# 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 !