This model is a fine-tuned version of
openai/whisper-small on the Lingalingeswaran/asr-sinhala-dataset_json_v1 dataset.
This Whisper model has been fine-tuned specifically for the Sinhala language using the Common Voice 11.0 dataset. It is designed to handle tasks such as speech-to-text transcription and language identification, making it suitable for applications where Sinhala is a primary language of interest. The fine-tuning process focused on enhancing performance for Sinhala, aiming to reduce the error rate in transcriptions and improve general accuracy.
Limitations:
May not perform as well on languages or dialects that are not well-represented in the Common Voice dataset.
Higher Word Error Rate (WER) in noisy environments or with speakers who have heavy accents not covered in the training data.
The model is optimized for Sinhala; performance in other languages may be suboptimal.
The training data for this model consists of voice recordings in Sinhala from the Mozilla-foundation/Common Voice 11.0 dataset. The dataset is a crowd-sourced collection of transcribed speech, ensuring diversity in terms of speaker accents, age groups, and speech styles.
Here is an example of how to use the model for Sinhala speech recognition with Gradio:
1import gradio as gr
2from transformers import pipeline
3
4# Initialize the pipeline with the specified model
5pipe = pipeline(model="Lingalingeswaran/whisper-small-sinhala")
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()