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

[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
Name Description
request BatchRecognizeRequest

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).

CreateCustomClass(CreateCustomClassRequest, ServerCallContext)

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

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

Parameters
Name Description
request CreateCustomClassRequest

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).

CreatePhraseSet(CreatePhraseSetRequest, ServerCallContext)

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

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

Parameters
Name Description
request CreatePhraseSetRequest

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).

CreateRecognizer(CreateRecognizerRequest, ServerCallContext)

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

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

Parameters
Name Description
request CreateRecognizerRequest

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).

DeleteCustomClass(DeleteCustomClassRequest, ServerCallContext)

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

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

Parameters
Name Description
request DeleteCustomClassRequest

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).

DeletePhraseSet(DeletePhraseSetRequest, ServerCallContext)

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

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

Parameters
Name Description
request DeletePhraseSetRequest

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).

DeleteRecognizer(DeleteRecognizerRequest, ServerCallContext)

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

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

Parameters
Name Description
request DeleteRecognizerRequest

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).

GetConfig(GetConfigRequest, ServerCallContext)

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

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

Parameters
Name Description
request GetConfigRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
Name Description
request GetCustomClassRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
Name Description
request GetPhraseSetRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
Name Description
request GetRecognizerRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
Name Description
request ListCustomClassesRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
Name Description
request ListPhraseSetsRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
Name Description
request ListRecognizersRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
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.

UndeleteCustomClass(UndeleteCustomClassRequest, ServerCallContext)

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

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

Parameters
Name Description
request UndeleteCustomClassRequest

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).

UndeletePhraseSet(UndeletePhraseSetRequest, ServerCallContext)

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

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

Parameters
Name Description
request UndeletePhraseSetRequest

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).

UndeleteRecognizer(UndeleteRecognizerRequest, ServerCallContext)

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

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

Parameters
Name Description
request UndeleteRecognizerRequest

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).

UpdateConfig(UpdateConfigRequest, ServerCallContext)

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

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

Parameters
Name Description
request UpdateConfigRequest

The request received from the client.

context ServerCallContext

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

Returns
Type Description
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
Name Description
request UpdateCustomClassRequest

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).

UpdatePhraseSet(UpdatePhraseSetRequest, ServerCallContext)

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

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

Parameters
Name Description
request UpdatePhraseSetRequest

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).

UpdateRecognizer(UpdateRecognizerRequest, ServerCallContext)

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

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

Parameters
Name Description
request UpdateRecognizerRequest

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).