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
File size: 3,125 Bytes
3f582bf | 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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | {
"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
}
|