Represents a Speech
Inheritance
$protobuf.rpc.Service > protos.google.cloud.speech.v1.SpeechPackage
@google-cloud/speechConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new Speech 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): Speech;
Creates new Speech 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 |
Speech |
RPC service. Useful where requests and/or responses are streamed. |
longRunningRecognize(request, callback)
public longRunningRecognize(request: google.cloud.speech.v1.ILongRunningRecognizeRequest, callback: google.cloud.speech.v1.Speech.LongRunningRecognizeCallback): void;
Calls LongRunningRecognize.
Parameters | |
---|---|
Name | Description |
request |
ILongRunningRecognizeRequest
LongRunningRecognizeRequest message or plain object |
callback |
LongRunningRecognizeCallback
Node-style callback called with the error, if any, and Operation |
Returns | |
---|---|
Type | Description |
void |
longRunningRecognize(request)
public longRunningRecognize(request: google.cloud.speech.v1.ILongRunningRecognizeRequest): Promise<google.longrunning.Operation>;
Calls LongRunningRecognize.
Parameter | |
---|---|
Name | Description |
request |
ILongRunningRecognizeRequest
LongRunningRecognizeRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.longrunning.Operation> |
Promise |
recognize(request, callback)
public recognize(request: google.cloud.speech.v1.IRecognizeRequest, callback: google.cloud.speech.v1.Speech.RecognizeCallback): void;
Calls Recognize.
Parameters | |
---|---|
Name | Description |
request |
IRecognizeRequest
RecognizeRequest message or plain object |
callback |
RecognizeCallback
Node-style callback called with the error, if any, and RecognizeResponse |
Returns | |
---|---|
Type | Description |
void |
recognize(request)
public recognize(request: google.cloud.speech.v1.IRecognizeRequest): Promise<google.cloud.speech.v1.RecognizeResponse>;
Calls Recognize.
Parameter | |
---|---|
Name | Description |
request |
IRecognizeRequest
RecognizeRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.cloud.speech.v1.RecognizeResponse> |
Promise |
streamingRecognize(request, callback)
public streamingRecognize(request: google.cloud.speech.v1.IStreamingRecognizeRequest, callback: google.cloud.speech.v1.Speech.StreamingRecognizeCallback): void;
Calls StreamingRecognize.
Parameters | |
---|---|
Name | Description |
request |
IStreamingRecognizeRequest
StreamingRecognizeRequest message or plain object |
callback |
StreamingRecognizeCallback
Node-style callback called with the error, if any, and StreamingRecognizeResponse |
Returns | |
---|---|
Type | Description |
void |
streamingRecognize(request)
public streamingRecognize(request: google.cloud.speech.v1.IStreamingRecognizeRequest): Promise<google.cloud.speech.v1.StreamingRecognizeResponse>;
Calls StreamingRecognize.
Parameter | |
---|---|
Name | Description |
request |
IStreamingRecognizeRequest
StreamingRecognizeRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.cloud.speech.v1.StreamingRecognizeResponse> |
Promise |