Whisper command line client that uses CTranslate2
Project description
Introduction
Whisper command line client compatible with original OpenAI client based on CTranslate2.
It uses CTranslate2 and Faster-whisper Whisper implementation that is up to 4 times faster than openai/whisper for the same accuracy while using less memory.
Goals of the project:
- Provide an easy way to use the CTranslate2 Whisper implementation
- Easy the migration for people using OpenAI Whisper CLI
Installation
Just type:
pip install -U whisper-ctranslate2
Alternatively, the following command will pull and install the latest commit from this repository, along with its Python dependencies:
pip install git+https://github.com/jordimas/whisper-ctranslate2.git
Usage
Same command line that OpenAI whisper.
To transcribe:
whisper-ctranslate2 inaguracio2011.mp3 --model medium
To translate:
whisper-ctranslate2 inaguracio2011.mp3 --model medium --task translate
Additionally using:
whisper-ctranslate2 --help
All the supported options with their help are shown.
Whisper-ctranslate2 specific options
On top of the OpenAI Whisper command line options, there are some specific CTranslate2 options.
--compute_type {default,auto,int8,int8_float16,int16,float16,float32}
Type of quantization to use. On CPU int8 will give the best performance.
--model_directory MODEL_DIRECTORY
Directory where to find a CTranslate Whisper model, for example a fine-tunned Whisper model. The model should be in CTranslate2 format.
--device_index
Device IDs where to place this model on
--print-colors
Adding the --print_colors True
argument will print the transcribed text using an experimental color coding strategy based on whisper.cpp to highlight words with high or low confidence:
Contact
Jordi Mas jmas@softcatala.org
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for whisper-ctranslate2-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c297432e7719d045e1bb3acb059e7a3a7747967a2082345e2c45169a19630221 |
|
MD5 | efee9ed18daec090055b6f71f8ca6437 |
|
BLAKE2b-256 | dc9330e929ab43908a52a5e61bfbad078b9d1e0d55f339429378096c277e6dd2 |
Hashes for whisper_ctranslate2-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abdb9cb73cce4badae36f84cb7e37158d8cfd38d77f1cf3ee7d015ed9e1c1ae |
|
MD5 | 31e0d49a67349de18e4564a917dd84fa |
|
BLAKE2b-256 | 7c871dadee2eaf5d7d065915a753bf41fa22036c82f5778f24435c6ea8345126 |