Instructions to use Rahul3215/swecha-gonthuka-asr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rahul3215/swecha-gonthuka-asr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Rahul3215/swecha-gonthuka-asr")# Load model directly from transformers import AutoProcessor, AutoModelForCTC processor = AutoProcessor.from_pretrained("Rahul3215/swecha-gonthuka-asr") model = AutoModelForCTC.from_pretrained("Rahul3215/swecha-gonthuka-asr", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Telugu Automatic Speech Recognition (ASR)
Model Overview
This model is a fine-tuned Automatic Speech Recognition (ASR) model for the Telugu language. It is based on the swechatelangana/swecha-gonthuka-asr model and fine-tuned on a custom Telugu speech dataset.
The model converts spoken Telugu audio into Telugu text.
Model Details
- Developed by: Rahul Karnati
- Language: Telugu (te)
- Task: Automatic Speech Recognition (ASR)
- Base Model: swechatelangana/swecha-gonthuka-asr
- Framework: Hugging Face Transformers
- Fine-tuned using: PyTorch + Hugging Face Trainer
Dataset
The model was fine-tuned on a custom Telugu speech dataset.
Dataset statistics:
- Total recordings: 1226
- Language: Telugu
- Audio Format: MP3
- Sampling Rate: 16 kHz
- Training Split: 1103
- Validation Split: 123
The dataset contains Telugu speech recordings with corresponding Telugu transcripts.
Training Configuration
| Parameter | Value |
|---|---|
| Epochs | 20 |
| Learning Rate | 1e-5 |
| Batch Size | 8 |
| Optimizer | AdamW |
| Framework | Hugging Face Trainer |
Evaluation Results
| Metric | Value |
|---|---|
| Validation Loss | 0.4166 |
| Word Error Rate (WER) | 50.58% |
| Character Error Rate (CER) | 15.32% |
Compared to the previous version of the model:
| Version | Dataset Size | Validation Loss | WER | CER |
|---|---|---|---|---|
| V1 | 1017 | 0.4442 | 55.12% | 16.27% |
| V2 | 1226 | 0.4166 | 50.58% | 15.32% |
The additional training data improved the overall recognition performance.
Usage
from transformers import AutoProcessor, AutoModelForCTC
import librosa
import torch
processor = AutoProcessor.from_pretrained("YOUR_USERNAME/YOUR_MODEL_NAME")
model = AutoModelForCTC.from_pretrained("YOUR_USERNAME/YOUR_MODEL_NAME")
speech, sr = librosa.load("sample.mp3", sr=16000)
inputs = processor(
speech,
sampling_rate=16000,
return_tensors="pt"
)
with torch.no_grad():
logits = model(**inputs).logits
predicted_ids = torch.argmax(logits, dim=-1)
prediction = processor.batch_decode(predicted_ids)[0]
print(prediction)
Applications
- Telugu Speech-to-Text
- Voice Assistants
- Accessibility Applications
- Educational Tools
- Voice Search
- Telugu Voice Interfaces
Limitations
The model may produce recognition errors for:
- Noisy recordings
- Heavy regional accents
- Rare words
- Extremely fast speech
Additional diverse training data can further improve performance.
Future Work
- Increase dataset size
- Support multiple Telugu dialects
- Improve recognition in noisy environments
- Reduce Word Error Rate
- Deploy as a web application using FastAPI and Streamlit
Acknowledgements
- Swecha Foundation
- Hugging Face Transformers
- PyTorch
- Google Colab
Author
Rahul Karnati
Data Science Undergraduate
Specialization: Artificial Intelligence and Machine Learning
- Downloads last month
- 35