Text-to-Speech
Transformers
Safetensors
Zonos
zonos3_mini
text-generation
tts
speech-synthesis
multilingual
voice-cloning
zonos3
zyphra
Instructions to use Zyphra/ZONOS3-Mini-transformers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zyphra/ZONOS3-Mini-transformers with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="Zyphra/ZONOS3-Mini-transformers")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("Zyphra/ZONOS3-Mini-transformers", device_map="auto") - Zonos
How to use Zyphra/ZONOS3-Mini-transformers 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-transformers", 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 processor_config.json from Zyphra/ZONOS3-Mini-transformers: direct link, hf CLI and curl.
- Browser
- Download file 3.13 kB
-
https://huggingface.co/Zyphra/ZONOS3-Mini-transformers/resolve/main/processor_config.json
- Command line
-
hf download hf://Zyphra/ZONOS3-Mini-transformers/processor_config.json
-
curl -L -o processor_config.json https://huggingface.co/Zyphra/ZONOS3-Mini-transformers/resolve/main/processor_config.json
3.13 kB
| { | |
| "audio_eos_token_id": 4096, | |
| "audio_pad_token_id": 4097, | |
| "audio_tokenizer": { | |
| "audio_tokenizer_class": "ZacModel", | |
| "audio_tokenizer_name_or_path": "Zyphra/ZAC-1-hf" | |
| }, | |
| "codebook_size": 4096, | |
| "codec_feature_extractor": { | |
| "feature_extractor_type": "ZacFeatureExtractor", | |
| "feature_size": 1, | |
| "hop_length": 2940, | |
| "lane_context_frames": 150, | |
| "lane_frames": 300, | |
| "max_seconds": 600.0, | |
| "min_seconds": 0.5, | |
| "padding_side": "right", | |
| "padding_value": 0.0, | |
| "return_attention_mask": true, | |
| "sampling_rate": 44100 | |
| }, | |
| "condition_bucket_counts": [ | |
| 10, | |
| 10, | |
| 30 | |
| ], | |
| "condition_edges": { | |
| "fmax": [ | |
| 8437.5, | |
| 10242.2, | |
| 11507.8, | |
| 13359.4, | |
| 15164.1, | |
| 15585.9, | |
| 15750.0, | |
| 17765.6, | |
| 19945.3 | |
| ], | |
| "loudness": [ | |
| -29.778, | |
| -26.947, | |
| -25.047, | |
| -23.3, | |
| -21.743, | |
| -20.386, | |
| -19.186, | |
| -17.851, | |
| -15.967 | |
| ], | |
| "speaking_rate": [ | |
| 6.546, | |
| 8.182, | |
| 9.273, | |
| 10.31, | |
| 11.054, | |
| 11.667, | |
| 12.193, | |
| 12.656, | |
| 13.083, | |
| 13.476, | |
| 13.846, | |
| 14.196, | |
| 14.53, | |
| 14.887, | |
| 15.193, | |
| 15.517, | |
| 15.865, | |
| 16.208, | |
| 16.579, | |
| 16.972, | |
| 17.411, | |
| 17.898, | |
| 18.434, | |
| 19.069, | |
| 19.818, | |
| 20.816, | |
| 22.286, | |
| 24.722, | |
| 29.25 | |
| ] | |
| }, | |
| "condition_names": [ | |
| "loudness", | |
| "fmax", | |
| "speaking_rate" | |
| ], | |
| "decode_context_frames": 30, | |
| "feature_extractor": { | |
| "feature_extractor_type": "Zonos3MiniFeatureExtractor", | |
| "feature_size": 80, | |
| "max_seconds": 60.0, | |
| "normalize_means": true, | |
| "normalize_vars": false, | |
| "num_mel_bins": 80, | |
| "padding_side": "right", | |
| "padding_value": 0.0, | |
| "return_attention_mask": true, | |
| "sampling_rate": 44100, | |
| "speaker_sampling_rate": 16000, | |
| "waveform_scale": 32768.0 | |
| }, | |
| "headroom_db": 3.0, | |
| "languages": { | |
| "ar": null, | |
| "bg": null, | |
| "bn": null, | |
| "cmn": "zh", | |
| "cs": null, | |
| "da": null, | |
| "de": "de", | |
| "el": null, | |
| "en_gb": "en", | |
| "en_us": "en", | |
| "es": "es", | |
| "fi": null, | |
| "fr_fr": "fr", | |
| "gu": null, | |
| "he": null, | |
| "hi": null, | |
| "hu": null, | |
| "id": null, | |
| "it": "it", | |
| "ja": "ja", | |
| "ka": null, | |
| "kn": null, | |
| "ko": "ko", | |
| "ml": null, | |
| "mr": null, | |
| "ms": null, | |
| "nl": null, | |
| "no": null, | |
| "or": null, | |
| "pa": null, | |
| "pl": null, | |
| "pt_br": "pt", | |
| "ro": null, | |
| "ru": null, | |
| "sk": null, | |
| "sv": null, | |
| "ta": null, | |
| "te": null, | |
| "th": null, | |
| "tl": null, | |
| "tr": null, | |
| "uk": null, | |
| "ur": null, | |
| "vi": null | |
| }, | |
| "markup_tags": [ | |
| "laugh", | |
| "breath", | |
| "sigh", | |
| "cough", | |
| "panting", | |
| "shouting", | |
| "crying" | |
| ], | |
| "max_silence_prefill_frames": 30, | |
| "num_codebooks": 10, | |
| "output_limit_dbfs": -1.0, | |
| "overlap_frames": 4, | |
| "processor_class": "Zonos3MiniProcessor", | |
| "reference_max_frames": 900, | |
| "silence_frame": [ | |
| 1918, | |
| 746, | |
| 3544, | |
| 234, | |
| 1267, | |
| 2914, | |
| 3944, | |
| 2849, | |
| 326, | |
| 1337 | |
| ], | |
| "text_pad_token_id": 8196 | |
| } | |