Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
12 |
|
13 |
|
14 |
-
iface = gr.Interface(
|
|
|
|
|
|
|
|
|
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()
|