Automatic Speech Recognition
NeMo
PyTorch
NeMo
Yoruba
Igbo
Nigerian_Pidgin
Nigerian_English
Hausa
NaijaVoices
Instructions to use ogunlao/SBPN_multilingual_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use ogunlao/SBPN_multilingual_base with NeMo:
import nemo.collections.asr as nemo_asr asr_model = nemo_asr.models.ASRModel.from_pretrained("ogunlao/SBPN_multilingual_base") transcriptions = asr_model.transcribe(["file.wav"]) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -66,29 +66,29 @@ import nemo.collections.asr as nemo_asr
|
|
| 66 |
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="ogunlao/SBPN_multilingual_base")
|
| 67 |
```
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
### Input
|
| 93 |
|
| 94 |
This model accepts 16000 Hz mono-channel audio (wav files) as input.
|
|
|
|
| 66 |
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="ogunlao/SBPN_multilingual_base")
|
| 67 |
```
|
| 68 |
|
| 69 |
+
### Transcribing using Python
|
| 70 |
+
First, let's get a sample
|
| 71 |
+
```python
|
| 72 |
+
audio_path = "audio_sample_in_pidgin_english.wav"
|
| 73 |
+
```
|
| 74 |
+
Then simply do:
|
| 75 |
+
```python
|
| 76 |
+
output = asr_model.transcribe([audio_path])
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Remove the language tag
|
| 80 |
+
```python
|
| 81 |
+
prediction = output[0].text
|
| 82 |
+
prediction = re.sub(r'<.*?>', '', prediction)
|
| 83 |
+
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
### For language identification
|
| 87 |
+
Take the prediction and get the first token
|
| 88 |
+
```python
|
| 89 |
+
prediction = output[0].text
|
| 90 |
+
language_id = prediction.split()[0]
|
| 91 |
+
```
|
| 92 |
### Input
|
| 93 |
|
| 94 |
This model accepts 16000 Hz mono-channel audio (wav files) as input.
|