projekt-rising-ai commited on
Commit
62e4476
·
1 Parent(s): f099057

Changed talking head functionality

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -415,10 +415,12 @@ class ChatWrapper:
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:
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
  else:
423
  html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
424
  else:
@@ -510,7 +512,6 @@ def do_html_video_speak(words_to_speak, azure_language):
510
  api_endpoint = "https://api.exh.ai/animations/v1/generate_lipsync"
511
  res = requests.post(api_endpoint, json=body, headers=headers)
512
  print("res.status_code: ", res.status_code)
513
- print('No azure_voice detected, using default')
514
 
515
  html_video = '<pre>no video</pre>'
516
  if isinstance(res.content, bytes):
 
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
+ html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
419
  else:
420
  temp_file = LOOPING_TALKING_HEAD
421
  html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
422
  html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
423
+
424
  else:
425
  html_audio, temp_aud_file = do_html_audio_speak(output, translate_to)
426
  else:
 
512
  api_endpoint = "https://api.exh.ai/animations/v1/generate_lipsync"
513
  res = requests.post(api_endpoint, json=body, headers=headers)
514
  print("res.status_code: ", res.status_code)
 
515
 
516
  html_video = '<pre>no video</pre>'
517
  if isinstance(res.content, bytes):