MLX-Audio: Run Audio Models on Apple Silicon

MLX-Audio, built on MLX, runs text-to-speech, speech-to-text, speech-to-speech and music generation models on Apple Silicon.

Verified

Core facts

Read by a script from the official API, not rewritten by a model.

License
MIT
Languages
Python
Maintainer
Neywa-Labs
Verified

What it is

MLX-Audio runs audio models on Apple Silicon. It covers text-to-speech, speech-to-text, speech-to-speech, and music generation. It is built on MLX. MLX-Audio uses the MIT License.

Main features

  1. The project's feature list includes inference optimized for Apple Silicon (M series chips).

  2. The project's feature list includes multilingual support across models.

  3. The project's feature list includes voice customization and cloning capabilities.

  4. The project's feature list includes adjustable speech speed control.

  5. The project's feature list includes an interactive web interface with 3D audio visualization.

  6. The project's feature list includes an OpenAI-compatible REST API.

  7. MLX-Audio includes a web interface and an OpenAI-compatible API.

Getting started

  1. By default, when generation yields multiple segments, mlx-audio saves numbered files.

  2. Using the join-audio option saves one combined file instead of those numbered files.

  3. When using the stream option, adding the save option writes the streamed audio to disk.

  4. The project says that quantization with the convert script reduces model size and improves performance.

From the README · bash
pip install -U mlx-audio
From the README · bash
uv tool install --force mlx-audio --prerelease=allow
From the README · bash
uv tool install --force git+https://github.com/Blaizzy/mlx-audio.git --prerelease=allow
From the README · bash
git clone https://github.com/Blaizzy/mlx-audio.git
cd mlx-audio
pip install -e ".[dev, server]"
From the README · bash
# Basic TTS generation
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello, world!' --voice Vivian

# With a different voice and language hint
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Welcome to MLX-Audio!' --voice Ryan --lang_code English

# Play audio immediately
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello!' --voice Vivian --play

# Save to a specific directory
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello!' --voice Vivian --output_path ./my_audio

# Stream audio during generation
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello!' --voice Vivian --stream

# Stream audio during generation and save it to disk
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text 'Hello!' --voice Vivian --stream --save

# Join multiple generated segments into one file
mlx_audio.tts.generate --model mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit --text $'Hello!\nHow are you?' --voice Vivian --join_audio
From the README · python
from mlx_audio.tts.utils import load_model

# Load model
model = load_model("mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit")

# Generate speech
for result in model.generate(
    "Hello from MLX-Audio!",
    voice="Vivian",
    lang_code="English",
):
    print(f"Generated {result.audio.shape[0]} samples")
    # result.audio contains the waveform as mx.array

Who it is for

The project lists multiple model architectures for text-to-speech, speech-to-text, speech-to-speech, and music generation. The project lists quantization support, including 3-bit, 4-bit, 6-bit, 8-bit, and more. The project lists a Swift package for iOS/macOS integration.

MLX-Audio requires Python 3.10 or newer. MLX-Audio requires an Apple Silicon Mac (M1/M2/M3/M4). MLX-Audio requires the MLX framework.

ffmpeg is required for MP3, FLAC, OGG, Opus, and Vorbis audio encoding. WAV format works without ffmpeg. Kokoro is a multilingual text-to-speech model with 54 voice presets.

Kokoro requires installing misaki for text processing. OmniVoice is a zero-shot multilingual text-to-speech model for at least 646 languages, with voice cloning, batch generation, pronunciation controls, and nonverbal tags. VibeVoice-ASR is Microsoft's 9B parameter speech-to-text model with speaker diarization and timestamps.

VibeVoice-ASR supports long-form audio, up to 60 minutes, and outputs structured JSON. Parakeet v3 supports 25 European languages. Voxtral TTS is Mistral's 4B multilingual text-to-speech model with 20 voice presets across 9 languages.

KugelAudio requires about 17GB of memory (7B parameters in bfloat16). Pre-encoded voice presets (voice cloning) are not yet available in the upstream KugelAudio model. MedASR is a specialized model for medical terms and dictation.

SAM-Audio separates specific sounds from audio using text prompts. MossFormer2 removes noise from speech recordings.

Sources

This page is written from the official sources below. Open them to check the original text.

Verified ·

This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.