Spaces:
Running
Running
test
Browse files
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 |
-
|
36 |
-
# text_recognized =
|
37 |
-
text_recognized = str(pipeline_res)
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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(
|