Views
No views yet
1
2import torch
3from transformers import pipeline
4
5audio = "path to the audio file to be transcribed"
6device = "cuda:0" if torch.cuda.is_available() else "cpu"
7modelTags="ARTPARK-IISc/whisper-small-vaani-hindi"
8transcribe = pipeline(task="automatic-speech-recognition", model=modelTags, chunk_length_s=30, device=device)
9transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="hi", task="transcribe")
10
11print('Transcription: ', transcribe(audio)["text"])
12| Dataset | WER |
|---|---|
| Gramvaani | 32.49 |
| Fleurs | 19.08 |
| IndicTTS | 11.33 |
| MUCS | 28.44 |
| Commonvoice | 26.27 |
| Kathbath | 18.66 |
| Kathbath Noisy | 21.15 |
| Vaani | 26.62 |