Cloud Text-to-Speech V1beta1 API - Class Google::Cloud::TextToSpeech::V1beta1::SynthesisInput (v0.20.0)

Reference documentation and code samples for the Cloud Text-to-Speech V1beta1 API class Google::Cloud::TextToSpeech::V1beta1::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::V1beta1::CustomPronunciations
Returns
  • (::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations) — Optional. The pronunciation customizations to be applied to the input. If this is set, the input will be synthesized using the given pronunciation customizations.

    The initial support will be for EFIGS (English, French, Italian, German, Spanish) languages, as provided in VoiceSelectionParams. Journey and Instant Clone voices are not supported yet.

    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 (entirely or partially).

#custom_pronunciations=

def custom_pronunciations=(value) -> ::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations
Parameter
  • value (::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations) — Optional. The pronunciation customizations to be applied to the input. If this is set, the input will be synthesized using the given pronunciation customizations.

    The initial support will be for EFIGS (English, French, Italian, German, Spanish) languages, as provided in VoiceSelectionParams. Journey and Instant Clone voices are not supported yet.

    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 (entirely or partially).

Returns
  • (::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations) — Optional. The pronunciation customizations to be applied to the input. If this is set, the input will be synthesized using the given pronunciation customizations.

    The initial support will be for EFIGS (English, French, Italian, German, Spanish) languages, as provided in VoiceSelectionParams. Journey and Instant Clone voices are not supported yet.

    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 (entirely or partially).

#multi_speaker_markup

def multi_speaker_markup() -> ::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerMarkup
Returns
  • (::Google::Cloud::TextToSpeech::V1beta1::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, 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::V1beta1::MultiSpeakerMarkup
Parameter
  • value (::Google::Cloud::TextToSpeech::V1beta1::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, ssml. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::TextToSpeech::V1beta1::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, ssml. If a field in that set is populated, all other fields in the set will automatically be cleared.

#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.

    Note: The following fields are mutually exclusive: ssml, text, 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.

    Note: The following fields are mutually exclusive: ssml, text, 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.

    Note: The following fields are mutually exclusive: ssml, text, 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, 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, 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, ssml, multi_speaker_markup. If a field in that set is populated, all other fields in the set will automatically be cleared.