API de reconnaissance vocale (STT), synthèse vocale (TTS) et traduction (Dioula ↔ Français).
GET /
Cette page de documentation
GET /health
Statut de l'API et des modèles
POST /api/stt
Speech-to-Text - Transcrit un fichier audio en texte Dioula
Entrée: Fichier audio (WebM, WAV, MP3)
Sortie: {"transcription": "texte en dioula"}
curl -X POST https://votre-space.hf.space/api/stt \ -F "audio=@recording.wav"
POST /api/tts
Text-to-Speech - Génère un audio en Dioula depuis du texte
Entrée: Texte en Dioula (paramètre text)
Sortie: Fichier WAV
curl -X POST https://votre-space.hf.space/api/tts \ -F "text=na an be do minkÉ›" \ -o output.wav
POST /api/translate/dyu-fr
Traduction Dioula → Français
Entrée: Texte en Dioula (paramètre text)
Sortie: JSON avec traduction française
curl -X POST https://votre-space.hf.space/api/translate/dyu-fr \ -F "text=Sanji bɛna kɛ bi"
POST /api/translate/fr-dyu
Traduction Français → Dioula
Entrée: Texte en Français (paramètre text)
Sortie: JSON avec traduction dioula
curl -X POST https://votre-space.hf.space/api/translate/fr-dyu \ -F "text=Il va pleuvoir aujourd'hui"
WS /ws/pipeline
Pipeline WebSocket - Audio → STT → Traduction (temps réel)
Entrée: JSON avec audio base64
Sortie: Progression en temps réel + résultats
const ws = new WebSocket('wss://votre-space.hf.space/ws/pipeline');
ws.send(JSON.stringify({
action: "process",
audio: "base64_audio",
target_lang: "fr"
}));
🎯 Demo Live | 🔄 WebSocket Demo | Swagger UI | ReDoc
Exemple : Audio Dioula → Texte Dioula → Traduction Français → Audio Français
/api/stt : Convertit audio en texte dioula/api/translate/dyu-fr : Traduit en français