mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 09:03:54 +08:00
fix:火上声音复刻
This commit is contained in:
@@ -264,6 +264,8 @@ TTS:
|
|||||||
ws_url: wss://openspeech.bytedance.com/api/v3/tts/bidirection
|
ws_url: wss://openspeech.bytedance.com/api/v3/tts/bidirection
|
||||||
appid: 你的火山引擎语音合成服务appid
|
appid: 你的火山引擎语音合成服务appid
|
||||||
access_token: 你的火山引擎语音合成服务access_token
|
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
|
speaker: zh_female_meilinvyou_moon_bigtts
|
||||||
CosyVoiceSiliconflow:
|
CosyVoiceSiliconflow:
|
||||||
type: siliconflow
|
type: siliconflow
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ class TTSProvider(TTSProviderBase):
|
|||||||
self.appId = config.get("appid")
|
self.appId = config.get("appid")
|
||||||
self.access_token = config.get("access_token")
|
self.access_token = config.get("access_token")
|
||||||
self.cluster = config.get("cluster")
|
self.cluster = config.get("cluster")
|
||||||
|
self.resource_id = config.get("resource_id")
|
||||||
self.voice = config.get("voice")
|
self.voice = config.get("voice")
|
||||||
self.ws_url = config.get("ws_url")
|
self.ws_url = config.get("ws_url")
|
||||||
self.authorization = config.get("authorization")
|
self.authorization = config.get("authorization")
|
||||||
@@ -156,7 +157,7 @@ class TTSProvider(TTSProviderBase):
|
|||||||
ws_header = {
|
ws_header = {
|
||||||
"X-Api-App-Key": self.appId,
|
"X-Api-App-Key": self.appId,
|
||||||
"X-Api-Access-Key": self.access_token,
|
"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(),
|
"X-Api-Connect-Id": uuid.uuid4(),
|
||||||
}
|
}
|
||||||
self.ws = await websockets.connect(self.ws_url, additional_headers=ws_header, max_size=1000000000)
|
self.ws = await websockets.connect(self.ws_url, additional_headers=ws_header, max_size=1000000000)
|
||||||
|
|||||||
Reference in New Issue
Block a user