Class: OCI::AiSpeech::Models::TranscriptionModelDetails
- Inherits:
- 
      Object
      
        - Object
- OCI::AiSpeech::Models::TranscriptionModelDetails
 
- Defined in:
- lib/oci/ai_speech/models/transcription_model_details.rb
Overview
Model details.
Constant Summary collapse
- DOMAIN_ENUM =
- [ DOMAIN_GENERIC = 'GENERIC'.freeze, DOMAIN_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
- LANGUAGE_CODE_ENUM =
- [ LANGUAGE_CODE_EN_US = 'en-US'.freeze, LANGUAGE_CODE_ES_ES = 'es-ES'.freeze, LANGUAGE_CODE_PT_BR = 'pt-BR'.freeze, LANGUAGE_CODE_EN_GB = 'en-GB'.freeze, LANGUAGE_CODE_EN_AU = 'en-AU'.freeze, LANGUAGE_CODE_EN_IN = 'en-IN'.freeze, LANGUAGE_CODE_HI_IN = 'hi-IN'.freeze, LANGUAGE_CODE_FR_FR = 'fr-FR'.freeze, LANGUAGE_CODE_DE_DE = 'de-DE'.freeze, LANGUAGE_CODE_IT_IT = 'it-IT'.freeze, LANGUAGE_CODE_AF = 'af'.freeze, LANGUAGE_CODE_AR = 'ar'.freeze, LANGUAGE_CODE_AZ = 'az'.freeze, LANGUAGE_CODE_BE = 'be'.freeze, LANGUAGE_CODE_BG = 'bg'.freeze, LANGUAGE_CODE_BS = 'bs'.freeze, LANGUAGE_CODE_CA = 'ca'.freeze, LANGUAGE_CODE_CS = 'cs'.freeze, LANGUAGE_CODE_CY = 'cy'.freeze, LANGUAGE_CODE_DA = 'da'.freeze, LANGUAGE_CODE_DE = 'de'.freeze, LANGUAGE_CODE_EL = 'el'.freeze, LANGUAGE_CODE_EN = 'en'.freeze, LANGUAGE_CODE_ES = 'es'.freeze, LANGUAGE_CODE_ET = 'et'.freeze, LANGUAGE_CODE_FA = 'fa'.freeze, LANGUAGE_CODE_FI = 'fi'.freeze, LANGUAGE_CODE_FR = 'fr'.freeze, LANGUAGE_CODE_GL = 'gl'.freeze, LANGUAGE_CODE_HE = 'he'.freeze, LANGUAGE_CODE_HI = 'hi'.freeze, LANGUAGE_CODE_HR = 'hr'.freeze, LANGUAGE_CODE_HU = 'hu'.freeze, LANGUAGE_CODE_HY = 'hy'.freeze, LANGUAGE_CODE_ID = 'id'.freeze, LANGUAGE_CODE_IS = 'is'.freeze, LANGUAGE_CODE_IT = 'it'.freeze, LANGUAGE_CODE_JA = 'ja'.freeze, LANGUAGE_CODE_KK = 'kk'.freeze, LANGUAGE_CODE_KN = 'kn'.freeze, LANGUAGE_CODE_KO = 'ko'.freeze, LANGUAGE_CODE_LT = 'lt'.freeze, LANGUAGE_CODE_LV = 'lv'.freeze, LANGUAGE_CODE_MI = 'mi'.freeze, LANGUAGE_CODE_MK = 'mk'.freeze, LANGUAGE_CODE_MR = 'mr'.freeze, LANGUAGE_CODE_MS = 'ms'.freeze, LANGUAGE_CODE_NE = 'ne'.freeze, LANGUAGE_CODE_NL = 'nl'.freeze, LANGUAGE_CODE_NO = 'no'.freeze, LANGUAGE_CODE_PL = 'pl'.freeze, LANGUAGE_CODE_PT = 'pt'.freeze, LANGUAGE_CODE_RO = 'ro'.freeze, LANGUAGE_CODE_RU = 'ru'.freeze, LANGUAGE_CODE_SK = 'sk'.freeze, LANGUAGE_CODE_SL = 'sl'.freeze, LANGUAGE_CODE_SR = 'sr'.freeze, LANGUAGE_CODE_SV = 'sv'.freeze, LANGUAGE_CODE_SW = 'sw'.freeze, LANGUAGE_CODE_TA = 'ta'.freeze, LANGUAGE_CODE_TH = 'th'.freeze, LANGUAGE_CODE_TL = 'tl'.freeze, LANGUAGE_CODE_TR = 'tr'.freeze, LANGUAGE_CODE_UK = 'uk'.freeze, LANGUAGE_CODE_UR = 'ur'.freeze, LANGUAGE_CODE_VI = 'vi'.freeze, LANGUAGE_CODE_ZH = 'zh'.freeze, LANGUAGE_CODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
Instance Attribute Summary collapse
- 
  
    
      #domain  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Domain for input files. 
- 
  
    
      #language_code  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Oracle supported language codes are (Oracle models are locale specific). 
- 
  
    
      #model_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Select a model to use for generating transcriptions. 
- #transcription_settings ⇒ OCI::AiSpeech::Models::TranscriptionSettings
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 = {})  ⇒ TranscriptionModelDetails 
    
    
  
  
  
    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 = {}) ⇒ TranscriptionModelDetails
Initializes the object
| 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 212 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.model_type = attributes[:'modelType'] if attributes[:'modelType'] self.model_type = "ORACLE" if model_type.nil? && !attributes.key?(:'modelType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :modelType and :model_type' if attributes.key?(:'modelType') && attributes.key?(:'model_type') self.model_type = attributes[:'model_type'] if attributes[:'model_type'] self.model_type = "ORACLE" if model_type.nil? && !attributes.key?(:'modelType') && !attributes.key?(:'model_type') # rubocop:disable Style/StringLiterals self.domain = attributes[:'domain'] if attributes[:'domain'] self.domain = "GENERIC" if domain.nil? && !attributes.key?(:'domain') # rubocop:disable Style/StringLiterals self.language_code = attributes[:'languageCode'] if attributes[:'languageCode'] self.language_code = "en-US" if language_code.nil? && !attributes.key?(:'languageCode') # rubocop:disable Style/StringLiterals 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_code = "en-US" if language_code.nil? && !attributes.key?(:'languageCode') && !attributes.key?(:'language_code') # rubocop:disable Style/StringLiterals self.transcription_settings = attributes[:'transcriptionSettings'] if attributes[:'transcriptionSettings'] raise 'You cannot provide both :transcriptionSettings and :transcription_settings' if attributes.key?(:'transcriptionSettings') && attributes.key?(:'transcription_settings') self.transcription_settings = attributes[:'transcription_settings'] if attributes[:'transcription_settings'] end | 
Instance Attribute Details
#domain ⇒ String
Domain for input files.
| 98 99 100 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 98 def domain @domain end | 
#language_code ⇒ String
Oracle supported language codes are (Oracle models are locale specific). - en-US: English - United States (default) - es-ES: Spanish - Spain - pt-BR: Portuguese - Brazil - en-GB: English - Great Britain - en-AU: English - Australia - en-IN: English - India - hi-IN: Hindi - India - fr-FR: French - France - de-DE: German - Germany - it-IT: Italian - Italy
Whisper supported language codes are (Whisper models are locale agnostic). - af: Afrikaans - ar: Arabic - az: Azerbaijani - be: Belarusian - bg: Bulgarian - bs: Bosnian - ca: Catalan - cs: Czech - cy: Welsh - da: Danish - de: German - el: Greek - en: English (default) - es: Spanish - et: Estonian - fa: Persian - fi: Finnish - fr: French - gl: Galician - he: Hebrew - hi: Hindi - hr: Croatian - hu: Hungarian - hy: Armenian - id: Indonesian - is: Icelandic - it: Italian - ja: Japanese - kk: Kazakh - kn: Kannada - ko: Korean - lt: Lithuanian - lv: Latvian - mi: Maori - mk: Macedonian - mr: Marathi - ms: Malay - ne: Nepali - nl: Dutch - no: Norwegian - pl: Polish - pt: Portuguese - ro: Romanian - ru: Russian - sk: Slovak - sl: Slovenian - sr: Serbian - sv: Swedish - sw: Swahili - ta: Tamil - th: Thai - tl: Tagalog - tr: Turkish - uk: Ukrainian - ur: Urdu - vi: Vietnamese - zh: Chinese
| 173 174 175 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 173 def language_code @language_code end | 
#model_type ⇒ String
Select a model to use for generating transcriptions. Currently supported models are: - ORACLE - WHISPER_MEDIUM - WHISPER_LARGE_V2 (upon service request)
| 94 95 96 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 94 def model_type @model_type end | 
#transcription_settings ⇒ OCI::AiSpeech::Models::TranscriptionSettings
| 176 177 178 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 176 def transcription_settings @transcription_settings end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 179 180 181 182 183 184 185 186 187 188 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 179 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'model_type': :'modelType', 'domain': :'domain', 'language_code': :'languageCode', 'transcription_settings': :'transcriptionSettings' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 191 192 193 194 195 196 197 198 199 200 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 191 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'model_type': :'String', 'domain': :'String', 'language_code': :'String', 'transcription_settings': :'OCI::AiSpeech::Models::TranscriptionSettings' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 277 278 279 280 281 282 283 284 285 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 277 def ==(other) return true if equal?(other) self.class == other.class && model_type == other.model_type && domain == other.domain && language_code == other.language_code && transcription_settings == other.transcription_settings end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 310 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
| 290 291 292 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 290 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 299 300 301 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 299 def hash [model_type, domain, language_code, transcription_settings].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 343 344 345 346 347 348 349 350 351 352 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 343 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
| 337 338 339 | # File 'lib/oci/ai_speech/models/transcription_model_details.rb', line 337 def to_s to_hash.to_s end |