ogunlao commited on
Commit
03eccc5
·
verified ·
1 Parent(s): 68ed818

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -23
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
- ### Transcribing using Python
70
- First, let's get a sample
71
- ```
72
- audio_path = "audio_sample_in_pidgin_english.wav"
73
- ```
74
- Then simply do:
75
- ```
76
- output = asr_model.transcribe([audio_path])
77
- ```
78
-
79
- Remove the language tag
80
- ```
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
- ```
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.
 
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.