mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user