AI/TLDR

MLX-Audio

Speech generation and recognition running natively on Apple Silicon

Audio, Music & VoiceOpen source
Language
Python
License
MIT
$pip install mlx-audio

Overview

MLX-Audio is an audio-processing library built directly on Apple's MLX framework, so speech models run on the unified memory and GPU of an Apple Silicon Mac rather than through a CPU fallback or a remote API. It covers text-to-speech, speech-to-text, speech-to-speech and music generation behind one package.

The model coverage is broad and current. For TTS it supports Kokoro, Qwen3-TTS, OmniVoice, KittenTTS, Voxtral, MeloTTS, Ming Omni and KugelAudio among others; for STT, Whisper, Qwen3-ASR, Parakeet, VibeVoice-ASR and Voxtral Realtime; for speech-to-speech, SAM-Audio, DialogueSidon and the MossFormer2 enhancement model; plus MiniMax Music 3 for music. Models are pulled from Hugging Face by identifier, so trying a different voice or a quantised variant is a one-string change.

It is usable three ways: as a Python library, as a CLI for one-off generation, and as a local HTTP server with an optional web UI — which makes it a practical local backend for a voice app you do not want sending audio off the machine. It requires Python 3.10+, an Apple Silicon Mac (M1 through M4), and ffmpeg for MP3, FLAC, OGG, Opus and Vorbis encoding.

What it does

  • Text-to-speech, speech-to-text, speech-to-speech and music generation in one library
  • Runs natively on Apple Silicon through MLX, using the GPU and unified memory
  • Wide model support including Kokoro, Qwen3-TTS, Voxtral, Whisper, Parakeet, SAM-Audio and MiniMax Music 3
  • Models loaded by Hugging Face identifier, so swapping voices or quantisations is trivial
  • Three interfaces: Python API, CLI generation, and a local HTTP server with a web UI
  • MIT licensed

Getting started

Install from PyPI on an Apple Silicon Mac. Install ffmpeg too if you want compressed output formats.

Install the package

bashbash
pip install mlx-audio

Generate speech from Python

load_model takes a Hugging Face model id. generate yields results you read the audio off — swap the voice and speed per call.

pythonpython
from mlx_audio.tts.utils import load_model

model = load_model("mlx-community/Kokoro-82M-bf16")
for result in model.generate(
    text="Welcome to MLX-Audio!",
    voice="af_heart",
    speed=1.0,
):
    audio = result.audio

Or generate from the CLI

bashbash
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello, world!' --voice Vivian

Run the local server and web UI

Start the server, then bring up the UI in a second terminal.

bashbash
mlx_audio.server --host 0.0.0.0 --port 8000

# in another terminal
cd mlx_audio/ui
npm install && npm run dev

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it to run text-to-speech locally on a Mac with no per-character API bill and no audio leaving the machine
  • Reach for it to transcribe with Whisper or Parakeet on Apple Silicon at GPU speed rather than CPU
  • Reach for it as the speech backend for a local voice assistant, using the built-in HTTP server
  • Reach for it when comparing several TTS voices or models quickly, since each is a model-id change

How MLX-Audio compares

MLX-Audio alongside other open-source audio, music & voice tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Whisper★ 109kOpenAI's speech recognition model that transcribes and translates audio across many languages.
GPT-SoVITS★ 61.8kAn open-source WebUI that clones a voice from a short audio sample and turns text into speech, with zero-shot and few-shot fine-tuning.
VibeVoice★ 54.3kMicrosoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts.
Voicebox★ 54.3kLocal-first voice studio that clones a voice from a short sample, generates speech across seven TTS engines and 23 languages, handles system-wide dictation, and speaks for agents over MCP.
whisper.cpp★ 53.7kA dependency-free C/C++ port of Whisper built on ggml, running speech recognition on CPU, Metal, CUDA, Vulkan and NPUs from phones to servers.
Coqui TTS★ 46kA library of text-to-speech models including the multilingual XTTS voice-cloning model.
ChatTTS★ 39.8kChatTTS is an open-source text-to-speech model tuned for dialogue, with multi-speaker support and fine-grained control over laughter, pauses, and prosody.
MLX-Audio★ 7.9kSpeech generation and recognition running natively on Apple Silicon