{
  "name": "gen-voice",
  "toolName": "gen_voice",
  "tier": "atomic",
  "category": "asset",
  "title": "Text-to-Speech (Minimax)",
  "description": "Text-to-speech (TTS): synthesize narration audio from text via the Minimax TTS model. Returns the persisted audio URL — no download needed.",
  "auth": "required",
  "joinsTake": true,
  "envVars": [
    "PRIV_TOKEN",
    "MM_API_BASE_URL",
    "AGENT_NAME"
  ],
  "entry": {
    "type": "http",
    "handler": "gen-voice"
  },
  "parameters": {
    "type": "object",
    "properties": {
      "text": {
        "type": "string",
        "description": "Text to synthesize (required)"
      },
      "voice_id": {
        "type": "string",
        "description": "Voice id. Default 'Chinese (Mandarin)_Male_Announcer'. When unsure, call with list_voices=true first to see what's available — do not invent ids, and do not declare a voice unavailable unless it is missing from that list."
      },
      "speed": {
        "type": "number",
        "description": "Speech rate, 0.5-2.0"
      },
      "list_voices": {
        "type": "boolean",
        "description": "List the available voices and exit. This queries the live voice service and is the authoritative catalog — one call is enough, and its absence from this list is the only evidence that a voice id is invalid."
      },
      "json_output": {
        "type": "boolean",
        "description": "Emit a JSON result (url, audio_length_ms, subtitles)"
      }
    },
    "required": []
  },
  "ui": {
    "primary": [
      "text",
      "voice_id"
    ],
    "advanced": [
      "speed"
    ],
    "hidden": [
      "json_output",
      "list_voices"
    ]
  }
}
