fcernafukuzaki commited on
Commit
71965f4
·
verified ·
1 Parent(s): a6c2c32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -51,6 +51,7 @@ def transcribe_2(audio_bytes):
51
  #request = speech_v1.RecognizeSpeechRequest(config=config, audio=audio)
52
  print(type(audio_bytes))
53
  sr, y = audio_bytes
 
54
  print(type(y))
55
  y = y.astype(np.float32)
56
  y /= np.max(np.abs(y))
@@ -74,7 +75,7 @@ def transcribe_2(audio_bytes):
74
 
75
  demo = gr.Interface(
76
  transcribe_2,
77
- gr.Audio(format="bytes", streaming=True),
78
  "text",
79
  #live=True, # No muestra el botón de Submit.
80
  )
 
51
  #request = speech_v1.RecognizeSpeechRequest(config=config, audio=audio)
52
  print(type(audio_bytes))
53
  sr, y = audio_bytes
54
+ print(type(sr))
55
  print(type(y))
56
  y = y.astype(np.float32)
57
  y /= np.max(np.abs(y))
 
75
 
76
  demo = gr.Interface(
77
  transcribe_2,
78
+ gr.Audio(sources=["microphone"], streaming=True),
79
  "text",
80
  #live=True, # No muestra el botón de Submit.
81
  )