[BindServiceMethod(typeof(Speech), "BindService")]
public abstract class SpeechBase
Base class for server-side implementations of Speech
Namespace
Google.Cloud.Speech.V1Assembly
Google.Cloud.Speech.V1.dll
Methods
LongRunningRecognize(LongRunningRecognizeRequest, ServerCallContext)
public virtual Task<Operation> LongRunningRecognize(LongRunningRecognizeRequest request, ServerCallContext context)
Performs asynchronous speech recognition: receive results via the
google.longrunning.Operations interface. Returns either an
Operation.error
or an Operation.response
which contains
a LongRunningRecognizeResponse
message.
For more information on asynchronous speech recognition, see the
how-to.
Parameters | |
---|---|
Name | Description |
request | LongRunningRecognizeRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | The response to send back to the client (wrapped by a task). |
Recognize(RecognizeRequest, ServerCallContext)
public virtual Task<RecognizeResponse> Recognize(RecognizeRequest request, ServerCallContext context)
Performs synchronous speech recognition: receive results after all audio has been sent and processed.
Parameters | |
---|---|
Name | Description |
request | RecognizeRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<RecognizeResponse> | The response to send back to the client (wrapped by a task). |
StreamingRecognize(IAsyncStreamReader<StreamingRecognizeRequest>, IServerStreamWriter<StreamingRecognizeResponse>, ServerCallContext)
public virtual Task StreamingRecognize(IAsyncStreamReader<StreamingRecognizeRequest> requestStream, IServerStreamWriter<StreamingRecognizeResponse> responseStream, ServerCallContext context)
Performs bidirectional streaming speech recognition: receive results while sending audio. This method is only available via the gRPC API (not REST).
Parameters | |
---|---|
Name | Description |
requestStream | IAsyncStreamReader<StreamingRecognizeRequest> Used for reading requests from the client. |
responseStream | IServerStreamWriter<StreamingRecognizeResponse> Used for sending responses back to the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task | A task indicating completion of the handler. |