Class protos.google.cloud.texttospeech.v1beta1.TextToSpeech (3.4.0)

Represents a TextToSpeech

Inheritance

$protobuf.rpc.Service > protos.google.cloud.texttospeech.v1beta1.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.v1beta1.IListVoicesRequest, callback: google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoicesCallback): void;

Calls ListVoices.

Parameters
NameDescription
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
TypeDescription
void

listVoices(request)

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

Calls ListVoices.

Parameter
NameDescription
request google.cloud.texttospeech.v1beta1.IListVoicesRequest

ListVoicesRequest message or plain object

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

Promise

synthesizeSpeech(request, callback)

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

Calls SynthesizeSpeech.

Parameters
NameDescription
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
TypeDescription
void

synthesizeSpeech(request)

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

Calls SynthesizeSpeech.

Parameter
NameDescription
request google.cloud.texttospeech.v1beta1.ISynthesizeSpeechRequest

SynthesizeSpeechRequest message or plain object

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

Promise