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.2b0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: whisper_turbo_mlx-0.0.2b0.tar.gz
  • Upload date:
  • Size: 6.3 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.2b0.tar.gz
Algorithm Hash digest
SHA256 9d215b735c7434eda2dcf7cbc3fa8260f0d7e95ba9b73767a73da821cd6bfa6c
MD5 eb70260d7cab3820611bdc3878a25889
BLAKE2b-256 9a90a6238d122cea508c645c6fc9f844d048633f89a6d7495416ca9e9c90d8d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for whisper_turbo_mlx-0.0.2b0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c88736dc36e2ebc00e94f3b304656687ab003dbb65f5dedee8fb742893945f9
MD5 0c3746958571dd013a92ded30a606af0
BLAKE2b-256 5216329c5fe32345eaa294c5c4ddc265e3fd595d41fa808239c46564cca5c1f4

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