projekt-rising-ai commited on
Commit
b738385
·
1 Parent(s): 163a94e

Changed logic for adding Polly output to video

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -418,8 +418,8 @@ class ChatWrapper:
418
  else:
419
  temp_file = LOOPING_TALKING_HEAD
420
  html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
421
- html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
422
-
423
  else:
424
  html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
425
  else:
@@ -655,9 +655,9 @@ with gr.Blocks(css="css/custom_css.css") as block:
655
  trace_chain_cb.change(update_foo, inputs=[trace_chain_cb, trace_chain_state],
656
  outputs=[trace_chain_state])
657
 
658
- speak_text_cb = gr.Checkbox(label="Speak text from agent", value=False)
659
- speak_text_cb.change(update_foo, inputs=[speak_text_cb, speak_text_state],
660
- outputs=[speak_text_state])
661
 
662
  talking_head_cb = gr.Checkbox(label="Show talking head", value=True)
663
  talking_head_cb.change(update_talking_head, inputs=[talking_head_cb, talking_head_state],
 
418
  else:
419
  temp_file = LOOPING_TALKING_HEAD
420
  html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
421
+ #html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
422
+ html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
423
  else:
424
  html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
425
  else:
 
655
  trace_chain_cb.change(update_foo, inputs=[trace_chain_cb, trace_chain_state],
656
  outputs=[trace_chain_state])
657
 
658
+ # speak_text_cb = gr.Checkbox(label="Speak text from agent", value=False)
659
+ # speak_text_cb.change(update_foo, inputs=[speak_text_cb, speak_text_state],
660
+ # outputs=[speak_text_state])
661
 
662
  talking_head_cb = gr.Checkbox(label="Show talking head", value=True)
663
  talking_head_cb.change(update_talking_head, inputs=[talking_head_cb, talking_head_state],