gdnartea commited on
Commit
588a062
1 Parent(s): 9bebeaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -8,9 +8,13 @@ def convert_speech(audio):
8
  sr, y = audio
9
  y = y.astype(np.float32)
10
  y /= np.max(np.abs(y))
11
- return transcriber({"sampling_rate": sr, "raw": y})["text"]
12
 
13
 
14
- iface = gr.Interface(fn=convert_speech, inputs=gr.Audio(sources="microphone"), outputs="textbox")
 
 
 
 
15
 
16
  iface.launch()
 
8
  sr, y = audio
9
  y = y.astype(np.float32)
10
  y /= np.max(np.abs(y))
11
+ return canary_pipe({"sampling_rate": sr, "raw": y})["text"]
12
 
13
 
14
+ iface = gr.Interface(
15
+ fn=convert_speech,
16
+ inputs=gr.Audio(sources="microphone"),
17
+ outputs="text"
18
+ )
19
 
20
  iface.launch()