Allow Generate Only button for all TTS modes, not just Chatterbox

This commit is contained in:
2026-06-05 16:55:16 -05:00
parent 5cf65c3e3d
commit d262115dab
2 changed files with 4 additions and 9 deletions
+1 -4
View File
@@ -386,7 +386,7 @@ def tts_job_update(job_id):
@app.route("/api/tts/generate", methods=["POST"])
@login_required
def api_tts_generate():
"""Generate TTS via the bot (no VC playback). Chatterbox only."""
"""Generate TTS via the bot (no VC playback). All modes supported."""
data = request.get_json(force=True)
text = (data.get("text") or "").strip()
if not text:
@@ -400,9 +400,6 @@ def api_tts_generate():
global_mode = gcfg.get("tts_mode", "minimax")
mode = data.get("mode") or user_mode_overrides.get(str(user_id), global_mode)
if mode != "chatterbox":
return jsonify({"error": "Generate Only is available for Chatterbox mode only. Switch to Chatterbox or use Speak in VC."}), 400
voice = data.get("voice") or None
job_id = str(uuid.uuid4())
_tts_jobs[job_id] = {"status": "pending", "text": text, "user": discord_name, "engine": mode}