{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-polly/json-schema/amazon-polly-start-speech-synthesis-stream-output-schema.json",
  "title": "StartSpeechSynthesisStreamOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-polly-operations-api-openapi.yml#/components/schemas/StartSpeechSynthesisStreamOutput",
  "type": "object",
  "properties": {
    "EventStream": {
      "$ref": "#/$defs/StartSpeechSynthesisStreamEventStream"
    }
  },
  "$defs": {
    "AudioEvent": {
      "type": "object",
      "properties": {
        "AudioChunk": {
          "type": "string",
          "format": "byte",
          "description": "A chunk of synthesized audio data encoded in the format specified by the OutputFormat parameter."
        }
      }
    },
    "ServiceFailureException": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        }
      }
    },
    "ServiceQuotaExceededException": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "quotaCode": {
          "type": "string",
          "enum": [
            "input-stream-inbound-event-timeout",
            "input-stream-timeout"
          ],
          "description": "The quota code identifying the specific quota."
        },
        "serviceCode": {
          "type": "string",
          "enum": [
            "polly"
          ],
          "description": "The service code identifying the originating service."
        }
      },
      "required": [
        "message",
        "quotaCode",
        "serviceCode"
      ]
    },
    "StartSpeechSynthesisStreamEventStream": {
      "type": "object",
      "properties": {
        "AudioEvent": {
          "$ref": "#/$defs/AudioEvent"
        },
        "StreamClosedEvent": {
          "$ref": "#/$defs/StreamClosedEvent"
        },
        "ValidationException": {
          "$ref": "#/$defs/ValidationException"
        },
        "ServiceQuotaExceededException": {
          "$ref": "#/$defs/ServiceQuotaExceededException"
        },
        "ServiceFailureException": {
          "$ref": "#/$defs/ServiceFailureException"
        },
        "ThrottlingException": {
          "$ref": "#/$defs/ThrottlingException"
        }
      },
      "description": "Exactly one member is set."
    },
    "StreamClosedEvent": {
      "type": "object",
      "properties": {
        "RequestCharacters": {
          "type": "integer",
          "description": "The total number of characters synthesized during the streaming session."
        }
      }
    },
    "ThrottlingException": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "throttlingReasons": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ThrottlingReason"
          },
          "description": "A list of reasons explaining why the request was throttled."
        }
      }
    },
    "ThrottlingReason": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "description": "The reason code explaining why the request was throttled."
        },
        "resource": {
          "type": "string",
          "description": "The resource that caused the throttling."
        }
      }
    },
    "ValidationException": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "reason": {
          "type": "string",
          "enum": [
            "unsupportedOperation",
            "fieldValidationFailed",
            "other",
            "invalidInboundEvent"
          ],
          "description": "The reason the request failed validation."
        },
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ValidationExceptionField"
          },
          "description": "The fields that caused the validation error."
        }
      },
      "required": [
        "message",
        "reason"
      ]
    },
    "ValidationExceptionField": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the field that failed validation."
        },
        "message": {
          "type": "string",
          "description": "A message describing why the field failed validation."
        }
      },
      "required": [
        "name",
        "message"
      ]
    }
  }
}