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
+6 -4
View File
@@ -330,7 +330,7 @@ LLM:
# 定义LLM API类型
type: openai
# 先开通服务,打开以下网址,开通的服务搜索Doubao-1.5-pro,开通它
# 开通地址:https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement?LLM=%7B%7D&OpenTokenDrawer=false
# 开通地址:https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement?LLM=%7B%7D&OpenTokenDrawer=false
# 免费额度500000token
# 开通后,进入这里获取密钥:https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D
base_url: https://ark.cn-beijing.volces.com/api/v3
@@ -460,14 +460,16 @@ TTS:
#火山tts,支持双向流式tts
HuoshanDoubleStreamTTS:
type: huoshan_double_stream
# 如果是机智云 wss://bytedance.gizwitsapi.com/api/v3/tts/bidirection
# 访问 https://console.volcengine.com/speech/service/10007 开通语音合成大模型,购买音色
# 在页面底部获取appid和access_token
# 资源ID固定为:volc.service_type.10029(大模型语音合成及混音)
# 如果是机智云,把接口地址换成wss://bytedance.gizwitsapi.com/api/v3/tts/bidirection
# 机智云不需要天填 appid
ws_url: wss://openspeech.bytedance.com/api/v3/tts/bidirection
appid: 你的火山引擎语音合成服务appid
access_token: 你的火山引擎语音合成服务access_token
# 资源信息IDhttps://www.volcengine.com/docs/6561/1329505volc.service_type.10029,大模型语音合成及混音
resource_id: volc.service_type.10029
speaker: zh_female_meilinvyou_moon_bigtts
speaker: zh_female_wanwanxiaohe_moon_bigtts
CosyVoiceSiliconflow:
type: siliconflow
# 硅基流动TTS
-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