nekin12 commited on
Commit
a36980b
1 Parent(s): 764a8f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
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
- return transcriber({"sampling_rate": sr, "raw": y})["text"]
 
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)