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

