# Cloud Text-to-Speech V1 API - Class Google::Cloud::TextToSpeech::V1::SynthesisInput (v1.19.0)

1.19.0 (latest) 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.1 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.13.0 0.12.2 0.11.1 0.10.1 0.9.1 0.8.0 0.7.0 0.6.0 0.5.2 Reference documentation and code samples for the Cloud Text-to-Speech V1 API class Google::Cloud::TextToSpeech::V1::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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #custom_pronunciations

    def custom_pronunciations() -> ::Google::Cloud::TextToSpeech::V1::CustomPronunciations

**Returns**

- ([::Google::Cloud::TextToSpeech::V1::CustomPronunciations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-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.

### #custom_pronunciations=

    def custom_pronunciations=(value) -> ::Google::Cloud::TextToSpeech::V1::CustomPronunciations

**Parameter**

- **value** ([::Google::Cloud::TextToSpeech::V1::CustomPronunciations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-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.
**Returns**

- ([::Google::Cloud::TextToSpeech::V1::CustomPronunciations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-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.

### #markup

    def markup() -> ::String

**Returns**

- (::String) --- Markup for Chirp 3: HD voices specifically. This field may not be used with any other voices.

  Note: The following fields are mutually exclusive: `markup`, `text`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #markup=

    def markup=(value) -> ::String

**Parameter**

- **value** (::String) --- Markup for Chirp 3: HD voices specifically. This field may not be used with any other voices.


  Note: The following fields are mutually exclusive: `markup`, `text`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- Markup for Chirp 3: HD voices specifically. This field may not be used with any other voices.

  Note: The following fields are mutually exclusive: `markup`, `text`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #multi_speaker_markup

    def multi_speaker_markup() -> ::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup

**Returns**

- ([::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-MultiSpeakerMarkup)) --- The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.


  Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`, `ssml`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #multi_speaker_markup=

    def multi_speaker_markup=(value) -> ::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup

**Parameter**

- **value** ([::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-MultiSpeakerMarkup)) --- The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.


  Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`, `ssml`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-MultiSpeakerMarkup)) --- The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.


  Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`, `ssml`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #prompt

    def prompt() -> ::String

**Returns**

- (::String) --- 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.

### #prompt=

    def prompt=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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.

### #ssml

    def ssml() -> ::String

**Returns**

- (::String) --- 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](https://cloud.google.com/text-to-speech/docs/ssml).


  Note: The following fields are mutually exclusive: `ssml`, `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #ssml=

    def ssml=(value) -> ::String

**Parameter**

- **value** (::String) --- 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](https://cloud.google.com/text-to-speech/docs/ssml).


  Note: The following fields are mutually exclusive: `ssml`, `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- 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](https://cloud.google.com/text-to-speech/docs/ssml).


  Note: The following fields are mutually exclusive: `ssml`, `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text

    def text() -> ::String

**Returns**

- (::String) --- The raw text to be synthesized.

  Note: The following fields are mutually exclusive: `text`, `markup`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text=

    def text=(value) -> ::String

**Parameter**

- **value** (::String) --- The raw text to be synthesized.


  Note: The following fields are mutually exclusive: `text`, `markup`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- The raw text to be synthesized.

  Note: The following fields are mutually exclusive: `text`, `markup`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared.