Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -68,12 +68,12 @@ def transcribe_audio(audio):
|
|
68 |
)
|
69 |
result = result[1]
|
70 |
result = result[0][1]
|
71 |
-
|
72 |
#tts = gTTS(text=result, lang='de')
|
73 |
#tts.save("./chroma/output.mp3")
|
74 |
#os.system("start ./chroma/output.mp3") # Dies spielt die Audiodatei ab
|
75 |
-
text_to_speech(result)
|
76 |
-
|
77 |
#text = update(text)
|
78 |
#return text
|
79 |
except sr.UnknownValueError:
|
@@ -205,7 +205,9 @@ with gr.Blocks() as speech:
|
|
205 |
sr_outputs = gr.Textbox(label="Antwort")
|
206 |
with gr.Row():
|
207 |
sr_inputs = gr.Microphone(type="filepath")
|
208 |
-
|
|
|
|
|
209 |
sr_inputs.change(transcribe_audio, inputs=sr_inputs, outputs=sr_outputs)
|
210 |
|
211 |
#with gr.Row():
|
|
|
68 |
)
|
69 |
result = result[1]
|
70 |
result = result[0][1]
|
71 |
+
result=gr.Markdown(result)
|
72 |
#tts = gTTS(text=result, lang='de')
|
73 |
#tts.save("./chroma/output.mp3")
|
74 |
#os.system("start ./chroma/output.mp3") # Dies spielt die Audiodatei ab
|
75 |
+
#text_to_speech(result)
|
76 |
+
return result
|
77 |
#text = update(text)
|
78 |
#return text
|
79 |
except sr.UnknownValueError:
|
|
|
205 |
sr_outputs = gr.Textbox(label="Antwort")
|
206 |
with gr.Row():
|
207 |
sr_inputs = gr.Microphone(type="filepath")
|
208 |
+
with gr.Row():
|
209 |
+
audio_button = gr.Button("audio")
|
210 |
+
audio_button.click(text_to_speech("guten tag wie geht es dir"))
|
211 |
sr_inputs.change(transcribe_audio, inputs=sr_inputs, outputs=sr_outputs)
|
212 |
|
213 |
#with gr.Row():
|