Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions astrbot/core/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ class ChatProviderTemplate(TypedDict):
"minimax-is-timber-weight": False,
"minimax-voice-id": "female-shaonv",
"minimax-timber-weight": '[\n {\n "voice_id": "Chinese (Mandarin)_Warm_Girl",\n "weight": 25\n },\n {\n "voice_id": "Chinese (Mandarin)_BashfulGirl",\n "weight": 50\n }\n]',
"minimax-voice-emotion": "neutral",
"minimax-voice-emotion": "auto",
"minimax-voice-latex": False,
"minimax-voice-english-normalization": False,
"timeout": 20,
Expand Down Expand Up @@ -1858,15 +1858,18 @@ class ChatProviderTemplate(TypedDict):
"minimax-voice-emotion": {
"type": "string",
"description": "情绪",
"hint": "控制合成语音的情绪",
"hint": "控制合成语音的情绪。当为 auto 时,将根据文本内容自动选择情绪。",
"options": [
"auto",
"happy",
"sad",
"angry",
"fearful",
"disgusted",
"surprised",
"neutral",
"calm",
"fluent",
"whisper",
],
},
"minimax-voice-latex": {
Expand Down
5 changes: 4 additions & 1 deletion astrbot/core/provider/sources/minimax_tts_api_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ def __init__(
"voice_id": ""
if self.is_timber_weight
else provider_config.get("minimax-voice-id", ""),
"emotion": provider_config.get("minimax-voice-emotion", "neutral"),
"emotion": provider_config.get("minimax-voice-emotion", "auto"),
"latex_read": provider_config.get("minimax-voice-latex", False),
"english_normalization": provider_config.get(
"minimax-voice-english-normalization",
False,
),
}

if self.voice_setting["emotion"] == "auto":
self.voice_setting.pop("emotion", None)

self.audio_setting: dict = {
"sample_rate": 32000,
"bitrate": 128000,
Expand Down