mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
feat: apply to cartesia and elevenlabs
This commit is contained in:
parent
e139dfadde
commit
968f83427a
2 changed files with 8 additions and 2 deletions
|
|
@ -57,7 +57,10 @@ class TTSProvider(TTSProviderBase):
|
|||
|
||||
# Voice 配置(支持 voice_id 或 voice_embedding)
|
||||
# 优先读取顶层 voice_id,然后检查嵌套的 voice.id 和 voice.embedding
|
||||
self.voice_id = config.get("voice_id", "")
|
||||
if config.get("private_voice"):
|
||||
self.voice_id = config.get("private_voice")
|
||||
else:
|
||||
self.voice_id = config.get("voice_id", "")
|
||||
self.voice_embedding = None
|
||||
|
||||
if not self.voice_id:
|
||||
|
|
|
|||
|
|
@ -64,7 +64,10 @@ class TTSProvider(TTSProviderBase):
|
|||
)
|
||||
|
||||
# Voice 配置
|
||||
self.voice_id = config.get("voice_id", "21m00Tcm4TlvDq8ikWAM") # Rachel (default)
|
||||
if config.get("private_voice"):
|
||||
self.voice_id = config.get("private_voice")
|
||||
else:
|
||||
self.voice_id = config.get("voice_id", "21m00Tcm4TlvDq8ikWAM") # Rachel (default)
|
||||
|
||||
# 模型配置
|
||||
self.model = config.get("model", "eleven_multilingual_v2")
|
||||
|
|
|
|||
Loading…
Reference in a new issue