Giter Site home page Giter Site logo

mrluyao / whisper-ctranslate2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from softcatala/whisper-ctranslate2

0.0 0.0 0.0 50 KB

Whisper command line client compatible with original OpenAI client based on CTranslate2.

License: MIT License

Python 99.54% Makefile 0.46%

whisper-ctranslate2's Introduction

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
  • Ease 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.

CTranslate2 specific options

On top of the OpenAI Whisper command line options, there are some specific options provided by CTranslate2 .

--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_INDEX ...]

Device IDs where to place this model on

--vad_filter VAD_FILTER

Enable the voice activity detection (VAD) to filter out parts of the audio without speech. This step is using the Silero VAD model https://github.com/snakers4/silero-vad.

--vad_min_silence_duration_ms VAD_MIN_SILENCE_DURATION_MS

When vad_filter is enabled, audio segments without speech for at least this number of milliseconds will be ignored.

Whisper-ctranslate2 specific options

On top of the OpenAI Whisper and CTranslate2, whisper-ctranslate2 provides some additional specific options:

--print-colors 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 [email protected]

whisper-ctranslate2's People

Contributors

jordimas avatar mayeaux avatar mrluyao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.