Views
No views yet
transformers and datasets libraries.1from transformers import pipeline
2
3# Load the fine-tuned model from Hugging Face
4pipe = pipeline(
5 task="automatic-speech-recognition",
6 model="Bhaveen/Medical-Speech-Transcription-Whisper-Small-Fine-Tuned",
7 device=0 # set to -1 for CPU, or 0 for GPU if available
8)
9
10# Run inference on an audio file
11result = pipe("path_to_audio.wav") # Replace with your actual audio file path
12print(result["text"])pip install transformers datasets torchaudio| Training Loss | Epoch | Step | Validation Loss | Wer |
|---|---|---|---|---|
| 0.0384 | 1.0 | 25 | 0.4705 | 12.2222 |
| 0.0375 | 2.0 | 50 | 0.4689 | 12.0 |
| 0.0332 | 3.0 | 75 | 0.4666 | 11.0370 |
| 0.0293 | 4.0 | 100 | 0.4636 | 11.1111 |
| 0.0242 | 5.0 | 125 | 0.4612 | 11.0370 |
| 0.0197 | 6.0 | 150 | 0.4586 | 10.9630 |
| 0.0152 | 7.0 | 175 | 0.4555 | 10.7407 |
| 0.0116 | 8.0 | 200 | 0.4537 | 10.6667 |