Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# **IndicF5: A Multilingual TTS Fairyteller**
|
| 2 |
+
|
| 3 |
+
[](https://huggingface.co/ai4bharat/IndicF5)
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
We release **IndicF5**, a **near-human polyglot** **Text-to-Speech (TTS)** model trained on **1417 hours** of high-quality speech from **Rasa, IndicTTS, LIMMITS, and IndicVoices-R**.
|
| 7 |
+
|
| 8 |
+
IndicF5 supports **11 Indian languages**:
|
| 9 |
+
**Assamese, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Odia, Punjabi, Tamil, Telugu.**
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## 🚀 Installation
|
| 14 |
+
```bash
|
| 15 |
+
conda create -n indicf5 python=3.10 -y
|
| 16 |
+
conda activate indicf5
|
| 17 |
+
pip install git+https://github.com/ai4bharat/indicf5.git
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
## 🎙 Usage
|
| 22 |
+
```python
|
| 23 |
+
from transformers import AutoModel
|
| 24 |
+
import numpy as np
|
| 25 |
+
import soundfile as sf
|
| 26 |
+
|
| 27 |
+
# Load INF5 from Hugging Face
|
| 28 |
+
repo_id = "svp19/INF5"
|
| 29 |
+
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True)
|
| 30 |
+
|
| 31 |
+
# Generate speech
|
| 32 |
+
audio = model(
|
| 33 |
+
"नमस्ते! संगीत की तरह जीवन भी खूबसूरत होता है, बस इसे सही ताल में जीना आना चाहिए.",
|
| 34 |
+
ref_audio_path="prompts/PAN_F_HAPPY_00001.wav",
|
| 35 |
+
ref_text="ਭਹੰਪੀ ਵਿੱਚ ਸਮਾਰਕਾਂ ਦੇ ਭਵਨ ਨਿਰਮਾਣ ਕਲਾ ਦੇ ਵੇਰਵੇ ਗੁੰਝਲਦਾਰ ਅਤੇ ਹੈਰਾਨ ਕਰਨ ਵਾਲੇ ਹਨ, ਜੋ ਮੈਨੂੰ ਖੁਸ਼ ਕਰਦੇ ਹਨ।"
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
# Normalize and save output
|
| 39 |
+
if audio.dtype == np.int16:
|
| 40 |
+
audio = audio.astype(np.float32) / 32768.0
|
| 41 |
+
sf.write("samples/namaste.wav", np.array(audio, dtype=np.float32), samplerate=24000)
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## References
|
| 45 |
+
|
| 46 |
+
1. https://github.com/SWivid/F5-TTS
|