Update script.py

updated timeout
This commit is contained in:
erew123 authored and GitHub committed 2023-12-23 00:16:38 +00:00
1 parent 28a62ed39a
commit b5b68ad51f
1 file changed
+2 -2
+2 -2
View File
@@ -248,7 +248,7 @@ else:
# Cleanly kill off this script, but allow text-generation-webui to keep running, albeit without this alltalk_tts # Cleanly kill off this script, but allow text-generation-webui to keep running, albeit without this alltalk_tts
sys.exit(1) sys.exit(1)
timeout = 60 # Adjust the timeout as needed timeout = 120 # Adjust the timeout as needed
# Introduce a delay before starting the check loop # Introduce a delay before starting the check loop
time.sleep(25) # Wait 25 secs before checking if the tts_server.py has started up. time.sleep(25) # Wait 25 secs before checking if the tts_server.py has started up.
@@ -261,7 +261,7 @@ while time.time() - start_time < timeout:
except requests.RequestException as e: except requests.RequestException as e:
# Print the exception for debugging purposes # Print the exception for debugging purposes
print( print(
f"[{params['branding']}Startup] \033[91mWarning\033[0m TTS Subprocess has NOT started up yet, Will keep trying for 60 seconds maximum. Please wait." f"[{params['branding']}Startup] \033[91mWarning\033[0m TTS Subprocess has NOT started up yet, Will keep trying for 120 seconds maximum. Please wait."
) )
time.sleep(1) time.sleep(1)
else: else: