Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,10 +9,12 @@ text_to_speech = pipeline("text-to-speech", model="kakao-enterprise/vits-ljs")
|
|
9 |
def alexa(audio):
|
10 |
text = speech_to_text(audio, lang="en")["text"]
|
11 |
#generate = text_generation(text, max_length=60)[0]["generated_text"]
|
12 |
-
speech = text_to_speech(text)
|
13 |
-
return (speech["sampling_rate"], speech["audio"][0])
|
|
|
14 |
|
15 |
gr.Interface(
|
16 |
fn = alexa,
|
17 |
inputs = gr.Audio(type="filepath"),
|
18 |
-
outputs = gr.Audio(label="Narration", type="numpy", autoplay=True), live=True).launch()
|
|
|
|
9 |
def alexa(audio):
|
10 |
text = speech_to_text(audio, lang="en")["text"]
|
11 |
#generate = text_generation(text, max_length=60)[0]["generated_text"]
|
12 |
+
#speech = text_to_speech(text)
|
13 |
+
#return (speech["sampling_rate"], speech["audio"][0])
|
14 |
+
return text
|
15 |
|
16 |
gr.Interface(
|
17 |
fn = alexa,
|
18 |
inputs = gr.Audio(type="filepath"),
|
19 |
+
#outputs = gr.Audio(label="Narration", type="numpy", autoplay=True), live=True).launch()
|
20 |
+
outputs = gr.Textbox(), live=True).launch()
|