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.
str
The raw text to be synthesized.
This field is a member of oneof_ input_source.
markup
str
Markup for HD voices specifically. This field
may not be used with any other voices.
This field is a member of oneof_ input_source.
ssml
str
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][google.rpc.Code.INVALID_ARGUMENT].
For more information, see
SSML __.
This field is a member of oneof_ input_source.
str
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.
This field is a member of oneof_ _prompt.
custom_pronunciations
google.cloud.texttospeech_v1.types.CustomPronunciations
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Class SynthesisInput (2.27.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.27.0 (latest)](/python/docs/reference/texttospeech/latest/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.26.0](/python/docs/reference/texttospeech/2.26.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.25.0](/python/docs/reference/texttospeech/2.25.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.24.0](/python/docs/reference/texttospeech/2.24.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.23.0](/python/docs/reference/texttospeech/2.23.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.22.0](/python/docs/reference/texttospeech/2.22.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.21.1](/python/docs/reference/texttospeech/2.21.1/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.20.0](/python/docs/reference/texttospeech/2.20.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.19.0](/python/docs/reference/texttospeech/2.19.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.18.0](/python/docs/reference/texttospeech/2.18.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.17.2](/python/docs/reference/texttospeech/2.17.2/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.16.5](/python/docs/reference/texttospeech/2.16.5/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.15.1](/python/docs/reference/texttospeech/2.15.1/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.14.2](/python/docs/reference/texttospeech/2.14.2/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.13.0](/python/docs/reference/texttospeech/2.13.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.12.3](/python/docs/reference/texttospeech/2.12.3/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.11.1](/python/docs/reference/texttospeech/2.11.1/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.10.2](/python/docs/reference/texttospeech/2.10.2/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.9.1](/python/docs/reference/texttospeech/2.9.1/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.8.0](/python/docs/reference/texttospeech/2.8.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.7.1](/python/docs/reference/texttospeech/2.7.1/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.6.0](/python/docs/reference/texttospeech/2.6.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.5.3](/python/docs/reference/texttospeech/2.5.3/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.4.0](/python/docs/reference/texttospeech/2.4.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.3.0](/python/docs/reference/texttospeech/2.3.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.2.0](/python/docs/reference/texttospeech/2.2.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.1.0](/python/docs/reference/texttospeech/2.1.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [2.0.0](/python/docs/reference/texttospeech/2.0.0/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [1.0.3](/python/docs/reference/texttospeech/1.0.3/google.cloud.texttospeech_v1.types.SynthesisInput)\n- [0.5.0](/python/docs/reference/texttospeech/0.5.0/google.cloud.texttospeech_v1.types.SynthesisInput) \n\n SynthesisInput(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nContains text input to be synthesized. Either `text` or `ssml`\nmust be supplied. Supplying both or neither returns\n`google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]`.\nThe input size is limited to 5000 bytes.\n\nThis message has `oneof`_ fields (mutually exclusive fields).\nFor each oneof, at most one member field can be set at the same time.\nSetting any member of the oneof automatically clears all other\nmembers.\n\n.. _oneof: \u003chttps://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\u003e"]]