Class protos.google.cloud.texttospeech.v1.TextToSpeech (5.0.2)

Represents a TextToSpeech

Inheritance

$protobuf.rpc.Service > protos.google.cloud.texttospeech.v1.TextToSpeech

Package

@google-cloud/text-to-speech

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new TextToSpeech service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TextToSpeech;

Creates new TextToSpeech service using the specified rpc implementation.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
TextToSpeech

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

listVoices(request, callback)

public listVoices(request: google.cloud.texttospeech.v1.IListVoicesRequest, callback: google.cloud.texttospeech.v1.TextToSpeech.ListVoicesCallback): void;

Calls ListVoices.

Parameters
NameDescription
request IListVoicesRequest

ListVoicesRequest message or plain object

callback ListVoicesCallback

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

Returns
TypeDescription
void

listVoices(request)

public listVoices(request: google.cloud.texttospeech.v1.IListVoicesRequest): Promise<google.cloud.texttospeech.v1.ListVoicesResponse>;

Calls ListVoices.

Parameter
NameDescription
request IListVoicesRequest

ListVoicesRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.texttospeech.v1.ListVoicesResponse>

Promise

synthesizeSpeech(request, callback)

public synthesizeSpeech(request: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest, callback: google.cloud.texttospeech.v1.TextToSpeech.SynthesizeSpeechCallback): void;

Calls SynthesizeSpeech.

Parameters
NameDescription
request ISynthesizeSpeechRequest

SynthesizeSpeechRequest message or plain object

callback SynthesizeSpeechCallback

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

Returns
TypeDescription
void

synthesizeSpeech(request)

public synthesizeSpeech(request: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest): Promise<google.cloud.texttospeech.v1.SynthesizeSpeechResponse>;

Calls SynthesizeSpeech.

Parameter
NameDescription
request ISynthesizeSpeechRequest

SynthesizeSpeechRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.texttospeech.v1.SynthesizeSpeechResponse>

Promise