Cloud Speech-to-Text v2 API - Class Speech.SpeechBase (1.0.0-beta07)

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

Reference documentation and code samples for the Cloud Speech-to-Text v2 API class Speech.SpeechBase.

Base class for server-side implementations of Speech

Inheritance

object > Speech.SpeechBase

Namespace

Google.Cloud.Speech.V2

Assembly

Google.Cloud.Speech.V2.dll

Methods

BatchRecognize(BatchRecognizeRequest, ServerCallContext)

public virtual Task<Operation> BatchRecognize(BatchRecognizeRequest request, ServerCallContext context)

Performs batch asynchronous speech recognition: send a request with N audio files and receive a long running operation that can be polled to see when the transcriptions are finished.

Parameters
NameDescription
requestBatchRecognizeRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

CreateCustomClass(CreateCustomClassRequest, ServerCallContext)

public virtual Task<Operation> CreateCustomClass(CreateCustomClassRequest request, ServerCallContext context)

Creates a [CustomClass][google.cloud.speech.v2.CustomClass].

Parameters
NameDescription
requestCreateCustomClassRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

CreatePhraseSet(CreatePhraseSetRequest, ServerCallContext)

public virtual Task<Operation> CreatePhraseSet(CreatePhraseSetRequest request, ServerCallContext context)

Creates a [PhraseSet][google.cloud.speech.v2.PhraseSet].

Parameters
NameDescription
requestCreatePhraseSetRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

CreateRecognizer(CreateRecognizerRequest, ServerCallContext)

public virtual Task<Operation> CreateRecognizer(CreateRecognizerRequest request, ServerCallContext context)

Creates a [Recognizer][google.cloud.speech.v2.Recognizer].

Parameters
NameDescription
requestCreateRecognizerRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

DeleteCustomClass(DeleteCustomClassRequest, ServerCallContext)

public virtual Task<Operation> DeleteCustomClass(DeleteCustomClassRequest request, ServerCallContext context)

Deletes the [CustomClass][google.cloud.speech.v2.CustomClass].

Parameters
NameDescription
requestDeleteCustomClassRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

DeletePhraseSet(DeletePhraseSetRequest, ServerCallContext)

public virtual Task<Operation> DeletePhraseSet(DeletePhraseSetRequest request, ServerCallContext context)

Deletes the [PhraseSet][google.cloud.speech.v2.PhraseSet].

Parameters
NameDescription
requestDeletePhraseSetRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

DeleteRecognizer(DeleteRecognizerRequest, ServerCallContext)

public virtual Task<Operation> DeleteRecognizer(DeleteRecognizerRequest request, ServerCallContext context)

Deletes the [Recognizer][google.cloud.speech.v2.Recognizer].

Parameters
NameDescription
requestDeleteRecognizerRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

GetConfig(GetConfigRequest, ServerCallContext)

public virtual Task<Config> GetConfig(GetConfigRequest request, ServerCallContext context)

Returns the requested [Config][google.cloud.speech.v2.Config].

Parameters
NameDescription
requestGetConfigRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskConfig

The response to send back to the client (wrapped by a task).

GetCustomClass(GetCustomClassRequest, ServerCallContext)

public virtual Task<CustomClass> GetCustomClass(GetCustomClassRequest request, ServerCallContext context)

Returns the requested [CustomClass][google.cloud.speech.v2.CustomClass].

Parameters
NameDescription
requestGetCustomClassRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskCustomClass

The response to send back to the client (wrapped by a task).

GetPhraseSet(GetPhraseSetRequest, ServerCallContext)

public virtual Task<PhraseSet> GetPhraseSet(GetPhraseSetRequest request, ServerCallContext context)

Returns the requested [PhraseSet][google.cloud.speech.v2.PhraseSet].

Parameters
NameDescription
requestGetPhraseSetRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskPhraseSet

The response to send back to the client (wrapped by a task).

GetRecognizer(GetRecognizerRequest, ServerCallContext)

public virtual Task<Recognizer> GetRecognizer(GetRecognizerRequest request, ServerCallContext context)

Returns the requested [Recognizer][google.cloud.speech.v2.Recognizer]. Fails with [NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested Recognizer doesn't exist.

Parameters
NameDescription
requestGetRecognizerRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskRecognizer

The response to send back to the client (wrapped by a task).

ListCustomClasses(ListCustomClassesRequest, ServerCallContext)

public virtual Task<ListCustomClassesResponse> ListCustomClasses(ListCustomClassesRequest request, ServerCallContext context)

Lists CustomClasses.

Parameters
NameDescription
requestListCustomClassesRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListCustomClassesResponse

The response to send back to the client (wrapped by a task).

ListPhraseSets(ListPhraseSetsRequest, ServerCallContext)

public virtual Task<ListPhraseSetsResponse> ListPhraseSets(ListPhraseSetsRequest request, ServerCallContext context)

Lists PhraseSets.

Parameters
NameDescription
requestListPhraseSetsRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListPhraseSetsResponse

The response to send back to the client (wrapped by a task).

ListRecognizers(ListRecognizersRequest, ServerCallContext)

public virtual Task<ListRecognizersResponse> ListRecognizers(ListRecognizersRequest request, ServerCallContext context)

Lists Recognizers.

Parameters
NameDescription
requestListRecognizersRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListRecognizersResponse

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
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
NameDescription
requestStreamIAsyncStreamReaderStreamingRecognizeRequest

Used for reading requests from the client.

responseStreamIServerStreamWriterStreamingRecognizeResponse

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.

UndeleteCustomClass(UndeleteCustomClassRequest, ServerCallContext)

public virtual Task<Operation> UndeleteCustomClass(UndeleteCustomClassRequest request, ServerCallContext context)

Undeletes the [CustomClass][google.cloud.speech.v2.CustomClass].

Parameters
NameDescription
requestUndeleteCustomClassRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

UndeletePhraseSet(UndeletePhraseSetRequest, ServerCallContext)

public virtual Task<Operation> UndeletePhraseSet(UndeletePhraseSetRequest request, ServerCallContext context)

Undeletes the [PhraseSet][google.cloud.speech.v2.PhraseSet].

Parameters
NameDescription
requestUndeletePhraseSetRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

UndeleteRecognizer(UndeleteRecognizerRequest, ServerCallContext)

public virtual Task<Operation> UndeleteRecognizer(UndeleteRecognizerRequest request, ServerCallContext context)

Undeletes the [Recognizer][google.cloud.speech.v2.Recognizer].

Parameters
NameDescription
requestUndeleteRecognizerRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

UpdateConfig(UpdateConfigRequest, ServerCallContext)

public virtual Task<Config> UpdateConfig(UpdateConfigRequest request, ServerCallContext context)

Updates the [Config][google.cloud.speech.v2.Config].

Parameters
NameDescription
requestUpdateConfigRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskConfig

The response to send back to the client (wrapped by a task).

UpdateCustomClass(UpdateCustomClassRequest, ServerCallContext)

public virtual Task<Operation> UpdateCustomClass(UpdateCustomClassRequest request, ServerCallContext context)

Updates the [CustomClass][google.cloud.speech.v2.CustomClass].

Parameters
NameDescription
requestUpdateCustomClassRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

UpdatePhraseSet(UpdatePhraseSetRequest, ServerCallContext)

public virtual Task<Operation> UpdatePhraseSet(UpdatePhraseSetRequest request, ServerCallContext context)

Updates the [PhraseSet][google.cloud.speech.v2.PhraseSet].

Parameters
NameDescription
requestUpdatePhraseSetRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

UpdateRecognizer(UpdateRecognizerRequest, ServerCallContext)

public virtual Task<Operation> UpdateRecognizer(UpdateRecognizerRequest request, ServerCallContext context)

Updates the [Recognizer][google.cloud.speech.v2.Recognizer].

Parameters
NameDescription
requestUpdateRecognizerRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).