File size: 1,489 Bytes
899a643
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Kyutai TTS Handler pour Hugging Face Endpoints

## Déploiement rapide

1. **Créez un nouveau repo sur Hugging Face** : `daiemon12/kyutai-tts-endpoint`

2. **Uploadez ces fichiers** :
   - `handler.py`
   - `requirements.txt`
   - `README.md`

3. **Configuration de l'endpoint** :

```
Model Repository: daiemon12/kyutai-tts-endpoint

Hardware: Intel Sapphire Rapids - 8 vCPUs · 16 GB
($0.268/h)

Ou mieux (recommandé pour production):
Hardware: NVIDIA T4 · 16GB VRAM
(~$0.60/h mais BEAUCOUP plus rapide)

Security: Protected ✅
Autoscaling: 0 to 2 replicas
Scale-to-zero: après 60 min ✅
```

## Utilisation

```python
import requests

response = requests.post(
    "https://xxxxx.endpoints.huggingface.cloud",
    headers={"Authorization": f"Bearer {HF_TOKEN}"},
    json={
        "inputs": "Bonjour, ceci est un test de synthèse vocale.",
        "parameters": {
            "language": "fr",  # ou "en", ou "auto"
            "speed": 1.0
        }
    }
)

audio_base64 = response.json()["audio"]
```

## Performances attendues

- **Latence première requête** : ~10-15s (chargement modèle)
- **Latence suivantes** : 200-400ms
- **Qualité** : État de l'art pour FR/EN
- **Streaming** : 220ms du texte au premier audio

## Alternative simple

Si vous voulez tester rapidement sans créer de repo :

1. Allez sur https://huggingface.co/spaces
2. Duplicate un Space TTS existant
3. Modifiez pour utiliser Kyutai

Mais pour production, utilisez l'endpoint avec ce handler !