voice get

This commit is contained in:
Caikecheng
2025-10-13 20:53:16 +08:00
parent 92c18088f9
commit 5494b08a67
10 changed files with 3468 additions and 66 deletions

View File

@@ -191,13 +191,15 @@ class ASEngineClient:
print(f"Failed to send text to route '{route}': {e}")
return False
def send_voice(self, route: str, voice_data: bytes, id:str) -> bool:
def send_voice(self, route: str, voice_data: bytes, id:str=None) -> bool:
"""
发送语音数据
:param route: 目标路由
:param voice_data: 语音数据字节流
:return: 是否发送成功
"""
if id is None:
id = self.id
if not self.connected:
print("Not connected to server")
return False