Cloud Text-to-Speech V1 Client - Class SynthesizeSpeechRequest (1.4.5)

Reference documentation and code samples for the Cloud Text-to-Speech V1 Client class SynthesizeSpeechRequest.

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

Generated from protobuf message google.cloud.texttospeech.v1.SynthesizeSpeechRequest

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ input Google\Cloud\TextToSpeech\V1\SynthesisInput

Required. The Synthesizer requires either plain text or SSML as input.

↳ voice Google\Cloud\TextToSpeech\V1\VoiceSelectionParams

Required. The desired voice of the synthesized audio.

↳ audio_config Google\Cloud\TextToSpeech\V1\AudioConfig

Required. The configuration of the synthesized audio.

getInput

Required. The Synthesizer requires either plain text or SSML as input.

Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Google\Cloud\TextToSpeech\V1\SynthesisInput|null

hasInput

clearInput

setInput

Required. The Synthesizer requires either plain text or SSML as input.

Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var Google\Cloud\TextToSpeech\V1\SynthesisInput
Returns
TypeDescription
$this

getVoice

Required. The desired voice of the synthesized audio.

Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null

hasVoice

clearVoice

setVoice

Required. The desired voice of the synthesized audio.

Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var Google\Cloud\TextToSpeech\V1\VoiceSelectionParams
Returns
TypeDescription
$this

getAudioConfig

Required. The configuration of the synthesized audio.

Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Google\Cloud\TextToSpeech\V1\AudioConfig|null

hasAudioConfig

clearAudioConfig

setAudioConfig

Required. The configuration of the synthesized audio.

Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var Google\Cloud\TextToSpeech\V1\AudioConfig
Returns
TypeDescription
$this