voice get
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user