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 config.json from Zyphra/ZONOS3-Mini-transformers: direct link, hf CLI and curl.
- Browser
- Download file 3.56 kB
-
https://huggingface.co/Zyphra/ZONOS3-Mini-transformers/resolve/main/config.json
- Command line
-
hf download hf://Zyphra/ZONOS3-Mini-transformers/config.json
-
curl -L -o config.json https://huggingface.co/Zyphra/ZONOS3-Mini-transformers/resolve/main/config.json
3.56 kB
| { | |
| "architectures": [ | |
| "Zonos3MiniForConditionalGeneration" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "audio_eos_token_id": 4096, | |
| "audio_pad_token_id": 4097, | |
| "bos_token_id": 2, | |
| "codebook_size": 4096, | |
| "condition_bucket_counts": [ | |
| 10, | |
| 10, | |
| 30 | |
| ], | |
| "dtype": "bfloat16", | |
| "eos_token_id": 3, | |
| "final_logit_softcapping": 15.0, | |
| "head_dim": 32, | |
| "hidden_act": "silu", | |
| "hidden_size": 1024, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 2048, | |
| "layer_types": [ | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention" | |
| ], | |
| "linear_conv_kernel_dim": 4, | |
| "linear_key_head_dim": 128, | |
| "linear_num_key_heads": 4, | |
| "linear_num_value_heads": 4, | |
| "linear_value_head_dim": 128, | |
| "max_position_embeddings": 32768, | |
| "mlp_layer_types": [ | |
| "dense", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse" | |
| ], | |
| "model_type": "zonos3_mini", | |
| "moe_intermediate_size": 1536, | |
| "moe_latent_size": 256, | |
| "num_attention_heads": 16, | |
| "num_codebooks": 10, | |
| "num_experts": 64, | |
| "num_experts_per_tok": 2, | |
| "num_hidden_layers": 11, | |
| "num_key_value_heads": 4, | |
| "pad_token_id": 0, | |
| "qk_norm_eps": 1e-06, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| }, | |
| "speaker_embedding_size": 192, | |
| "speaker_encoder_config": { | |
| "activation_dropout": 0.0, | |
| "attention_dropout": 0.0, | |
| "batch_norm_eps": 1e-05, | |
| "bottleneck_size": 128, | |
| "channel_norm_eps": 1e-06, | |
| "embedding_size": 192, | |
| "hidden_act": "gelu_new", | |
| "hidden_dropout": 0.0, | |
| "hidden_size": 64, | |
| "in_channels": 32, | |
| "initializer_range": 0.02, | |
| "layer_norm_eps": 1e-06, | |
| "model_type": "zonos3_mini_speaker_encoder", | |
| "num_attention_heads": 4, | |
| "num_experts": 4, | |
| "num_mel_bins": 80, | |
| "pos_conv_kernel_size": 113, | |
| "stage_block_specs": [ | |
| [ | |
| [ | |
| 3, | |
| 32, | |
| 1, | |
| 1, | |
| 4 | |
| ], | |
| [ | |
| 3, | |
| 32, | |
| 1, | |
| 1, | |
| 4 | |
| ] | |
| ], | |
| [ | |
| [ | |
| 3, | |
| 64, | |
| 2, | |
| 1, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 64, | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 64, | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 64, | |
| 1, | |
| 2, | |
| 2 | |
| ] | |
| ], | |
| [ | |
| [ | |
| 3, | |
| 128, | |
| 2, | |
| 1, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 128, | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 128, | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 128, | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 128, | |
| 1, | |
| 2, | |
| 2 | |
| ] | |
| ], | |
| [ | |
| [ | |
| 3, | |
| 256, | |
| 2, | |
| 1, | |
| 1 | |
| ], | |
| [ | |
| 2, | |
| 256, | |
| 1, | |
| 2, | |
| 1 | |
| ], | |
| [ | |
| 2, | |
| 256, | |
| 1, | |
| 2, | |
| 1 | |
| ] | |
| ] | |
| ] | |
| }, | |
| "text_pad_token_id": 8196, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.24.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 8197 | |
| } | |