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.
The model was fine-tuned on a custom Telugu speech dataset.
The dataset contains Telugu speech recordings with corresponding Telugu transcripts.
The additional training data improved the overall recognition performance.
1from transformers import AutoProcessor, AutoModelForCTC
2import librosa
3import torch
4
5processor = AutoProcessor.from_pretrained("YOUR_USERNAME/YOUR_MODEL_NAME")
6model = AutoModelForCTC.from_pretrained("YOUR_USERNAME/YOUR_MODEL_NAME")
7
8speech, sr = librosa.load("sample.mp3", sr=16000)
9
10inputs = processor(
11 speech,
12 sampling_rate=16000,
13 return_tensors="pt"
14)
15
16with torch.no_grad():
17 logits = model(**inputs).logits
18
19predicted_ids = torch.argmax(logits, dim=-1)
20
21prediction = processor.batch_decode(predicted_ids)[0]
22
23print(prediction)
Additional diverse training data can further improve performance.