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,6 +57,9 @@ class TTSProvider(TTSProviderBase):
|
||||||
|
|
||||||
# Voice 配置(支持 voice_id 或 voice_embedding)
|
# Voice 配置(支持 voice_id 或 voice_embedding)
|
||||||
# 优先读取顶层 voice_id,然后检查嵌套的 voice.id 和 voice.embedding
|
# 优先读取顶层 voice_id,然后检查嵌套的 voice.id 和 voice.embedding
|
||||||
|
if config.get("private_voice"):
|
||||||
|
self.voice_id = config.get("private_voice")
|
||||||
|
else:
|
||||||
self.voice_id = config.get("voice_id", "")
|
self.voice_id = config.get("voice_id", "")
|
||||||
self.voice_embedding = None
|
self.voice_embedding = None
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,9 @@ class TTSProvider(TTSProviderBase):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Voice 配置
|
# Voice 配置
|
||||||
|
if config.get("private_voice"):
|
||||||
|
self.voice_id = config.get("private_voice")
|
||||||
|
else:
|
||||||
self.voice_id = config.get("voice_id", "21m00Tcm4TlvDq8ikWAM") # Rachel (default)
|
self.voice_id = config.get("voice_id", "21m00Tcm4TlvDq8ikWAM") # Rachel (default)
|
||||||
|
|
||||||
# 模型配置
|
# 模型配置
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue