Represents a TextToSpeech
Inheritance
$protobuf.rpc.Service > protos.google.cloud.texttospeech.v1beta1.TextToSpeechPackage
@google-cloud/text-to-speechConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new TextToSpeech service.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | 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 |
void |
listVoices(request)
public listVoices(request: google.cloud.texttospeech.v1beta1.IListVoicesRequest): Promise<google.cloud.texttospeech.v1beta1.ListVoicesResponse>;
Calls ListVoices.
Parameter | |
---|---|
Name | 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)
public synthesizeSpeech(request: google.cloud.texttospeech.v1beta1.ISynthesizeSpeechRequest, callback: google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeechCallback): void;
Calls SynthesizeSpeech.
Parameters | |
---|---|
Name | Description |
request |
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 |
void |
synthesizeSpeech(request)
public synthesizeSpeech(request: google.cloud.texttospeech.v1beta1.ISynthesizeSpeechRequest): Promise<google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse>;
Calls SynthesizeSpeech.
Parameter | |
---|---|
Name | Description |
request |
ISynthesizeSpeechRequest
SynthesizeSpeechRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse> | Promise |