{"id":2026081401,"name":"MiMo V2.5 TTS · Legado","url":"@js:mimoTtsUrl(speakText, speakSpeed);","contentType":"audio/mpeg","concurrentRate":"1/1000","loginUrl":"function login() {\n    var apiKey = String(result[\"apiKey\"] || \"\").trim();\n    if (!apiKey) {\n        throw \"请填写 MiMo API Key\";\n    }\n    var model = String(result[\"model\"] || \"mimo-v2.5-tts\");\n    if (model == \"预置音色\") model = \"mimo-v2.5-tts\";\n    if (model == \"设计音色\") model = \"mimo-v2.5-tts-voicedesign\";\n    if (model != \"mimo-v2.5-tts\" && model != \"mimo-v2.5-tts-voicedesign\") {\n        throw \"模型选择无效\";\n    }\n    result[\"model\"] = model;\n    var prompt = String(result[\"prompt\"] || \"\").trim();\n    if (model == \"mimo-v2.5-tts-voicedesign\" && !prompt) {\n        throw \"设计音色模型需要填写音色描述提示词\";\n    }\n    if (model == \"mimo-v2.5-tts\" && !String(result[\"voice\"] || \"\").trim()) {\n        throw \"请选择预置音色\";\n    }\n    source.putLoginInfo(JSON.stringify(result));\n    var variant = java.md5Encode(model + \"|\" + String(result[\"voice\"] || \"\") + \"|\" + prompt);\n    source.putLoginHeader(JSON.stringify({\"X-Legado-TTS-Profile\": variant}));\n}","loginUi":"@js:\nvar voiceOptions = [\"MiMo 默认\",\"冰糖\",\"茉莉\",\"苏打\",\"白桦\",\"Mia\",\"Chloe\",\"Milo\",\"Dean\"];\nvar model = String(result[\"model\"] || \"mimo-v2.5-tts\");\nvar rows = [\n    {\"name\":\"apiKey\",\"viewName\":\"'MiMo API Key（必填）'\",\"type\":\"password\"},\n    {\"name\":\"model\",\"viewName\":\"'模型'\",\"type\":\"select\",\"chars\":[\"mimo-v2.5-tts\",\"mimo-v2.5-tts-voicedesign\"],\"default\":\"mimo-v2.5-tts\",\"action\":\"java.reLoginView(true);\"},\n    {\"name\":\"prompt\",\"viewName\":model == \"mimo-v2.5-tts-voicedesign\" || model == \"设计音色\" ? \"'提示词（必填）'\" : \"'提示词（可选）'\",\"type\":\"text\",\"default\":\"\"}\n];\nif (model == \"mimo-v2.5-tts\" || model == \"预置音色\") {\n    rows.splice(2, 0, {\"name\":\"voice\",\"viewName\":\"'预置音色'\",\"type\":\"select\",\"chars\":voiceOptions,\"default\":\"MiMo 默认\"});\n}\nJSON.stringify(rows);","header":"@js:\nvar info = source.getLoginInfoMap();\nJSON.stringify({\n    \"Authorization\": \"Bearer \" + String(info.get(\"apiKey\") || \"\"),\n    \"Content-Type\": \"application/json\"\n});","jsLib":"function mimoTtsUrl(speakText, speakSpeed) {\n    var info = source.getLoginInfoMap();\n    var models = {\"设计音色\":\"mimo-v2.5-tts-voicedesign\",\"预置音色\":\"mimo-v2.5-tts\"};\n    var voices = {\"Chloe\":\"Chloe\",\"Dean\":\"Dean\",\"MiMo 默认\":\"mimo_default\",\"Mia\":\"Mia\",\"Milo\":\"Milo\",\"冰糖\":\"冰糖\",\"白桦\":\"白桦\",\"苏打\":\"苏打\",\"茉莉\":\"茉莉\"};\n    var modelLabel = String(info.get(\"model\") || \"预置音色\");\n    var model = String(models[modelLabel] || modelLabel || \"mimo-v2.5-tts\");\n    var voiceLabel = String(info.get(\"voice\") || \"MiMo 默认\");\n    var voice = String(voices[voiceLabel] || voiceLabel || \"mimo_default\");\n    var prompt = String(info.get(\"prompt\") || \"\");\n    var body = JSON.stringify({\n        text: String(speakText),\n        model: model,\n        voice: voice,\n        prompt: prompt,\n        speed: Number(speakSpeed)\n    });\n    return \"https://mimotts.hienxi.com\" + \"/v1/synthesize,\" + JSON.stringify({ method: \"POST\", body: body });\n}","enabledCookieJar":false}