Local speech recognition & synthesis
Last updated
mlx-audio: TTS and STT from a single install
A Mac audio toolkit where you swap only the model
mlx-audio handles speech generation and transcription on a Mac in one package. The command stays the same when you change models, which makes one-sentence comparisons easy, and its server exposes an OpenAI-style API1.
Text and audio in one package
mlx-audio is an audio library on top of Apple's MLX2. Text in gives you speech, speech in gives you text, and synthesis, recognition, speech-to-speech and music generation all live in one package.
Models do not each bring their own command: one CLI3 and one server stay fixed while the model value changes. Comparing models on the same sentence needs no new code.
It is Mac-only: it runs on Apple Silicon, with no CUDA4 or ROCm5 path.
It runs on MLX, so it is tuned for Apple Silicon: a Python package whose arithmetic MLX performs.

Install it and generate one sentence
Install with pip. Saving to mp3 or FLAC also needs ffmpeg; wav alone does not.
One command takes a model, a sentence and a voice. Multiple sentences produce numbered files, and --join_audio merges them.
With --stream the audio arrives while it is generated. Use --play to hear it immediately, and add --save to keep the streamed result.
| Option | What happens |
|---|---|
| --model | Picks the model |
| --voice | Selects a voice |
| --lang_code | Hints the language |
| --join_audio | Merges segments into one file |
| --stream | Streams chunks as they are generated |
Korean support depends on the model
Supported languages vary by model, and six of the listed ones name Korean. Choosing by name alone can land you on an English-only model.
Cloning splits into models that need a reference voice and models that do not. If cloning is the goal, start from the models that ship it.
| Model name | Kind | Note |
|---|---|---|
| Qwen3-TTS | TTS | Voice design |
| Ming-3.0 TTS Tiny | TTS | MoE with cloning |
| Ming-3.0 TTS Dense | TTS | 0.5B, emotion and dialect |
| Higgs Audio v2 | TTS | Five languages |
| Qwen3-ASR | STT | Transcription |
| Qwen3-ForcedAligner | Alignment | Subtitle timing |
Run one sentence through several models
In Python you load a model and pass the text. Changing only the model name runs another model on the same code.
Each switch downloads new weights. The first run spends time on the download and later runs use the local cache.
The README publishes no per-model speed figures, so compare output length and memory footprint, then decide by listening.
from mlx_audio.tts.utils import load_model
for name in [
"mlx-community/Qwen3-TTS-12Hz-0.6B-CustomVoice-8bit",
"mlx-community/Ming-3.0-tts-tiny-8bit",
]:
model = load_model(name)
for chunk in model.generate("같은 문장을 읽어 봐요.", lang_code="Korean"):
print(name, chunk.audio.shape[0])
Serve it and other apps can use it
Starting the server opens OpenAI-style routes, so an app already wired to that shape only needs a new base URL.
Synthesis takes JSON with the text; transcription takes an audio file as multipart. One server handles both.
mlx_audio.server --host 0.0.0.0 --port 8000
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{"model": "mlx-community/Kokoro-82M-bf16", "input": "안녕하세요", "voice": "af_heart"}' \
--output speech.wav| Route | What happens | Payload |
|---|---|---|
| /v1/audio/speech | Text to speech | JSON |
| /v1/audio/transcriptions | Speech to text | File |
A web view ships too, but it starts separately from the server rather than with a single command.

Transcription and subtitle timing come along
The recognition side ships Whisper variants, Qwen3-ASR and Parakeet, in the same package as synthesis with no second install.
The aligner matches sentences to audio at timestamp level, which is where subtitle start times come from.
Diarization6 models are listed too, so a meeting recording with several speakers can be split by speaker.
A Swift package lets an iOS or macOS app call it directly without going through the server.
Quantization trims the memory
Many models are published at 3, 4, 6 and 8 bits, so changing the suffix on the model name reruns the same sentence at another width.
Lower bits need less memory and shift the sound. Start at 8-bit for dialogue and 4-bit for narration.
What the package does not decide for you
There is no baseline for quality or speed; conditions differ per model, so compare the same sentence yourself.
Without ffmpeg only wav is written, so install it first if the pipeline7 needs mp3.
Model licences differ per repository, so check the model card before commercial use.
Terminology notes
API — A defined interface that lets other code call a program’s functions.
Back to the textMLX — Apple’s machine-learning framework, which runs models using memory shared by the CPU and GPU on Apple Silicon.
Back to the textCLI — Short for Command-Line Interface: operating a program by entering commands in a terminal.
Back to the textCUDA — A software platform for general-purpose computing on NVIDIA GPUs.
Back to the textROCm — AMD’s software platform for AI and high-performance computing on GPUs. Support depends on the combination of GPU, operating system, driver, and framework versions.
Back to the textSpeaker diarization — The task of dividing a recording into who-spoke-when segments and labeling them by speaker.
Back to the textPipeline — A sequence of processing stages from input to output. Different models or tools may be used at each stage.
Back to the text
Frequently asked questions
- What should you check first in this article?
- mlx-audio handles speech generation and transcription on a Mac in one package. The command stays the same when you change models, which makes one-sentence comparisons easy, and its server exposes an OpenAI-style API.
- How much memory does it need?
- Lower bits need less memory and shift the sound. Start at 8-bit for dialogue and 4-bit for narration.
- Where can you check the conditions and sources?
- Model licences differ per repository, so check the model card before commercial use.
Read next
Local speech recognition & synthesis
LFM3-Audio-2B: a 1 GB model that listens and speaks
Local speech recognition & synthesis
Compare local TTS models: languages, hardware and speed evidence
Local speech recognition & synthesis
Fish Audio Drama 3 int4: 41.5 GB down to 22 GB
Local speech recognition & synthesis
What is Qwen3-TTS? Turn text into speech on your computer
