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 |
IListVoicesRequest
ListVoicesRequest message or plain object |
callback |
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 |
IListVoicesRequest
ListVoicesRequest message or plain object |
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.texttospeech.v1beta1.ListVoicesResponse> |
Promise |
streamingSynthesize(request, callback)
public streamingSynthesize(request: google.cloud.texttospeech.v1beta1.IStreamingSynthesizeRequest, callback: google.cloud.texttospeech.v1beta1.TextToSpeech.StreamingSynthesizeCallback): void;Calls StreamingSynthesize.
| Parameters | |
|---|---|
| Name | Description |
request |
IStreamingSynthesizeRequest
StreamingSynthesizeRequest message or plain object |
callback |
StreamingSynthesizeCallback
Node-style callback called with the error, if any, and StreamingSynthesizeResponse |
| Returns | |
|---|---|
| Type | Description |
void |
|
streamingSynthesize(request)
public streamingSynthesize(request: google.cloud.texttospeech.v1beta1.IStreamingSynthesizeRequest): Promise<google.cloud.texttospeech.v1beta1.StreamingSynthesizeResponse>;Calls StreamingSynthesize.
| Parameter | |
|---|---|
| Name | Description |
request |
IStreamingSynthesizeRequest
StreamingSynthesizeRequest message or plain object |
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.texttospeech.v1beta1.StreamingSynthesizeResponse> |
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 |
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 |