Class: Google::Cloud::TextToSpeech::V1::SynthesisInput

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb

Overview

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.

Instance Attribute Summary collapse

Instance Attribute Details

#custom_pronunciations::Google::Cloud::TextToSpeech::V1::CustomPronunciations

Returns 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)

    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.



225
226
227
228
# File 'proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb', line 225

class SynthesisInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#markup::String

Returns Markup for 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 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.



225
226
227
228
# File 'proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb', line 225

class SynthesisInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#multi_speaker_markup::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup

Returns 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)

    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.



225
226
227
228
# File 'proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb', line 225

class SynthesisInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#ssml::String

Returns 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, 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.

    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.



225
226
227
228
# File 'proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb', line 225

class SynthesisInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#text::String

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



225
226
227
228
# File 'proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb', line 225

class SynthesisInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end