mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
add
This commit is contained in:
parent
6bbb7f25f8
commit
52c9d55963
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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}",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue