Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,13 +8,14 @@ def transcribe(audio):
|
|
8 |
sr, y = audio
|
9 |
y = y.astype(np.float32)
|
10 |
y /= np.max(np.abs(y))
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
demo = gr.Interface(
|
15 |
transcribe,
|
16 |
gr.Audio(sources=["microphone"], type="numpy", label="xerra aqui..."),
|
17 |
-
"text"
|
18 |
-
|
19 |
-
demo.launch(debug=True)
|
20 |
|
|
|
|
8 |
sr, y = audio
|
9 |
y = y.astype(np.float32)
|
10 |
y /= np.max(np.abs(y))
|
11 |
+
txt= transcriber({"sampling_rate": sr, "raw": y})["text"]
|
12 |
+
print(txt)
|
13 |
+
return txt
|
14 |
|
15 |
demo = gr.Interface(
|
16 |
transcribe,
|
17 |
gr.Audio(sources=["microphone"], type="numpy", label="xerra aqui..."),
|
18 |
+
"text",
|
19 |
+
)
|
|
|
20 |
|
21 |
+
demo.launch(debug=True)
|