Lingalingeswaran/asr-sinhala-dataset_json_v1
Viewer • Updated • 11.4k • 50 • 1
How to use Lingalingeswaran/whisper-small-sinhala_v3 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="Lingalingeswaran/whisper-small-sinhala_v3") # Load model directly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("Lingalingeswaran/whisper-small-sinhala_v3")
model = AutoModelForSpeechSeq2Seq.from_pretrained("Lingalingeswaran/whisper-small-sinhala_v3")This model is a fine-tuned version of openai/whisper-small on the Lingalingeswaran/asr-sinhala-dataset_json_v1 dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| 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 |
Here is an example of how to use the model for Sinhala speech recognition with Gradio:
import gradio as gr
from transformers import pipeline
# Initialize the pipeline with the specified model
pipe = pipeline(model="Lingalingeswaran/whisper-small-sinhala_v3")
def transcribe(audio):
# Transcribe the audio file to text
text = pipe(audio)["text"]
return text
# Create the Gradio interface
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(sources=["microphone", "upload"], type="filepath"),
outputs="text",
title="Whisper Small Sinhala",
description="Realtime demo for Sinhala speech recognition using a fine-tuned Whisper small model.",
)
# Launch the interface
if __name__ == "__main__":
iface.launch()
Base model
openai/whisper-small