
Text-to-Speech
API Overview
Google's TTS model, reference: https://cloud.google.com/text-to-speech#demo
Price: 40 PTC/million characters
API Console
Log in to explore more features! Click to Log In
API Reference (1)
| API Description | API Endpoint | Request Method | Stability | Parameter Description |
|---|---|---|---|---|
Text-to-Speech | POST | Stable | View Details | |
Document Details From Google’s TTS model, reference: https://cloud.google.com/text-to-speech#demo Price: 40 PTC/million characters Request Parameters Header ParametersAuthorizationstringOptional Example Value: Bearer {{YOUR_API_KEY}}Query Parametersresponse_formatstringOptional Example Value: urlRequest Body application/jsonaudioConfigobjectRequired audioEncodingstringRequired Value source: https://cloud.google.com/speech-to-text/docs/encoding?hl=en effectsProfileIdarray[string]Optional Value source: https://cloud.google.com/text-to-speech/docs/audio-profiles?hl=en pitchnumberOptional Optional. For input only. Speaking pitch, range [-20.0, 20.0]. 20 means increasing the pitch by 20 semitones above the original. -20 means decreasing the pitch by 20 semitones below the original. speakingRatenumberOptional Optional. For input only. Speaking rate/speed, range [0.25, 2.0]. 1.0 represents the normal native speed supported by the specific voice. 2.0 represents twice the speed, 0.5 represents half the speed. If not set (0.0), it defaults to the native speed of 1.0. Any other value less than 0.25 or greater than 2.0 will return an error. inputobjectRequired textstringRequired Input text to be converted voiceobjectRequired Voice parameters reference: https://cloud.google.com/text-to-speech/docs/voices?hl=en languageCodestringRequired Required. The language (and possibly region) of the voice, expressed as a BCP-47 language tag, e.g., “en-US”. This parameter should not include a script tag (e.g., use “cmn-cn” instead of “cmn-Hant-cn”), as the script will be inferred from the input provided in SynthesisInput. The TTS service will use this parameter to help select 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 instead of en-CA if no Canadian voice is available), or even a different language, e.g., using “nb” (Norwegian Bokmål) instead of “no” (Norwegian). namestringRequired Name of the voice. If neither name nor gender is set, the service will choose a voice based on other parameters (e.g., languageCode). | ||||
API Pricing
| Model | Description | 302.AI Price |
|---|
Text-to-Speech | TTS model from Google |
|