Repolode
Blaizzy

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:ElevenLabsOtter.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. 1

    Install the package with pip

    pip install mlx-audio
  2. 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