Google Cloud Speech v1 API - Class Speech.SpeechBase (3.8.0)

[BindServiceMethod(typeof(Speech), "BindService")]
public abstract class Speech.SpeechBase

Reference documentation and code samples for the Google Cloud Speech v1 API class Speech.SpeechBase.

Base class for server-side implementations of Speech

Inheritance

object > Speech.SpeechBase

Namespace

Google.Cloud.Speech.V1

Assembly

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
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 RecognizeRequest

The request received from the client.

context ServerCallContext

The 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 IAsyncStreamReaderStreamingRecognizeRequest

Used for reading requests from the client.

responseStream IServerStreamWriterStreamingRecognizeResponse

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.