Zonos (code, models, paper, wiki)
Browse files- .gitattributes +4 -0
- A novel semantic compression approach for ultra-low bandwidth voice communication.pdf +3 -0
- code/ComfyUI-Zonos.zip +3 -0
- code/ComfyUI-ZonosTTS.zip +3 -0
- code/Zonos.zip +3 -0
- code/cog-zonos.zip +3 -0
- code/zonos-api.zip +3 -0
- models/Zonos-Hebrew/.gitattributes +35 -0
- models/Zonos-Hebrew/README.md +160 -0
- models/Zonos-Hebrew/Zonos-v0.1-hybrid-Hebrew.safetensors +3 -0
- models/Zonos-Hebrew/config.json +117 -0
- models/Zonos-Hebrew/phonikud-1.0.onnx +3 -0
- models/Zonos-Hebrew/source.txt +1 -0
- models/Zonos-v0.1-hybrid/.gitattributes +35 -0
- models/Zonos-v0.1-hybrid/README.md +157 -0
- models/Zonos-v0.1-hybrid/config.json +117 -0
- models/Zonos-v0.1-hybrid/model.safetensors +3 -0
- models/Zonos-v0.1-hybrid/source.txt +1 -0
- models/Zonos-v0.1-speaker-embedding/.gitattributes +35 -0
- models/Zonos-v0.1-speaker-embedding/README.md +8 -0
- models/Zonos-v0.1-speaker-embedding/ResNet293_SimAM_ASP_base.pt +3 -0
- models/Zonos-v0.1-speaker-embedding/ResNet293_SimAM_ASP_base_LDA-128.pt +3 -0
- models/Zonos-v0.1-speaker-embedding/source.txt +1 -0
- models/Zonos-v0.1-transformer/.gitattributes +35 -0
- models/Zonos-v0.1-transformer/README.md +157 -0
- models/Zonos-v0.1-transformer/Zonos_v0_1.ipynb +200 -0
- models/Zonos-v0.1-transformer/Zonos_v0_1_Text_to_Speech.ipynb +299 -0
- models/Zonos-v0.1-transformer/config.json +101 -0
- models/Zonos-v0.1-transformer/issues.txt +95 -0
- models/Zonos-v0.1-transformer/model.safetensors +3 -0
- models/Zonos-v0.1-transformer/source.txt +1 -0
- models/zonos-assets/.gitattributes +35 -0
- models/zonos-assets/dac.json +1 -0
- models/zonos-assets/dac_decode.onnx +3 -0
- models/zonos-assets/dac_encode.onnx +3 -0
- models/zonos-assets/issues.txt +71 -0
- models/zonos-assets/silent.wav +0 -0
- models/zonos-assets/source.txt +1 -0
- models/zonos-assets/speaker_embedding_lda.onnx +3 -0
- wiki/Beta Release of Zonos v0.1.pdf +3 -0
- wiki/Zonos v0.1. Best Open Source AI Voice Clone Tool.pdf +3 -0
- wiki/Zyphra Just Dropped Zonos. Instant TTS and Voice Cloning. Install Locally.mkv +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
A[[:space:]]novel[[:space:]]semantic[[:space:]]compression[[:space:]]approach[[:space:]]for[[:space:]]ultra-low[[:space:]]bandwidth[[:space:]]voice[[:space:]]communication.pdf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
wiki/Beta[[:space:]]Release[[:space:]]of[[:space:]]Zonos[[:space:]]v0.1.pdf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
wiki/Zonos[[:space:]]v0.1.[[:space:]]Best[[:space:]]Open[[:space:]]Source[[:space:]]AI[[:space:]]Voice[[:space:]]Clone[[:space:]]Tool.pdf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
wiki/Zyphra[[:space:]]Just[[:space:]]Dropped[[:space:]]Zonos.[[:space:]]Instant[[:space:]]TTS[[:space:]]and[[:space:]]Voice[[:space:]]Cloning.[[:space:]]Install[[:space:]]Locally.mkv filter=lfs diff=lfs merge=lfs -text
|
A novel semantic compression approach for ultra-low bandwidth voice communication.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2e12f61c1c9c2724cea4cb0da132482b50a7c13db5efb1d8bc61fc6e9577c3c
|
| 3 |
+
size 365385
|
code/ComfyUI-Zonos.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80ea42b0eee3d6b8783e4b66afd2514afb01af1c5489332b5611a839024f8a7a
|
| 3 |
+
size 1535148
|
code/ComfyUI-ZonosTTS.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96e17c63e013d84a03d4a023078adb3725ca678d436d6d6e81b5564c0ec5b73c
|
| 3 |
+
size 75203
|
code/Zonos.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d29a36b793fb6a6c3e2ad271f6346d570d4cdca12e0b2b44c2dd6a76bba6a649
|
| 3 |
+
size 4946826
|
code/cog-zonos.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ba31c5e4f5dec81a3c3e4ded9f78692a2d3ccc2541d745020168b26f609f2ea
|
| 3 |
+
size 3510060
|
code/zonos-api.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53da88886bd99c65e192653dae86c32707e03161882f7158a4513eb955d5201e
|
| 3 |
+
size 121146
|
models/Zonos-Hebrew/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
models/Zonos-Hebrew/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
pipeline_tag: text-to-speech
|
| 4 |
+
library_name: zonos
|
| 5 |
+
---
|
| 6 |
+
# Zonos-v0.1-Hebrew
|
| 7 |
+
|
| 8 |
+
<div align="center">
|
| 9 |
+
<img src="https://github.com/Zyphra/Zonos/blob/main/assets/ZonosHeader.png?raw=true"
|
| 10 |
+
alt="Title card"
|
| 11 |
+
style="width: 500px;
|
| 12 |
+
height: auto;
|
| 13 |
+
object-position: center top;">
|
| 14 |
+
</div>
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
Zonos-v0.1 is a leading open-weight text-to-speech model trained on more than 200k hours of varied multilingual speech, delivering expressiveness and quality on par with—or even surpassing—top TTS providers.
|
| 19 |
+
|
| 20 |
+
Our model enables highly natural speech generation from text prompts when given a speaker embedding or audio prefix, and can accurately perform speech cloning when given a reference clip spanning just a few seconds. The conditioning setup also allows for fine control over speaking rate, pitch variation, audio quality, and emotions such as happiness, fear, sadness, and anger. The model outputs speech natively at 44kHz.
|
| 21 |
+
|
| 22 |
+
##### For more details and speech samples, check out our blog [here](https://www.zyphra.com/post/beta-release-of-zonos-v0-1)
|
| 23 |
+
|
| 24 |
+
##### We also have a hosted version available at [playground.zyphra.com/audio](https://playground.zyphra.com/audio)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
Zonos follows a straightforward architecture: text normalization and phonemization via eSpeak, followed by DAC token prediction through a transformer or hybrid backbone. An overview of the architecture can be seen below.
|
| 29 |
+
|
| 30 |
+
<div align="center">
|
| 31 |
+
<img src="https://github.com/Zyphra/Zonos/blob/main/assets/ArchitectureDiagram.png?raw=true"
|
| 32 |
+
alt="Architecture diagram"
|
| 33 |
+
style="width: 1000px;
|
| 34 |
+
height: auto;
|
| 35 |
+
object-position: center top;">
|
| 36 |
+
</div>
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
### Python
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
import torch
|
| 46 |
+
import torchaudio
|
| 47 |
+
from zonos.model import Zonos
|
| 48 |
+
from zonos.conditioning import make_cond_dict
|
| 49 |
+
from zonos.utils import DEFAULT_DEVICE as device
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
model = Zonos.from_pretrained("notmax123/Zonos-Hebrew", device=device)
|
| 53 |
+
|
| 54 |
+
wav, sampling_rate = torchaudio.load("assets/exampleaudio.mp3")
|
| 55 |
+
speaker = model.make_speaker_embedding(wav, sampling_rate)
|
| 56 |
+
|
| 57 |
+
torch.manual_seed(421)
|
| 58 |
+
|
| 59 |
+
cond_dict = make_cond_dict(text="ירושלים יום טוב", speaker=speaker, language="he")
|
| 60 |
+
conditioning = model.prepare_conditioning(cond_dict)
|
| 61 |
+
|
| 62 |
+
codes = model.generate(conditioning)
|
| 63 |
+
|
| 64 |
+
wavs = model.autoencoder.decode(codes).cpu()
|
| 65 |
+
torchaudio.save("sample.wav", wavs[0], model.autoencoder.sampling_rate)
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
### Gradio interface (recommended)
|
| 69 |
+
|
| 70 |
+
```bash
|
| 71 |
+
uv run gradio_interface.py
|
| 72 |
+
# python gradio_interface.py
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
This should produce a `sample.wav` file in your project root directory.
|
| 76 |
+
|
| 77 |
+
_For repeated sampling we highly recommend using the gradio interface instead, as the minimal example needs to load the model every time it is run._
|
| 78 |
+
|
| 79 |
+
## Features
|
| 80 |
+
|
| 81 |
+
- Zero-shot TTS with voice cloning: Input desired text and a 10-30s speaker sample to generate high quality TTS output
|
| 82 |
+
- Audio prefix inputs: Add text plus an audio prefix for even richer speaker matching. Audio prefixes can be used to elicit behaviours such as whispering which can otherwise be challenging to replicate when cloning from speaker embeddings
|
| 83 |
+
- Multilingual support: Zonos-v0.1 supports English, Japanese, Chinese, French, and German
|
| 84 |
+
- Audio quality and emotion control: Zonos offers fine-grained control of many aspects of the generated audio. These include speaking rate, pitch, maximum frequency, audio quality, and various emotions such as happiness, anger, sadness, and fear.
|
| 85 |
+
- Fast: our model runs with a real-time factor of ~2x on an RTX 4090
|
| 86 |
+
- Gradio WebUI: Zonos comes packaged with an easy to use gradio interface to generate speech
|
| 87 |
+
- Simple installation and deployment: Zonos can be installed and deployed simply using the docker file packaged with our repository.
|
| 88 |
+
|
| 89 |
+
## Installation
|
| 90 |
+
|
| 91 |
+
**At the moment this repository only supports Linux systems (preferably Ubuntu 22.04/24.04) with recent NVIDIA GPUs (3000-series or newer, 6GB+ VRAM).**
|
| 92 |
+
|
| 93 |
+
See also [Docker Installation](#docker-installation)
|
| 94 |
+
|
| 95 |
+
#### System dependencies
|
| 96 |
+
|
| 97 |
+
Zonos depends on the eSpeak library phonemization. You can install it on Ubuntu with the following command:
|
| 98 |
+
|
| 99 |
+
```bash
|
| 100 |
+
apt install -y espeak-ng
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
#### Python dependencies
|
| 104 |
+
|
| 105 |
+
We highly recommend using a recent version of [uv](https://docs.astral.sh/uv/#installation) for installation. If you don't have uv installed, you can install it via pip: `pip install -U uv`.
|
| 106 |
+
|
| 107 |
+
##### Installing into a new uv virtual environment (recommended)
|
| 108 |
+
|
| 109 |
+
```bash
|
| 110 |
+
uv sync
|
| 111 |
+
uv sync --extra compile
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
##### Installing into the system/actived environment using uv
|
| 115 |
+
|
| 116 |
+
```bash
|
| 117 |
+
uv pip install -e .
|
| 118 |
+
uv pip install -e .[compile]
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
##### Installing into the system/actived environment using pip
|
| 122 |
+
|
| 123 |
+
```bash
|
| 124 |
+
pip install -e .
|
| 125 |
+
pip install --no-build-isolation -e .[compile]
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
##### Confirm that it's working
|
| 129 |
+
|
| 130 |
+
For convenience we provide a minimal example to check that the installation works:
|
| 131 |
+
|
| 132 |
+
```bash
|
| 133 |
+
uv run sample.py
|
| 134 |
+
# python sample.py
|
| 135 |
+
```
|
| 136 |
+
|
| 137 |
+
## Docker installation
|
| 138 |
+
|
| 139 |
+
```bash
|
| 140 |
+
git clone https://github.com/Zyphra/Zonos.git
|
| 141 |
+
cd Zonos
|
| 142 |
+
|
| 143 |
+
# For gradio
|
| 144 |
+
docker compose up
|
| 145 |
+
|
| 146 |
+
# Or for development you can do
|
| 147 |
+
docker build -t Zonos .
|
| 148 |
+
docker run -it --gpus=all --net=host -v /path/to/Zonos:/Zonos -t Zonos
|
| 149 |
+
cd /Zonos
|
| 150 |
+
python sample.py # this will generate a sample.wav in /Zonos
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
## Citation
|
| 154 |
+
If you find this model useful in an academic context please cite as:
|
| 155 |
+
```bash
|
| 156 |
+
@misc{zyphra2025zonos,
|
| 157 |
+
title = {Zonos-v0.1: An Expressive, Open-Source TTS Model},
|
| 158 |
+
author = {Dario Sucic, Mohamed Osman, Gabriel Clark, Chris Warner, Beren Millidge},
|
| 159 |
+
year = {2025},
|
| 160 |
+
}
|
models/Zonos-Hebrew/Zonos-v0.1-hybrid-Hebrew.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4c486829764a262548ba25c1a7d9651811e5d79e523ba4499cf3943b1f55e32
|
| 3 |
+
size 3303692816
|
models/Zonos-Hebrew/config.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backbone": {
|
| 3 |
+
"d_model": 2048,
|
| 4 |
+
"d_intermediate": 0,
|
| 5 |
+
"attn_mlp_d_intermediate": 8192,
|
| 6 |
+
"n_layer": 46,
|
| 7 |
+
"ssm_cfg": {
|
| 8 |
+
"layer": "Mamba2"
|
| 9 |
+
},
|
| 10 |
+
"attn_layer_idx": [
|
| 11 |
+
0,
|
| 12 |
+
4,
|
| 13 |
+
8,
|
| 14 |
+
12,
|
| 15 |
+
16,
|
| 16 |
+
20,
|
| 17 |
+
24,
|
| 18 |
+
28,
|
| 19 |
+
32,
|
| 20 |
+
36,
|
| 21 |
+
40,
|
| 22 |
+
44
|
| 23 |
+
],
|
| 24 |
+
"attn_cfg": {
|
| 25 |
+
"causal": true,
|
| 26 |
+
"num_heads": 16,
|
| 27 |
+
"num_heads_kv": 4,
|
| 28 |
+
"rotary_emb_dim": 128,
|
| 29 |
+
"qkv_proj_bias": false,
|
| 30 |
+
"out_proj_bias": false
|
| 31 |
+
},
|
| 32 |
+
"rms_norm": false,
|
| 33 |
+
"residual_in_fp32": false,
|
| 34 |
+
"norm_epsilon": 1e-05
|
| 35 |
+
},
|
| 36 |
+
"prefix_conditioner": {
|
| 37 |
+
"conditioners": [
|
| 38 |
+
{
|
| 39 |
+
"type": "EspeakPhonemeConditioner",
|
| 40 |
+
"name": "espeak"
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"cond_dim": 128,
|
| 44 |
+
"uncond_type": "learned",
|
| 45 |
+
"projection": "linear",
|
| 46 |
+
"type": "PassthroughConditioner",
|
| 47 |
+
"name": "speaker"
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"input_dim": 8,
|
| 51 |
+
"uncond_type": "learned",
|
| 52 |
+
"type": "FourierConditioner",
|
| 53 |
+
"name": "emotion"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"min_val": 0,
|
| 57 |
+
"max_val": 24000,
|
| 58 |
+
"uncond_type": "learned",
|
| 59 |
+
"type": "FourierConditioner",
|
| 60 |
+
"name": "fmax"
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"min_val": 0,
|
| 64 |
+
"max_val": 400,
|
| 65 |
+
"uncond_type": "learned",
|
| 66 |
+
"type": "FourierConditioner",
|
| 67 |
+
"name": "pitch_std"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"min_val": 0,
|
| 71 |
+
"max_val": 40,
|
| 72 |
+
"uncond_type": "learned",
|
| 73 |
+
"type": "FourierConditioner",
|
| 74 |
+
"name": "speaking_rate"
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"min_val": -1,
|
| 78 |
+
"max_val": 126,
|
| 79 |
+
"uncond_type": "learned",
|
| 80 |
+
"type": "IntegerConditioner",
|
| 81 |
+
"name": "language_id"
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"input_dim": 8,
|
| 85 |
+
"min_val": 0.5,
|
| 86 |
+
"max_val": 0.8,
|
| 87 |
+
"uncond_type": "learned",
|
| 88 |
+
"type": "FourierConditioner",
|
| 89 |
+
"name": "vqscore_8"
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"min_val": -1.0,
|
| 93 |
+
"max_val": 1000,
|
| 94 |
+
"uncond_type": "learned",
|
| 95 |
+
"type": "FourierConditioner",
|
| 96 |
+
"name": "ctc_loss"
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"min_val": 1,
|
| 100 |
+
"max_val": 5,
|
| 101 |
+
"uncond_type": "learned",
|
| 102 |
+
"type": "FourierConditioner",
|
| 103 |
+
"name": "dnsmos_ovrl"
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
"min_val": 0,
|
| 107 |
+
"max_val": 1,
|
| 108 |
+
"uncond_type": "learned",
|
| 109 |
+
"type": "IntegerConditioner",
|
| 110 |
+
"name": "speaker_noised"
|
| 111 |
+
}
|
| 112 |
+
],
|
| 113 |
+
"projection": "linear"
|
| 114 |
+
},
|
| 115 |
+
"eos_token_id": 1024,
|
| 116 |
+
"masked_token_id": 1025
|
| 117 |
+
}
|
models/Zonos-Hebrew/phonikud-1.0.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1fa2624b1e8202a0c0a23259b560b0c41ad92a3a6750bd0e322ce5a2b1acdb6
|
| 3 |
+
size 307844158
|
models/Zonos-Hebrew/source.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/notmax123/Zonos-Hebrew
|
models/Zonos-v0.1-hybrid/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
models/Zonos-v0.1-hybrid/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: text-to-speech
|
| 4 |
+
library_name: zonos
|
| 5 |
+
---
|
| 6 |
+
# Zonos-v0.1
|
| 7 |
+
|
| 8 |
+
<div align="center">
|
| 9 |
+
<img src="https://github.com/Zyphra/Zonos/blob/main/assets/ZonosHeader.png?raw=true"
|
| 10 |
+
alt="Title card"
|
| 11 |
+
style="width: 500px;
|
| 12 |
+
height: auto;
|
| 13 |
+
object-position: center top;">
|
| 14 |
+
</div>
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
Zonos-v0.1 is a leading open-weight text-to-speech model trained on more than 200k hours of varied multilingual speech, delivering expressiveness and quality on par with—or even surpassing—top TTS providers.
|
| 19 |
+
|
| 20 |
+
Our model enables highly natural speech generation from text prompts when given a speaker embedding or audio prefix, and can accurately perform speech cloning when given a reference clip spanning just a few seconds. The conditioning setup also allows for fine control over speaking rate, pitch variation, audio quality, and emotions such as happiness, fear, sadness, and anger. The model outputs speech natively at 44kHz.
|
| 21 |
+
|
| 22 |
+
##### For more details and speech samples, check out our blog [here](https://www.zyphra.com/post/beta-release-of-zonos-v0-1)
|
| 23 |
+
|
| 24 |
+
##### We also have a hosted version available at [playground.zyphra.com/audio](https://playground.zyphra.com/audio)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
Zonos follows a straightforward architecture: text normalization and phonemization via eSpeak, followed by DAC token prediction through a transformer or hybrid backbone. An overview of the architecture can be seen below.
|
| 29 |
+
|
| 30 |
+
<div align="center">
|
| 31 |
+
<img src="https://github.com/Zyphra/Zonos/blob/main/assets/ArchitectureDiagram.png?raw=true"
|
| 32 |
+
alt="Architecture diagram"
|
| 33 |
+
style="width: 1000px;
|
| 34 |
+
height: auto;
|
| 35 |
+
object-position: center top;">
|
| 36 |
+
</div>
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
### Python
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
import torch
|
| 46 |
+
import torchaudio
|
| 47 |
+
from zonos.model import Zonos
|
| 48 |
+
from zonos.conditioning import make_cond_dict
|
| 49 |
+
|
| 50 |
+
model = Zonos.from_pretrained("Zyphra/Zonos-v0.1-hybrid", device="cuda")
|
| 51 |
+
# model = Zonos.from_pretrained("Zyphra/Zonos-v0.1-transformer", device="cuda")
|
| 52 |
+
|
| 53 |
+
wav, sampling_rate = torchaudio.load("assets/exampleaudio.mp3")
|
| 54 |
+
speaker = model.make_speaker_embedding(wav, sampling_rate)
|
| 55 |
+
|
| 56 |
+
cond_dict = make_cond_dict(text="Hello, world!", speaker=speaker, language="en-us")
|
| 57 |
+
conditioning = model.prepare_conditioning(cond_dict)
|
| 58 |
+
|
| 59 |
+
codes = model.generate(conditioning)
|
| 60 |
+
|
| 61 |
+
wavs = model.autoencoder.decode(codes).cpu()
|
| 62 |
+
torchaudio.save("sample.wav", wavs[0], model.autoencoder.sampling_rate)
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
### Gradio interface (recommended)
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
uv run gradio_interface.py
|
| 69 |
+
# python gradio_interface.py
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
This should produce a `sample.wav` file in your project root directory.
|
| 73 |
+
|
| 74 |
+
_For repeated sampling we highly recommend using the gradio interface instead, as the minimal example needs to load the model every time it is run._
|
| 75 |
+
|
| 76 |
+
## Features
|
| 77 |
+
|
| 78 |
+
- Zero-shot TTS with voice cloning: Input desired text and a 10-30s speaker sample to generate high quality TTS output
|
| 79 |
+
- Audio prefix inputs: Add text plus an audio prefix for even richer speaker matching. Audio prefixes can be used to elicit behaviours such as whispering which can otherwise be challenging to replicate when cloning from speaker embeddings
|
| 80 |
+
- Multilingual support: Zonos-v0.1 supports English, Japanese, Chinese, French, and German
|
| 81 |
+
- Audio quality and emotion control: Zonos offers fine-grained control of many aspects of the generated audio. These include speaking rate, pitch, maximum frequency, audio quality, and various emotions such as happiness, anger, sadness, and fear.
|
| 82 |
+
- Fast: our model runs with a real-time factor of ~2x on an RTX 4090
|
| 83 |
+
- Gradio WebUI: Zonos comes packaged with an easy to use gradio interface to generate speech
|
| 84 |
+
- Simple installation and deployment: Zonos can be installed and deployed simply using the docker file packaged with our repository.
|
| 85 |
+
|
| 86 |
+
## Installation
|
| 87 |
+
|
| 88 |
+
**At the moment this repository only supports Linux systems (preferably Ubuntu 22.04/24.04) with recent NVIDIA GPUs (3000-series or newer, 6GB+ VRAM).**
|
| 89 |
+
|
| 90 |
+
See also [Docker Installation](#docker-installation)
|
| 91 |
+
|
| 92 |
+
#### System dependencies
|
| 93 |
+
|
| 94 |
+
Zonos depends on the eSpeak library phonemization. You can install it on Ubuntu with the following command:
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
apt install -y espeak-ng
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
#### Python dependencies
|
| 101 |
+
|
| 102 |
+
We highly recommend using a recent version of [uv](https://docs.astral.sh/uv/#installation) for installation. If you don't have uv installed, you can install it via pip: `pip install -U uv`.
|
| 103 |
+
|
| 104 |
+
##### Installing into a new uv virtual environment (recommended)
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
uv sync
|
| 108 |
+
uv sync --extra compile
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
##### Installing into the system/actived environment using uv
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
uv pip install -e .
|
| 115 |
+
uv pip install -e .[compile]
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
##### Installing into the system/actived environment using pip
|
| 119 |
+
|
| 120 |
+
```bash
|
| 121 |
+
pip install -e .
|
| 122 |
+
pip install --no-build-isolation -e .[compile]
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
##### Confirm that it's working
|
| 126 |
+
|
| 127 |
+
For convenience we provide a minimal example to check that the installation works:
|
| 128 |
+
|
| 129 |
+
```bash
|
| 130 |
+
uv run sample.py
|
| 131 |
+
# python sample.py
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
## Docker installation
|
| 135 |
+
|
| 136 |
+
```bash
|
| 137 |
+
git clone https://github.com/Zyphra/Zonos.git
|
| 138 |
+
cd Zonos
|
| 139 |
+
|
| 140 |
+
# For gradio
|
| 141 |
+
docker compose up
|
| 142 |
+
|
| 143 |
+
# Or for development you can do
|
| 144 |
+
docker build -t Zonos .
|
| 145 |
+
docker run -it --gpus=all --net=host -v /path/to/Zonos:/Zonos -t Zonos
|
| 146 |
+
cd /Zonos
|
| 147 |
+
python sample.py # this will generate a sample.wav in /Zonos
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
## Citation
|
| 151 |
+
If you find this model useful in an academic context please cite as:
|
| 152 |
+
```bash
|
| 153 |
+
@misc{zyphra2025zonos,
|
| 154 |
+
title = {Zonos-v0.1: An Expressive, Open-Source TTS Model},
|
| 155 |
+
author = {Dario Sucic, Mohamed Osman, Gabriel Clark, Chris Warner, Beren Millidge},
|
| 156 |
+
year = {2025},
|
| 157 |
+
}
|
models/Zonos-v0.1-hybrid/config.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backbone": {
|
| 3 |
+
"d_model": 2048,
|
| 4 |
+
"d_intermediate": 0,
|
| 5 |
+
"attn_mlp_d_intermediate": 8192,
|
| 6 |
+
"n_layer": 46,
|
| 7 |
+
"ssm_cfg": {
|
| 8 |
+
"layer": "Mamba2"
|
| 9 |
+
},
|
| 10 |
+
"attn_layer_idx": [
|
| 11 |
+
0,
|
| 12 |
+
4,
|
| 13 |
+
8,
|
| 14 |
+
12,
|
| 15 |
+
16,
|
| 16 |
+
20,
|
| 17 |
+
24,
|
| 18 |
+
28,
|
| 19 |
+
32,
|
| 20 |
+
36,
|
| 21 |
+
40,
|
| 22 |
+
44
|
| 23 |
+
],
|
| 24 |
+
"attn_cfg": {
|
| 25 |
+
"causal": true,
|
| 26 |
+
"num_heads": 16,
|
| 27 |
+
"num_heads_kv": 4,
|
| 28 |
+
"rotary_emb_dim": 128,
|
| 29 |
+
"qkv_proj_bias": false,
|
| 30 |
+
"out_proj_bias": false
|
| 31 |
+
},
|
| 32 |
+
"rms_norm": false,
|
| 33 |
+
"residual_in_fp32": false,
|
| 34 |
+
"norm_epsilon": 1e-05
|
| 35 |
+
},
|
| 36 |
+
"prefix_conditioner": {
|
| 37 |
+
"conditioners": [
|
| 38 |
+
{
|
| 39 |
+
"type": "EspeakPhonemeConditioner",
|
| 40 |
+
"name": "espeak"
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"cond_dim": 128,
|
| 44 |
+
"uncond_type": "learned",
|
| 45 |
+
"projection": "linear",
|
| 46 |
+
"type": "PassthroughConditioner",
|
| 47 |
+
"name": "speaker"
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"input_dim": 8,
|
| 51 |
+
"uncond_type": "learned",
|
| 52 |
+
"type": "FourierConditioner",
|
| 53 |
+
"name": "emotion"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"min_val": 0,
|
| 57 |
+
"max_val": 24000,
|
| 58 |
+
"uncond_type": "learned",
|
| 59 |
+
"type": "FourierConditioner",
|
| 60 |
+
"name": "fmax"
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"min_val": 0,
|
| 64 |
+
"max_val": 400,
|
| 65 |
+
"uncond_type": "learned",
|
| 66 |
+
"type": "FourierConditioner",
|
| 67 |
+
"name": "pitch_std"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"min_val": 0,
|
| 71 |
+
"max_val": 40,
|
| 72 |
+
"uncond_type": "learned",
|
| 73 |
+
"type": "FourierConditioner",
|
| 74 |
+
"name": "speaking_rate"
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"min_val": -1,
|
| 78 |
+
"max_val": 126,
|
| 79 |
+
"uncond_type": "learned",
|
| 80 |
+
"type": "IntegerConditioner",
|
| 81 |
+
"name": "language_id"
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"input_dim": 8,
|
| 85 |
+
"min_val": 0.5,
|
| 86 |
+
"max_val": 0.8,
|
| 87 |
+
"uncond_type": "learned",
|
| 88 |
+
"type": "FourierConditioner",
|
| 89 |
+
"name": "vqscore_8"
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"min_val": -1.0,
|
| 93 |
+
"max_val": 1000,
|
| 94 |
+
"uncond_type": "learned",
|
| 95 |
+
"type": "FourierConditioner",
|
| 96 |
+
"name": "ctc_loss"
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"min_val": 1,
|
| 100 |
+
"max_val": 5,
|
| 101 |
+
"uncond_type": "learned",
|
| 102 |
+
"type": "FourierConditioner",
|
| 103 |
+
"name": "dnsmos_ovrl"
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
"min_val": 0,
|
| 107 |
+
"max_val": 1,
|
| 108 |
+
"uncond_type": "learned",
|
| 109 |
+
"type": "IntegerConditioner",
|
| 110 |
+
"name": "speaker_noised"
|
| 111 |
+
}
|
| 112 |
+
],
|
| 113 |
+
"projection": "linear"
|
| 114 |
+
},
|
| 115 |
+
"eos_token_id": 1024,
|
| 116 |
+
"masked_token_id": 1025
|
| 117 |
+
}
|
models/Zonos-v0.1-hybrid/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04e02e5542dd6968ad79942b014e317623efc671ea54b57069d3016e7aa3cceb
|
| 3 |
+
size 3303692816
|
models/Zonos-v0.1-hybrid/source.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/Zyphra/Zonos-v0.1-hybrid
|
models/Zonos-v0.1-speaker-embedding/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
models/Zonos-v0.1-speaker-embedding/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
This repository contains the speaker embedding models for our Zonos-v0.1 [transformer](https://huggingface.co/Zyphra/Zonos-v0.1-transformer) and [hybrid](https://huggingface.co/Zyphra/Zonos-v0.1-hybrid) models.
|
| 5 |
+
|
| 6 |
+
The speaker embedding models are based on the [ResNet293-SimAM-ASP](https://github.com/VoxBlink2/ScriptsForVoxBlink2/tree/main/asv) models from VoxBlink2. We use the pretrain models as we found the finetunes performed worse.
|
| 7 |
+
|
| 8 |
+
The output of the speaker embedding model is then passed through an LDA layer and compressed from 256 to 128 dimensions to remove further spurious information about the speaker embedding clip before being fed into the Zonos models.
|
models/Zonos-v0.1-speaker-embedding/ResNet293_SimAM_ASP_base.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f02677cd204f91e228f9ec344b7262749a9ab80b9848a7e0452e198d629a65d
|
| 3 |
+
size 396513742
|
models/Zonos-v0.1-speaker-embedding/ResNet293_SimAM_ASP_base_LDA-128.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:383d4289dacaeac44386716ef15f7a1de6ff069d2a07ec1e933526eef5bd0084
|
| 3 |
+
size 264512
|
models/Zonos-v0.1-speaker-embedding/source.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/Zyphra/Zonos-v0.1-speaker-embedding
|
models/Zonos-v0.1-transformer/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
models/Zonos-v0.1-transformer/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: text-to-speech
|
| 4 |
+
library_name: zonos
|
| 5 |
+
---
|
| 6 |
+
# Zonos-v0.1
|
| 7 |
+
|
| 8 |
+
<div align="center">
|
| 9 |
+
<img src="https://github.com/Zyphra/Zonos/blob/main/assets/ZonosHeader.png?raw=true"
|
| 10 |
+
alt="Title card"
|
| 11 |
+
style="width: 500px;
|
| 12 |
+
height: auto;
|
| 13 |
+
object-position: center top;">
|
| 14 |
+
</div>
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
Zonos-v0.1 is a leading open-weight text-to-speech model trained on more than 200k hours of varied multilingual speech, delivering expressiveness and quality on par with—or even surpassing—top TTS providers.
|
| 19 |
+
|
| 20 |
+
Our model enables highly natural speech generation from text prompts when given a speaker embedding or audio prefix, and can accurately perform speech cloning when given a reference clip spanning just a few seconds. The conditioning setup also allows for fine control over speaking rate, pitch variation, audio quality, and emotions such as happiness, fear, sadness, and anger. The model outputs speech natively at 44kHz.
|
| 21 |
+
|
| 22 |
+
##### For more details and speech samples, check out our blog [here](https://www.zyphra.com/post/beta-release-of-zonos-v0-1)
|
| 23 |
+
|
| 24 |
+
##### We also have a hosted version available at [playground.zyphra.com/audio](https://playground.zyphra.com/audio)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
Zonos follows a straightforward architecture: text normalization and phonemization via eSpeak, followed by DAC token prediction through a transformer or hybrid backbone. An overview of the architecture can be seen below.
|
| 29 |
+
|
| 30 |
+
<div align="center">
|
| 31 |
+
<img src="https://github.com/Zyphra/Zonos/blob/main/assets/ArchitectureDiagram.png?raw=true"
|
| 32 |
+
alt="Architecture diagram"
|
| 33 |
+
style="width: 1000px;
|
| 34 |
+
height: auto;
|
| 35 |
+
object-position: center top;">
|
| 36 |
+
</div>
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
### Python
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
import torch
|
| 46 |
+
import torchaudio
|
| 47 |
+
from zonos.model import Zonos
|
| 48 |
+
from zonos.conditioning import make_cond_dict
|
| 49 |
+
|
| 50 |
+
# model = Zonos.from_pretrained("Zyphra/Zonos-v0.1-hybrid", device="cuda")
|
| 51 |
+
model = Zonos.from_pretrained("Zyphra/Zonos-v0.1-transformer", device="cuda")
|
| 52 |
+
|
| 53 |
+
wav, sampling_rate = torchaudio.load("assets/exampleaudio.mp3")
|
| 54 |
+
speaker = model.make_speaker_embedding(wav, sampling_rate)
|
| 55 |
+
|
| 56 |
+
cond_dict = make_cond_dict(text="Hello, world!", speaker=speaker, language="en-us")
|
| 57 |
+
conditioning = model.prepare_conditioning(cond_dict)
|
| 58 |
+
|
| 59 |
+
codes = model.generate(conditioning)
|
| 60 |
+
|
| 61 |
+
wavs = model.autoencoder.decode(codes).cpu()
|
| 62 |
+
torchaudio.save("sample.wav", wavs[0], model.autoencoder.sampling_rate)
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
### Gradio interface (recommended)
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
uv run gradio_interface.py
|
| 69 |
+
# python gradio_interface.py
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
This should produce a `sample.wav` file in your project root directory.
|
| 73 |
+
|
| 74 |
+
_For repeated sampling we highly recommend using the gradio interface instead, as the minimal example needs to load the model every time it is run._
|
| 75 |
+
|
| 76 |
+
## Features
|
| 77 |
+
|
| 78 |
+
- Zero-shot TTS with voice cloning: Input desired text and a 10-30s speaker sample to generate high quality TTS output
|
| 79 |
+
- Audio prefix inputs: Add text plus an audio prefix for even richer speaker matching. Audio prefixes can be used to elicit behaviours such as whispering which can otherwise be challenging to replicate when cloning from speaker embeddings
|
| 80 |
+
- Multilingual support: Zonos-v0.1 supports English, Japanese, Chinese, French, and German
|
| 81 |
+
- Audio quality and emotion control: Zonos offers fine-grained control of many aspects of the generated audio. These include speaking rate, pitch, maximum frequency, audio quality, and various emotions such as happiness, anger, sadness, and fear.
|
| 82 |
+
- Fast: our model runs with a real-time factor of ~2x on an RTX 4090
|
| 83 |
+
- Gradio WebUI: Zonos comes packaged with an easy to use gradio interface to generate speech
|
| 84 |
+
- Simple installation and deployment: Zonos can be installed and deployed simply using the docker file packaged with our repository.
|
| 85 |
+
|
| 86 |
+
## Installation
|
| 87 |
+
|
| 88 |
+
**At the moment this repository only supports Linux systems (preferably Ubuntu 22.04/24.04) with recent NVIDIA GPUs (3000-series or newer, 6GB+ VRAM).**
|
| 89 |
+
|
| 90 |
+
See also [Docker Installation](#docker-installation)
|
| 91 |
+
|
| 92 |
+
#### System dependencies
|
| 93 |
+
|
| 94 |
+
Zonos depends on the eSpeak library phonemization. You can install it on Ubuntu with the following command:
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
apt install -y espeak-ng
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
#### Python dependencies
|
| 101 |
+
|
| 102 |
+
We highly recommend using a recent version of [uv](https://docs.astral.sh/uv/#installation) for installation. If you don't have uv installed, you can install it via pip: `pip install -U uv`.
|
| 103 |
+
|
| 104 |
+
##### Installing into a new uv virtual environment (recommended)
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
uv sync
|
| 108 |
+
uv sync --extra compile
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
##### Installing into the system/actived environment using uv
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
uv pip install -e .
|
| 115 |
+
uv pip install -e .[compile]
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
##### Installing into the system/actived environment using pip
|
| 119 |
+
|
| 120 |
+
```bash
|
| 121 |
+
pip install -e .
|
| 122 |
+
pip install --no-build-isolation -e .[compile]
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
##### Confirm that it's working
|
| 126 |
+
|
| 127 |
+
For convenience we provide a minimal example to check that the installation works:
|
| 128 |
+
|
| 129 |
+
```bash
|
| 130 |
+
uv run sample.py
|
| 131 |
+
# python sample.py
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
## Docker installation
|
| 135 |
+
|
| 136 |
+
```bash
|
| 137 |
+
git clone https://github.com/Zyphra/Zonos.git
|
| 138 |
+
cd Zonos
|
| 139 |
+
|
| 140 |
+
# For gradio
|
| 141 |
+
docker compose up
|
| 142 |
+
|
| 143 |
+
# Or for development you can do
|
| 144 |
+
docker build -t Zonos .
|
| 145 |
+
docker run -it --gpus=all --net=host -v /path/to/Zonos:/Zonos -t Zonos
|
| 146 |
+
cd /Zonos
|
| 147 |
+
python sample.py # this will generate a sample.wav in /Zonos
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
## Citation
|
| 151 |
+
If you find this model useful in an academic context please cite as:
|
| 152 |
+
```bash
|
| 153 |
+
@misc{zyphra2025zonos,
|
| 154 |
+
title = {Zonos-v0.1: An Expressive, Open-Source TTS Model},
|
| 155 |
+
author = {Dario Sucic, Mohamed Osman, Gabriel Clark, Chris Warner, Beren Millidge},
|
| 156 |
+
year = {2025},
|
| 157 |
+
}
|
models/Zonos-v0.1-transformer/Zonos_v0_1.ipynb
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"nbformat": 4,
|
| 3 |
+
"nbformat_minor": 0,
|
| 4 |
+
"metadata": {
|
| 5 |
+
"colab": {
|
| 6 |
+
"provenance": [],
|
| 7 |
+
"machine_shape": "hm",
|
| 8 |
+
"gpuType": "L4"
|
| 9 |
+
},
|
| 10 |
+
"kernelspec": {
|
| 11 |
+
"name": "python3",
|
| 12 |
+
"display_name": "Python 3"
|
| 13 |
+
},
|
| 14 |
+
"language_info": {
|
| 15 |
+
"name": "python"
|
| 16 |
+
},
|
| 17 |
+
"accelerator": "GPU"
|
| 18 |
+
},
|
| 19 |
+
"cells": [
|
| 20 |
+
{
|
| 21 |
+
"cell_type": "markdown",
|
| 22 |
+
"source": [
|
| 23 |
+
"# Zonos Text-to-Speech in Google Colab\n",
|
| 24 |
+
"\n",
|
| 25 |
+
"This guide walks you through setting up and using Zonos, a text-to-speech model, in Google Colab.\n",
|
| 26 |
+
"\n",
|
| 27 |
+
"## Setup Instructions\n",
|
| 28 |
+
"\n",
|
| 29 |
+
"First, create a new Colab notebook and run these setup commands:\n"
|
| 30 |
+
],
|
| 31 |
+
"metadata": {
|
| 32 |
+
"id": "2KxPFOkv_weX"
|
| 33 |
+
}
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"cell_type": "code",
|
| 37 |
+
"source": [
|
| 38 |
+
"# Install system dependencies\n",
|
| 39 |
+
"!apt update && apt install -y espeak-ng\n",
|
| 40 |
+
"\n",
|
| 41 |
+
"# Install UV package manager\n",
|
| 42 |
+
"!pip install -U uv\n",
|
| 43 |
+
"\n",
|
| 44 |
+
"# Clone Zonos repository\n",
|
| 45 |
+
"!git clone https://github.com/Zyphra/Zonos.git\n",
|
| 46 |
+
"%cd Zonos\n",
|
| 47 |
+
"\n",
|
| 48 |
+
"# Install dependencies using UV\n",
|
| 49 |
+
"!uv sync\n",
|
| 50 |
+
"!uv sync --extra compile"
|
| 51 |
+
],
|
| 52 |
+
"metadata": {
|
| 53 |
+
"id": "otaPpBlI5kQK"
|
| 54 |
+
},
|
| 55 |
+
"execution_count": null,
|
| 56 |
+
"outputs": []
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"cell_type": "markdown",
|
| 60 |
+
"source": [
|
| 61 |
+
"\n",
|
| 62 |
+
"## Basic Usage Example\n",
|
| 63 |
+
"\n",
|
| 64 |
+
"Here's a complete example showing how to generate speech from text:"
|
| 65 |
+
],
|
| 66 |
+
"metadata": {
|
| 67 |
+
"id": "c7U2RJBjACfL"
|
| 68 |
+
}
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"cell_type": "code",
|
| 72 |
+
"source": [
|
| 73 |
+
"import torch\n",
|
| 74 |
+
"import torchaudio\n",
|
| 75 |
+
"from zonos.model import Zonos\n",
|
| 76 |
+
"from zonos.conditioning import make_cond_dict\n",
|
| 77 |
+
"\n",
|
| 78 |
+
"# Initialize model (use GPU if available)\n",
|
| 79 |
+
"device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n",
|
| 80 |
+
"model = Zonos.from_pretrained(\"Zyphra/Zonos-v0.1-transformer\", device=device)\n",
|
| 81 |
+
"\n",
|
| 82 |
+
"# Load reference audio for speaker characteristics\n",
|
| 83 |
+
"wav, sampling_rate = torchaudio.load(\"path_to_your_reference.mp3\")\n",
|
| 84 |
+
"speaker = model.make_speaker_embedding(wav, sampling_rate)\n",
|
| 85 |
+
"\n",
|
| 86 |
+
"# Set random seed for reproducibility\n",
|
| 87 |
+
"torch.manual_seed(421)\n",
|
| 88 |
+
"\n",
|
| 89 |
+
"# Create conditioning dictionary\n",
|
| 90 |
+
"cond_dict = make_cond_dict(\n",
|
| 91 |
+
" text=\"Hello, world!\",\n",
|
| 92 |
+
" speaker=speaker,\n",
|
| 93 |
+
" language=\"en-us\"\n",
|
| 94 |
+
")\n",
|
| 95 |
+
"conditioning = model.prepare_conditioning(cond_dict)\n",
|
| 96 |
+
"\n",
|
| 97 |
+
"# Generate audio codes\n",
|
| 98 |
+
"codes = model.generate(conditioning)\n",
|
| 99 |
+
"\n",
|
| 100 |
+
"# Decode to waveform and save\n",
|
| 101 |
+
"wavs = model.autoencoder.decode(codes).cpu()\n",
|
| 102 |
+
"torchaudio.save(\"output.wav\", wavs[0], model.autoencoder.sampling_rate)"
|
| 103 |
+
],
|
| 104 |
+
"metadata": {
|
| 105 |
+
"id": "MoyaNigzAK47"
|
| 106 |
+
},
|
| 107 |
+
"execution_count": null,
|
| 108 |
+
"outputs": []
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"cell_type": "markdown",
|
| 112 |
+
"source": [
|
| 113 |
+
"\n",
|
| 114 |
+
"## Available Model Variants\n",
|
| 115 |
+
"\n",
|
| 116 |
+
"Zonos offers two main model variants:\n",
|
| 117 |
+
"- `Zyphra/Zonos-v0.1-transformer`: Transformer-based model (default)\n",
|
| 118 |
+
"- `Zyphra/Zonos-v0.1-hybrid`: Hybrid model architecture\n",
|
| 119 |
+
"\n",
|
| 120 |
+
"## Common Parameters\n",
|
| 121 |
+
"\n",
|
| 122 |
+
"The `make_cond_dict()` function accepts these parameters:\n",
|
| 123 |
+
"- `text`: The text to synthesize (required)\n",
|
| 124 |
+
"- `speaker`: Speaker embedding tensor (required)\n",
|
| 125 |
+
"- `language`: Language code (default: \"en-us\")\n",
|
| 126 |
+
"- `emotion`: Emotional style (optional)\n",
|
| 127 |
+
"- `speed`: Speech rate multiplier (optional)\n",
|
| 128 |
+
"\n",
|
| 129 |
+
"## Tips for Best Results\n",
|
| 130 |
+
"\n",
|
| 131 |
+
"1. Use high-quality reference audio (clean, single-speaker recordings)\n",
|
| 132 |
+
"2. Keep input text lengths reasonable (under 200 words per generation)\n",
|
| 133 |
+
"3. Experiment with different random seeds for variety\n",
|
| 134 |
+
"4. Consider using the hybrid model for longer texts\n",
|
| 135 |
+
"5. Clean your reference audio from background noise if possible\n",
|
| 136 |
+
"\n",
|
| 137 |
+
"## Troubleshooting\n",
|
| 138 |
+
"\n",
|
| 139 |
+
"Common issues and solutions:\n",
|
| 140 |
+
"\n",
|
| 141 |
+
"### CUDA Out of Memory\n",
|
| 142 |
+
"- Reduce batch size\n",
|
| 143 |
+
"- Use shorter input text\n",
|
| 144 |
+
"- Switch to CPU if necessary\n",
|
| 145 |
+
"- Clear torch cache: `torch.cuda.empty_cache()`\n",
|
| 146 |
+
"\n",
|
| 147 |
+
"### Poor Audio Quality\n",
|
| 148 |
+
"- Check reference audio quality\n",
|
| 149 |
+
"- Try different random seeds\n",
|
| 150 |
+
"- Adjust conditioning parameters\n",
|
| 151 |
+
"- Use a different model variant\n",
|
| 152 |
+
"\n",
|
| 153 |
+
"### Installation Issues\n",
|
| 154 |
+
"- Ensure all dependencies are installed\n",
|
| 155 |
+
"- Check CUDA compatibility\n",
|
| 156 |
+
"- Try reinstalling with `--force-reinstall`\n",
|
| 157 |
+
"\n",
|
| 158 |
+
"## Resources\n",
|
| 159 |
+
"\n",
|
| 160 |
+
"- [Zonos GitHub Repository](https://github.com/Zyphra/Zonos)\n",
|
| 161 |
+
"- [Model Card on Hugging Face](https://huggingface.co/Zyphra/Zonos-v0.1-transformer)\n",
|
| 162 |
+
"\n",
|
| 163 |
+
"Note: This documentation assumes basic familiarity with Python and Google Colab. For more detailed information, refer to the official repository."
|
| 164 |
+
],
|
| 165 |
+
"metadata": {
|
| 166 |
+
"id": "RrEyAyBJAQwT"
|
| 167 |
+
}
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"cell_type": "code",
|
| 171 |
+
"source": [
|
| 172 |
+
"!uv run sample.py\n",
|
| 173 |
+
"\n"
|
| 174 |
+
],
|
| 175 |
+
"metadata": {
|
| 176 |
+
"colab": {
|
| 177 |
+
"base_uri": "https://localhost:8080/"
|
| 178 |
+
},
|
| 179 |
+
"id": "_M20HuL38k_Z",
|
| 180 |
+
"outputId": "259a14d1-8da6-4666-dfef-fd79cf00e29a"
|
| 181 |
+
},
|
| 182 |
+
"execution_count": null,
|
| 183 |
+
"outputs": [
|
| 184 |
+
{
|
| 185 |
+
"output_type": "stream",
|
| 186 |
+
"name": "stdout",
|
| 187 |
+
"text": [
|
| 188 |
+
"config.json: 100% 2.52k/2.52k [00:00<00:00, 13.6MB/s]\n",
|
| 189 |
+
"model.safetensors: 100% 3.25G/3.25G [01:16<00:00, 42.2MB/s]\n",
|
| 190 |
+
"config.json: 100% 541/541 [00:00<00:00, 3.97MB/s]\n",
|
| 191 |
+
"model.safetensors: 100% 307M/307M [00:07<00:00, 42.2MB/s]\n",
|
| 192 |
+
"ResNet293_SimAM_ASP_base.pt: 100% 397M/397M [00:09<00:00, 42.3MB/s]\n",
|
| 193 |
+
"ResNet293_SimAM_ASP_base_LDA-128.pt: 100% 265k/265k [00:00<00:00, 199MB/s]\n",
|
| 194 |
+
"Generating: 5% 130/2588 [00:02<00:50, 48.35it/s]\n"
|
| 195 |
+
]
|
| 196 |
+
}
|
| 197 |
+
]
|
| 198 |
+
}
|
| 199 |
+
]
|
| 200 |
+
}
|
models/Zonos-v0.1-transformer/Zonos_v0_1_Text_to_Speech.ipynb
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"nbformat": 4,
|
| 3 |
+
"nbformat_minor": 0,
|
| 4 |
+
"metadata": {
|
| 5 |
+
"colab": {
|
| 6 |
+
"provenance": []
|
| 7 |
+
},
|
| 8 |
+
"kernelspec": {
|
| 9 |
+
"name": "python3",
|
| 10 |
+
"display_name": "Python 3"
|
| 11 |
+
},
|
| 12 |
+
"language_info": {
|
| 13 |
+
"name": "python"
|
| 14 |
+
}
|
| 15 |
+
},
|
| 16 |
+
"cells": [
|
| 17 |
+
{
|
| 18 |
+
"cell_type": "markdown",
|
| 19 |
+
"source": [
|
| 20 |
+
"# 🎧 Zonos v0.1 Text-to-Speech Demo\n",
|
| 21 |
+
"\n",
|
| 22 |
+
"Welcome to the Zonos Text-to-Speech demo! This notebook demonstrates how to use the Zonos TTS model to generate high-quality speech in multiple languages.\n",
|
| 23 |
+
"\n",
|
| 24 |
+
"## 📦 Setup\n",
|
| 25 |
+
"\n",
|
| 26 |
+
"First, let's install the required dependencies:"
|
| 27 |
+
],
|
| 28 |
+
"metadata": {
|
| 29 |
+
"id": "N-549GV0DfSD"
|
| 30 |
+
}
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"cell_type": "code",
|
| 34 |
+
"source": [
|
| 35 |
+
"# Install system dependencies\n",
|
| 36 |
+
"!apt update && apt install -y espeak-ng\n",
|
| 37 |
+
"\n",
|
| 38 |
+
"# Install UV package manager\n",
|
| 39 |
+
"!pip install -U uv\n",
|
| 40 |
+
"\n",
|
| 41 |
+
"# Clone Zonos repository\n",
|
| 42 |
+
"!git clone https://github.com/Zyphra/Zonos.git\n",
|
| 43 |
+
"%cd Zonos\n",
|
| 44 |
+
"\n",
|
| 45 |
+
"# Install dependencies using UV\n",
|
| 46 |
+
"!uv sync\n",
|
| 47 |
+
"!uv sync --extra compile"
|
| 48 |
+
],
|
| 49 |
+
"metadata": {
|
| 50 |
+
"id": "la2K7_QCDinW"
|
| 51 |
+
},
|
| 52 |
+
"execution_count": null,
|
| 53 |
+
"outputs": []
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"cell_type": "markdown",
|
| 57 |
+
"source": [
|
| 58 |
+
"\n",
|
| 59 |
+
"## 🎵 Upload Reference Audio\n",
|
| 60 |
+
"\n",
|
| 61 |
+
"Upload a reference audio file that Zonos will use to clone the voice:\n"
|
| 62 |
+
],
|
| 63 |
+
"metadata": {
|
| 64 |
+
"id": "fINPv_7nDmJw"
|
| 65 |
+
}
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"cell_type": "code",
|
| 69 |
+
"source": [
|
| 70 |
+
"# Create assets directory\n",
|
| 71 |
+
"!mkdir -p assets\n",
|
| 72 |
+
"\n",
|
| 73 |
+
"# Option 1: Upload from your computer\n",
|
| 74 |
+
"from google.colab import files\n",
|
| 75 |
+
"uploaded = files.upload()\n",
|
| 76 |
+
"for filename in uploaded.keys():\n",
|
| 77 |
+
" !mv \"{filename}\" \"assets/reference.mp3\"\n",
|
| 78 |
+
"\n",
|
| 79 |
+
"# Option 2: Download from URL\n",
|
| 80 |
+
"# !wget -O assets/reference.mp3 YOUR_AUDIO_URL_HERE"
|
| 81 |
+
],
|
| 82 |
+
"metadata": {
|
| 83 |
+
"id": "FzZs7PaUDok4"
|
| 84 |
+
},
|
| 85 |
+
"execution_count": null,
|
| 86 |
+
"outputs": []
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"cell_type": "markdown",
|
| 90 |
+
"source": [
|
| 91 |
+
"## 🚀 Generate Speech\n",
|
| 92 |
+
"\n",
|
| 93 |
+
"Now let's generate some speech using the model:"
|
| 94 |
+
],
|
| 95 |
+
"metadata": {
|
| 96 |
+
"id": "mA0GTXGFDzLq"
|
| 97 |
+
}
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"cell_type": "code",
|
| 101 |
+
"source": [
|
| 102 |
+
"\n",
|
| 103 |
+
"import torch\n",
|
| 104 |
+
"import torchaudio\n",
|
| 105 |
+
"from zonos.model import Zonos\n",
|
| 106 |
+
"from zonos.conditioning import make_cond_dict\n",
|
| 107 |
+
"\n",
|
| 108 |
+
"# Check device\n",
|
| 109 |
+
"device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n",
|
| 110 |
+
"print(f\"Using device: {device}\")\n",
|
| 111 |
+
"\n",
|
| 112 |
+
"# Load model\n",
|
| 113 |
+
"print(\"Loading model...\")\n",
|
| 114 |
+
"model = Zonos.from_pretrained(\"Zyphra/Zonos-v0.1-transformer\", device=device)\n",
|
| 115 |
+
"\n",
|
| 116 |
+
"# Load reference audio\n",
|
| 117 |
+
"print(\"Loading reference audio...\")\n",
|
| 118 |
+
"wav, sampling_rate = torchaudio.load(\"assets/reference.mp3\")\n",
|
| 119 |
+
"speaker = model.make_speaker_embedding(wav, sampling_rate)\n",
|
| 120 |
+
"\n",
|
| 121 |
+
"# Set seed for reproducibility\n",
|
| 122 |
+
"torch.manual_seed(421)\n",
|
| 123 |
+
"\n",
|
| 124 |
+
"def generate_speech(text, language=\"en-us\", speed=1.0):\n",
|
| 125 |
+
" \"\"\"Generate speech from text\"\"\"\n",
|
| 126 |
+
" print(f\"Generating: {text}\")\n",
|
| 127 |
+
"\n",
|
| 128 |
+
" # Create conditioning\n",
|
| 129 |
+
" cond_dict = make_cond_dict(\n",
|
| 130 |
+
" text=text,\n",
|
| 131 |
+
" speaker=speaker,\n",
|
| 132 |
+
" language=language,\n",
|
| 133 |
+
" speed=speed\n",
|
| 134 |
+
" )\n",
|
| 135 |
+
" conditioning = model.prepare_conditioning(cond_dict)\n",
|
| 136 |
+
"\n",
|
| 137 |
+
" # Generate audio\n",
|
| 138 |
+
" codes = model.generate(conditioning)\n",
|
| 139 |
+
" wavs = model.autoencoder.decode(codes).cpu()\n",
|
| 140 |
+
"\n",
|
| 141 |
+
" # Save and play\n",
|
| 142 |
+
" filename = \"output.wav\"\n",
|
| 143 |
+
" torchaudio.save(filename, wavs[0], model.autoencoder.sampling_rate)\n",
|
| 144 |
+
" return filename\n",
|
| 145 |
+
"\n",
|
| 146 |
+
"# Test generation\n",
|
| 147 |
+
"output_file = generate_speech(\n",
|
| 148 |
+
" \"Welcome to Zonos Text-to-Speech! This is a demo of voice cloning technology.\",\n",
|
| 149 |
+
" language=\"en-us\",\n",
|
| 150 |
+
" speed=1.0\n",
|
| 151 |
+
")\n",
|
| 152 |
+
"\n",
|
| 153 |
+
"# Play the generated audio\n",
|
| 154 |
+
"from IPython.display import Audio\n",
|
| 155 |
+
"Audio(output_file)"
|
| 156 |
+
],
|
| 157 |
+
"metadata": {
|
| 158 |
+
"id": "wyTwtvfoD1X_"
|
| 159 |
+
},
|
| 160 |
+
"execution_count": null,
|
| 161 |
+
"outputs": []
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"cell_type": "markdown",
|
| 165 |
+
"source": [
|
| 166 |
+
"## 🌍 Multi-language Support\n",
|
| 167 |
+
"\n",
|
| 168 |
+
"Try generating speech in different languages:"
|
| 169 |
+
],
|
| 170 |
+
"metadata": {
|
| 171 |
+
"id": "Mlx2IZBLD82n"
|
| 172 |
+
}
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"cell_type": "code",
|
| 176 |
+
"source": [
|
| 177 |
+
"# Generate speech in multiple languages\n",
|
| 178 |
+
"languages = {\n",
|
| 179 |
+
" \"English\": (\"en-us\", \"Hello, how are you today?\"),\n",
|
| 180 |
+
" \"Japanese\": (\"ja-jp\", \"こんにちは、お元気ですか?\"),\n",
|
| 181 |
+
" \"Spanish\": (\"es-es\", \"¡Hola! ¿Cómo estás?\"),\n",
|
| 182 |
+
" \"Korean\": (\"ko-kr\", \"안녕하세요, 오늘 기분이 어떠신가요?\"),\n",
|
| 183 |
+
" \"Russian\": (\"ru-ru\", \"Привет, как дела?\"),\n",
|
| 184 |
+
" \"French\": (\"fr-fr\", \"Bonjour, comment allez-vous?\"),\n",
|
| 185 |
+
" \"German\": (\"de-de\", \"Hallo, wie geht es dir?\"),\n",
|
| 186 |
+
" \"Chinese\": (\"zh-cn\", \"你好,今天过得怎么样?\"),\n",
|
| 187 |
+
" \"Hindi\": (\"hi-in\", \"नमस्ते, आप कैसे हैं?\"),\n",
|
| 188 |
+
" \"Arabic\": (\"ar-ae\", \"مرحبا، كيف حالك؟\")\n",
|
| 189 |
+
"}\n",
|
| 190 |
+
"\n",
|
| 191 |
+
"for lang_name, (lang_code, text) in languages.items():\n",
|
| 192 |
+
" print(f\"\\n{lang_name}:\")\n",
|
| 193 |
+
" output_file = generate_speech(text, language=lang_code)\n",
|
| 194 |
+
" display(Audio(output_file))"
|
| 195 |
+
],
|
| 196 |
+
"metadata": {
|
| 197 |
+
"id": "Wm3RgQcsD_tT"
|
| 198 |
+
},
|
| 199 |
+
"execution_count": null,
|
| 200 |
+
"outputs": []
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"cell_type": "markdown",
|
| 204 |
+
"source": [
|
| 205 |
+
"## ⚡ Speed Control\n",
|
| 206 |
+
"\n",
|
| 207 |
+
"Experiment with different speech speeds:"
|
| 208 |
+
],
|
| 209 |
+
"metadata": {
|
| 210 |
+
"id": "lu3u-xstEEaj"
|
| 211 |
+
}
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"cell_type": "code",
|
| 215 |
+
"source": [
|
| 216 |
+
"text = \"This is a demonstration of speech rate control in Zonos.\"\n",
|
| 217 |
+
"speeds = [0.8, 1.0, 1.2, 1.5]\n",
|
| 218 |
+
"\n",
|
| 219 |
+
"for speed in speeds:\n",
|
| 220 |
+
" print(f\"\\nSpeed {speed}x:\")\n",
|
| 221 |
+
" output_file = generate_speech(text, speed=speed)\n",
|
| 222 |
+
" display(Audio(output_file))"
|
| 223 |
+
],
|
| 224 |
+
"metadata": {
|
| 225 |
+
"id": "pX_0hcZ3EDYH"
|
| 226 |
+
},
|
| 227 |
+
"execution_count": null,
|
| 228 |
+
"outputs": []
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"cell_type": "markdown",
|
| 232 |
+
"source": [
|
| 233 |
+
"## 📝 Custom Text Generation\n",
|
| 234 |
+
"\n",
|
| 235 |
+
"Try your own text:"
|
| 236 |
+
],
|
| 237 |
+
"metadata": {
|
| 238 |
+
"id": "zw8Y6T6zEIS-"
|
| 239 |
+
}
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"cell_type": "code",
|
| 243 |
+
"source": [
|
| 244 |
+
"# @title Generate Speech from Text\n",
|
| 245 |
+
"text = \"Type your text here\" # @param {type:\"string\"}\n",
|
| 246 |
+
"language = \"en-us\" # @param [\"en-us\", \"ja-jp\", \"es-es\", \"ko-kr\", \"ru-ru\", \"fr-fr\", \"de-de\", \"zh-cn\", \"hi-in\", \"ar-ae\"]\n",
|
| 247 |
+
"speed = 1.0 # @param {type:\"slider\", min:0.5, max:2.0, step:0.1}\n",
|
| 248 |
+
"\n",
|
| 249 |
+
"output_file = generate_speech(text, language=language, speed=speed)\n",
|
| 250 |
+
"Audio(output_file)"
|
| 251 |
+
],
|
| 252 |
+
"metadata": {
|
| 253 |
+
"id": "fWQE9d_JEKqj"
|
| 254 |
+
},
|
| 255 |
+
"execution_count": null,
|
| 256 |
+
"outputs": []
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"cell_type": "markdown",
|
| 260 |
+
"source": [
|
| 261 |
+
"\n",
|
| 262 |
+
"\n",
|
| 263 |
+
"## 📚 Resources\n",
|
| 264 |
+
"\n",
|
| 265 |
+
"- [Zonos GitHub Repository](https://github.com/Zyphra/Zonos)\n",
|
| 266 |
+
"- [Model on Hugging Face](https://huggingface.co/Zyphra/Zonos-v0.1-transformer)\n",
|
| 267 |
+
"- [Documentation](https://github.com/Zyphra/Zonos/blob/main/README.md)\n",
|
| 268 |
+
"\n",
|
| 269 |
+
"## 🤝 Community\n",
|
| 270 |
+
"\n",
|
| 271 |
+
"- Share your generations with the community using #ZonosAI\n",
|
| 272 |
+
"- Report issues on [GitHub](https://github.com/Zyphra/Zonos/issues)\n",
|
| 273 |
+
"- Join discussions on [Discord](https://discord.gg/zonos)\n",
|
| 274 |
+
"\n",
|
| 275 |
+
"## ⚠️ Notes\n",
|
| 276 |
+
"\n",
|
| 277 |
+
"1. For best results:\n",
|
| 278 |
+
" - Use clear reference audio (5-10 seconds)\n",
|
| 279 |
+
" - Avoid background noise\n",
|
| 280 |
+
" - Keep input text reasonably sized\n",
|
| 281 |
+
" - Experiment with different speeds\n",
|
| 282 |
+
"\n",
|
| 283 |
+
"2. Troubleshooting:\n",
|
| 284 |
+
" - If you get CUDA out of memory errors, try:\n",
|
| 285 |
+
" - Shorter text\n",
|
| 286 |
+
" - Lower batch size\n",
|
| 287 |
+
" - CPU mode\n",
|
| 288 |
+
" - `torch.cuda.empty_cache()`\n",
|
| 289 |
+
" - For audio quality issues:\n",
|
| 290 |
+
" - Try different reference audio\n",
|
| 291 |
+
" - Adjust speed parameter\n",
|
| 292 |
+
" - Change random seed\n"
|
| 293 |
+
],
|
| 294 |
+
"metadata": {
|
| 295 |
+
"id": "Ek_mm65_DbHK"
|
| 296 |
+
}
|
| 297 |
+
}
|
| 298 |
+
]
|
| 299 |
+
}
|
models/Zonos-v0.1-transformer/config.json
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backbone": {
|
| 3 |
+
"d_model": 2048,
|
| 4 |
+
"d_intermediate": 0,
|
| 5 |
+
"attn_mlp_d_intermediate": 8192,
|
| 6 |
+
"n_layer": 26,
|
| 7 |
+
"ssm_cfg": {},
|
| 8 |
+
"attn_layer_idx": [
|
| 9 |
+
0,
|
| 10 |
+
1,
|
| 11 |
+
2,
|
| 12 |
+
3,
|
| 13 |
+
4,
|
| 14 |
+
5,
|
| 15 |
+
6,
|
| 16 |
+
7,
|
| 17 |
+
8,
|
| 18 |
+
9,
|
| 19 |
+
10,
|
| 20 |
+
11,
|
| 21 |
+
12,
|
| 22 |
+
13,
|
| 23 |
+
14,
|
| 24 |
+
15,
|
| 25 |
+
16,
|
| 26 |
+
17,
|
| 27 |
+
18,
|
| 28 |
+
19,
|
| 29 |
+
20,
|
| 30 |
+
21,
|
| 31 |
+
22,
|
| 32 |
+
23,
|
| 33 |
+
24,
|
| 34 |
+
25
|
| 35 |
+
],
|
| 36 |
+
"attn_cfg": {
|
| 37 |
+
"causal": true,
|
| 38 |
+
"num_heads": 16,
|
| 39 |
+
"num_heads_kv": 4,
|
| 40 |
+
"rotary_emb_dim": 128,
|
| 41 |
+
"rotary_emb_interleaved": true,
|
| 42 |
+
"qkv_proj_bias": false,
|
| 43 |
+
"out_proj_bias": false
|
| 44 |
+
},
|
| 45 |
+
"rms_norm": false,
|
| 46 |
+
"residual_in_fp32": false,
|
| 47 |
+
"norm_epsilon": 1e-05
|
| 48 |
+
},
|
| 49 |
+
"prefix_conditioner": {
|
| 50 |
+
"conditioners": [
|
| 51 |
+
{
|
| 52 |
+
"type": "EspeakPhonemeConditioner",
|
| 53 |
+
"name": "espeak"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"cond_dim": 128,
|
| 57 |
+
"uncond_type": "learned",
|
| 58 |
+
"projection": "linear",
|
| 59 |
+
"type": "PassthroughConditioner",
|
| 60 |
+
"name": "speaker"
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"input_dim": 8,
|
| 64 |
+
"uncond_type": "learned",
|
| 65 |
+
"type": "FourierConditioner",
|
| 66 |
+
"name": "emotion"
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"min_val": 0,
|
| 70 |
+
"max_val": 24000,
|
| 71 |
+
"uncond_type": "learned",
|
| 72 |
+
"type": "FourierConditioner",
|
| 73 |
+
"name": "fmax"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"min_val": 0,
|
| 77 |
+
"max_val": 400,
|
| 78 |
+
"uncond_type": "learned",
|
| 79 |
+
"type": "FourierConditioner",
|
| 80 |
+
"name": "pitch_std"
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"min_val": 0,
|
| 84 |
+
"max_val": 40,
|
| 85 |
+
"uncond_type": "learned",
|
| 86 |
+
"type": "FourierConditioner",
|
| 87 |
+
"name": "speaking_rate"
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"min_val": -1,
|
| 91 |
+
"max_val": 126,
|
| 92 |
+
"uncond_type": "learned",
|
| 93 |
+
"type": "IntegerConditioner",
|
| 94 |
+
"name": "language_id"
|
| 95 |
+
}
|
| 96 |
+
],
|
| 97 |
+
"projection": "linear"
|
| 98 |
+
},
|
| 99 |
+
"eos_token_id": 1024,
|
| 100 |
+
"masked_token_id": 1025
|
| 101 |
+
}
|
models/Zonos-v0.1-transformer/issues.txt
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 2 |
+
#2 Streaming support / batch inference?
|
| 3 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 4 |
+
|
| 5 |
+
[brainofchild] Feb 11, 2025
|
| 6 |
+
|
| 7 |
+
For production purposes, these are important. Was curious how the model handles output streaming / batch inference.
|
| 8 |
+
|
| 9 |
+
[gabrielclark3330, Zyphra.org] Feb 13, 2025
|
| 10 |
+
|
| 11 |
+
Both are possible but have not been added to the codebase yet. We will definitely ship streaming as there is already a PR out for it.
|
| 12 |
+
|
| 13 |
+
[brainofchild] Apr 14, 2025
|
| 14 |
+
|
| 15 |
+
Curious to hear if there are any updates!
|
| 16 |
+
|
| 17 |
+
[ism0il] Oct 2, 2025
|
| 18 |
+
|
| 19 |
+
Any update?
|
| 20 |
+
|
| 21 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 22 |
+
#5 Zonos not installing backbone
|
| 23 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 24 |
+
|
| 25 |
+
[mnemic] Feb 27, 2025
|
| 26 |
+
|
| 27 |
+
To fix it, I needed to:
|
| 28 |
+
Git clone https://github.com/Zyphra/Zonos/
|
| 29 |
+
|
| 30 |
+
Edit pyproject.toml:
|
| 31 |
+
|
| 32 |
+
[project]
|
| 33 |
+
name = "zonos"
|
| 34 |
+
version = "0.1.0"
|
| 35 |
+
description = "Text-to-speech by Zyphra"
|
| 36 |
+
readme = "README.md"
|
| 37 |
+
requires-python = ">=3.10"
|
| 38 |
+
dependencies = [
|
| 39 |
+
"torch>=2.5.1",
|
| 40 |
+
"setuptools",
|
| 41 |
+
"packaging",
|
| 42 |
+
"inflect>=7.5.0",
|
| 43 |
+
"kanjize>=1.5.0",
|
| 44 |
+
"numpy>=2.2.2",
|
| 45 |
+
"phonemizer>=3.3.0",
|
| 46 |
+
"sudachidict-full>=20241021",
|
| 47 |
+
"sudachipy>=0.6.10",
|
| 48 |
+
"torchaudio>=2.5.1",
|
| 49 |
+
"transformers>=4.48.1",
|
| 50 |
+
"soundfile>=0.13.1",
|
| 51 |
+
"huggingface-hub>=0.28.1",
|
| 52 |
+
"gradio>=5.15.0",
|
| 53 |
+
]
|
| 54 |
+
|
| 55 |
+
# These are technically optional, but mamba-ssm is required to run hybrid models.
|
| 56 |
+
[project.optional-dependencies]
|
| 57 |
+
compile = [
|
| 58 |
+
"flash-attn>=2.7.3",
|
| 59 |
+
"mamba-ssm>=2.2.4",
|
| 60 |
+
"causal-conv1d>=1.5.0.post8",
|
| 61 |
+
]
|
| 62 |
+
|
| 63 |
+
[tool.setuptools.packages.find]
|
| 64 |
+
include = ["zonos", "zonos.*"]
|
| 65 |
+
|
| 66 |
+
[tool.uv]
|
| 67 |
+
no-build-isolation-package = ["flash-attn", "mamba-ssm", "causal-conv1d"]
|
| 68 |
+
|
| 69 |
+
[tool.ruff]
|
| 70 |
+
line-length = 120
|
| 71 |
+
|
| 72 |
+
The difference was this line:
|
| 73 |
+
include = ["zonos", "zonos.*"]
|
| 74 |
+
|
| 75 |
+
Then do a "pip install" inside this folder, to install it into the virtual environment.
|
| 76 |
+
|
| 77 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 78 |
+
#7 Zonos is excellent, but there's one major issue that makes it's use impractical - the "uh" (and "um") sounds weren't labelled in the dataset
|
| 79 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 80 |
+
|
| 81 |
+
[jattoedaltni] Mar 13, 2025
|
| 82 |
+
|
| 83 |
+
I've spoken to a few others about this, I know it's not just me or the specific input .wavs - I think the training data didn't label "uh" and "um" in people's speech, and thus, random "uh" sounds appear extremely consistently in the outputs.
|
| 84 |
+
(And the output does not output a normal "uh" sound, but since the model was trained to output the "uh" sound where it wasn't labelled, it randomly attached it to many words, especially those starting with vowels. The result is that it sounds like an extra syllable directly attached to the word, and making the word partly unrecognizable)
|
| 85 |
+
It's important that those "uh" and sounds are removed or at least labelled for the next iteration.
|
| 86 |
+
Other than that it's almost perfect!
|
| 87 |
+
|
| 88 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 89 |
+
#11 German with english accent?
|
| 90 |
+
------------------------------------------------------------------------------------------------------------------------------------------------
|
| 91 |
+
|
| 92 |
+
[fesrgs] May 30, 2025
|
| 93 |
+
|
| 94 |
+
Zonos is perfect as a tool, but the "de" model doesn't seems to generate speech without an English accent for me.
|
| 95 |
+
Is there currently a way to generate perfect german?
|
models/Zonos-v0.1-transformer/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ac68319d6b8c1b29b94b8801ca41a93a5fc458f4b1d4bbbe5045b2ee77efcf0
|
| 3 |
+
size 3248848864
|
models/Zonos-v0.1-transformer/source.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/Zyphra/Zonos-v0.1-transformer
|
models/zonos-assets/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
models/zonos-assets/dac.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"num_codebooks": 9, "sampling_rate": 44100}
|
models/zonos-assets/dac_decode.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:894114aaca947f80dca5ba5ca0b229fe227ccf31e482ea46527190ccb41125ec
|
| 3 |
+
size 217067971
|
models/zonos-assets/dac_encode.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb742ae3eb64985f210079eb6af49d6a1e751937ffdaffb9ece46f9688c9fec6
|
| 3 |
+
size 90461103
|
models/zonos-assets/issues.txt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-----------------------------------------------------------------------
|
| 2 |
+
#1 I have checked ONNX OPs supported by RKNN Toolkit2
|
| 3 |
+
-----------------------------------------------------------------------
|
| 4 |
+
|
| 5 |
+
[Mongdol1] Aug 4, 2025
|
| 6 |
+
|
| 7 |
+
RKNNToolkit2 is a toolkit for Rockchip's NPU.
|
| 8 |
+
|
| 9 |
+
=>dac_decode.onnx <=
|
| 10 |
+
| Used op| support |
|
| 11 |
+
| Add | O |
|
| 12 |
+
| Conv | O |
|
| 13 |
+
| ConvTranspose | O |
|
| 14 |
+
| Gather | O |
|
| 15 |
+
| Mul | O |
|
| 16 |
+
| Pow | O |
|
| 17 |
+
| Sin | O |
|
| 18 |
+
| Squeeze |O |
|
| 19 |
+
| Tanh | O |
|
| 20 |
+
| Transpose |O |
|
| 21 |
+
| Unsqueeze | O |
|
| 22 |
+
|
| 23 |
+
=> dac_encode.onnx <=
|
| 24 |
+
| Used op| support |
|
| 25 |
+
| Abs | O |
|
| 26 |
+
| Add | O |
|
| 27 |
+
| ArgMax | O |
|
| 28 |
+
| Clip | O |
|
| 29 |
+
| Concat | O |
|
| 30 |
+
| Conv |O |
|
| 31 |
+
| Div | O |
|
| 32 |
+
| Expand | O |
|
| 33 |
+
| Gather | O |
|
| 34 |
+
| MatMul | O |
|
| 35 |
+
| Mul | O |
|
| 36 |
+
| Neg | O |
|
| 37 |
+
| Pow | O |
|
| 38 |
+
| ReduceL2| X | ❌
|
| 39 |
+
| ReduceSum |O |
|
| 40 |
+
| Reshape | O |
|
| 41 |
+
| Shape | O |
|
| 42 |
+
| Sin | O |
|
| 43 |
+
| Squeeze | O |
|
| 44 |
+
| Sub | O |
|
| 45 |
+
| Transpose | O |
|
| 46 |
+
| Unsqueeze | O |
|
| 47 |
+
|
| 48 |
+
=> speaker_embedding_lda.onnx <=
|
| 49 |
+
|
| 50 |
+
| Used op| support |
|
| 51 |
+
| Add | O |
|
| 52 |
+
| BatchNormalization | O |
|
| 53 |
+
| Cast | O |
|
| 54 |
+
| Clip | O |
|
| 55 |
+
| Concat | O |
|
| 56 |
+
| Conv | O |
|
| 57 |
+
| Div | O |
|
| 58 |
+
| Gather | O |
|
| 59 |
+
| Gemm | O |
|
| 60 |
+
| Mul | O |
|
| 61 |
+
| Pow | O |
|
| 62 |
+
| ReduceMean | O |
|
| 63 |
+
| ReduceSum | O |
|
| 64 |
+
| Relu | O |
|
| 65 |
+
| Reshape | O |
|
| 66 |
+
| Shape | O |
|
| 67 |
+
| Sigmoid | O |
|
| 68 |
+
| Softmax | O |
|
| 69 |
+
| Sqrt | O |
|
| 70 |
+
| Sub | O |
|
| 71 |
+
| Unsqueeze | O |
|
models/zonos-assets/silent.wav
ADDED
|
Binary file (9.43 kB). View file
|
|
|
models/zonos-assets/source.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/neody/zonos-assets
|
models/zonos-assets/speaker_embedding_lda.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6da5eb350808a0f1771b34352cec9a22b53378aa4249f75fa89b51cd0e2aebfd
|
| 3 |
+
size 402992435
|
wiki/Beta Release of Zonos v0.1.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b983a56053b5cc16ad7c4cb490afaefbcd5e659ffb11f7ea095a1b4d45eb796
|
| 3 |
+
size 4173594
|
wiki/Zonos v0.1. Best Open Source AI Voice Clone Tool.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:132c8f31b63194e7675552fe684a2dcaa1e97f32ba13e07792c9669c3b474449
|
| 3 |
+
size 3062830
|
wiki/Zyphra Just Dropped Zonos. Instant TTS and Voice Cloning. Install Locally.mkv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3dc201ed13f1525208c495383f72a1c22bdbbee0017d113a1f53ddddb706ff3
|
| 3 |
+
size 46213991
|