Spaces:
Sleeping
Sleeping
change ui add audio
Browse files
app.py
CHANGED
@@ -59,10 +59,10 @@ def process_audio(input_audio, new_chunk):
|
|
59 |
|
60 |
stream, transcription = transcribe(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 |
audio = "./output.wav"
|
65 |
-
print (transcription, text)
|
66 |
return stream, text, audio
|
67 |
|
68 |
|
@@ -70,7 +70,7 @@ 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="
|
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,
|
76 |
allow_flagging="never"
|
|
|
59 |
|
60 |
stream, transcription = transcribe(input_audio, new_chunk)
|
61 |
text = autocomplete(transcription)
|
62 |
+
print (transcription, text)
|
63 |
api = TTS(model_name="tts_models/fra/fairseq/vits").to("cuda")
|
64 |
api.tts_to_file(text, file_path="output.wav")
|
65 |
audio = "./output.wav"
|
|
|
66 |
return stream, text, audio
|
67 |
|
68 |
|
|
|
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="Parlons nous ☎️",
|
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,
|
76 |
allow_flagging="never"
|