Views
No views yet
| Training Loss | Epoch | Step | Validation Loss | Wer |
|---|---|---|---|---|
| 0.1852 | 1.7606 | 1000 | 0.1875 | 50.9772 |
| 0.0602 | 3.5211 | 2000 | 0.1886 | 47.5774 |
| 0.0238 | 5.2817 | 3000 | 0.2086 | 46.4577 |
1import gradio as gr
2from transformers import pipeline
3
4# Initialize the pipeline with the specified model
5pipe = pipeline(model="Lingalingeswaran/whisper-small-sinhala_v3")
6
7def transcribe(audio):
8 # Transcribe the audio file to text
9 text = pipe(audio)["text"]
10 return text
11
12# Create the Gradio interface
13
14iface = gr.Interface(
15 fn=transcribe,
16 inputs=gr.Audio(sources=["microphone", "upload"], type="filepath"),
17 outputs="text",
18 title="Whisper Small Sinhala",
19 description="Realtime demo for Sinhala speech recognition using a fine-tuned Whisper small model.",
20)
21
22# Launch the interface
23if __name__ == "__main__":
24 iface.launch()