Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.87 KB

README.md

File metadata and controls

55 lines (35 loc) · 1.87 KB

WTM (Whisper Turbo MLX)

This repository provides a fast and lightweight implementation of the Whisper model using MLX, all contained within a single file of under 300 lines, designed for efficient audio transcription.

Alt text

Installation

brew install ffmpeg
git clone https://github.com/JosefAlbers/whisper-turbo-mlx.git
cd whisper-turbo-mlx
pip install -e .

Quick Start

To transcribe an audio file:

wtm test.wav

To use the library in a Python script:

>>> from whisper_turbo import transcribe
>>> transcribe('test.wav', any_lang=True)

Quick Parameter

The quick parameter allows you to choose between two transcription methods:

  • quick=True: Utilizes a parallel processing method for faster transcription. This method may produce choppier output but is significantly quicker, ideal for situations where speed is a priority (e.g., for feeding the generated transcripts into an LLM to collect quick summaries on many audio recordings).

  • quick=False (default): Engages a recurrent processing method that is slower but yields more faithful and coherent transcriptions (still faster than other reference implementations).

You can specify this parameter when calling the transcribe function:

wtm --quick=True
>>> transcribe('test.wav', quick=True)

Acknowledgements

This project builds upon the reference MLX implementation of the Whisper model. Great thanks to the contributors of the MLX project for their exceptional work and inspiration.

Contributing

Contributions are welcome! Feel free to submit issues or pull requests.