Local, offline Python toolkit that combines speech-to-text, text-to-speech, voice cloning and conversion, music generation, and audio cleanup in one CLI and GUI.
Blaizzy/mlx-audio
A Python library for text-to-speech, speech-to-text and speech-to-speech models running natively on Apple Silicon via the MLX framework.
Open-source alternative to:ElevenLabs
Otter.ai
- Stars
- 8,088
- Forks
- 765
- Open issues
- 96
- Last commit
- yesterday
What is it?
MLX-Audio is a Python library for running audio models on Apple Silicon Macs using Apple's MLX framework. It covers text-to-speech (TTS), speech-to-text (STT), speech-to-speech (STS) and music generation, and loads many community-converted models from Hugging Face through a single command-line tool and Python API.
The library ships with a CLI (mlx_audio.tts.generate) for quick synthesis, with options for streaming, playback, voice selection and joining multiple segments. Models expose a Python interface for generation, voice cloning and, for some models, word-level timestamps or speaker diarization. A convert script handles quantization to 3- to 8-bit formats and bfloat16 conversion.
It also includes an OpenAI-compatible REST server with /v1/audio/speech and /v1/audio/transcriptions endpoints, plus a web interface. Saving to MP3, FLAC, OGG or Opus requires ffmpeg; WAV works without it. A separate Swift package covers iOS and macOS.
Key features
- 01Text-to-speech, speech-to-text, speech-to-speech and music generation models on MLX
- 02Command-line tool and Python API for loading models from Hugging Face
- 03Voice cloning and voice selection for supported TTS models
- 04Streaming audio output and word-level alignment for some models
- 05OpenAI-compatible REST server for speech and transcription endpoints
- 06Quantization and dtype conversion scripts (3 to 8 bit, bfloat16, MXFP formats)
Use cases
- Generating speech locally on a Mac without sending text to a cloud API
- Transcribing meetings or dictation on Apple Silicon with speaker labels
- Running a local OpenAI-style speech endpoint for an app under development
- Removing background noise or separating speakers from recordings
Quick start
- 1
Install the package with pip
pip install mlx-audio - 2
Generate speech from the command line
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello, world!' --voice Vivian
Things to know
- Runs natively only on Apple Silicon Macs because it is built on the MLX framework.
- Released under the MIT license, so no copyleft obligations apply.
Topics
FAQ
- What is mlx-audio?
- A Python library for text-to-speech, speech-to-text and speech-to-speech models running natively on Apple Silicon via the MLX framework. MLX-Audio is a Python library for running audio models on Apple Silicon Macs using Apple's MLX framework. It covers text-to-speech (TTS), speech-to-text (STT), speech-to-speech (STS) and music generation, and loads many community-converted models from Hugging Face through a single command-line tool and Python API.
- Is mlx-audio free to use? What license does it have?
- mlx-audio is open source under the MIT license. Check the license terms before using it in commercial products.
- Is mlx-audio still maintained?
- Actively maintained. The last commit to mlx-audio was on Oct 21, 2026.
- What can I use mlx-audio for?
- Generating speech locally on a Mac without sending text to a cloud API Transcribing meetings or dictation on Apple Silicon with speaker labels Running a local OpenAI-style speech endpoint for an app under development Removing background noise or separating speakers from recordings
- How do I install mlx-audio?
- Install the package with pip: pip install mlx-audio Generate speech from the command line: mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello, world!' --voice Vivian
- Where can I get mlx-audio?
- The source code and installation instructions are on GitHub: https://github.com/Blaizzy/mlx-audio
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
VoxCPM2 is an open-source, tokenizer-free text-to-speech model supporting 30 languages, voice design from text descriptions, and voice cloning from short reference clips.
Open-source text-to-speech system with voice cloning, natural-language emotion control and multi-speaker generation, built on LLM-style models.
Open-source text-to-speech model family by Resemble AI, with voice cloning from a short reference clip across English and many other languages.
Open-source text-to-speech library whose KittenTTS 2 model clones voices from 5 seconds of audio and runs in real time on a CPU.
Open-source text-to-speech system using flow matching with a Diffusion Transformer, supporting zero-shot voice cloning from a short reference audio.