diff --git a/bin/api/voice.py b/bin/api/voice.py index 8be5a49..68c1eb1 100644 --- a/bin/api/voice.py +++ b/bin/api/voice.py @@ -5,8 +5,6 @@ import json import uuid from pathlib import Path -from bin.commands.protocols import EventType, MsgType, full_client_request, receive_message - _RESOURCE_ID = "volc.service_type.10029" _ENDPOINT = "wss://openspeech.bytedance.com/api/v3/tts/unidirectional/stream" @@ -33,6 +31,9 @@ def synthesize_tts( Returns absolute path to the output audio file. """ + # Delayed import to avoid circular dependency when bin.commands is not yet loaded + from bin.commands.protocols import EventType, MsgType, full_client_request, receive_message + try: import websockets except ImportError as e: