Package types (2.16.2)

API documentation for texttospeech_v1.types package.

Classes

AudioConfig

Description of audio data to be synthesized.

AudioEncoding

Configuration to set up audio encoder. The encoding determines the output audio format that we'd like.

Values: AUDIO_ENCODING_UNSPECIFIED (0): Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. LINEAR16 (1): Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header. MP3 (2): MP3 audio at 32kbps. OGG_OPUS (3): Opus encoded audio wrapped in an ogg container. The result will be 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. MULAW (5): 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. ALAW (6): 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.

CustomVoiceParams

Description of the custom voice to be synthesized.

ListVoicesRequest

The top-level message sent by the client for the ListVoices method.

ListVoicesResponse

The message returned to the client by the ListVoices method.

SsmlVoiceGender

Gender of the voice as described in SSML voice element <https://www.w3.org/TR/speech-synthesis11/#edef_voice>__.

Values: SSML_VOICE_GENDER_UNSPECIFIED (0): 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. MALE (1): A male voice. FEMALE (2): A female voice. NEUTRAL (3): A gender-neutral voice. This voice is not yet supported.

SynthesisInput

Contains text input to be synthesized. Either text or ssml must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The input size is limited to 5000 bytes.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

SynthesizeLongAudioMetadata

Metadata for response returned by the SynthesizeLongAudio method.

SynthesizeLongAudioRequest

The top-level message sent by the client for the SynthesizeLongAudio method.

SynthesizeLongAudioResponse

The message returned to the client by the SynthesizeLongAudio method.

SynthesizeSpeechRequest

The top-level message sent by the client for the SynthesizeSpeech method.

SynthesizeSpeechResponse

The message returned to the client by the SynthesizeSpeech method.

Voice

Description of a voice supported by the TTS service.

VoiceSelectionParams

Description of which voice to use for a synthesis request.