update
Browse files
README.md
CHANGED
@@ -4,11 +4,14 @@ language:
|
|
4 |
- bn
|
5 |
base_model:
|
6 |
- openai/whisper-small
|
|
|
7 |
pipeline_tag: automatic-speech-recognition
|
8 |
|
9 |
---
|
10 |
-
|
11 |
|
|
|
|
|
12 |
import os
|
13 |
import librosa
|
14 |
import torch, torchaudio
|
@@ -22,7 +25,7 @@ processor = WhisperProcessor.from_pretrained(model_path_)
|
|
22 |
model = WhisperForConditionalGeneration.from_pretrained(model_path_).to(device)
|
23 |
model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(language="bengali", task="transcribe")
|
24 |
|
25 |
-
mp3_path = "/
|
26 |
speech_array, sampling_rate = librosa.load(mp3_path, sr=16000)
|
27 |
|
28 |
speech_array = librosa.resample(np.asarray(speech_array), orig_sr=sampling_rate, target_sr=16000)
|
@@ -34,5 +37,10 @@ transcription = processor.decode(predicted_ids, skip_special_tokens=True)
|
|
34 |
|
35 |
print(transcription)
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
-
```
|
|
|
4 |
- bn
|
5 |
base_model:
|
6 |
- openai/whisper-small
|
7 |
+
|
8 |
pipeline_tag: automatic-speech-recognition
|
9 |
|
10 |
---
|
11 |
+
BengaliRegionalASR trained on bengali regional dialact dataset.
|
12 |
|
13 |
+
# Try the model
|
14 |
+
```py
|
15 |
import os
|
16 |
import librosa
|
17 |
import torch, torchaudio
|
|
|
25 |
model = WhisperForConditionalGeneration.from_pretrained(model_path_).to(device)
|
26 |
model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(language="bengali", task="transcribe")
|
27 |
|
28 |
+
mp3_path = "https://huggingface.co/sha1779/BengaliRegionalASR/resolve/main/Mp3/common_voice_bn_31617644.mp3"
|
29 |
speech_array, sampling_rate = librosa.load(mp3_path, sr=16000)
|
30 |
|
31 |
speech_array = librosa.resample(np.asarray(speech_array), orig_sr=sampling_rate, target_sr=16000)
|
|
|
37 |
|
38 |
print(transcription)
|
39 |
|
40 |
+
```
|
41 |
+
|
42 |
+
# Evaluation
|
43 |
+
Word Error Rate 0.65 %
|
44 |
+
|
45 |
+
|
46 |
|
|