Class: Google::Apis::TexttospeechV1::SynthesizeSpeechRequest

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

The top-level message sent by the client for the SynthesizeSpeech method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SynthesizeSpeechRequest

Returns a new instance of SynthesizeSpeechRequest.



559
560
561
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 559

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

Instance Attribute Details

#advanced_voice_optionsGoogle::Apis::TexttospeechV1::AdvancedVoiceOptions

Used for advanced voice options. Corresponds to the JSON property advancedVoiceOptions



540
541
542
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 540

def advanced_voice_options
  @advanced_voice_options
end

#audio_configGoogle::Apis::TexttospeechV1::AudioConfig

Description of audio data to be synthesized. Corresponds to the JSON property audioConfig



545
546
547
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 545

def audio_config
  @audio_config
end

#inputGoogle::Apis::TexttospeechV1::SynthesisInput

Contains text input to be synthesized. Either text or ssml must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. The input size is limited to 5000 bytes. Corresponds to the JSON property input



552
553
554
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 552

def input
  @input
end

#voiceGoogle::Apis::TexttospeechV1::VoiceSelectionParams

Description of which voice to use for a synthesis request. Corresponds to the JSON property voice



557
558
559
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 557

def voice
  @voice
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



564
565
566
567
568
569
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 564

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