This commit is contained in:
seven 2025-03-25 20:16:02 +08:00
parent d9e7bb7eda
commit c8b69a5a9d
2 changed files with 11 additions and 3 deletions

View file

@ -300,6 +300,17 @@ TTS:
appid: 你的火山引擎语音合成服务appid appid: 你的火山引擎语音合成服务appid
access_token: 你的火山引擎语音合成服务access_token access_token: 你的火山引擎语音合成服务access_token
cluster: volcano_tts cluster: volcano_tts
LinkeraiTTS:
# 定义TTS API类型, 免费
# 支持克隆音色,文档地址:https://tts.linkerai.top/docs#/
type: linkerai
api_url: https://tts.linkerai.top/tts
voice: OUeAo1mhq6IBExi
output_dir: tmp/
authorization: "Bearer;"
response_format: 'opus'
access_token: '123'
sample_rate: 16000
CosyVoiceSiliconflow: CosyVoiceSiliconflow:
type: siliconflow type: siliconflow
# 硅基流动TTS # 硅基流动TTS

View file

@ -8,13 +8,10 @@ import json
class TTSProvider(TTSProviderBase): class TTSProvider(TTSProviderBase):
def __init__(self, config, delete_audio_file): def __init__(self, config, delete_audio_file):
super().__init__(config, delete_audio_file) super().__init__(config, delete_audio_file)
self.model = config.get("model")
self.access_token = config.get("access_token") self.access_token = config.get("access_token")
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.speed = config.get("speed")
self.gain = config.get("gain")
self.host = "tts.linkerai.top" self.host = "tts.linkerai.top"
self.api_url = f"https://{self.host}/tts" self.api_url = f"https://{self.host}/tts"