Spaces:
Runtime error
Runtime error
Live Translation App
This Space serves both the frontend (React + Vite build) and backend (FastAPI) from a single Docker container.
How to use
- Open the Space URL. The UI loads from
/and the API is same-origin. - Host view:
- Start Recording for sentence-level live transcription
- Upload audio for server-side transcription (use the Language hint for accuracy)
- Click "Preload Model" to warm the translator
Endpoints
GET /healthβ{ "status": "ok" }POST /translateβ{ text, source_language, target_language }POST /preloadβ{ source_language, target_language }GET /metricsβ Prometheus metrics
Space variables (recommended)
STT_ENABLED=1β enable server-side transcriptionWHISPER_MODEL=smallβ good for CPU (usemediumfor better accuracy;large-v3requires GPU)- Optional:
REQUESTS_PER_MINUTE=60,ALLOWED_ORIGINS=*
Notes
- First requests may download models. Use Preload to warm up.
- For best accuracy on fast or unclear audio, set
WHISPER_MODEL=medium(CPU) or upgrade to a GPU Space and uselarge-v3.