ales commited on
Commit
3702096
1 Parent(s): 216ef4f
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -32,11 +32,16 @@ def main(audio_fp: str):
32
  pipeline = PreTrainedPipeline(model_path=HF_HUB_URL, language_model_fp=lm_fp)
33
 
34
  # recognize speech
35
- pipeline_res = pipeline(inputs=inputs)
36
- # text_recognized = pipeline(inputs=inputs)['text'][0]
37
- text_recognized = str(pipeline_res)
38
 
39
- return text_recognized
 
 
 
 
 
 
40
 
41
 
42
  iface = gr.Interface(
 
32
  pipeline = PreTrainedPipeline(model_path=HF_HUB_URL, language_model_fp=lm_fp)
33
 
34
  # recognize speech
35
+ res = pipeline(inputs=inputs)
36
+ # text_recognized = res['text'][0]
 
37
 
38
+ res['sampling_rate_orig'] = sampling_rate
39
+ res['init_audio_shape'] = audio.shape
40
+ res['inputs_shape'] = inputs.shape
41
+ res['inputs_max'] = np.max(inputs).item()
42
+ res['inputs_min'] = np.min(inputs).item()
43
+
44
+ return str(res)
45
 
46
 
47
  iface = gr.Interface(