1import torchaudio as ta
2from chatterbox.tts_turbo import ChatterboxTurboTTS
3from huggingface_hub import snapshot_download
4import os
56REPO_ID ="CoRal-project/roest-v3-chatterbox-350m"7device ="cuda"# Change to cpu if no GPU is available89# Load the model10model_dir = snapshot_download(11 repo_id=REPO_ID,12 token=os.getenv("HF_TOKEN")orTrue,13# Optional: Filter to download only what you need14 allow_patterns=["*.safetensors","*.json","*.txt","*.pt","*.model"],15)1617model = ChatterboxTurboTTS.from_local(model_dir, device)181920text ="Hej, hvordan går det? Jeg er dansk Chatterbox, og taler naturligt dansk."21wav = model.generate(text)22ta.save("test.wav", wav, model.sr)2324# If you want to synthesize with a different voice, specify the audio prompt25AUDIO_PROMPT_PATH ="YOUR_FILE.wav"26wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH)27ta.save("test-2.wav", wav, model.sr)
Model Details
The model is a finetuned variant of Chatterbox-Turbo, one of the leading open-source text-to-speech models. The base Chatterbox-Turbo model uses the GPT-2 Medium architecture and tokenizer, and is trained on more than 500,000 hours of high-quality English speech.
We finetuned the model on over 2000 hours of Danish speech. The model supports zero-shot voice cloning on as little as a 10 seconds audio prompt. It is compatible with the original Chatterbox library, thus being easy to setup and retaining the built-in Watermarked outputs.
The model works very well with the two predefined speakers from the CoRal-tts dataset, Mic and Nic.
Usage Recommendations
We have found the model to work best with the following settings:
Parameter
Value
temp
0.7-0.8
top_p
0.95
top_k
600-1000
Generally, lower temperature and lower top_k gives longer breaks and more stable prosody.
The model was evaluated using Mean Opinion Score (MOS), achieving a score of 4.01 as rated by a panel of 20 native Danish speakers.
The evaluation used a set of 10 samples for two different speakers, Mic and Nic. Samples were generated with temp=0.7, top_p=0.95, top_k=600. The MOS scale was defined as follows:
Score
Rating
Description
1.0
Bad
Speech sounds completely unnatural and artificial. The synthetic voice is very obvious and so distracting that it can be hard to listen to.
2.0
Poor
Speech sounds mostly unnatural. The synthetic quality is obvious and feels distracting, but still bearable.
3.0
Fair
Speech appears both natural and unnatural in roughly equal measure. It's clear the voice is synthetic, and it can be somewhat distracting.
4.0
Good
Speech sounds mostly natural. You can tell it's synthetic speech, but it's only slightly noticeable and not distracting.
5.0
Excellent
Speech sounds completely natural and cannot be distinguished from a real human voice. There are no audible signs of synthetic speech.