Update app.py
Browse files
app.py
CHANGED
@@ -192,13 +192,13 @@ def bot_response(message, history):
|
|
192 |
return llm_tokenizer.decode(out, skip_special_tokens=True)
|
193 |
|
194 |
|
195 |
-
def voice_player(history):
|
196 |
"""
|
197 |
Plays the generated response using the VITS-ljs model.
|
198 |
Returns the audio player with the generated response.
|
199 |
"""
|
200 |
-
|
201 |
-
|
202 |
voice = gr.Audio(value = (voice["sampling_rate"], voice["audio"].squeeze()), type="numpy", autoplay=True, label="MyAlexa Response", show_label=True,
|
203 |
visible=True)
|
204 |
return voice
|
|
|
192 |
return llm_tokenizer.decode(out, skip_special_tokens=True)
|
193 |
|
194 |
|
195 |
+
def voice_player(history):
|
196 |
"""
|
197 |
Plays the generated response using the VITS-ljs model.
|
198 |
Returns the audio player with the generated response.
|
199 |
"""
|
200 |
+
_, text = history
|
201 |
+
voice = pipe(text)
|
202 |
voice = gr.Audio(value = (voice["sampling_rate"], voice["audio"].squeeze()), type="numpy", autoplay=True, label="MyAlexa Response", show_label=True,
|
203 |
visible=True)
|
204 |
return voice
|