Class: Google::Apis::TexttospeechV1beta1::CustomPronunciationParams

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/texttospeech_v1beta1/classes.rb,
lib/google/apis/texttospeech_v1beta1/representations.rb,
lib/google/apis/texttospeech_v1beta1/representations.rb

Overview

Pronunciation customization for a phrase.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CustomPronunciationParams

Returns a new instance of CustomPronunciationParams.



139
140
141
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 139

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#phonetic_encodingString

The phonetic encoding of the phrase. Corresponds to the JSON property phoneticEncoding

Returns:

  • (String)


124
125
126
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 124

def phonetic_encoding
  @phonetic_encoding
end

#phraseString

The phrase to which the customization will be applied. The phrase can be multiple words (in the case of proper nouns etc), but should not span to a whole sentence. Corresponds to the JSON property phrase

Returns:

  • (String)


131
132
133
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 131

def phrase
  @phrase
end

#pronunciationString

The pronunciation of the phrase. This must be in the phonetic encoding specified above. Corresponds to the JSON property pronunciation

Returns:

  • (String)


137
138
139
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 137

def pronunciation
  @pronunciation
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



144
145
146
147
148
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 144

def update!(**args)
  @phonetic_encoding = args[:phonetic_encoding] if args.key?(:phonetic_encoding)
  @phrase = args[:phrase] if args.key?(:phrase)
  @pronunciation = args[:pronunciation] if args.key?(:pronunciation)
end