Class: Google::Apis::TexttospeechV1::InputAudio

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

Overview

Holds audio content and config.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InputAudio

Returns a new instance of InputAudio.



335
336
337
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 335

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

Instance Attribute Details

#audio_configGoogle::Apis::TexttospeechV1::InputAudioConfig

Description of inputted audio data. Corresponds to the JSON property audioConfig



324
325
326
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 324

def audio_config
  @audio_config
end

#contentString

Required. The audio data bytes encoded as specified in InputAudioConfig. Note: as with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64. Audio samples should be between 5-25 seconds in length. Corresponds to the JSON property content NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


333
334
335
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 333

def content
  @content
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



340
341
342
343
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 340

def update!(**args)
  @audio_config = args[:audio_config] if args.key?(:audio_config)
  @content = args[:content] if args.key?(:content)
end