jayasuryajsk/google-fleurs-te-romanized
Viewer • Updated • 2.77k • 13
How to use jayasuryajsk/whisper-large-v3-Telugu-Romanized with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="jayasuryajsk/whisper-large-v3-Telugu-Romanized") # Load model directly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("jayasuryajsk/whisper-large-v3-Telugu-Romanized")
model = AutoModelForSpeechSeq2Seq.from_pretrained("jayasuryajsk/whisper-large-v3-Telugu-Romanized", device_map="auto")This model is a fine-tuned version of openai/whisper-large-v3 on the Telugu Romanized 1.0 dataset. It achieves the following results on the evaluation set:
The model is trained to transcipt Telugu conversations in Romanized script, that most people uses in day to day life.
Limitations: Sometimes, it translates the audio to english directly. Working on this to fix it.
Gpt 4 api was used to convert google-fleurs telugu labels to romanized script. I used english tokenizer, since the script is in english alphabet to train the model.
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model_id = "jayasuryajsk/whisper-large-v3-Telugu-Romanized"
model = AutoModelForSpeechSeq2Seq.from_pretrained(
model_id, torch_dtype=torch_dtype
)
model.to(device)
processor = AutoProcessor.from_pretrained(model_id)
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
max_new_tokens=128,
chunk_length_s=30,
batch_size=16,
return_timestamps=True,
torch_dtype=torch_dtype,
device=device,
)
result = pipe("recording.mp3", generate_kwargs={"language": "english"})
print(result["text"])
The following hyperparameters were used during training:
Base model
openai/whisper-large-v3