🎙️ STT API (faster-whisper)¶
Déployé le 2026-03-31
Service de Speech-to-Text self-hosted, propulsé par faster-whisper (CTranslate2).
Informations¶
| URL | https://stt.srv759970.hstgr.cloud |
| Port interne | 9000 |
| Container | stt-server |
| Compose | /opt/stt/docker-compose.yml |
| Config | /opt/stt/server/.env |
| Modèle | medium (int8 quantized, CPU) |
| RAM | ~1.5 GB |
| Authentification | Bearer token |
Utilisation¶
Health Check¶
Transcription¶
curl -X POST https://stt.srv759970.hstgr.cloud/transcribe \
-H "Authorization: Bearer <API_KEY>" \
-F "file=@audio.wav" \
-F "language=fr"
Réponse¶
{
"text": "Texte transcrit complet",
"segments": [
{"start": 0.0, "end": 5.6, "text": "Premier segment."}
],
"language": "fr",
"language_probability": 1.0,
"duration": 8.09,
"processing_time": 10.44
}
Paramètres optionnels¶
| Paramètre | Type | Description |
|---|---|---|
language |
string | Code langue (fr, en, auto...) |
initial_prompt |
string | Vocabulaire custom / contexte |
hotwords |
string | Mots à booster (virgules) |
word_timestamps |
bool | Timestamps par mot |
Architecture¶
graph LR
Client[Client Windows/Mobile] -->|HTTPS POST| Nginx
Nginx -->|proxy_pass :9000| Docker[stt-server]
Docker -->|faster-whisper| Model[medium int8]
Model -->|Silero VAD| Result[JSON response]
Administration¶
Logs¶
Restart¶
Rebuild¶
Changer de modèle¶
Éditer /opt/stt/server/.env :
STT_WHISPER_MODEL=small # Plus rapide (~8s/min)
STT_WHISPER_MODEL=medium # Meilleur compromis (~15s/min) ← défaut
STT_WHISPER_MODEL=large-v3 # Meilleure qualité (~40s/min, 3.1 GB RAM)
Puis docker compose restart stt (le modèle sera téléchargé au premier démarrage).
Performance¶
| Modèle | RAM | Vitesse (1 min audio) | Qualité FR |
|---|---|---|---|
| tiny | 75 MB | ~2s | ⭐⭐ |
| base | 142 MB | ~4s | ⭐⭐⭐ |
| small | 466 MB | ~8s | ⭐⭐⭐⭐ |
| medium | 1.5 GB | ~15s | ⭐⭐⭐⭐⭐ |
| large-v3 | 3.1 GB | ~40s | ⭐⭐⭐⭐⭐ |
Client Windows¶
Le projet source 2026.04 STT on VPS contient un client :
stt_client.py— Record micro → API → clipboardstt_hotkey.ahk— Ctrl+Shift+Space → record → transcribe → pasteconfig.json— URL serveur + API key
SSL¶
- Certificat Let's Encrypt (expire 2026-06-29)
- Renouvellement automatique via certbot timer
client_max_body_size 100Mdans nginx
Historique¶
| Date | Changement |
|---|---|
| 2026-03-31 | Déploiement initial (faster-whisper medium, FastAPI, Docker) |
Ancien setup (désactivé)
L'ancien setup WhisperX (3 containers + Redis queue) dans apps/02-ai-transcription/whisperx/ est arrêté. Trop lourd en CPU pour la diarisation.