[BindServiceMethod(typeof(Speech), "BindService")]
public abstract class Speech.SpeechBaseReference documentation and code samples for the Google Cloud Speech v1 API class Speech.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 |
LongRunningRecognizeRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
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 |
RecognizeRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskRecognizeResponse |
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 |
IAsyncStreamReaderStreamingRecognizeRequestUsed for reading requests from the client. |
responseStream |
IServerStreamWriterStreamingRecognizeResponseUsed for sending responses back to the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
Task |
A task indicating completion of the handler. |