ggoknar commited on
Commit
e0aeb7a
1 Parent(s): d346a71

fix last sentece, use file for ios

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -497,10 +497,13 @@ def generate_speech(history):
497
  # final_audio.update(value=combined_file_name, visible=True)
498
  # yield (combined_file_name, history
499
 
 
500
  wav_bytestream = wave_header_chunk() + wav_bytestream
501
- time.sleep(0.7)
 
 
502
  yield (gr.Audio.update(value=None, autoplay=False), history)
503
- yield (gr.Audio.update(value=wav_bytestream, autoplay=False), history)
504
 
505
 
506
  with gr.Blocks(title=title) as demo:
 
497
  # final_audio.update(value=combined_file_name, visible=True)
498
  # yield (combined_file_name, history
499
 
500
+ time.sleep(0.6)
501
  wav_bytestream = wave_header_chunk() + wav_bytestream
502
+ outfile = "combined.wav"
503
+ with open(outfile, "wb") as f:
504
+ f.write(wav_bytestream)
505
  yield (gr.Audio.update(value=None, autoplay=False), history)
506
+ yield (gr.Audio.update(value=outfile, autoplay=False), history)
507
 
508
 
509
  with gr.Blocks(title=title) as demo: