Class protos.google.cloud.speech.v1.Speech

Represents a Speech

Inheritance

$protobuf.rpc.Service > protos.google.cloud.speech.v1.Speech

Package

@google-cloud/speech

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

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

Constructs a new Speech 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): Speech;

Creates new Speech 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
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
NameDescription
request google.cloud.speech.v1.ILongRunningRecognizeRequest

LongRunningRecognizeRequest message or plain object

callback google.cloud.speech.v1.Speech.LongRunningRecognizeCallback

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

Returns
TypeDescription
void

longRunningRecognize(request)

public longRunningRecognize(request: google.cloud.speech.v1.ILongRunningRecognizeRequest): Promise<google.longrunning.Operation>;

Calls LongRunningRecognize.

Parameter
NameDescription
request google.cloud.speech.v1.ILongRunningRecognizeRequest

LongRunningRecognizeRequest message or plain object

Returns
TypeDescription
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
NameDescription
request IRecognizeRequest

RecognizeRequest message or plain object

callback google.cloud.speech.v1.Speech.RecognizeCallback

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

Returns
TypeDescription
void

recognize(request)

public recognize(request: google.cloud.speech.v1.IRecognizeRequest): Promise<google.cloud.speech.v1.RecognizeResponse>;

Calls Recognize.

Parameter
NameDescription
request IRecognizeRequest

RecognizeRequest message or plain object

Returns
TypeDescription
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
NameDescription
request google.cloud.speech.v1.IStreamingRecognizeRequest

StreamingRecognizeRequest message or plain object

callback google.cloud.speech.v1.Speech.StreamingRecognizeCallback

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

Returns
TypeDescription
void

streamingRecognize(request)

public streamingRecognize(request: google.cloud.speech.v1.IStreamingRecognizeRequest): Promise<google.cloud.speech.v1.StreamingRecognizeResponse>;

Calls StreamingRecognize.

Parameter
NameDescription
request google.cloud.speech.v1.IStreamingRecognizeRequest

StreamingRecognizeRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.speech.v1.StreamingRecognizeResponse>

Promise