Text-to-Speech
Transformers
Safetensors
Zonos
zonos3_mini
feature-extraction
tts
voice-cloning
zonos3
zyphra
custom_code
Instructions to use Zyphra/ZONOS3-Mini-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zyphra/ZONOS3-Mini-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="Zyphra/ZONOS3-Mini-hf", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Zyphra/ZONOS3-Mini-hf", trust_remote_code=True, device_map="auto") - Zonos
How to use Zyphra/ZONOS3-Mini-hf 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("Zyphra/ZONOS3-Mini-hf", 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
Download tokenizer_config.json from Zyphra/ZONOS3-Mini-hf: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/Zyphra/ZONOS3-Mini-hf/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://Zyphra/ZONOS3-Mini-hf/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/Zyphra/ZONOS3-Mini-hf/resolve/main/tokenizer_config.json
1.36 kB
| { | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<|zonos_pad|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<|zonos_unk|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "<|zonos_bos|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<|zonos_eos|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "5": { | |
| "content": "<|pad|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "bos_token": "<|zonos_bos|>", | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|zonos_eos|>", | |
| "extra_special_tokens": {}, | |
| "model_max_length": 32768, | |
| "pad_token": "<|zonos_pad|>", | |
| "tokenizer_class": "PreTrainedTokenizerFast", | |
| "unk_token": "<|zonos_unk|>" | |
| } | |