EAG_s9_sample / README.md
Rahuluni's picture
add eng only
1095508

A newer version of the Gradio SDK is available: 6.6.0

Upgrade
metadata
license: apache-2.0
sdk: gradio
emoji: πŸš€
colorFrom: red

license: apache-2.0 sdk: gradio emoji: πŸš€ colorFrom: red

Whisper-Small Speech-to-English (Gradio)

Drop these files into a Hugging Face Space (Gradio template):

  • app.py
  • requirements.txt

This app uses openai/whisper-small in translate mode to convert spoken audio into English text (Whisper's translate task). The model runs CPU-only by default and is suitable for small/medium audio files.

Usage

  • Click the microphone recorder to record or upload an audio file.
  • Click Transcribe to get English text output (the app translates input speech into English).

Debug

Set DEBUG = True in app.py to enable logging and save resampled WAVs (written to your system temp directory) for inspection.

Run locally

# Windows PowerShell
python -m venv venv_hf
venv_hf\Scripts\Activate.ps1
pip install -r requirements.txt
python app.py

Open the Gradio URL shown in the console (usually http://0.0.0.0:7860).

Notes

  • The openai/whisper-small model runs on CPU and may take time for longer files.
  • For other target languages or lower latency consider using the Hugging Face Inference API or a separate text translation pipeline.