frogcho123 commited on
Commit
7e0b303
·
1 Parent(s): 947a20a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -47,8 +47,8 @@ def translate_speech_to_speech(input_audio):
47
 
48
  title = "Speech-to-Speech Translator"
49
 
50
- input_audio = gr.inputs.Audio(type=["mp3", "wav"])
51
- output_audio = gr.outputs.Audio(type=["mp3", "wav"], sample_rate=44100)
52
 
53
  stt_demo = gr.Interface(
54
  fn=translate_speech_to_speech,
@@ -63,3 +63,4 @@ if __name__ == "__main__":
63
 
64
 
65
 
 
 
47
 
48
  title = "Speech-to-Speech Translator"
49
 
50
+ input_audio = gr.inputs.Audio(source="microphone", type="numpy", dtype="float32", sample_rate=44100)
51
+ output_audio = gr.outputs.Audio(type="numpy", dtype="int16", sample_rate=44100)
52
 
53
  stt_demo = gr.Interface(
54
  fn=translate_speech_to_speech,
 
63
 
64
 
65
 
66
+