Skip to main content

mlx-speech

PyPI Downloads Hugging Face Python 3.13+ License: MIT Platform Project page

[!NOTE] This project wouldn't exist without the inspiration and generous support of the incredible community at linux.do.

Local speech synthesis, editing, and transcription on Apple Silicon, running pure MLX. No cloud, no PyTorch.

mlx-speech is an App Automaton project. Project page: appautomaton.github.io/mlx-speech. The appautomaton org hosts the code on GitHub and the converted weights on Hugging Face.

Models

Pre-converted MLX weights are published under the App Automaton Hugging Face org, appautomaton, and download automatically on first use. Flat model repositories load by alias or full repo id — tts.load("fish-s2-pro") and tts.load("appautomaton/fishaudio-s2-pro-8bit-mlx") are equivalent. Shared multi-artifact repositories use an alias or an explicit artifact_subdir so the runtime never guesses a variant. Each model name links to a guide covering behavior, flags, and known limitations.

Text-to-speech

Alias Model Weights
fish-s2-pro Fish S2 Pro — dual-AR TTS, voice cloning, emotion tags int8
vibevoice VibeVoice Large — hybrid LLM+diffusion TTS, voice cloning int8
longcat LongCat AudioDiT — flow-matching diffusion TTS int8
moss-local OpenMOSS TTS Local — local-attention multi-VQ TTS int8
moss-ttsd MOSS-TTSD — delay-pattern dialogue TTS int8
moss-sound-effect OpenMOSS Sound Effect — text-to-sound-effect generation 4-bit
step-audio Step-Audio-EditX — voice cloning, audio editing int8
dramabox DramaBox — Resemble flow-matching diffusion TTS, 48 kHz stereo bf16¹
dots-tts-soar dots.tts SOAR — continuous autoregressive flow-matching TTS and voice cloning int8 + base
dots-tts-mf dots.tts MeanFlow — distilled continuous autoregressive TTS and voice cloning int8 + base

Speech-to-text

Alias Model Weights
cohere-asr Cohere Transcribe — multilingual ASR int8
qwen3-asr-1.7b Qwen3-ASR-1.7B — English, Chinese, and mixed Chinese/English ASR int8 · bf16
nemotron-asr-streaming NVIDIA Nemotron 3.5 ASR Streaming — cache-aware multilingual streaming across three stated quality tiers int8
IBM Granite Speech 4.0 1B — runs the original sharded checkpoint from a local path local checkpoint

¹ tts.load("dramabox") also pulls the Gemma 3 12B backbone text encoder automatically. Output is 48 kHz stereo. For advanced controls (cfg, steps, voice reference) use scripts/generate_dramabox.py. Optional denoise_ref=True cleans a noisy voice reference with the pure-MLX RE-USE / SEMamba enhancer (off by default; NSCLv1 non-commercial weights). See docs/dramabox.md.

Installation

Requires an Apple Silicon Mac (M1 or later) and Python 3.13+.

pip install mlx-speech

Quick Start

Python:

import mlx_speech

# Text-to-speech
model = mlx_speech.tts.load("fish-s2-pro")
result = model.generate("Hello from mlx-speech!")
# result.waveform: mx.array, result.sample_rate: int

# Voice cloning with emotion tags
result = model.generate(
    "[excited] This is amazing!",
    reference_audio="reference.wav",
    reference_text="Transcript of the reference audio.",
)

# Speech-to-text
asr = mlx_speech.asr.load("qwen3-asr-1.7b")
print(asr.generate("audio.wav").text)

# True cache-aware waveform streaming is available on Nemotron
nemotron = mlx_speech.asr.load("nemotron-asr-streaming")
session = nemotron.stream_session(language="en-US", att_context_size=(56, 3))

# Local checkpoint paths work anywhere an alias does
granite = mlx_speech.asr.load("models/ibm/granite_4_0_1b_speech/original")
print(granite.generate("audio.wav").text)

# Discover models
mlx_speech.tts.list_models()
mlx_speech.tts.list_models(detailed=True)  # includes shared-repo artifact paths
mlx_speech.asr.list_models()

CLI:

# Generate speech
mlx-speech tts --model fish-s2-pro --text "Hello!" -o output.wav

# Bounded waveform streaming with dots.tts
mlx-speech tts --model dots-tts-soar --text "Hello!" --stream -o streamed.wav

# Voice cloning with emotion tags
mlx-speech tts --model fish-s2-pro \
  --text "[whisper] Just between us..." \
  --reference-audio ref.wav \
  --reference-text "Transcript of reference." \
  -o cloned.wav

# Step Audio emotion editing
mlx-speech tts --model step-audio \
  --reference-audio input.wav \
  --reference-text "Transcript." \
  --edit-type emotion --edit-info happy \
  -o happy.wav

# Sound effect generation
mlx-speech tts --model moss-sound-effect \
  --text "rolling thunder with rainfall" \
  --duration-seconds 8 \
  -o thunder.wav

# Transcribe audio
mlx-speech asr --model cohere-asr --audio speech.wav
mlx-speech asr --model qwen3-asr-1.7b --audio speech.wav --language Chinese
mlx-speech asr --model nemotron-asr-streaming --audio speech.wav --language en-US

# Local checkpoint paths work anywhere an alias does
mlx-speech tts --model models/fish_s2_pro/mlx-int8 --text "Hello!" -o output.wav
mlx-speech asr --model models/ibm/granite_4_0_1b_speech/original --audio speech.wav

# Discover models
mlx-speech tts --list-models
mlx-speech asr --list-models
mlx-speech --help

Note: The mlx-speech CLI covers the common path — basic generation, voice cloning, and editing. For advanced controls (sampling temperature, top-p/k, diffusion steps, batch JSONL, duration tuning, etc.) use the scripts in scripts/ directly. Each model family has a corresponding script with the full inference surface documented in docs/.

Conversion

To convert upstream source weights yourself:

python scripts/convert/fish_s2_pro.py
python scripts/convert/longcat_audiodit.py
python scripts/convert/vibevoice.py
python scripts/convert/moss_local.py
python scripts/convert/moss_ttsd.py
python scripts/convert/moss_sound_effect.py
python scripts/convert/step_audio_editx.py
python scripts/convert/cohere_asr.py
python scripts/convert/qwen3_asr.py

Development

git clone https://github.com/appautomaton/mlx-speech.git
cd mlx-speech
uv sync
uv run pytest tests/unit/
uv run ruff check .
mlx-speech/
  src/mlx_speech/    library code
  scripts/           conversion, generation, eval, and audit entry points
  models/            local checkpoints (not in git)
  tests/             unit, checkpoint, runtime, integration tests
  docs/              model-family behavior guides

License

MIT — see LICENSE

Built and maintained by App Automaton.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlx_speech-0.5.0.tar.gz (400.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlx_speech-0.5.0-py3-none-any.whl (524.7 kB view details)

Uploaded Python 3

File details

Details for the file mlx_speech-0.5.0.tar.gz.

File metadata

  • Download URL: mlx_speech-0.5.0.tar.gz
  • Upload date:
  • Size: 400.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mlx_speech-0.5.0.tar.gz
Algorithm Hash digest
SHA256 635dc243e4db52d50ba97b6b83ef9709e0f9e4f35a1202cb3d2eeda5c39ad4b3
MD5 a9bc838504e7d714da868d287afe6c30
BLAKE2b-256 d031f44705383e360396580f32f8fd98d61462430f0ff73fb39bba2cc40e606b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlx_speech-0.5.0.tar.gz:

Publisher: publish.yml on appautomaton/mlx-speech

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mlx_speech-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mlx_speech-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 524.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mlx_speech-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8b6df537177c0e7d917f0adbd8b9338b949a9b9b365fdebcefa77e118ffe22a
MD5 f40ab4008a3d1540da8759b1dde7d97c
BLAKE2b-256 3a952c3ce334fdc09f7381d187aa798319adf333e554697db73e5225e2db8a30

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlx_speech-0.5.0-py3-none-any.whl:

Publisher: publish.yml on appautomaton/mlx-speech

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page