{
  "title": "Cloud Text-to-Speech API",
  "name": "texttospeech",
  "baseUrl": "https://texttospeech.googleapis.com/",
  "discoveryVersion": "v1",
  "version": "v1beta1",
  "documentationLink": "https://cloud.google.com/text-to-speech/",
  "mtlsRootUrl": "https://texttospeech.mtls.googleapis.com/",
  "fullyEncodeReservedExpansion": true,
  "schemas": {
    "VoiceSelectionParams": {
      "id": "VoiceSelectionParams",
      "description": "Description of which voice to use for a synthesis request.",
      "type": "object",
      "properties": {
        "multiSpeakerVoiceConfig": {
          "description": "Optional. The configuration for a Gemini multi-speaker text-to-speech setup. Enables the use of two distinct voices in a single synthesis request.",
          "$ref": "MultiSpeakerVoiceConfig"
        },
        "customVoice": {
          "$ref": "CustomVoiceParams",
          "description": "The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration."
        },
        "voiceClone": {
          "$ref": "VoiceCloneParams",
          "description": "Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service chooses the voice clone matching the specified configuration."
        },
        "ssmlGender": {
          "description": "The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.",
          "type": "string",
          "enum": [
            "SSML_VOICE_GENDER_UNSPECIFIED",
            "MALE",
            "FEMALE",
            "NEUTRAL"
          ],
          "enumDescriptions": [
            "An unspecified gender. In VoiceSelectionParams, this means that the client doesn't care which gender the selected voice will have. In the Voice field of ListVoicesResponse, this may mean that the voice doesn't fit any of the other categories in this enum, or that the gender of the voice isn't known.",
            "A male voice.",
            "A female voice.",
            "A gender-neutral voice. This voice is not yet supported."
          ]
        },
        "languageCode": {
          "description": "Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. \"en-US\". This should not include a script tag (e.g. use \"cmn-cn\" rather than \"cmn-Hant-cn\"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using \"nb\" (Norwegian Bokmal) instead of \"no\" (Norwegian)\".",
          "type": "string"
        },
        "name": {
          "description": "The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.",
          "type": "string"
        },
        "modelName": {
          "description": "Optional. The name of the model. If set, the service will choose the model matching the specified configuration.",
          "type": "string"
        }
      }
    },
    "Timepoint": {
      "id": "Timepoint",
      "description": "This contains a mapping between a certain point in the input text and a corresponding time in the output audio.",
      "type": "object",
      "properties": {
        "timeSeconds": {
          "description": "Time offset in seconds from the start of the synthesized audio.",
          "type": "number",
          "format": "double"
        },
        "markName": {
          "description": "Timepoint name as received from the client within `` tag.",
          "type": "string"
        }
      }
    },
    "AdvancedVoiceOptions": {
      "id": "AdvancedVoiceOptions",
      "description": "Used for advanced voice options.",
      "type": "object",
      "properties": {
        "lowLatencyJourneySynthesis": {
          "description": "Only for Journey voices. If false, the synthesis is context aware and has a higher latency.",
          "type": "boolean"
        },
        "relaxSafetyFilters": {
          "description": "Optional. Input only. Deprecated, use safety_settings instead. If true, relaxes safety filters for Gemini TTS.",
          "type": "boolean",
          "deprecated": true
        },
        "safetySettings": {
          "$ref": "SafetySettings",
          "description": "Optional. Input only. This applies to Gemini TTS only. If set, the category specified in the safety setting will be blocked if the harm probability is above the threshold. Otherwise, the safety filter will be disabled by default."
        },
        "enableTextnorm": {
          "description": "Optional. If true, textnorm will be applied to text input. This feature is enabled by default. Only applies for Gemini TTS.",
          "type": "boolean"
        }
      }
    },
    "SafetySetting": {
      "id": "SafetySetting",
      "description": "Safety setting for a single harm category.",
      "type": "object",
      "properties": {
        "threshold": {
          "description": "The harm block threshold for the safety setting.",
          "type": "string",
          "enum": [
            "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
            "BLOCK_LOW_AND_ABOVE",
            "BLOCK_MEDIUM_AND_ABOVE",
            "BLOCK_ONLY_HIGH",
            "BLOCK_NONE",
            "OFF"
          ],
          "enumDescriptions": [
            "The harm block threshold is unspecified.",
            "Block content with a low harm probability or higher.",
            "Block content with a medium harm probability or higher.",
            "Block content with a high harm probability.",
            "Do not block any content, regardless of its harm probability.",
            "Turn off the safety filter entirely."
          ]
        },
        "category": {
          "description": "The harm category to apply the safety setting to.",
          "type": "string",
          "enum": [
            "HARM_CATEGORY_UNSPECIFIED",
            "HARM_CATEGORY_HATE_SPEECH",
            "HARM_CATEGORY_DANGEROUS_CONTENT",
            "HARM_CATEGORY_HARASSMENT",
            "HARM_CATEGORY_SEXUALLY_EXPLICIT"
          ],
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Content that promotes violence or incites hatred against individuals or groups based on certain attributes.",
            "Content that promotes, facilitates, or enables dangerous activities.",
            "Abusive, threatening, or content intended to bully, torment, or ridicule.",
            "Content that contains sexually explicit material."
          ]
        }
      }
    },
    "CustomPronunciations": {
      "properties": {
        "pronunciations": {
          "description": "The pronunciation customizations are applied.",
          "type": "array",
          "items": {
            "$ref": "CustomPronunciationParams"
          }
        }
      },
      "id": "CustomPronunciations",
      "description": "A collection of pronunciation customizations.",
      "type": "object"
    },
    "SynthesizeLongAudioRequest": {
      "properties": {
        "voice": {
          "$ref": "VoiceSelectionParams",
          "description": "Required. The desired voice of the synthesized audio."
        },
        "input": {
          "$ref": "SynthesisInput",
          "description": "Required. The Synthesizer requires either plain text or SSML as input."
        },
        "outputGcsUri": {
          "description": "Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.",
          "type": "string"
        },
        "audioConfig": {
          "description": "Required. The configuration of the synthesized audio.",
          "$ref": "AudioConfig"
        }
      },
      "id": "SynthesizeLongAudioRequest",
      "description": "The top-level message sent by the client for the `SynthesizeLongAudio` method.",
      "type": "object"
    },
    "SynthesizeSpeechRequest": {
      "properties": {
        "audioConfig": {
          "$ref": "AudioConfig",
          "description": "Required. The configuration of the synthesized audio."
        },
        "enableTimePointing": {
          "description": "Whether and what timepoints are returned in the response.",
          "type": "array",
          "items": {
            "enumDescriptions": [
              "Not specified. No timepoint information will be returned.",
              "Timepoint information of `` tags in SSML input will be returned."
            ],
            "type": "string",
            "enum": [
              "TIMEPOINT_TYPE_UNSPECIFIED",
              "SSML_MARK"
            ]
          }
        },
        "input": {
          "description": "Required. The Synthesizer requires either plain text or SSML as input.",
          "$ref": "SynthesisInput"
        },
        "voice": {
          "$ref": "VoiceSelectionParams",
          "description": "Required. The desired voice of the synthesized audio."
        },
        "advancedVoiceOptions": {
          "description": "Optional. Advanced voice options.",
          "$ref": "AdvancedVoiceOptions"
        }
      },
      "id": "SynthesizeSpeechRequest",
      "description": "The top-level message sent by the client for the `SynthesizeSpeech` method.",
      "type": "object"
    },
    "Voice": {
      "properties": {
        "name": {
          "description": "The name of this voice. Each distinct voice has a unique name.",
          "type": "string"
        },
        "ssmlGender": {
          "enumDescriptions": [
            "An unspecified gender. In VoiceSelectionParams, this means that the client doesn't care which gender the selected voice will have. In the Voice field of ListVoicesResponse, this may mean that the voice doesn't fit any of the other categories in this enum, or that the gender of the voice isn't known.",
            "A male voice.",
            "A female voice.",
            "A gender-neutral voice. This voice is not yet supported."
          ],
          "description": "The gender of this voice.",
          "type": "string",
          "enum": [
            "SSML_VOICE_GENDER_UNSPECIFIED",
            "MALE",
            "FEMALE",
            "NEUTRAL"
          ]
        },
        "naturalSampleRateHertz": {
          "format": "int32",
          "description": "The natural sample rate (in hertz) for this voice.",
          "type": "integer"
        },
        "languageCodes": {
          "description": "The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. \"en-US\", \"es-419\", \"cmn-tw\").",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "id": "Voice",
      "description": "Description of a voice supported by the TTS service.",
      "type": "object"
    },
    "SynthesizeSpeechResponse": {
      "id": "SynthesizeSpeechResponse",
      "description": "The message returned to the client by the `SynthesizeSpeech` method.",
      "type": "object",
      "properties": {
        "timepoints": {
          "description": "A link between a position in the original request input and a corresponding time in the output audio. It's only supported via `` of SSML input.",
          "type": "array",
          "items": {
            "$ref": "Timepoint"
          }
        },
        "audioContent": {
          "description": "The audio data bytes encoded as specified in the request, including the header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). For LINEAR16 audio, we include the WAV header. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.",
          "type": "string",
          "format": "byte"
        },
        "audioConfig": {
          "description": "The audio metadata of `audio_content`.",
          "$ref": "AudioConfig"
        }
      }
    },
    "Turn": {
      "properties": {
        "speaker": {
          "description": "Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer to documentation for available speakers.",
          "type": "string"
        },
        "text": {
          "description": "Required. The text to speak.",
          "type": "string"
        }
      },
      "id": "Turn",
      "description": "A multi-speaker turn.",
      "type": "object"
    },
    "CustomVoiceParams": {
      "id": "CustomVoiceParams",
      "description": "Description of the custom voice to be synthesized.",
      "type": "object",
      "properties": {
        "model": {
          "description": "Required. The name of the AutoML model that synthesizes the custom voice.",
          "type": "string"
        },
        "reportedUsage": {
          "enum": [
            "REPORTED_USAGE_UNSPECIFIED",
            "REALTIME",
            "OFFLINE"
          ],
          "deprecated": true,
          "description": "Optional. Deprecated. The usage of the synthesized audio to be reported.",
          "type": "string",
          "enumDescriptions": [
            "Request with reported usage unspecified will be rejected.",
            "For scenarios where the synthesized audio is not downloadable and can only be used once. For example, real-time request in IVR system.",
            "For scenarios where the synthesized audio is downloadable and can be reused. For example, the synthesized audio is downloaded, stored in customer service system and played repeatedly."
          ]
        }
      }
    },
    "SafetySettings": {
      "properties": {
        "settings": {
          "description": "The safety settings for the request.",
          "type": "array",
          "items": {
            "$ref": "SafetySetting"
          }
        }
      },
      "id": "SafetySettings",
      "description": "Safety settings for the request.",
      "type": "object"
    },
    "ListVoicesResponse": {
      "properties": {
        "voices": {
          "description": "The list of voices.",
          "type": "array",
          "items": {
            "$ref": "Voice"
          }
        }
      },
      "id": "ListVoicesResponse",
      "description": "The message returned to the client by the `ListVoices` method.",
      "type": "object"
    },
    "SynthesizeLongAudioMetadata": {
      "id": "SynthesizeLongAudioMetadata",
      "description": "Metadata for response returned by the `SynthesizeLongAudio` method.",
      "type": "object",
      "properties": {
        "startTime": {
          "format": "google-datetime",
          "description": "Time when the request was received.",
          "type": "string"
        },
        "lastUpdateTime": {
          "description": "Deprecated. Do not use.",
          "type": "string",
          "deprecated": true,
          "format": "google-datetime"
        },
        "progressPercentage": {
          "description": "The progress of the most recent processing update in percentage, ie. 70.0%.",
          "type": "number",
          "format": "double"
        }
      }
    },
    "AudioConfig": {
      "id": "AudioConfig",
      "description": "Description of audio data to be synthesized.",
      "type": "object",
      "properties": {
        "audioEncoding": {
          "description": "Required. The format of the audio byte stream.",
          "type": "string",
          "enum": [
            "AUDIO_ENCODING_UNSPECIFIED",
            "LINEAR16",
            "MP3",
            "MP3_64_KBPS",
            "OGG_OPUS",
            "MULAW",
            "ALAW",
            "PCM",
            "M4A"
          ],
          "enumDescriptions": [
            "Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return result google.rpc.Code.INVALID_ARGUMENT.",
            "Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.",
            "MP3 audio at 32kbps.",
            "MP3 at 64kbps.",
            "Opus encoded audio wrapped in an ogg container. The result is a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.",
            "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.",
            "8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header.",
            "Uncompressed 16-bit signed little-endian samples (Linear PCM). Note that as opposed to LINEAR16, audio won't be wrapped in a WAV (or any other) header.",
            "M4A audio."
          ]
        },
        "speakingRate": {
          "format": "double",
          "description": "Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values \u003c 0.25 or \u003e 2.0 will return an error.",
          "type": "number"
        },
        "pitch": {
          "description": "Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.",
          "type": "number",
          "format": "double"
        },
        "volumeGainDb": {
          "format": "double",
          "description": "Optional. Input only. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. Strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.",
          "type": "number"
        },
        "sampleRateHertz": {
          "description": "Optional. The synthesis sample rate (in hertz) for this audio. When this is specified in SynthesizeSpeechRequest, if this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality), unless the specified sample rate is not supported for the encoding chosen, in which case it will fail the request and return google.rpc.Code.INVALID_ARGUMENT.",
          "type": "integer",
          "format": "int32"
        },
        "effectsProfileId": {
          "description": "Optional. Input only. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. See [audio profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for current supported profile ids.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata": {
      "id": "GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata",
      "description": "Metadata for response returned by the `SynthesizeLongAudio` method.",
      "type": "object",
      "properties": {
        "startTime": {
          "format": "google-datetime",
          "description": "Time when the request was received.",
          "type": "string"
        },
        "lastUpdateTime": {
          "description": "Deprecated. Do not use.",
          "type": "string",
          "deprecated": true,
          "format": "google-datetime"
        },
        "progressPercentage": {
          "description": "The progress of the most recent processing update in percentage, ie. 70.0%.",
          "type": "number",
          "format": "double"
        }
      }
    },
    "MultispeakerPrebuiltVoice": {
      "properties": {
        "speakerId": {
          "description": "Required. The speaker ID of the voice. See https://cloud.google.com/text-to-speech/docs/gemini-tts#voice_options for available values.",
          "type": "string"
        },
        "speakerAlias": {
          "description": "Required. The speaker alias of the voice. This is the user-chosen speaker name that is used in the multispeaker text input, such as \"Speaker1\".",
          "type": "string"
        }
      },
      "id": "MultispeakerPrebuiltVoice",
      "description": "Configuration for a single speaker in a Gemini TTS multi-speaker setup. Enables dialogue between two speakers.",
      "type": "object"
    },
    "Operation": {
      "properties": {
        "name": {
          "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.",
          "type": "string"
        },
        "error": {
          "$ref": "Status",
          "description": "The error result of the operation in case of failure or cancellation."
        },
        "response": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          },
          "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.",
          "type": "object"
        },
        "metadata": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          },
          "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.",
          "type": "object"
        },
        "done": {
          "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.",
          "type": "boolean"
        }
      },
      "id": "Operation",
      "description": "This resource represents a long-running operation that is the result of a network API call.",
      "type": "object"
    },
    "VoiceCloneParams": {
      "properties": {
        "voiceCloningKey": {
          "description": "Required. Created by GenerateVoiceCloningKey.",
          "type": "string"
        }
      },
      "id": "VoiceCloneParams",
      "description": "The configuration of Voice Clone feature.",
      "type": "object"
    },
    "MultiSpeakerVoiceConfig": {
      "id": "MultiSpeakerVoiceConfig",
      "description": "Configuration for a multi-speaker text-to-speech setup. Enables the use of up to two distinct voices in a single synthesis request.",
      "type": "object",
      "properties": {
        "speakerVoiceConfigs": {
          "description": "Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.",
          "type": "array",
          "items": {
            "$ref": "MultispeakerPrebuiltVoice"
          }
        }
      }
    },
    "MultiSpeakerMarkup": {
      "properties": {
        "turns": {
          "description": "Required. Speaker turns.",
          "type": "array",
          "items": {
            "$ref": "Turn"
          }
        }
      },
      "id": "MultiSpeakerMarkup",
      "description": "A collection of turns for multi-speaker synthesis.",
      "type": "object"
    },
    "ListOperationsResponse": {
      "id": "ListOperationsResponse",
      "description": "The response message for Operations.ListOperations.",
      "type": "object",
      "properties": {
        "unreachable": {
          "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operations": {
          "description": "A list of operations that matches the specified filter in the request.",
          "type": "array",
          "items": {
            "$ref": "Operation"
          }
        },
        "nextPageToken": {
          "description": "The standard List next-page token.",
          "type": "string"
        }
      }
    },
    "CustomPronunciationParams": {
      "properties": {
        "phrase": {
          "description": "The phrase to which the customization is applied. The phrase can be multiple words, such as proper nouns, but shouldn't span the length of the sentence.",
          "type": "string"
        },
        "phoneticEncoding": {
          "enumDescriptions": [
            "Not specified.",
            "IPA, such as apple -\u003e ˈæpəl. https://en.wikipedia.org/wiki/International_Phonetic_Alphabet",
            "X-SAMPA, such as apple -\u003e \"{p@l\". https://en.wikipedia.org/wiki/X-SAMPA",
            "For reading-to-pron conversion to work well, the `pronunciation` field should only contain Kanji, Hiragana, and Katakana. The pronunciation can also contain pitch accents. The start of a pitch phrase is specified with `^` and the down-pitch position is specified with `!`, for example: phrase:端 pronunciation:^はし phrase:箸 pronunciation:^は!し phrase:橋 pronunciation:^はし! We currently only support the Tokyo dialect, which allows at most one down-pitch per phrase (i.e. at most one `!` between `^`).",
            "Used to specify pronunciations for Mandarin words. See https://en.wikipedia.org/wiki/Pinyin. For example: 朝阳, the pronunciation is \"chao2 yang2\". The number represents the tone, and there is a space between syllables. Neutral tones are represented by 5, for example 孩子 \"hai2 zi5\"."
          ],
          "description": "The phonetic encoding of the phrase.",
          "type": "string",
          "enum": [
            "PHONETIC_ENCODING_UNSPECIFIED",
            "PHONETIC_ENCODING_IPA",
            "PHONETIC_ENCODING_X_SAMPA",
            "PHONETIC_ENCODING_JAPANESE_YOMIGANA",
            "PHONETIC_ENCODING_PINYIN"
          ]
        },
        "pronunciation": {
          "description": "The pronunciation of the phrase. This must be in the phonetic encoding specified above.",
          "type": "string"
        }
      },
      "id": "CustomPronunciationParams",
      "description": "Pronunciation customization for a phrase.",
      "type": "object"
    },
    "Status": {
      "properties": {
        "code": {
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "type": "integer",
          "format": "int32"
        },
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array",
          "items": {
            "additionalProperties": {
              "type": "any",
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object"
          }
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        }
      },
      "id": "Status",
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).",
      "type": "object"
    },
    "SynthesisInput": {
      "properties": {
        "multiSpeakerMarkup": {
          "description": "The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.",
          "$ref": "MultiSpeakerMarkup"
        },
        "customPronunciations": {
          "description": "Optional. The pronunciation customizations are applied to the input. If this is set, the input is synthesized using the given pronunciation customizations. The initial support is for en-us, with plans to expand to other locales in the future. Instant Clone voices aren't supported. In order to customize the pronunciation of a phrase, there must be an exact match of the phrase in the input types. If using SSML, the phrase must not be inside a phoneme tag.",
          "$ref": "CustomPronunciations"
        },
        "text": {
          "description": "The raw text to be synthesized.",
          "type": "string"
        },
        "ssml": {
          "description": "The SSML document to be synthesized. The SSML document must be valid and well-formed. Otherwise the RPC will fail and return google.rpc.Code.INVALID_ARGUMENT. For more information, see [SSML](https://cloud.google.com/text-to-speech/docs/ssml).",
          "type": "string"
        },
        "prompt": {
          "description": "This system instruction is supported only for controllable/promptable voice models. If this system instruction is used, we pass the unedited text to Gemini-TTS. Otherwise, a default system instruction is used. AI Studio calls this system instruction, Style Instructions.",
          "type": "string"
        },
        "markup": {
          "description": "Markup for Chirp 3: HD voices specifically. This field may not be used with any other voices.",
          "type": "string"
        }
      },
      "id": "SynthesisInput",
      "description": "Contains text input to be synthesized. Either `text` or `ssml` must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. The input size is limited to 5000 bytes.",
      "type": "object"
    }
  },
  "resources": {
    "projects": {
      "resources": {
        "locations": {
          "methods": {
            "synthesizeLongAudio": {
              "httpMethod": "POST",
              "parameters": {
                "parent": {
                  "pattern": "^projects/[^/]+/locations/[^/]+$",
                  "location": "path",
                  "description": "The resource states of the request in the form of `projects/*/locations/*`.",
                  "required": true,
                  "type": "string"
                }
              },
              "id": "texttospeech.projects.locations.synthesizeLongAudio",
              "request": {
                "$ref": "SynthesizeLongAudioRequest"
              },
              "path": "v1beta1/{+parent}:synthesizeLongAudio",
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "response": {
                "$ref": "Operation"
              },
              "parameterOrder": [
                "parent"
              ],
              "description": "Synthesizes long form text asynchronously.",
              "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:synthesizeLongAudio"
            }
          },
          "resources": {
            "operations": {
              "methods": {
                "list": {
                  "parameterOrder": [
                    "name"
                  ],
                  "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
                  "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations",
                  "response": {
                    "$ref": "ListOperationsResponse"
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/cloud-platform"
                  ],
                  "path": "v1beta1/{+name}/operations",
                  "id": "texttospeech.projects.locations.operations.list",
                  "parameters": {
                    "filter": {
                      "location": "query",
                      "description": "The standard list filter.",
                      "type": "string"
                    },
                    "name": {
                      "pattern": "^projects/[^/]+/locations/[^/]+$",
                      "location": "path",
                      "description": "The name of the operation's parent resource.",
                      "required": true,
                      "type": "string"
                    },
                    "pageToken": {
                      "description": "The standard list page token.",
                      "type": "string",
                      "location": "query"
                    },
                    "returnPartialSuccess": {
                      "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.",
                      "type": "boolean",
                      "location": "query"
                    },
                    "pageSize": {
                      "location": "query",
                      "format": "int32",
                      "description": "The standard list page size.",
                      "type": "integer"
                    }
                  },
                  "httpMethod": "GET"
                },
                "get": {
                  "response": {
                    "$ref": "Operation"
                  },
                  "parameterOrder": [
                    "name"
                  ],
                  "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
                  "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
                  "path": "v1beta1/{+name}",
                  "scopes": [
                    "https://www.googleapis.com/auth/cloud-platform"
                  ],
                  "id": "texttospeech.projects.locations.operations.get",
                  "httpMethod": "GET",
                  "parameters": {
                    "name": {
                      "description": "The name of the operation resource.",
                      "required": true,
                      "type": "string",
                      "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
                      "location": "path"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "voices": {
      "methods": {
        "list": {
          "response": {
            "$ref": "ListVoicesResponse"
          },
          "flatPath": "v1beta1/voices",
          "parameterOrder": [],
          "description": "Returns a list of Voice supported for synthesis.",
          "path": "v1beta1/voices",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "id": "texttospeech.voices.list",
          "httpMethod": "GET",
          "parameters": {
            "languageCode": {
              "location": "query",
              "description": "Optional. Recommended. [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If not specified, the API will return all supported voices. If specified, the ListVoices call will only return voices that can be used to synthesize this language_code. For example, if you specify `\"en-NZ\"`, all `\"en-NZ\"` voices will be returned. If you specify `\"no\"`, both `\"no-\\*\"` (Norwegian) and `\"nb-\\*\"` (Norwegian Bokmal) voices will be returned.",
              "type": "string"
            }
          }
        }
      }
    },
    "text": {
      "methods": {
        "synthesize": {
          "response": {
            "$ref": "SynthesizeSpeechResponse"
          },
          "flatPath": "v1beta1/text:synthesize",
          "parameterOrder": [],
          "description": "Synthesizes speech synchronously: receive results after all text input has been processed.",
          "path": "v1beta1/text:synthesize",
          "request": {
            "$ref": "SynthesizeSpeechRequest"
          },
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "id": "texttospeech.text.synthesize",
          "httpMethod": "POST",
          "parameters": {}
        }
      }
    }
  },
  "revision": "20260409",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        }
      }
    }
  },
  "parameters": {
    "upload_protocol": {
      "location": "query",
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "fields": {
      "location": "query",
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "quotaUser": {
      "location": "query",
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "default": "true",
      "location": "query"
    },
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "$.xgafv": {
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "type": "string",
      "description": "V1 error format."
    },
    "alt": {
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "type": "string",
      "description": "Data format for response.",
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query"
    }
  },
  "servicePath": "",
  "protocol": "rest",
  "id": "texttospeech:v1beta1",
  "batchPath": "batch",
  "basePath": "",
  "kind": "discovery#restDescription",
  "description": "Synthesizes natural-sounding speech by applying powerful neural network models.",
  "version_module": true,
  "ownerDomain": "google.com",
  "rootUrl": "https://texttospeech.googleapis.com/",
  "canonicalName": "Texttospeech",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "ownerName": "Google"
}
