Spaces:
Sleeping
Sleeping
Commit
·
f099057
1
Parent(s):
b6a52ee
Added debugging statements
Browse files
app.py
CHANGED
@@ -493,8 +493,10 @@ def create_html_video(file_name, width):
|
|
493 |
|
494 |
|
495 |
def do_html_video_speak(words_to_speak, azure_language):
|
|
|
496 |
azure_voice = AZURE_VOICE_DATA.get_voice(azure_language, "Male")
|
497 |
if not azure_voice:
|
|
|
498 |
azure_voice = "en-US-ChristopherNeural"
|
499 |
|
500 |
headers = {"Authorization": f"Bearer {os.environ['EXHUMAN_API_KEY']}"}
|
@@ -508,9 +510,11 @@ def do_html_video_speak(words_to_speak, azure_language):
|
|
508 |
api_endpoint = "https://api.exh.ai/animations/v1/generate_lipsync"
|
509 |
res = requests.post(api_endpoint, json=body, headers=headers)
|
510 |
print("res.status_code: ", res.status_code)
|
|
|
511 |
|
512 |
html_video = '<pre>no video</pre>'
|
513 |
if isinstance(res.content, bytes):
|
|
|
514 |
response_stream = io.BytesIO(res.content)
|
515 |
print("len(res.content)): ", len(res.content))
|
516 |
|
|
|
493 |
|
494 |
|
495 |
def do_html_video_speak(words_to_speak, azure_language):
|
496 |
+
print('do_html_video_speak called')
|
497 |
azure_voice = AZURE_VOICE_DATA.get_voice(azure_language, "Male")
|
498 |
if not azure_voice:
|
499 |
+
print('No azure_voice detected using default')
|
500 |
azure_voice = "en-US-ChristopherNeural"
|
501 |
|
502 |
headers = {"Authorization": f"Bearer {os.environ['EXHUMAN_API_KEY']}"}
|
|
|
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):
|
517 |
+
print('Starting branch which creates temp video files')
|
518 |
response_stream = io.BytesIO(res.content)
|
519 |
print("len(res.content)): ", len(res.content))
|
520 |
|