jbilcke-hf HF staff commited on
Commit
d1d60a3
1 Parent(s): 38ba98e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -586,9 +586,9 @@ def generate_speech_for_sentence(history, chatbot_role, sentence, return_as_byte
586
  f.setframerate(24000)
587
  f.writeframes(wav_bytestream)
588
 
589
- return (history , gr.Audio.update(value=audio_unique_filename, autoplay=True))
590
  else:
591
- return (history , gr.Audio.update(value=wav_bytestream, autoplay=True))
592
  except RuntimeError as e:
593
  if "device-side assert" in str(e):
594
  # cannot do anything on cuda device side error, need tor estart
 
586
  f.setframerate(24000)
587
  f.writeframes(wav_bytestream)
588
 
589
+ return (history , gr.Audio(value=audio_unique_filename, autoplay=True))
590
  else:
591
+ return (history , gr.Audio(value=wav_bytestream, autoplay=True))
592
  except RuntimeError as e:
593
  if "device-side assert" in str(e):
594
  # cannot do anything on cuda device side error, need tor estart