Local speech recognition & synthesis

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.

Requirements and key details
  • Synthesis, recognition, speech conversion and music share one package.
  • The CLI and server commands stay the same across models.
  • Six of its models list Korean.
  • An OpenAI-style API lets other apps connect.

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.

A sunlit desk with a small speaker, a handheld recorder and a studio microphone side by side
Comparison starts from one sentence under one condition, since only a fixed input exposes the difference.

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.

Options worth knowing
OptionWhat happens
--modelPicks the model
--voiceSelects a voice
--lang_codeHints the language
--join_audioMerges segments into one file
--streamStreams 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.

Models that list Korean
Model nameKindNote
Qwen3-TTSTTSVoice design
Ming-3.0 TTS TinyTTSMoE with cloning
Ming-3.0 TTS DenseTTS0.5B, emotion and dialect
Higgs Audio v2TTSFive languages
Qwen3-ASRSTTTranscription
Qwen3-ForcedAlignerAlignmentSubtitle 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.

One sentence, several models
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])
A desk with a monitor showing an audio waveform, an audio interface and headphones
Generating the same sentence across models and stacking the waveforms side by side makes the difference visible.

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.

Starting the server
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
Server routes
RouteWhat happensPayload
/v1/audio/speechText to speechJSON
/v1/audio/transcriptionsSpeech to textFile

A web view ships too, but it starts separately from the server rather than with a single command.

A shelf holding a Mac mini, headphones, an external drive and document folders
Once served, the browser and other apps share one model instead of repeating the install per app.

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

  1. API — A defined interface that lets other code call a program’s functions.

    Back to the text
  2. MLX — Apple’s machine-learning framework, which runs models using memory shared by the CPU and GPU on Apple Silicon.

    Back to the text
  3. CLI — Short for Command-Line Interface: operating a program by entering commands in a terminal.

    Back to the text
  4. CUDA — A software platform for general-purpose computing on NVIDIA GPUs.

    Back to the text
  5. ROCm — 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 text
  6. Speaker diarization — The task of dividing a recording into who-spoke-when segments and labeling them by speaker.

    Back to the text
  7. Pipeline — 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.