File size: 2,486 Bytes
db087ba 0d2cf05 bf2c7f6 0d2cf05 db087ba 0d2cf05 db087ba 0d2cf05 db087ba 0d2cf05 bf2c7f6 0d2cf05 bf2c7f6 0d2cf05 db087ba 0d2cf05 db087ba 0d2cf05 db087ba 0d2cf05 bf2c7f6 0d2cf05 bf2c7f6 0d2cf05 bf2c7f6 0d2cf05 bf2c7f6 db087ba 0d2cf05 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
---
license: apache-2.0
language:
- ar
- da
- de
- el
- en
- es
- fi
- fr
- he
- hi
- it
- ja
- ko
- ms
- nl
- no
- pl
- pt
- ru
- sv
- sw
- tr
- zh
base_model:
- ResembleAI/chatterbox
pipeline_tag: text-to-speech
library_name: mlx-audio
tags:
- text-to-speech
- speech
- speech generation
- voice cloning
- mlx
- tts
---
# mlx-community/chatterbox-6bit
This 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.
## Use with mlx
```bash
pip install -U mlx-audio
```
### CLI Example:
```bash
python -m mlx_audio.tts.generate --model mlx-community/chatterbox-6bit --text "Hello, this is a test."
```
### Python Example:
```python
from mlx_audio.tts.utils import load_model
from mlx_audio.tts.generate import generate_audio
model = load_model("mlx-community/chatterbox-6bit")
generate_audio(
model=model, text="Hello, this is a test.",
file_prefix="test_audio",
)
```
### Voice Cloning:
```python
from mlx_audio.tts.generate import generate_audio
generate_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",
)
```
## Multilingual Quickstart
Generate speech in 23 languages by specifying the `lang_code` parameter. The model automatically handles pronunciation, intonation, and language-specific phonemes.
```python
from mlx_audio.tts.generate import generate_audio
generate_audio(
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 | | |
|