This commit is contained in:
seven 2025-03-25 23:17:24 +08:00
parent 6bbb7f25f8
commit 52c9d55963
2 changed files with 3 additions and 2 deletions

View file

@ -311,6 +311,7 @@ TTS:
response_format: 'opus' response_format: 'opus'
access_token: '123' access_token: '123'
sample_rate: 16000 sample_rate: 16000
instruct_text: "普通话"
CosyVoiceSiliconflow: CosyVoiceSiliconflow:
type: siliconflow type: siliconflow
# 硅基流动TTS # 硅基流动TTS

View file

@ -16,7 +16,7 @@ class TTSProvider(TTSProviderBase):
self.voice = config.get("voice") self.voice = config.get("voice")
self.response_format = config.get("response_format") self.response_format = config.get("response_format")
self.sample_rate = config.get("sample_rate") self.sample_rate = config.get("sample_rate")
self.instruct_text = config.get("instruct_text")
self.host = "tts.linkerai.top" self.host = "tts.linkerai.top"
self.api_url = 'http://47.243.172.147:24003/tts' self.api_url = 'http://47.243.172.147:24003/tts'
@ -31,7 +31,7 @@ class TTSProvider(TTSProviderBase):
"stream": True, "stream": True,
"target_sr": self.sample_rate, "target_sr": self.sample_rate,
"audio_format":"opus", "audio_format":"opus",
"instruct_text":"" "instruct_text":self.instruct_text
} }
headers = { headers = {
"Authorization": f"Bearer {self.access_token}", "Authorization": f"Bearer {self.access_token}",