> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-hi/audio-and-voice/zonos-tts.md).

# Zonos TTS वॉइस क्लोनिंग

Clore.ai GPUs पर भावना और पिच नियंत्रण के साथ वॉइस क्लोनिंग के लिए Zyphra द्वारा Zonos TTS चलाएँ।

Zonos द्वारा [Zyphra](https://www.zyphra.com/) यह 0.4B-पैरामीटर वाला ओपन-वेट टेक्स्ट-टू-स्पीच मॉडल है, जिसे 200K+ घंटे की बहुभाषी वाणी पर प्रशिक्षित किया गया है। यह केवल 2–30 सेकंड के संदर्भ ऑडियो से ज़ीरो-शॉट वॉइस क्लोनिंग करता है और भावना, बोलने की गति, पिच में बदलाव, तथा ऑडियो गुणवत्ता पर सूक्ष्म नियंत्रण प्रदान करता है। आउटपुट उच्च-निष्ठा 44 kHz ऑडियो होता है। दो मॉडल वेरिएंट उपलब्ध हैं: Transformer (सर्वोत्तम गुणवत्ता) और Hybrid/Mamba (तेज़ इन्फ़रेंस)।

**GitHub:** [Zyphra/Zonos](https://github.com/Zyphra/Zonos) **HuggingFace:** [Zyphra/Zonos-v0.1-transformer](https://huggingface.co/Zyphra/Zonos-v0.1-transformer) **लाइसेंस:** Apache 2.0

## मुख्य विशेषताएँ

* **2–30 सेकंड से वॉइस क्लोनिंग** — किसी फाइन-ट्यूनिंग की आवश्यकता नहीं
* **44 kHz उच्च-निष्ठा आउटपुट** — स्टूडियो-स्तरीय ऑडियो गुणवत्ता
* **भावना नियंत्रण** — 8-आयामी वेक्टर के माध्यम से खुशी, उदासी, क्रोध, भय, आश्चर्य, घृणा
* **बोलने की गति और पिच** — स्वतंत्र सूक्ष्म नियंत्रण
* **ऑडियो प्रिफ़िक्स इनपुट** — फुसफुसाहट और अन्य कठिन-से-क्लोन व्यवहारों को सक्षम करता है
* **बहुभाषी** — अंग्रेज़ी, जापानी, चीनी, फ़्रेंच, जर्मन
* **दो आर्किटेक्चर** — Transformer (गुणवत्ता) और Hybrid/Mamba (गति, RTX 4090 पर लगभग 2× रीयल-टाइम)
* **Apache 2.0** — व्यक्तिगत और व्यावसायिक उपयोग के लिए निःशुल्क

## आवश्यकताएँ

| घटक    | न्यूनतम            | अनुशंसित       |
| ------ | ------------------ | -------------- |
| GPU    | RTX 3080 10 GB     | RTX 4090 24 GB |
| VRAM   | 6 GB (Transformer) | 10 GB+         |
| RAM    | 16 GB              | 32 GB          |
| डिस्क  | 10 GB              | 20 GB          |
| Python | 3.10+              | 3.11           |
| CUDA   | 12.8+              | 12.8+          |
| सिस्टम | espeak-ng          | —              |

**Clore.ai की सिफारिश:** आरामदायक हेडरूम के लिए RTX 3090 ($0.07–0.21/घंटा)। Hybrid मॉडल और सबसे तेज़ इन्फ़रेंस के लिए RTX 4090 ($0.14–0.42/घंटा)।

## इंस्टॉलेशन

```bash
# सिस्टम निर्भरता इंस्टॉल करें
apt-get install -y espeak-ng

# क्लोन करें और इंस्टॉल करें
git clone https://github.com/Zyphra/Zonos.git
cd Zonos
pip install -e .

# Hybrid मॉडल के लिए (Ampere+ GPU, यानी RTX 3000 सीरीज़ या उससे नया चाहिए)
pip install -e ".[compile]"

# सत्यापित करें
python -c "from zonos.model import Zonos; print('Zonos तैयार है')"
```

## त्वरित शुरुआत

```python
import torch
import torchaudio
from zonos.model import Zonos
from zonos.conditioning import make_cond_dict

# मॉडल लोड करें (पहली बार चलाने पर वज़न डाउनलोड होंगे)
model = Zonos.from_pretrained("Zyphra/Zonos-v0.1-transformer", device="cuda")

# वॉइस क्लोनिंग के लिए संदर्भ ऑडियो लोड करें
wav, sr = torchaudio.load("reference_speaker.wav")
speaker = model.make_speaker_embedding(wav, sr)

# कंडीशनिंग बनाएँ
cond_dict = make_cond_dict(
    text="Clore.ai से नमस्ते! यह वॉइस क्लोनिंग का एक प्रदर्शन है.",
    speaker=speaker,
    language="en-us",
)
conditioning = model.prepare_conditioning(cond_dict)

# जनरेट करें
torch.manual_seed(42)
codes = model.generate(conditioning)
wavs = model.autoencoder.decode(codes).cpu()

torchaudio.save("output.wav", wavs[0], model.autoencoder.sampling_rate)
print(f"output.wav को {model.autoencoder.sampling_rate} Hz पर सहेजा गया")
```

## उपयोग के उदाहरण

### भावना नियंत्रण

Zonos 8-आयामी भावना वेक्टर स्वीकार करता है: `[खुशी, उदासी, घृणा, भय, आश्चर्य, क्रोध, अन्य, तटस्थ]`.

```python
import torch
import torchaudio
from zonos.model import Zonos
from zonos.conditioning import make_cond_dict

model = Zonos.from_pretrained("Zyphra/Zonos-v0.1-transformer", device="cuda")

wav, sr = torchaudio.load("speaker_ref.wav")
speaker = model.make_speaker_embedding(wav, sr)

text = "मुझे यकीन नहीं हो रहा कि आज अभी क्या हुआ!"

emotions = {
    "खुश":   [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
    "उदास":     [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
    "क्रोधित":   [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
    "भयभीत": [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
    "तटस्थ": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
}

for name, emo_vec in emotions.items():
    cond_dict = make_cond_dict(
        text=text,
        speaker=speaker,
        language="en-us",
        emotion=torch.tensor(emo_vec).unsqueeze(0),
    )
    conditioning = model.prepare_conditioning(cond_dict)
    codes = model.generate(conditioning)
    audio = model.autoencoder.decode(codes).cpu()
    torchaudio.save(f"emotion_{name}.wav", audio[0], model.autoencoder.sampling_rate)
    print(f"उत्पन्न किया गया: {name}")
```

### बोलने की गति और पिच नियंत्रण

```python
import torch
import torchaudio
from zonos.model import Zonos
from zonos.conditioning import make_cond_dict

model = Zonos.from_pretrained("Zyphra/Zonos-v0.1-transformer", device="cuda")

wav, sr = torchaudio.load("speaker_ref.wav")
speaker = model.make_speaker_embedding(wav, sr)

# धीमा और शांत
cond_slow = make_cond_dict(
    text="आराम से लें। कोई जल्दबाज़ी बिल्कुल नहीं है.",
    speaker=speaker,
    language="en-us",
    speaking_rate=torch.tensor([8.0]),   # कम = धीमा
    pitch_std=torch.tensor([20.0]),      # कम = अधिक एकस्वरीय
)
codes = model.generate(model.prepare_conditioning(cond_slow))
audio = model.autoencoder.decode(codes).cpu()
torchaudio.save("slow_calm.wav", audio[0], model.autoencoder.sampling_rate)

# तेज़ और ऊर्जावान
cond_fast = make_cond_dict(
    text="जल्दी करो! हमें अभी तुरंत निकलना है!",
    speaker=speaker,
    language="en-us",
    speaking_rate=torch.tensor([22.0]),  # अधिक = तेज़
    pitch_std=torch.tensor([80.0]),      # अधिक = अधिक अभिव्यंजक
)
codes = model.generate(model.prepare_conditioning(cond_fast))
audio = model.autoencoder.decode(codes).cpu()
torchaudio.save("fast_energetic.wav", audio[0], model.autoencoder.sampling_rate)
```

### Gradio वेब इंटरफ़ेस

```bash
cd Zonos
python gradio_interface.py
# या uv के साथ:
# uv run gradio_interface.py
```

पोर्ट एक्सपोज़ करें `7860/http` अपने Clore.ai ऑर्डर में और खोलें `http_pub` UI तक पहुँचने के लिए URL।

## Clore.ai उपयोगकर्ताओं के लिए सुझाव

* **मॉडल चयन** — सर्वोत्तम गुणवत्ता के लिए Transformer, लगभग 2× तेज़ इन्फ़रेंस के लिए Hybrid (RTX 3000+ GPU आवश्यक)
* **संदर्भ ऑडियो** — 10–30 सेकंड की साफ़ आवाज़ सर्वोत्तम परिणाम देती है; छोटे क्लिप (2–5 सेकंड) काम करते हैं, लेकिन उनकी निष्ठा कम होती है
* **Docker सेटअप** — उपयोग करें `pytorch/pytorch:2.11.0-cuda12.8-cudnn9-runtime`, जोड़ें `apt-get install -y espeak-ng` स्टार्टअप में
* **पोर्ट मैपिंग** — एक्सपोज़ करें `7860/http` Gradio UI के लिए, `8000/http` API सर्वर के लिए
* **सीड नियंत्रण** — सेट करें `torch.manual_seed()` पुनरुत्पादनीय आउटपुट के लिए जनरेशन से पहले
* **ऑडियो गुणवत्ता पैरामीटर** — इसके साथ प्रयोग करें `audio_quality` साफ़ आउटपुट के लिए कंडीशनिंग फ़ील्ड

## समस्या निवारण

| समस्या                          | समाधान                                                                                              |
| ------------------------------- | --------------------------------------------------------------------------------------------------- |
| `espeak-ng नहीं मिला`           | चलाएँ `apt-get install -y espeak-ng` (फोनीमाइज़ेशन के लिए आवश्यक)                                   |
| `CUDA out of memory`            | Transformer मॉडल का उपयोग करें (Hybrid से छोटा); प्रति कॉल पाठ की लंबाई कम करें                     |
| Hybrid मॉडल विफल होता है        | Ampere+ GPU (RTX 3000 सीरीज़ या उससे नया) और आवश्यक है `pip install -e ".[compile]"`                |
| क्लोन की गई आवाज़ सही नहीं लगती | अधिक लंबा संदर्भ क्लिप (15–30 सेकंड) स्पष्ट वाणी और न्यूनतम पृष्ठभूमि शोर के साथ उपयोग करें         |
| धीमी जनरेशन                     | Transformer के लिए सामान्य (\~0.5× रीयल-टाइम); Hybrid RTX 4090 पर लगभग 2× रीयल-टाइम प्राप्त करता है |
| `ModuleNotFoundError: zonos`    | सुनिश्चित करें कि आपने स्रोत से इंस्टॉल किया है: `cd Zonos && pip install -e .`                     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-hi/audio-and-voice/zonos-tts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
