Views
No views yet

whisper-small-dv model is an advanced Automatic Speech Recognition (ASR) model, trained on the extensive Mozilla Common Voice 13.0 dataset. This model is capable of transcribing spoken language into written text with high accuracy, making it a valuable tool for a wide range of applications, from transcription services to voice assistants.1from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
2
3# Load the model
4model = Wav2Vec2ForCTC.from_pretrained("Ryukijano/whisper-small-dv")
5processor = Wav2Vec2Processor.from_pretrained("Ryukijano/whisper-small-dv")
6
7# Use the model for ASR
8inputs = processor("path_to_audio_file", return_tensors="pt", padding=True)
9logits = model(inputs.input_values).logits
10predicted_ids = torch.argmax(logits, dim=-1)
11transcription = processor.decode(predicted_ids[0])