TextToSpeech

google.cloud.texttospeech.v1beta1. TextToSpeech

Represents a TextToSpeech

Constructor

new TextToSpeech(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new TextToSpeech service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

listVoices(request, callback) → {undefined}

Calls ListVoices.

Parameters:
Name Type Description
request google.cloud.texttospeech.v1beta1.IListVoicesRequest

ListVoicesRequest message or plain object

callback google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoicesCallback

Node-style callback called with the error, if any, and ListVoicesResponse

Returns:
Type Description
undefined

listVoices(request) → {Promise.<google.cloud.texttospeech.v1beta1.ListVoicesResponse>}

Calls ListVoices.

Parameters:
Name Type Description
request google.cloud.texttospeech.v1beta1.IListVoicesRequest

ListVoicesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.texttospeech.v1beta1.ListVoicesResponse>

Promise

synthesizeSpeech(request, callback) → {undefined}

Calls SynthesizeSpeech.

Parameters:
Name Type Description
request google.cloud.texttospeech.v1beta1.ISynthesizeSpeechRequest

SynthesizeSpeechRequest message or plain object

callback google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeechCallback

Node-style callback called with the error, if any, and SynthesizeSpeechResponse

Returns:
Type Description
undefined

synthesizeSpeech(request) → {Promise.<google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse>}

Calls SynthesizeSpeech.

Parameters:
Name Type Description
request google.cloud.texttospeech.v1beta1.ISynthesizeSpeechRequest

SynthesizeSpeechRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {TextToSpeech}

Creates new TextToSpeech service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
TextToSpeech

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

ListVoicesCallback(error, responseopt)

Callback as used by listVoices.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.texttospeech.v1beta1.ListVoicesResponse <optional>

ListVoicesResponse

SynthesizeSpeechCallback(error, responseopt)

Callback as used by synthesizeSpeech.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse <optional>

SynthesizeSpeechResponse