Spaces:
Sleeping
Sleeping
Commit
·
b27278a
1
Parent(s):
f0913b5
Added debugging statements for talking head
Browse files
app.py
CHANGED
@@ -412,7 +412,9 @@ class ChatWrapper:
|
|
412 |
html_video, temp_file, html_audio, temp_aud_file = None, None, None, None
|
413 |
|
414 |
if speak_text:
|
|
|
415 |
if talking_head:
|
|
|
416 |
if len(output) <= MAX_TALKING_HEAD_TEXT_LENGTH:
|
417 |
html_video, temp_file = do_html_video_speak(output, translate_to)
|
418 |
else:
|
@@ -420,12 +422,16 @@ class ChatWrapper:
|
|
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 |
else:
|
|
|
423 |
html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
|
424 |
else:
|
|
|
425 |
if talking_head:
|
|
|
426 |
temp_file = LOOPING_TALKING_HEAD
|
427 |
html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
|
428 |
else:
|
|
|
429 |
# html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
|
430 |
# html_video = create_html_video(temp_file, "128")
|
431 |
pass
|
|
|
412 |
html_video, temp_file, html_audio, temp_aud_file = None, None, None, None
|
413 |
|
414 |
if speak_text:
|
415 |
+
print('speak_text branch')
|
416 |
if talking_head:
|
417 |
+
print('speak_text then talking_head branch')
|
418 |
if len(output) <= MAX_TALKING_HEAD_TEXT_LENGTH:
|
419 |
html_video, temp_file = do_html_video_speak(output, translate_to)
|
420 |
else:
|
|
|
422 |
html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
|
423 |
html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
|
424 |
else:
|
425 |
+
print('speak_text branch then no talking_head branch')
|
426 |
html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
|
427 |
else:
|
428 |
+
print('no speak_text branch')
|
429 |
if talking_head:
|
430 |
+
print('no speak_text then talking_head branch')
|
431 |
temp_file = LOOPING_TALKING_HEAD
|
432 |
html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
|
433 |
else:
|
434 |
+
print('np speak_text then no talking_head branch')
|
435 |
# html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
|
436 |
# html_video = create_html_video(temp_file, "128")
|
437 |
pass
|