ssiidd commited on
Commit
d231d7c
1 Parent(s): 45af28c

Add CATSLU

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ speech2text_fsc = Speech2Text.from_pretrained(
35
  nbest=1
36
  )
37
 
38
- speech2text_fsc = Speech2Text.from_pretrained(
39
  asr_train_config="catslu/config.yaml",
40
  asr_model_file="catslu/valid.acc.ave_5best.pth",
41
  # Decoding parameters are not included in the model file
@@ -75,7 +75,7 @@ def inference(wav,data):
75
  speech=speech[:,0]
76
  # soundfile.write("store_file.wav", speech, rate, subtype='FLOAT')
77
  print(speech.shape)
78
- nbests = speech2text_fsc(speech)
79
  text, *_ = nbests[0]
80
  text=text.split(" ")[0]
81
  # intent=text.split(" ")[0]
 
35
  nbest=1
36
  )
37
 
38
+ speech2text_catslu = Speech2Text.from_pretrained(
39
  asr_train_config="catslu/config.yaml",
40
  asr_model_file="catslu/valid.acc.ave_5best.pth",
41
  # Decoding parameters are not included in the model file
 
75
  speech=speech[:,0]
76
  # soundfile.write("store_file.wav", speech, rate, subtype='FLOAT')
77
  print(speech.shape)
78
+ nbests = speech2text_catslu(speech)
79
  text, *_ = nbests[0]
80
  text=text.split(" ")[0]
81
  # intent=text.split(" ")[0]