{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lazybird-app/json-schema/lazybird-app-generate-speech-request-schema.json",
  "title": "GenerateSpeechRequest",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lazybird-app-openapi.json#/components/schemas/GenerateSpeechRequest",
  "type": "object",
  "required": [
    "voiceId"
  ],
  "oneOf": [
    {
      "required": [
        "text"
      ]
    },
    {
      "required": [
        "ssml"
      ]
    }
  ],
  "additionalProperties": false,
  "properties": {
    "voiceId": {
      "type": "string",
      "description": "Voice `id` from GET /voices"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "description": "Plain text to speak, not blank"
    },
    "ssml": {
      "type": "string",
      "minLength": 1,
      "description": "SSML (use instead of `text` for pauses or markup)"
    },
    "settings": {
      "$ref": "#/$defs/VoiceSettings"
    },
    "phone": {
      "type": "string",
      "enum": [
        "pcm",
        "mulaw"
      ],
      "description": "Return an 8 kHz mono WAV for phone systems (voicemail, phone menus) instead of an MP3: `pcm` (16-bit) or `mulaw` (G.711 µ-law)"
    }
  },
  "$defs": {
    "VoiceSettings": {
      "type": "object",
      "description": "All fields optional",
      "additionalProperties": false,
      "properties": {
        "style": {
          "type": "string",
          "description": "One of the voice's `styleList` values; ignored, with `styleIntensity`, when the voice doesn't list it"
        },
        "styleIntensity": {
          "type": "number",
          "description": "Strength of `style`. 1 is the default; the closest level the voice has is used"
        },
        "speed": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "1 is normal speed"
        },
        "pitch": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "1 is the default pitch"
        },
        "volume": {
          "type": "number",
          "minimum": 0,
          "description": "1 is the default volume; 0 is silent"
        },
        "locale": {
          "type": "string",
          "description": "Language and accent to speak in, as a locale with a region such as `es-ES`. Any voice can speak any supported language. A bare language such as `es` returns 400."
        },
        "instruction": {
          "type": "string",
          "maxLength": 200,
          "description": "How the speech is acted, in a few words such as `whispering, nervous`; never spoken. Brackets are dropped, and one without words returns 400."
        },
        "effect": {
          "type": "string",
          "enum": [
            "robot",
            "deep",
            "monster",
            "echo",
            "radio",
            "phone"
          ],
          "description": "A sound effect on the finished speech: `robot`, `deep`, `monster`, `echo` (a large hall), `radio` (a walkie-talkie) or `phone` (a phone call). Leave it out for plain speech."
        }
      }
    }
  }
}