Class Speech.SpeechBase (2.2.0)

[BindServiceMethod(typeof(Speech), "BindService")]
public abstract class 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
NameDescription
requestLongRunningRecognizeRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestRecognizeRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestStreamIAsyncStreamReader<StreamingRecognizeRequest>

Used for reading requests from the client.

responseStreamIServerStreamWriter<StreamingRecognizeResponse>

Used for sending responses back to the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task

A task indicating completion of the handler.