Cloud Text-to-Speech V1 Client - Class Voice (1.11.0)

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

Description of a voice supported by the TTS service.

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

Namespace

Google \ Cloud \ TextToSpeech \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ language_codes array

The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").

↳ name string

The name of this voice. Each distinct voice has a unique name.

↳ ssml_gender int

The gender of this voice.

↳ natural_sample_rate_hertz int

The natural sample rate (in hertz) for this voice.

getLanguageCodes

The languages that this voice supports, expressed as BCP-47 language tags (e.g.

"en-US", "es-419", "cmn-tw").

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setLanguageCodes

The languages that this voice supports, expressed as BCP-47 language tags (e.g.

"en-US", "es-419", "cmn-tw").

Parameter
Name Description
var string[]
Returns
Type Description
$this

getName

The name of this voice. Each distinct voice has a unique name.

Returns
Type Description
string

setName

The name of this voice. Each distinct voice has a unique name.

Parameter
Name Description
var string
Returns
Type Description
$this

getSsmlGender

The gender of this voice.

Returns
Type Description
int

setSsmlGender

The gender of this voice.

Parameter
Name Description
var int
Returns
Type Description
$this

getNaturalSampleRateHertz

The natural sample rate (in hertz) for this voice.

Returns
Type Description
int

setNaturalSampleRateHertz

The natural sample rate (in hertz) for this voice.

Parameter
Name Description
var int
Returns
Type Description
$this