Instructions to use espnet/bn_openslr53 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ESPnet
How to use espnet/bn_openslr53 with ESPnet:
import soundfile from espnet2.bin.asr_inference import Speech2Text model = Speech2Text.from_pretrained( "espnet/bn_openslr53" ) speech, rate = soundfile.read("speech.wav") text, *_ = model(speech)[0] - Notebooks
- Google Colab
- Kaggle
Add a usage example to the model card
Browse files
README.md
CHANGED
|
@@ -8,6 +8,21 @@ datasets:
|
|
| 8 |
license: cc-by-4.0
|
| 9 |
---
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
## ESPnet2 ASR model
|
| 12 |
|
| 13 |
### `espnet/bn_openslr53`
|
|
|
|
| 8 |
license: cc-by-4.0
|
| 9 |
---
|
| 10 |
|
| 11 |
+
## Usage
|
| 12 |
+
|
| 13 |
+
```python
|
| 14 |
+
import librosa
|
| 15 |
+
from espnet2.bin.asr_inference import Speech2Text
|
| 16 |
+
|
| 17 |
+
speech2text = Speech2Text.from_pretrained(model_tag="espnet/bn_openslr53")
|
| 18 |
+
# librosa resamples and mixes to one channel, so any file works; 16000 is
|
| 19 |
+
# what nearly every espnet recogniser is trained on - check this model's
|
| 20 |
+
# config if its audio is not 16 kHz
|
| 21 |
+
speech, rate = librosa.load("audio.wav", sr=16000, mono=True)
|
| 22 |
+
text, *_ = speech2text(speech)[0]
|
| 23 |
+
print(text)
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
## ESPnet2 ASR model
|
| 27 |
|
| 28 |
### `espnet/bn_openslr53`
|