TextToSpeech/src/V1/SynthesizeSpeechRequest.php
public function setVoice($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class);
        $this->voice = $var;

        return $this;
    }
public function setVoice($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class);
        $this->voice = $var;

        return $this;
    }
public function setVoice ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ TextToSpeech \ V1 \ VoiceSelectionParams :: class ) ; $ this -> voice = $ var ; return $ this ; }
Required. The desired voice of the synthesized audio.

Generated from protobuf field <code>.google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2;</code>
@param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var
@return $this
Required . The desired voice of the synthesized audio .