From 347fc4ca448b4e6f4d9f5c13658eae34b8d42dc8 Mon Sep 17 00:00:00 2001 From: lizhongxiang Date: Tue, 1 Apr 2025 15:07:16 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E7=81=AB=E4=B8=8A=E5=A3=B0?= =?UTF-8?q?=E9=9F=B3=E5=A4=8D=E5=88=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/config.yaml | 2 ++ main/xiaozhi-server/core/providers/tts/huoshan.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index d4076a3a..b1148441 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -264,6 +264,8 @@ TTS: ws_url: wss://openspeech.bytedance.com/api/v3/tts/bidirection appid: 你的火山引擎语音合成服务appid access_token: 你的火山引擎语音合成服务access_token + # 产看https://www.volcengine.com/docs/6561/1329505,volc.service_type.10029,volc.megatts.default + resource_id: volc.service_type.10029 speaker: zh_female_meilinvyou_moon_bigtts CosyVoiceSiliconflow: type: siliconflow diff --git a/main/xiaozhi-server/core/providers/tts/huoshan.py b/main/xiaozhi-server/core/providers/tts/huoshan.py index 6489cfa9..90a07a42 100644 --- a/main/xiaozhi-server/core/providers/tts/huoshan.py +++ b/main/xiaozhi-server/core/providers/tts/huoshan.py @@ -141,6 +141,7 @@ class TTSProvider(TTSProviderBase): self.appId = config.get("appid") self.access_token = config.get("access_token") self.cluster = config.get("cluster") + self.resource_id = config.get("resource_id") self.voice = config.get("voice") self.ws_url = config.get("ws_url") self.authorization = config.get("authorization") @@ -156,7 +157,7 @@ class TTSProvider(TTSProviderBase): ws_header = { "X-Api-App-Key": self.appId, "X-Api-Access-Key": self.access_token, - "X-Api-Resource-Id": 'volc.service_type.10029', + "X-Api-Resource-Id": self.resource_id, "X-Api-Connect-Id": uuid.uuid4(), } self.ws = await websockets.connect(self.ws_url, additional_headers=ws_header, max_size=1000000000)