| --- |
| title: Italian Speech To Text |
| emoji: π |
| colorFrom: yellow |
| colorTo: pink |
| sdk: gradio |
| sdk_version: 6.12.0 |
| app_file: app.py |
| pinned: false |
| short_description: Italian ASR + English translation (Whisper + Marian). Optional local fine-tuned model in models/whisper_finetuned_it/. |
| --- |
| |
| # Italian β Italian + English |
|
|
| Speak **Italian**; get **Italian transcription** and **English** translation. |
|
|
| - Default: `openai/whisper-small` + `Helsinki-NLP/opus-mt-it-en` |
| - Optional: copy your fine-tuned Whisper into `models/whisper_finetuned_it/` and set `ASR_REALTIME_MODE=finetuned` in Space variables. |
|
|
| ## Add your model |
|
|
| 1. Copy training outputs into `models/whisper_finetuned_it/` (`config.json`, tokenizer files, weights). |
| 2. Use **Git LFS** for large weight files when pushing this Space. |
| 3. In Space **Settings β Repository variables**: `ASR_REALTIME_MODE` = `finetuned`. |
|
|
| ## Optional environment variables |
|
|
| | Variable | Default | Meaning | |
| |----------|---------|---------| |
| | `ASR_WHISPER_MODEL` | `openai/whisper-small` | HF Whisper id if not using local finetuned | |
| | `ASR_REALTIME_MODE` | `quality` | `quality` = hub Whisper; `finetuned` = load `models/whisper_finetuned_it` | |
| | `ASR_WHISPER_FINETUNED_DIR` | (see above) | Override path to finetuned folder | |
| | `ASR_TRANSLATE` | `1` | Set `0` to disable English translation | |
| | `ASR_MIN_RMS` | `0.005` | Silence gate | |
|
|
| ## Local test |
|
|
| ```bash |
| cd Italian-Speech-to-Text |
| python app.py |
| ``` |
|
|
| Configuration reference: https://huggingface.co/docs/hub/spaces-config-reference |
|
|