Instructions to use mlx-community/Zonos-v0.1-transformer-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Zonos-v0.1-transformer-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Zonos-v0.1-transformer-bf16 mlx-community/Zonos-v0.1-transformer-bf16
- Zonos
How to use mlx-community/Zonos-v0.1-transformer-bf16 with Zonos:
# pip install git+https://github.com/Zyphra/Zonos.git import torchaudio from zonos.model import Zonos from zonos.conditioning import make_cond_dict model = Zonos.from_pretrained("mlx-community/Zonos-v0.1-transformer-bf16", device="cuda") wav, sr = torchaudio.load("speaker.wav") # 5-10s reference clip speaker = model.make_speaker_embedding(wav, sr) cond = make_cond_dict(text="Hello, world!", speaker=speaker, language="en-us") codes = model.generate(model.prepare_conditioning(cond)) audio = model.autoencoder.decode(codes)[0].cpu() torchaudio.save("sample.wav", audio, model.autoencoder.sampling_rate) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Zonos-v0.1-transformer (MLX, bf16)
Apple-Silicon MLX port of Zyphra/Zonos-v0.1-transformer โ an autoregressive transformer TTS over DAC codec tokens at 44.1 kHz, with zero-shot voice cloning, an 8-D emotion vector, and prosody controls (pitch, fmax, speaking-rate). Self-contained: no PyTorch, no multi-repo fetch.
Code: https://github.com/xocialize/zonos-mlx
Verification
Every component is numerically parity-tested against the PyTorch reference (CPU fp32):
| Component | Metric |
|---|---|
| AR backbone (GQA transformer) | rel err ~7e-7 |
| Conditioning + espeak G2P | rel err ~2e-7 |
| DAC decode | SI-SDR 108 dB |
| DAC encode | exact integer code match |
| Speaker encoder (ResNet293) | rel err ~1.2e-5 |
| Duration (speaking_rate) | monotonic |
| Emotion (8-D vector) | content + energy change, speaker stable |
Usage
import mlx.core as mx, soundfile as sf
from zonos_mlx.pipeline_mlx import ZonosPipeline
tts = ZonosPipeline.from_pretrained_mlx("mlx-community/Zonos-v0.1-transformer-bf16")
# voice cloning from a 16 kHz mono reference clip:
ref = mx.array(...) # (N,) float32 @ 16 kHz
spk = tts.make_speaker_embedding(ref)
wav = tts.generate("Hello from MLX.", speaker=spk, speaking_rate=15.0,
emotion=[0.0,0,0,0,0,0,0.1,0.9]) # happy..neutral 8-D
sf.write("out.wav", mx.array(wav)[0], tts.sampling_rate)
License & attribution
Apache-2.0, inherited from the upstream Zonos model and code (Zyphra). Bundled third-party components, all redistributable:
- DAC (Descript Audio Codec) โ
descript/dac_44khz, via HF transformersDacModel. - Speaker embedding โ ResNet293 (SimAM/ASP) + LDA from
Zyphra/Zonos-v0.1-speaker-embedding. - espeak-ng phonemizer frontend (GPL-3.0 tool, invoked at runtime โ not redistributed here).
Please cite Zyphra's Zonos for the model weights and architecture.
- Downloads last month
- 66
Model size
2B params
Tensor type
BF16
ยท
Hardware compatibility
Log In to add your hardware
Quantized
Model tree for mlx-community/Zonos-v0.1-transformer-bf16
Base model
Zyphra/Zonos-v0.1-transformer