VanYsa commited on
Commit
474452f
·
1 Parent(s): 0af41c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- _, text = history[-1]
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
 
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