update:智控台支持火山双流式配置

This commit is contained in:
hrz
2025-05-27 23:29:11 +08:00
parent 8d2ba39ab8
commit b3d6f173f1
7 changed files with 63 additions and 13 deletions
-1
View File
@@ -98,7 +98,6 @@ class SimpleOtaServer:
content_type="application/json",
)
except Exception as e:
self.logger.bind(tag=TAG).error(f"OTA请求异常: {e}")
return_json = {"success": False, "message": "request error."}
response = web.Response(
text=json.dumps(return_json, separators=(",", ":")),
@@ -143,10 +143,13 @@ class TTSProvider(TTSProviderBase):
self.access_token = config.get("access_token")
self.cluster = config.get("cluster")
self.resource_id = config.get("resource_id")
if config.get("private_voice"):
self.speaker = config.get("private_voice")
else:
self.speaker = config.get("speaker")
self.voice = config.get("voice")
self.ws_url = config.get("ws_url")
self.authorization = config.get("authorization")
self.speaker = config.get("speaker")
self.header = {"Authorization": f"{self.authorization}{self.access_token}"}
self.enable_two_way = True
self.start_connection_flag = False