Spaces:
Sleeping
Sleeping
| from faster_whisper import WhisperModel | |
| import gradio as gr | |
| # Load model (run on CUDA for GPU) | |
| model = WhisperModel("medium") | |
| def transcribe(audio_file): | |
| segments, info = model.transcribe(audio_file, beam_size=5) | |
| transcription = " ".join([seg.text for seg in segments]) | |
| return transcription | |
| iface = gr.Interface( | |
| fn=transcribe, | |
| inputs=gr.Audio(type="filepath"), | |
| outputs="text", | |
| title="Faster Whisper Medium Transcriber" | |
| ) | |
| iface.launch() | |