rutsam commited on
Commit
6c4292b
1 Parent(s): cbdd88f

change function for ctc mode

Browse files
Files changed (1) hide show
  1. nemo_asr.py +4 -2
nemo_asr.py CHANGED
@@ -13,8 +13,10 @@ def transcribe(file, modelName="stt_rw_conformer_transducer_large"):
13
  # out_file.write(content)
14
  #out_file.write(content) # async write
15
  #print(out_file.name)
16
- asr_model = nemo_asr.models.EncDecRNNTBPEModel.from_pretrained(
17
- model_name=modelName)
 
 
18
  # if not file.name.endswith("wav"):
19
  # sound = AudioSegment.from_mp3(out_file.name)
20
  # sound.export(out_file.name, format="wav")
 
13
  # out_file.write(content)
14
  #out_file.write(content) # async write
15
  #print(out_file.name)
16
+ asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained(
17
+ model_name="stt_rw_conformer_ctc_large")
18
+ #nemo_asr.models.EncDecRNNTBPEModel.from_pretrained(
19
+ #model_name=modelName)
20
  # if not file.name.endswith("wav"):
21
  # sound = AudioSegment.from_mp3(out_file.name)
22
  # sound.export(out_file.name, format="wav")