Skip to main content

Whisper Turbo in MLX

Project description

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.

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_turbo_mlx-0.0.2a0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

whisper_turbo_mlx-0.0.2a0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file whisper_turbo_mlx-0.0.2a0.tar.gz.

File metadata

  • Download URL: whisper_turbo_mlx-0.0.2a0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for whisper_turbo_mlx-0.0.2a0.tar.gz
Algorithm Hash digest
SHA256 1b71c542c7cf32152e94fee61b80f098dc80fb9f3ddbf20d599450ab92fc0f44
MD5 713edb3cb736a2651db5e43f065683f1
BLAKE2b-256 39d1905ea919750ca69d032da152a47d44d1da5d717ca8cf367a99d060b0bd9c

See more details on using hashes here.

File details

Details for the file whisper_turbo_mlx-0.0.2a0-py3-none-any.whl.

File metadata

File hashes

Hashes for whisper_turbo_mlx-0.0.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 da0c0234343d4c573cb2bf531bc7e727f449adc12b0d1a44e4c76ef15609508f
MD5 35d51d8a5071f03302226f378b3f6aca
BLAKE2b-256 f9f1820a23e8e49672161ab233ff3daf21414bef6fa54a67830d6e724b1897ae

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