Class: OCI::AiSpeech::Models::VoiceSummary
- Inherits:
-
Object
- Object
- OCI::AiSpeech::Models::VoiceSummary
- Defined in:
- lib/oci/ai_speech/models/voice_summary.rb
Overview
Details related to the voice available for the given language code and voice type.
Constant Summary collapse
- GENDER_ENUM =
[ GENDER_MALE = 'MALE'.freeze, GENDER_FEMALE = 'FEMALE'.freeze, GENDER_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LANGUAGE_CODE_ENUM =
[ LANGUAGE_CODE_EN_US = 'en-US'.freeze, LANGUAGE_CODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#description ⇒ String
A small description of the voice like its language and voice type.
-
#display_name ⇒ String
[Required] A user-friendly display name of the language for the user.
-
#gender ⇒ String
[Required] Gender of the speaker.
-
#is_default_voice ⇒ BOOLEAN
Whether this voice id is default voice used for inference.
-
#language_code ⇒ String
An abbreviated notation of region to which the language and accent of the speaker belongs to.
-
#language_description ⇒ String
A description of region to which the language and accent of the speaker belongs to.
-
#sample_rate_in_hertz ⇒ Integer
[Required] The sample rate of the speaker in Hertz.
-
#supported_models ⇒ Array<String>
Models the particular speaker is aligned to.
-
#voice_id ⇒ String
[Required] Unique Id of the voice.
-
#words_per_minute ⇒ Integer
[Required] The number of words the speaker can narrate per minute.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VoiceSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ VoiceSummary
Initializes the object
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 115 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.voice_id = attributes[:'voiceId'] if attributes[:'voiceId'] raise 'You cannot provide both :voiceId and :voice_id' if attributes.key?(:'voiceId') && attributes.key?(:'voice_id') self.voice_id = attributes[:'voice_id'] if attributes[:'voice_id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.description = attributes[:'description'] if attributes[:'description'] self.gender = attributes[:'gender'] if attributes[:'gender'] self.supported_models = attributes[:'supportedModels'] if attributes[:'supportedModels'] raise 'You cannot provide both :supportedModels and :supported_models' if attributes.key?(:'supportedModels') && attributes.key?(:'supported_models') self.supported_models = attributes[:'supported_models'] if attributes[:'supported_models'] self.language_code = attributes[:'languageCode'] if attributes[:'languageCode'] raise 'You cannot provide both :languageCode and :language_code' if attributes.key?(:'languageCode') && attributes.key?(:'language_code') self.language_code = attributes[:'language_code'] if attributes[:'language_code'] self.language_description = attributes[:'languageDescription'] if attributes[:'languageDescription'] raise 'You cannot provide both :languageDescription and :language_description' if attributes.key?(:'languageDescription') && attributes.key?(:'language_description') self.language_description = attributes[:'language_description'] if attributes[:'language_description'] self.sample_rate_in_hertz = attributes[:'sampleRateInHertz'] if attributes[:'sampleRateInHertz'] raise 'You cannot provide both :sampleRateInHertz and :sample_rate_in_hertz' if attributes.key?(:'sampleRateInHertz') && attributes.key?(:'sample_rate_in_hertz') self.sample_rate_in_hertz = attributes[:'sample_rate_in_hertz'] if attributes[:'sample_rate_in_hertz'] self.words_per_minute = attributes[:'wordsPerMinute'] if attributes[:'wordsPerMinute'] raise 'You cannot provide both :wordsPerMinute and :words_per_minute' if attributes.key?(:'wordsPerMinute') && attributes.key?(:'words_per_minute') self.words_per_minute = attributes[:'words_per_minute'] if attributes[:'words_per_minute'] self.is_default_voice = attributes[:'isDefaultVoice'] unless attributes[:'isDefaultVoice'].nil? raise 'You cannot provide both :isDefaultVoice and :is_default_voice' if attributes.key?(:'isDefaultVoice') && attributes.key?(:'is_default_voice') self.is_default_voice = attributes[:'is_default_voice'] unless attributes[:'is_default_voice'].nil? end |
Instance Attribute Details
#description ⇒ String
A small description of the voice like its language and voice type.
33 34 35 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 33 def description @description end |
#display_name ⇒ String
[Required] A user-friendly display name of the language for the user.
29 30 31 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 29 def display_name @display_name end |
#gender ⇒ String
[Required] Gender of the speaker.
37 38 39 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 37 def gender @gender end |
#is_default_voice ⇒ BOOLEAN
Whether this voice id is default voice used for inference.
61 62 63 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 61 def is_default_voice @is_default_voice end |
#language_code ⇒ String
An abbreviated notation of region to which the language and accent of the speaker belongs to.
45 46 47 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 45 def language_code @language_code end |
#language_description ⇒ String
A description of region to which the language and accent of the speaker belongs to.
49 50 51 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 49 def language_description @language_description end |
#sample_rate_in_hertz ⇒ Integer
[Required] The sample rate of the speaker in Hertz.
53 54 55 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 53 def sample_rate_in_hertz @sample_rate_in_hertz end |
#supported_models ⇒ Array<String>
Models the particular speaker is aligned to.
41 42 43 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 41 def supported_models @supported_models end |
#voice_id ⇒ String
[Required] Unique Id of the voice.
25 26 27 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 25 def voice_id @voice_id end |
#words_per_minute ⇒ Integer
[Required] The number of words the speaker can narrate per minute. It signifies the speed of the speech produced by the speaker.
57 58 59 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 57 def words_per_minute @words_per_minute end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 64 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'voice_id': :'voiceId', 'display_name': :'displayName', 'description': :'description', 'gender': :'gender', 'supported_models': :'supportedModels', 'language_code': :'languageCode', 'language_description': :'languageDescription', 'sample_rate_in_hertz': :'sampleRateInHertz', 'words_per_minute': :'wordsPerMinute', 'is_default_voice': :'isDefaultVoice' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 82 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'voice_id': :'String', 'display_name': :'String', 'description': :'String', 'gender': :'String', 'supported_models': :'Array<String>', 'language_code': :'String', 'language_description': :'String', 'sample_rate_in_hertz': :'Integer', 'words_per_minute': :'Integer', 'is_default_voice': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 207 def ==(other) return true if equal?(other) self.class == other.class && voice_id == other.voice_id && display_name == other.display_name && description == other.description && gender == other.gender && supported_models == other.supported_models && language_code == other.language_code && language_description == other.language_description && sample_rate_in_hertz == other.sample_rate_in_hertz && words_per_minute == other.words_per_minute && is_default_voice == other.is_default_voice end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 246 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
226 227 228 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 226 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
235 236 237 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 235 def hash [voice_id, display_name, description, gender, supported_models, language_code, language_description, sample_rate_in_hertz, words_per_minute, is_default_voice].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 279 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
273 274 275 |
# File 'lib/oci/ai_speech/models/voice_summary.rb', line 273 def to_s to_hash.to_s end |