Speech

google.cloud.speech.v1. 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

(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

longRunningRecognize(request, callback) → {undefined}

Calls LongRunningRecognize.

Parameters:
Name Type Description
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

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

Calls LongRunningRecognize.

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

LongRunningRecognizeRequest message or plain object

recognize(request, callback) → {undefined}

Calls Recognize.

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

RecognizeRequest message or plain object

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

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

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

Calls Recognize.

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

RecognizeRequest message or plain object

streamingRecognize(request, callback) → {undefined}

Calls StreamingRecognize.

Parameters:
Name Type Description
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

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

Calls StreamingRecognize.

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

StreamingRecognizeRequest message or plain object

Type Definitions

LongRunningRecognizeCallback(error, responseopt)

Callback as used by google.cloud.speech.v1.Speech#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 google.cloud.speech.v1.Speech#recognize.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

RecognizeResponse

StreamingRecognizeCallback(error, responseopt)

Callback as used by google.cloud.speech.v1.Speech#streamingRecognize.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

StreamingRecognizeResponse