MLX-native speech library for Apple Silicon.
Project description
mlx-speech
[!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.
| Alias | Type | Description |
|---|---|---|
fish-s2-pro |
TTS | Fish S2 Pro — dual-AR TTS, voice cloning, emotion tags |
vibevoice |
TTS | VibeVoice Large — hybrid LLM+diffusion TTS, voice cloning |
longcat |
TTS | LongCat AudioDiT — flow-matching diffusion TTS |
moss-local |
TTS | OpenMOSS TTS Local — local-attention multi-VQ TTS |
moss-ttsd |
TTS | OpenMOSS TTS Delay — delay-pattern dialogue TTS |
moss-sound-effect |
TTS | OpenMOSS Sound Effect — text-to-sound-effect generation |
step-audio |
TTS | Step-Audio-EditX — voice cloning + audio editing |
cohere-asr |
ASR | Cohere Transcribe — multilingual ASR |
Requirements
- Apple Silicon Mac (M1 or later)
- Python 3.13+
Installation
pip install mlx-speech
Quick Start
Models download automatically from HuggingFace on first use.
Python API:
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("cohere-asr")
result = asr.generate("audio.wav")
print(result.text)
# List available models
mlx_speech.tts.list_models()
mlx_speech.asr.list_models()
CLI:
# Generate speech
mlx-speech tts --model fish-s2-pro --text "Hello!" -o output.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
# Discover models
mlx-speech tts --list-models
mlx-speech asr --list-models
mlx-speech --help
Local model paths work too:
mlx-speech tts --model models/fish_s2_pro/mlx-int8 --text "Hello!" -o output.wav
Note: The
mlx-speechCLI 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 inscripts/directly. Each model family has a corresponding script with the full inference surface documented indocs/.
Models
Pre-converted MLX weights are on Hugging Face under appautomaton.
Use mlx_speech.tts.load("alias") or mlx_speech.tts.load("appautomaton/repo-name") to load them.
| Alias | HF Repo | Quant |
|---|---|---|
fish-s2-pro |
fishaudio-s2-pro-8bit-mlx | int8 |
vibevoice |
vibevoice-mlx | int8 |
longcat |
longcat-audiodit-3.5b-8bit-mlx | int8 |
moss-local |
openmoss-tts-local-mlx | int8 |
moss-ttsd |
openmoss-ttsd-mlx | int8 |
moss-sound-effect |
openmoss-sound-effect-mlx | 4-bit |
step-audio |
step-audio-editx-8bit-mlx | int8 |
cohere-asr |
cohere-asr-mlx | int8 |
Conversion
Convert from upstream source weights:
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/cohere_asr.py
Model Guides
Each family has a doc covering behavior, flags, and known limitations:
- Fish S2 Pro
- LongCat AudioDiT
- MossTTSLocal
- MOSS-TTSD
- MOSS-SoundEffect
- VibeVoice
- Step-Audio-EditX
- CohereASR
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlx_speech-0.4.0.tar.gz.
File metadata
- Download URL: mlx_speech-0.4.0.tar.gz
- Upload date:
- Size: 196.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8c231c1f652c183f38fe7215ed1153c0f0a66e3362a89880e82861f2d2dcf0
|
|
| MD5 |
e699b78ab8a88b42def5a4ad97c5f391
|
|
| BLAKE2b-256 |
399220d1da381c4448e33e7b9d3c3d91c27f37fad90a1b238b4b2e191bdd7167
|
Provenance
The following attestation bundles were made for mlx_speech-0.4.0.tar.gz:
Publisher:
publish.yml on appautomaton/mlx-speech
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlx_speech-0.4.0.tar.gz -
Subject digest:
0e8c231c1f652c183f38fe7215ed1153c0f0a66e3362a89880e82861f2d2dcf0 - Sigstore transparency entry: 1279875645
- Sigstore integration time:
-
Permalink:
appautomaton/mlx-speech@fba80aae7965ce322b8dd4e3374db5dcaabf103e -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/appautomaton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fba80aae7965ce322b8dd4e3374db5dcaabf103e -
Trigger Event:
push
-
Statement type:
File details
Details for the file mlx_speech-0.4.0-py3-none-any.whl.
File metadata
- Download URL: mlx_speech-0.4.0-py3-none-any.whl
- Upload date:
- Size: 255.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea471e90806f0a987d27e70e8462bfd88a91fb9bfe584fc1e917c5ab78626328
|
|
| MD5 |
5b17fa2a556fb5ea9a290e93946baaf2
|
|
| BLAKE2b-256 |
c5caeeb0f4498771e8114b25499d5c52ddae9d18ea3f1d156a038fa33baa433d
|
Provenance
The following attestation bundles were made for mlx_speech-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on appautomaton/mlx-speech
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlx_speech-0.4.0-py3-none-any.whl -
Subject digest:
ea471e90806f0a987d27e70e8462bfd88a91fb9bfe584fc1e917c5ab78626328 - Sigstore transparency entry: 1279875661
- Sigstore integration time:
-
Permalink:
appautomaton/mlx-speech@fba80aae7965ce322b8dd4e3374db5dcaabf103e -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/appautomaton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fba80aae7965ce322b8dd4e3374db5dcaabf103e -
Trigger Event:
push
-
Statement type: