Spaces:
Sleeping
Sleeping
change ui add audio
Browse files
app.py
CHANGED
@@ -61,15 +61,15 @@ def process_audio(input_audio, new_chunk):
|
|
61 |
text = autocomplete(transcription)
|
62 |
api = TTS(model_name="tts_models/fra/fairseq/vits").to("cuda")
|
63 |
api.tts_to_file(text, file_path="output.wav")
|
64 |
-
|
65 |
print (transcription, text)
|
66 |
-
return stream, text
|
67 |
|
68 |
|
69 |
demo = gr.Interface(
|
70 |
fn = process_audio,
|
71 |
inputs = ["state", gr.Audio(sources=["microphone"], streaming=True)],
|
72 |
-
outputs = ["state", gr.Markdown()],
|
73 |
title="Hey Gemma ☎️",
|
74 |
description="Powered by [whisper-base-en](https://huggingface.co/openai/whisper-base.en), and [gemma-7b-it](https://huggingface.co/google/gemma-7b-it) (via [Groq](https://groq.com/))",
|
75 |
live=True,
|
|
|
61 |
text = autocomplete(transcription)
|
62 |
api = TTS(model_name="tts_models/fra/fairseq/vits").to("cuda")
|
63 |
api.tts_to_file(text, file_path="output.wav")
|
64 |
+
audio = "output.wav"
|
65 |
print (transcription, text)
|
66 |
+
return stream, text, audio
|
67 |
|
68 |
|
69 |
demo = gr.Interface(
|
70 |
fn = process_audio,
|
71 |
inputs = ["state", gr.Audio(sources=["microphone"], streaming=True)],
|
72 |
+
outputs = ["state", gr.Markdown(), gr.Audio(interactive=False, autoplay=True)],
|
73 |
title="Hey Gemma ☎️",
|
74 |
description="Powered by [whisper-base-en](https://huggingface.co/openai/whisper-base.en), and [gemma-7b-it](https://huggingface.co/google/gemma-7b-it) (via [Groq](https://groq.com/))",
|
75 |
live=True,
|