NathMen12 commited on
Commit
e20b456
·
verified ·
1 Parent(s): 81145bd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -126
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: TTS Studio - Text to Speech
3
  emoji: 🎙️
4
  colorFrom: indigo
5
  colorTo: purple
@@ -9,128 +9,3 @@ license: apache-2.0
9
  sdk: docker
10
  ---
11
 
12
- # 🎙️ XTTS v2 Multilingual TTS Space
13
-
14
- [![Hugging Face Space](https://img.shields.io/badge/🤗%20Hugging%20Face-Space-yellow)](https://huggingface.co/spaces)
15
- [![License: CPML](https://img.shields.io/badge/License-CPML-blue)](https://github.com/coqui-ai/TTS/blob/main/LICENSE)
16
- [![Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue)](https://python.org)
17
- [![CPU Only](https://img.shields.io/badge/CPU-Only-green)](https://huggingface.co/docs/hub/spaces-gpu)
18
- [![Docker](https://img.shields.io/badge/Docker-Ready-blue)](https://docker.com)
19
-
20
- > **Synthèse vocale multilingue haute qualité avec clonage de voix • 100% CPU**
21
- > **High-quality multilingual TTS with voice cloning • 100% CPU**
22
-
23
- ---
24
-
25
- ## ✨ Fonctionnalités / Features
26
-
27
- | 🎯 Fonctionnalité | 📝 Description |
28
- |-------------------|----------------|
29
- | 🌍 **17 Langues** | EN, FR, ES, DE, IT, PT, PL, TR, RU, NL, CS, AR, ZH, JA, KO, HU, HI |
30
- | 🎭 **Clonage de voix** | Clone n'importe quelle voix à partir de 3-10s d'audio |
31
- | ⚡ **CPU Only** | Optimisé pour tourner sans GPU sur HF Spaces |
32
- | 🛡️ **Rate Limiting** | 30 requêtes/minute par IP (Redis ou mémoire) |
33
- | 📊 **Monitoring Temps Réel** | Graphiques CPU, RAM, Requêtes/min, Latence (fenêtre 1 min) |
34
- | 📚 **API Complète** | REST + Swagger UI interactif (`/docs`) |
35
- | 🔌 **Programmatique** | Accès complet via API (base64 audio) |
36
-
37
- ---
38
-
39
- ## 🚀 Démo en Direct / Live Demo
40
-
41
- **Interface Gradio** : `https://nathmen12-free-tts.hf.space`
42
- **API Docs (Swagger)** : `https://nathmen12-free-tts.hf.space/docs`
43
- **Health Check** : `https://nathmen12-free-tts.hf.space/health`
44
- **Stats Système** : `https://nathmen12-free-tts.hf.space/stats`
45
-
46
- ---
47
-
48
- ## 🎮 Utilisation Rapide / Quick Start
49
-
50
- ### 🖥️ Interface Web (Gradio)
51
-
52
- 1. Ouvrez l'onglet **"🎤 Synthèse TTS"**
53
- 2. Choisissez une langue (17 disponibles)
54
- 3. Entrez votre texte
55
- 4. Cliquez sur **"🎵 Générer"**
56
-
57
- **Onglet "🎭 Clonage Voix"** :
58
- 1. Uploadez un fichier WAV (3-10s, voix claire, sans bruit)
59
- 2. Entrez le texte à dire
60
- 3. Cliquez sur **"🎭 Cloner et Générer"**
61
-
62
- ---
63
-
64
- ### 🔌 API REST
65
-
66
- #### Synthèse Standard
67
-
68
- curl -X POST "https://nathmen12-free-tts.hf.space/api/v1/tts" \
69
- -H "Content-Type: application/json" \
70
- -d '{
71
- "text": "Bonjour le monde !",
72
- "language": "fr",
73
- "temperature": 0.7,
74
- "speed": 1.0
75
- }' | jq -r '.audio_base64' | base64 -d > output.wav
76
-
77
-
78
-
79
- ### Clonage de Voix (Base64)
80
-
81
- # 1. Encoder votre référence
82
- base64 -w 0 reference.wav
83
-
84
- # 2. Appeler l'API
85
- curl -X POST "https://nathmen12-free-tts.hf.space/api/v1/tts/clone" \
86
- -H "Content-Type: application/json" \
87
- -d '{
88
- "text": "Ceci est ma voix clonée !",
89
- "language": "fr",
90
- "reference_audio_base64": "UklGR...",
91
- "temperature": 0.7
92
- }' | jq -r '.audio_base64' | base64 -d > cloned.wav
93
-
94
- # Clonage de Voix (Upload Fichier)
95
-
96
- curl -X POST "https://nathmen12-free-tts.hf.space/api/v1/tts/clone/upload" \
97
- -F "text=Hello world!" \
98
- -F "language=en" \
99
- -F "reference_audio=@my_voice.wav" \
100
- --output cloned.wav
101
-
102
- # Health Check & Stats
103
-
104
- curl https://nathmen12-free-tts.hf.space/health
105
- curl https://nathmen12-free-tts.hf.space/stats
106
-
107
- ### 🐍 Client Python
108
-
109
- import requests, base64
110
-
111
- BASE = "https://nathmen12-free-tts.hf.space"
112
-
113
- # TTS Simple
114
- def tts(text, lang="fr", **kw):
115
- r = requests.post(f"{BASE}/api/v1/tts", json={"text": text, "language": lang, **kw})
116
- r.raise_for_status()
117
- d = r.json()
118
- if d["success"]:
119
- with open("out.wav", "wb") as f:
120
- f.write(base64.b64decode(d["audio_base64"]))
121
- return d
122
- raise Exception(d["error"])
123
-
124
- # Clonage
125
- def clone(text, lang, ref_wav, **kw):
126
- with open(ref_wav, "rb") as f:
127
- b64 = base64.b64encode(f.read()).decode()
128
- r = requests.post(f"{BASE}/api/v1/tts/clone", json={
129
- "text": text, "language": lang, "reference_audio_base64": b64, **kw
130
- })
131
- r.raise_for_status()
132
- return r.json()
133
-
134
- # Usage
135
- tts("Bonjour ! Comment ça va ?", "fr")
136
- clone("Hello cloned voice!", "en", "my_voice.wav")
 
1
  ---
2
+ title: Messages Anonymes
3
  emoji: 🎙️
4
  colorFrom: indigo
5
  colorTo: purple
 
9
  sdk: docker
10
  ---
11