Speech

google.cloud.speech.v1p1beta1. Speech

Represents a Speech

Constructor

new Speech(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new Speech service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

longRunningRecognize(request, callback) → {undefined}

Calls LongRunningRecognize.

Parameters:
Name Type Description
request google.cloud.speech.v1p1beta1.ILongRunningRecognizeRequest

LongRunningRecognizeRequest message or plain object

callback google.cloud.speech.v1p1beta1.Speech.LongRunningRecognizeCallback

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

Returns:
Type Description
undefined

longRunningRecognize(request) → {Promise.<google.longrunning.Operation>}

Calls LongRunningRecognize.

Parameters:
Name Type Description
request google.cloud.speech.v1p1beta1.ILongRunningRecognizeRequest

LongRunningRecognizeRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

recognize(request, callback) → {undefined}

Calls Recognize.

Parameters:
Name Type Description
request google.cloud.speech.v1p1beta1.IRecognizeRequest

RecognizeRequest message or plain object

callback google.cloud.speech.v1p1beta1.Speech.RecognizeCallback

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

Returns:
Type Description
undefined

recognize(request) → {Promise.<google.cloud.speech.v1p1beta1.RecognizeResponse>}

Calls Recognize.

Parameters:
Name Type Description
request google.cloud.speech.v1p1beta1.IRecognizeRequest

RecognizeRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.speech.v1p1beta1.RecognizeResponse>

Promise

streamingRecognize(request, callback) → {undefined}

Calls StreamingRecognize.

Parameters:
Name Type Description
request google.cloud.speech.v1p1beta1.IStreamingRecognizeRequest

StreamingRecognizeRequest message or plain object

callback google.cloud.speech.v1p1beta1.Speech.StreamingRecognizeCallback

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

Returns:
Type Description
undefined

streamingRecognize(request) → {Promise.<google.cloud.speech.v1p1beta1.StreamingRecognizeResponse>}

Calls StreamingRecognize.

Parameters:
Name Type Description
request google.cloud.speech.v1p1beta1.IStreamingRecognizeRequest

StreamingRecognizeRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.speech.v1p1beta1.StreamingRecognizeResponse>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {Speech}

Creates new Speech service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
Speech

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

LongRunningRecognizeCallback(error, responseopt)

Callback as used by longRunningRecognize.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

RecognizeCallback(error, responseopt)

Callback as used by recognize.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.speech.v1p1beta1.RecognizeResponse <optional>

RecognizeResponse

StreamingRecognizeCallback(error, responseopt)

Callback as used by streamingRecognize.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.speech.v1p1beta1.StreamingRecognizeResponse <optional>

StreamingRecognizeResponse