diff --git a/ttstoy/webui/app.py b/ttstoy/webui/app.py index 0c0a6c5..098aefe 100644 --- a/ttstoy/webui/app.py +++ b/ttstoy/webui/app.py @@ -619,12 +619,15 @@ def api_mc_login(): @app.route("/api/mc/voices", methods=["GET"]) def api_mc_voices(): - """List all predefined voices from the Chatterbox server.""" + """List predefined voices from the Chatterbox server (excludes user-uploaded voices).""" try: chatterbox_url = get_chatterbox_url() r = requests.get(f"{chatterbox_url}/get_predefined_voices", timeout=10) r.raise_for_status() - return jsonify(r.json()) + voices = r.json() + # Filter out user-uploaded voices (format: userid_name.wav where userid is numeric) + filtered = [v for v in voices if not v.get("filename", "").split("_")[0].isdigit()] + return jsonify(filtered) except Exception as e: return jsonify({"error": str(e)}), 502