> 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/f5-tts.md).

# F5-TTS

F5-TTS के साथ प्राकृतिक भाषण उत्पन्न करें - एक तेज़ और प्रवाहपूर्ण TTS सिस्टम।

{% hint style="success" %}
सभी उदाहरण GPU सर्वरों पर चलाए जा सकते हैं जिन्हें द्वारा किराए पर लिया गया है [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace).
{% endhint %}

## CLORE.AI पर किराये पर लेना

1. पर जाएँ [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace)
2. GPU प्रकार, VRAM, और मूल्य के अनुसार फ़िल्टर करें
3. चुनें **ऑन-डिमांड** (निश्चित दर) या **स्पॉट** (बिड प्राइस)
4. अपना ऑर्डर कॉन्फ़िगर करें:
   * Docker इमेज चुनें
   * पोर्ट सेट करें (SSH के लिए TCP, वेब UI के लिए HTTP)
   * यदि आवश्यक हो तो एनवायरनमेंट वेरिएबल जोड़ें
   * स्टार्टअप कमांड दर्ज करें
5. भुगतान चुनें: **CLORE**, **BTC**, या **USDT/USDC**
6. ऑर्डर बनाएं और डिप्लॉयमेंट का इंतज़ार करें

### अपने सर्वर तक पहुँचें

* कनेक्शन विवरण में खोजें **मेरे ऑर्डर**
* वेब इंटरफेस: HTTP पोर्ट URL का उपयोग करें
* SSH: `ssh -p <port> root@<proxy-address>`

## F5-TTS क्या है?

F5-TTS प्रदान करता है:

* तेज़ इनफ़ेरेंस (रीयल-टाइम से तेज़)
* प्राकृतिक बोली और उच्चारण
* ज़ीरो-शॉट वॉइस क्लोनिंग
* बहु-भाषा समर्थन

## संसाधन

* **GitHub:** [SWivid/F5-TTS](https://github.com/SWivid/F5-TTS)
* **HuggingFace:** [SWivid/F5-TTS](https://huggingface.co/SWivid/F5-TTS)
* **पेपर:** [F5-TTS पेपर](https://arxiv.org/abs/2410.06885)
* **डेमो:** [HuggingFace Space](https://huggingface.co/spaces/mrfakename/E2-F5-TTS)

## अनुशंसित हार्डवेयर

| घटक     | न्यूनतम       | अनुशंसित      | सर्वोत्तम     |
| ------- | ------------- | ------------- | ------------- |
| GPU     | RTX 3060 12GB | RTX 4080 16GB | RTX 4090 24GB |
| VRAM    | 6GB           | 12GB          | 16GB          |
| CPU     | 4 कोर         | 8 कोर         | 16 कोर        |
| RAM     | 16GB          | 32GB          | 64GB          |
| स्टोरेज | 20GB SSD      | 50GB NVMe     | 100GB NVMe    |
| इंटरनेट | 100 Mbps      | 500 Mbps      | 1 Gbps        |

## CLORE.AI पर त्वरित डिप्लॉय

**Docker इमेज:**

```
pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime
```

**पोर्ट:**

```
22/tcp
7860/http
```

**कमांड:**

```bash
pip install f5-tts && \
f5-tts-webui
```

## अपनी सेवा तक पहुँचना

डिप्लॉयमेंट के बाद, अपना खोजें `http_pub` URL में **मेरे ऑर्डर**:

1. जाएँ **मेरे ऑर्डर** पृष्ठ
2. अपने ऑर्डर पर क्लिक करें
3. खोजें `http_pub` URL (उदा., `abc123.clorecloud.net`)

उपयोग करें `https://YOUR_HTTP_PUB_URL` की बजाय `localhost` नीचे दिए उदाहरणों में।

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

```bash
pip install f5-tts

# या स्रोत से
git clone https://github.com/SWivid/F5-TTS.git
cd F5-TTS
pip install -e .
```

## आप क्या बना सकते हैं

### वॉइस सामग्री

* पॉडकास्ट उत्पादन
* ऑडियोबुक कथन
* वीडियो के लिए वॉइस-ओवर

### एक्सेसिबिलिटी

* स्क्रीन रीडर
* दस्तावेज़ रीडर
* शिक्षण सामग्री

### इंटरैक्टिव अनुप्रयोग

* वॉइस असिस्टेंट
* गेमिंग NPCs
* कस्टमर सर्विस बॉट

### रचनात्मक प्रोजेक्ट

* चरित्र की आवाज़ें
* ऑडियो ड्रामे
* संगीत वोकल्स

## मूल उपयोग

### सरल TTS

```python
from f5_tts import F5TTS

# आरंभ करें
tts = F5TTS(device="cuda")

# स्पीच जेनरेट करें
audio = tts.generate(
    text="Hello! This is F5-TTS generating natural speech.",
    output_path="output.wav"
)
```

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

```python
from f5_tts import F5TTS

tts = F5TTS(device="cuda")

# संदर्भ ऑडियो से वॉइस क्लोन करें
audio = tts.generate(
    text="This is my cloned voice speaking new text.",
    ref_audio="reference_voice.wav",
    ref_text="This is the reference text spoken in the audio.",
    output_path="cloned_output.wav"
)
```

## बहु-भाषा समर्थन

```python
from f5_tts import F5TTS

tts = F5TTS(device="cuda")

# अंग्रेज़ी
tts.generate(
    text="Hello, how are you today?",
    ref_audio="english_speaker.wav",
    output_path="english.wav"
)

# चीनी
tts.generate(
    text="你好，今天怎么样？",
    ref_audio="chinese_speaker.wav",
    output_path="chinese.wav"
)

# फ्रेंच
tts.generate(
    text="Bonjour, comment allez-vous?",
    ref_audio="french_speaker.wav",
    output_path="french.wav"
)
```

## बैच प्रोसेसिंग

```python
from f5_tts import F5TTS
import os

tts = F5TTS(device="cuda")

texts = [
    "Welcome to our product demonstration.",
    "Today we'll show you the key features.",
    "Let's start with the main dashboard.",
    "As you can see, the interface is intuitive.",
    "Thank you for watching!"
]

ref_audio = "narrator_voice.wav"
ref_text = "Sample text from the reference audio."
output_dir = "./narration"
os.makedirs(output_dir, exist_ok=True)

for i, text in enumerate(texts):
    print(f"Generating {i+1}/{len(texts)}: {text[:50]}...")

    tts.generate(
        text=text,
        ref_audio=ref_audio,
        ref_text=ref_text,
        output_path=f"{output_dir}/segment_{i:03d}.wav"
    )
```

## लॉन्ग-फॉर्म ऑडियो

```python
from f5_tts import F5TTS

tts = F5TTS(device="cuda")

long_text = """
Welcome to this comprehensive guide on machine learning.
In this chapter, we will explore the fundamentals of neural networks.
Neural networks are computing systems inspired by biological neural networks.
They consist of interconnected nodes that process information.
Let's begin with the basic concepts.
"""

# F5-TTS लंबे टेक्स्ट को वाक्यों में विभाजित करके संभालता है
audio = tts.generate(
    text=long_text,
    ref_audio="narrator.wav",
    output_path="long_narration.wav",
    chunk_size=200  # प्रति खंड अक्षर
)
```

## Gradio इंटरफ़ेस

```python
import gradio as gr
from f5_tts import F5TTS
import tempfile

tts = F5TTS(device="cuda")

def generate_speech(text, ref_audio, ref_text):
    with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as f:
        tts.generate(
            text=text,
            ref_audio=ref_audio,
            ref_text=ref_text,
            output_path=f.name
        )
        return f.name

demo = gr.Interface(
    fn=generate_speech,
    inputs=[
        gr.Textbox(label="Text to Speak", lines=5),
        gr.Audio(type="filepath", label="Reference Voice"),
        gr.Textbox(label="Reference Text", lines=2)
    ],
    outputs=gr.Audio(label="Generated Speech"),
    title="F5-TTS Voice Cloning",
    description="Clone any voice with F5-TTS on CLORE.AI servers"
)

demo.launch(server_name="0.0.0.0", server_port=7860)
```

## API सर्वर

```python
from fastapi import FastAPI, UploadFile, File, Form
from fastapi.responses import FileResponse
from f5_tts import F5TTS
import tempfile

app = FastAPI()
tts = F5TTS(device="cuda")

@app.post("/synthesize")
async def synthesize(
    text: str = Form(...),
    ref_audio: UploadFile = File(...),
    ref_text: str = Form(...)
):
    with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as ref_file:
        ref_file.write(await ref_audio.read())
        ref_path = ref_file.name

    with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as out_file:
        tts.generate(
            text=text,
            ref_audio=ref_path,
            ref_text=ref_text,
            output_path=out_file.name
        )
        return FileResponse(out_file.name, media_type="audio/wav")

# चलाएँ: uvicorn server:app --host 0.0.0.0 --port 8000
```

## प्रदर्शन

| टेक्स्ट की लंबाई | GPU      | उत्पादन समय | रीयल-टाइम फैक्टर |
| ---------------- | -------- | ----------- | ---------------- |
| 100 अक्षर        | RTX 3090 | 0.5s        | 5x               |
| 100 अक्षर        | RTX 4090 | 0.3s        | 8x               |
| 500 अक्षर        | RTX 4090 | 1.2s        | 10x              |
| 1000 अक्षर       | A100     | 2.0s        | 12x              |

## सामान्य समस्याएँ और समाधान

### खराब वॉइस मिलान

**समस्या:** उत्पन्न आवाज़ संदर्भ से मेल नहीं खाती

**समाधान:**

* 5-15 सेकंड का स्पष्ट संदर्भ ऑडियो उपयोग करें
* संदर्भ टेक्स्ट का सटीक प्रतिलिपि प्रदान करें
* संदर्भ में पृष्ठभूमि शोर से बचें
* टेक्स्ट और संदर्भ की भाषा मिलाएँ

### उच्चारण समस्याएँ

**समस्या:** शब्दों या नामों का गलत उच्चारण

**समाधान:**

```python

# कठिन शब्दों के लिए ध्वन्यात्मक संकेत उपयोग करें
text = "Welcome to CLORE (pronounced KLOR) AI platform."

# या SSML- जैसे फॉर्मेटिंग का उपयोग करें
text = "The CEO, John Smith (SMIHTH), will speak."
```

### ऑडियो गुणवत्ता समस्याएँ

**समस्या:** आउटपुट रोबोटिक या विरूपित लगता है

**समाधान:**

* उच्च-गुणवत्ता संदर्भ ऑडियो का उपयोग करें (24kHz+)
* संदर्भ को शोर से साफ़ करें
* विभिन्न संदर्भ सैंपल आज़माएँ
* उत्पादन गुणवत्ता सेटिंग्स बढ़ाएँ

### मेमोरी समस्याएँ

**समस्या:** लंबे टेक्स्ट के लिए मेमोरी खत्म हो रही है

**समाधान:**

```python

# छोटे खंडों में प्रोसेस करें
tts.generate(
    text=long_text,
    chunk_size=100,  # छोटे खंड
    overlap=20  # चिकने संक्रमण
)
```

### धीमा जनरेशन

**समस्या:** जनरेट करने में बहुत समय लगता है

**समाधान:**

* GPU इनफ़ेरेंस (CUDA) का उपयोग करें
* तेज़ प्रोसेसिंग के लिए chunk\_size घटाएँ
* RTX 4090 या बेहतर का उपयोग करें
* हेमि-प्रेसिज़न सक्षम करें (fp16)

## समस्याओं का निवारण

### वॉइस संदर्भ से मेल नहीं खाती

* 5-15 सेकंड का स्पष्ट संदर्भ ऑडियो उपयोग करें
* संदर्भ टेक्स्ट को सही तरीके से ट्रांसक्राइब करें
* संदर्भ में पृष्ठभूमि शोर से बचें

### ऑडियो गुणवत्ता समस्याएँ

* उच्च सैंपल दर संदर्भ का उपयोग करें (24kHz+)
* संदर्भ को शोर से साफ़ करें
* विभिन्न संदर्भ सैंपल आज़माएँ

### धीमी जनरेशन

* CUDA का उपयोग करें (CPU नहीं)
* टेक्स्ट की लंबाई घटाएँ या इसे खंडित करें
* छोटे बैच साइज़ का उपयोग करें

### भाषा असंगति

* टेक्स्ट भाषा को संदर्भ ऑडियो की भाषा से मिलाएँ
* कुछ भाषाओं के लिए विशिष्ट मॉडलों की आवश्यकता होती है

## लागत अनुमान

सामान्य CLORE.AI मार्केटप्लेस दरें (2024 के अनुसार):

| GPU       | घंटात्मक दर | दैनिक दर | 4-घंटे सत्र |
| --------- | ----------- | -------- | ----------- |
| RTX 3060  | \~$0.03     | \~$0.70  | \~$0.12     |
| RTX 3090  | \~$0.06     | \~$1.50  | \~$0.25     |
| RTX 4090  | \~$0.10     | \~$2.30  | \~$0.40     |
| A100 40GB | \~$0.17     | \~$4.00  | \~$0.70     |
| A100 80GB | \~$0.25     | \~$6.00  | \~$1.00     |

*कीमतें प्रदाता और मांग के अनुसार बदलती हैं। जाँच करें* [*CLORE.AI मार्केटप्लेस*](https://clore.ai/marketplace) *वर्तमान दरों के लिए।*

**पैसे बचाएँ:**

* उपयोग करें **स्पॉट** लचीले वर्कलोड के लिए मार्केट (अक्सर 30-50% सस्ता)
* भुगतान करें **CLORE** टोकन के साथ
* विभिन्न प्रदाताओं के बीच कीमतों की तुलना करें

## अगले कदम

* [XTTS](/guides/guides_v2-hi/audio-and-voice/xtts-coqui.md) - वैकल्पिक TTS
* [Bark TTS](/guides/guides_v2-hi/audio-and-voice/bark-tts.md) - भावनात्मक TTS
* [SadTalker](/guides/guides_v2-hi/talking-heads/sadtalker.md) - टॉकिंग हेड्स


---

# 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/f5-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.
