Skip to main content

Whisper command line client that uses CTranslate2

Project description

PyPI version PyPI downloads

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
image

To translate:

whisper-ctranslate2 inaguracio2011.mp3 --model medium --task translate
image

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:

image

Contact

Jordi Mas jmas@softcatala.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whisper-ctranslate2-0.1.2.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

whisper_ctranslate2-0.1.2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file whisper-ctranslate2-0.1.2.tar.gz.

File metadata

  • Download URL: whisper-ctranslate2-0.1.2.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for whisper-ctranslate2-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b0a90f210393df792c301a341bf4b516a7f7d1025dcf4bcee0c189b293d070a5
MD5 e7c8416efb72a625a0b5d0ebf8481222
BLAKE2b-256 a1ce977d18247b3b20587378ffcdf5adbbef3a36c137d3c138ae51ae53af81fa

See more details on using hashes here.

File details

Details for the file whisper_ctranslate2-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for whisper_ctranslate2-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fc9cbc5288572155fb07b865df97a74499a5b1db6317669f5b52a9ee0e611f37
MD5 629a7a09e540266b22e62c9d0757cd4b
BLAKE2b-256 af1bbbee4b0bbe628383c86cec7a3214fb200915dbb65ada70f2258e375fb5d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page