Update tts_server.py
This commit is contained in:
1 parent
883d8a82d0
commit
3d3047fb93
1 file changed
+9
-9
+9
-9
@@ -79,6 +79,14 @@ load_config()
|
|||||||
##########################
|
##########################
|
||||||
# Central print function #
|
# Central print function #
|
||||||
##########################
|
##########################
|
||||||
|
# ANSI color codes
|
||||||
|
BLUE = "\033[94m"
|
||||||
|
# MAGENTA = "\033[95m"
|
||||||
|
YELLOW = "\033[93m"
|
||||||
|
RED = "\033[91m"
|
||||||
|
GREEN = "\033[92m"
|
||||||
|
RESET = "\033[0m"
|
||||||
|
|
||||||
def print_message(message, message_type="standard", component="TTS"):
|
def print_message(message, message_type="standard", component="TTS"):
|
||||||
"""Centralized print function for AllTalk messages
|
"""Centralized print function for AllTalk messages
|
||||||
Args:
|
Args:
|
||||||
@@ -86,14 +94,6 @@ def print_message(message, message_type="standard", component="TTS"):
|
|||||||
message_type (str): Type of message (standard/warning/error/debug_*/debug)
|
message_type (str): Type of message (standard/warning/error/debug_*/debug)
|
||||||
component (str): Component identifier (TTS/ENG/GEN/API/etc.)
|
component (str): Component identifier (TTS/ENG/GEN/API/etc.)
|
||||||
"""
|
"""
|
||||||
# ANSI color codes
|
|
||||||
BLUE = "\033[94m"
|
|
||||||
# MAGENTA = "\033[95m"
|
|
||||||
YELLOW = "\033[93m"
|
|
||||||
RED = "\033[91m"
|
|
||||||
GREEN = "\033[92m"
|
|
||||||
RESET = "\033[0m"
|
|
||||||
|
|
||||||
prefix = f"[{config.branding}{component}] "
|
prefix = f"[{config.branding}{component}] "
|
||||||
|
|
||||||
if message_type.startswith("debug_"):
|
if message_type.startswith("debug_"):
|
||||||
@@ -2570,4 +2570,4 @@ def start_server():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
start_server()
|
start_server()
|
||||||
|
|
||||||
Reference in new issue
Block a user