{"components":{"parameters":{"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"enum":["1","2"],"type":"string"}},"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"enum":["json","media","proto"],"type":"string"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"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.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean"}},"quotaUser":{"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.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}}},"schemas":{"AudioConfig":{"description":"Description of audio data to be synthesized.","properties":{"audioEncoding":{"description":"Required. The format of the audio byte stream.","enum":["AUDIO_ENCODING_UNSPECIFIED","LINEAR16","MP3","OGG_OPUS","MULAW","ALAW"],"type":"string"},"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.","items":{"type":"string"},"type":"array"},"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.","format":"double","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.","format":"int32","type":"integer"},"speakingRate":{"description":"Optional. Input only. Speaking rate/speed, in the range [0.25, 4.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 < 0.25 or > 4.0 will return an error.","format":"double","type":"number"},"volumeGainDb":{"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.","format":"double","type":"number"}},"type":"object"},"CustomVoiceParams":{"description":"Description of the custom voice to be synthesized.","properties":{"model":{"description":"Required. The name of the AutoML model that synthesizes the custom voice.","type":"string"},"reportedUsage":{"deprecated":true,"description":"Optional. Deprecated. The usage of the synthesized audio to be reported.","enum":["REPORTED_USAGE_UNSPECIFIED","REALTIME","OFFLINE"],"type":"string"}},"type":"object"},"ListVoicesResponse":{"description":"The message returned to the client by the `ListVoices` method.","properties":{"voices":{"description":"The list of voices.","items":{"$ref":"#/components/schemas/Voice"},"type":"array"}},"type":"object"},"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.","properties":{"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"},"text":{"description":"The raw text to be synthesized.","type":"string"}},"type":"object"},"SynthesizeSpeechRequest":{"description":"The top-level message sent by the client for the `SynthesizeSpeech` method.","properties":{"audioConfig":{"$ref":"#/components/schemas/AudioConfig","description":"Required. The configuration of the synthesized audio."},"input":{"$ref":"#/components/schemas/SynthesisInput","description":"Required. The Synthesizer requires either plain text or SSML as input."},"voice":{"$ref":"#/components/schemas/VoiceSelectionParams","description":"Required. The desired voice of the synthesized audio."}},"type":"object"},"SynthesizeSpeechResponse":{"description":"The message returned to the client by the `SynthesizeSpeech` method.","properties":{"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.","format":"byte","type":"string"}},"type":"object"},"Voice":{"description":"Description of a voice supported by the TTS service.","properties":{"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\").","items":{"type":"string"},"type":"array"},"name":{"description":"The name of this voice. Each distinct voice has a unique name.","type":"string"},"naturalSampleRateHertz":{"description":"The natural sample rate (in hertz) for this voice.","format":"int32","type":"integer"},"ssmlGender":{"description":"The gender of this voice.","enum":["SSML_VOICE_GENDER_UNSPECIFIED","MALE","FEMALE","NEUTRAL"],"type":"string"}},"type":"object"},"VoiceSelectionParams":{"description":"Description of which voice to use for a synthesis request.","properties":{"customVoice":{"$ref":"#/components/schemas/CustomVoiceParams","description":"The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration."},"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 not set, the service will choose a voice based on the other parameters such as language_code and gender.","type":"string"},"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.","enum":["SSML_VOICE_GENDER_UNSPECIFIED","MALE","FEMALE","NEUTRAL"],"type":"string"}},"type":"object"}}},"externalDocs":{"url":"https://cloud.google.com/text-to-speech/"},"info":{"contact":{"name":"Google","url":"https://google.com","x-twitter":"youtube"},"description":"Synthesizes natural-sounding speech by applying powerful neural network models.","license":{"name":"Creative Commons Attribution 3.0","url":"http://creativecommons.org/licenses/by/3.0/"},"termsOfService":"https://developers.google.com/terms/","title":"Cloud Text-to-Speech API","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["analytics","media"],"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"format":"openapi","url":"https://texttospeech.googleapis.com/$discovery/rest?version=v1","version":"3.0"}],"x-preferred":false,"x-providerName":"googleapis.com","x-serviceName":"texttospeech"},"openapi":"3.0.0","paths":{"/v1/text:synthesize":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Synthesizes speech synchronously: receive results after all text input has been processed.","operationId":"texttospeech.text.synthesize","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeSpeechRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeSpeechResponse"}}},"description":"Successful response"}},"tags":["text"],"x-pay-metering":{"schemes":["mpp-charge","x402-exact"],"splits":[{"amount":0.00025,"memo":"Operator fee","recipient":"operator"},{"memo":"Platform fee","percent":0.05,"recipient":"platform"}],"variants":[{"dimensions":[{"direction":"usage","scale":1000000,"tiers":[{"price_usd":0.0,"up_to":1000000},{"price_usd":30.0}],"unit":"characters"}],"param":"voice","value":"chirp-3-hd"},{"dimensions":[{"direction":"usage","scale":1000000,"tiers":[{"price_usd":60.0}],"unit":"characters"}],"param":"voice","value":"instant-custom"}]}}},"/v1/voices":{"get":{"description":"Returns a list of Voice supported for synthesis.","operationId":"texttospeech.voices.list","parameters":[{"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.","in":"query","name":"languageCode","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVoicesResponse"}}},"description":"Successful response"}},"tags":["voices"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]}},"servers":[{"url":"https://texttospeech.google.gateway-402.com"}],"tags":[{"name":"operations"},{"name":"projects"},{"name":"text"},{"name":"voices"}]}