Skip to content
Open
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
12 changes: 12 additions & 0 deletions backend/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ def is_loaded(self) -> bool:
"chatterbox_turbo": "Chatterbox Turbo",
"tada": "TADA",
"kokoro": "Kokoro",
"minimax": "MiniMax TTS",
}

LLM_ENGINES = {
Expand Down Expand Up @@ -553,6 +554,13 @@ async def ensure_model_cached_or_raise(engine: str, model_size: str = "default")
status_code=400,
detail=f"Model {model_size} is not downloaded yet. Use /generate to trigger a download.",
)
elif engine == "minimax":
# MiniMax is a cloud API — "cached" means the API key is configured.
if not backend._is_model_cached():
raise HTTPException(
status_code=400,
detail="MINIMAX_API_KEY is not configured. Set it in your environment or ~/.env.local.",
)
else:
if not backend._is_model_cached():
display = cfg.display_name if cfg else engine
Expand Down Expand Up @@ -723,6 +731,10 @@ def get_tts_backend_for_engine(engine: str) -> TTSBackend:
from .qwen_custom_voice_backend import QwenCustomVoiceBackend

backend = QwenCustomVoiceBackend()
elif engine == "minimax":
from .minimax_backend import MiniMaxTTSBackend

backend = MiniMaxTTSBackend()
else:
raise ValueError(f"Unknown TTS engine: {engine}. Supported: {list(TTS_ENGINES.keys())}")

Expand Down
Loading