Text-to-Speech
Safetensors
Chatterbox
MLX
mlx-audio
speech
speech generation
voice cloning
tts
6-bit
Instructions to use mlx-community/chatterbox-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/chatterbox-6bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/chatterbox-6bit --local-dir chatterbox-6bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Update README.md
Browse files12234567891011121314151617181920212223242526272829303132333435367373839101112404142431444451646474849505119525354555657585960616263642265666768242526272829303132336970717273747576773678798081828384854243444546478687888990919293949596979899100101102103104---library_name: mlx-audiolicense: apache-2.0language: - ar - da - de - el - en - es - fi - fr - he - hi - it - ja - ko - ms - nl - no - pl - pt - ru - sv - sw - tr - zhbase_model:- ResembleAI/chatterboxpipeline_tag: text-to-speechlibrary_name: mlx-audiotags:- text-to-speech- speech- speech generation- voice cloning- mlxpipeline_tag: text-to-speech- tts---
# litmudoc/Chatterbox-Multilingual-MLX-v2-fp16
This model was converted to MLX format from [ResembleAI/chatterbox](https://huggingface.co/ResembleAI/chatterbox) using [mlx-audio](https://github.com/Blaizzy/mlx-audio) version **0.2.10**.# mlx-community/chatterbox-6bitThis model was converted to MLX format from [`ResembleAI/chatterbox`](https://huggingface.co/ResembleAI/chatterbox) using mlx-audio version **0.2.7**.Refer to the [original model card](https://huggingface.co/ResembleAI/chatterbox) for more details on the model.
**Note:** This model requires the S3Tokenizer weights from [mlx-community/S3TokenizerV2](https://huggingface.co/mlx-community/S3TokenizerV2), which will be downloaded automatically.## Use with mlx
## Use with mlx-audio```bashpip install -U mlx-audio```
### CLI Example:```bashpip install -U git+https://github.com/litmudoc/mlx-audio.git@main mlx-audiopython -m mlx_audio.tts.generate --model mlx-community/chatterbox-6bit --text "Hello, this is a test."```### Python Example:```pythonfrom mlx_audio.tts.utils import load_modelfrom mlx_audio.tts.generate import generate_audiomodel = load_model("mlx-community/chatterbox-6bit")generate_audio( model=model, text="Hello, this is a test.", file_prefix="test_audio",)```
### Command line### Voice Cloning: ```pythonfrom mlx_audio.tts.generate import generate_audio
```bashcurl -L -o ko.wav https://huggingface.co/litmudoc/Chatterbox-Multilingual-MLX-v2-fp16/blob/main/ko.wav
mlx_audio.tts.generate \ --model litmudoc/Chatterbox-Multilingual-MLX-v2-fp16 \ --text ", μ§λλ¬ μ°λ¦¬λ μ νλΈ μ±λμμ μ΄μμ΅ μ‘°νμλΌλ μλ‘μ΄ μ΄μ νμ λλ¬νμ΅λλ€." \ --lang_code ko \ --ref_audio ko.wav \ --ref_text "μ°λ¦¬λ μ λ§λ‘ νλ¦ν νΈν
μ 묡μμ§λ§, κ·Έλλ ν볡νλ€." \ --verbose --playgenerate_audio( text="Hello, this is a test of Chatterbox TTS.", model="mlx-community/chatterbox-6bit", ref_audio="path_to_file.wav", ref_text="Text transcript", # Optional file_prefix="vc_output",)```
### Python## Multilingual Quickstart
Generate speech in 23 languages by specifying the `lang_code` parameter. The model automatically handles pronunciation, intonation, and language-specific phonemes.
```pythonfrom mlx_audio.tts.generate import generate_audio
generate_audio( text=", μ§λλ¬ μ°λ¦¬λ μ νλΈ μ±λμμ μ΄μμ΅ μ‘°νμλΌλ μλ‘μ΄ μ΄μ νμ λλ¬νμ΅λλ€.", model="litmudoc/Chatterbox-Multilingual-MLX-v2-fp16", lang_code="ko", ref_audio="ko.wav", ref_text="μ°λ¦¬λ μ λ§λ‘ νλ¦ν νΈν
μ 묡μμ§λ§, κ·Έλλ ν볡νλ€.", file_prefix="output", text="OlΓ‘, tudo bem?", model="mlx-community/chatterbox-6bit", lang_code="pt", file_prefix="multilingual_output",)```
### Supported Languages
| Code | Language | Code | Language | Code | Language ||------|------------|------|------------|------|------------|| `ar` | Arabic | `he` | Hebrew | `no` | Norwegian || `da` | Danish | `hi` | Hindi | `pl` | Polish || `de` | German | `it` | Italian | `pt` | Portuguese || `el` | Greek | `ja` | Japanese | `ru` | Russian || `en` | English | `ko` | Korean | `sv` | Swedish || `es` | Spanish | `ms` | Malay | `sw` | Swahili || `fi` | Finnish | `nl` | Dutch | `tr` | Turkish || `fr` | French | `zh` | Chinese | | |README.md+81-26