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

public abstract class SpeechClient

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

Speech client wrapper, for convenient use.

Inheritance

object > SpeechClient

Derived Types

Namespace

Google.Cloud.Speech.V2

Assembly

Google.Cloud.Speech.V2.dll

Remarks

Enables speech transcription and resource management.

Properties

BatchRecognizeOperationsClient

public virtual OperationsClient BatchRecognizeOperationsClient { get; }

The long-running operations client for BatchRecognize.

Property Value
TypeDescription
OperationsClient

CreateCustomClassOperationsClient

public virtual OperationsClient CreateCustomClassOperationsClient { get; }

The long-running operations client for CreateCustomClass.

Property Value
TypeDescription
OperationsClient

CreatePhraseSetOperationsClient

public virtual OperationsClient CreatePhraseSetOperationsClient { get; }

The long-running operations client for CreatePhraseSet.

Property Value
TypeDescription
OperationsClient

CreateRecognizerOperationsClient

public virtual OperationsClient CreateRecognizerOperationsClient { get; }

The long-running operations client for CreateRecognizer.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Speech service, which is a host of "speech.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Speech scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default Speech scopes are:

DeleteCustomClassOperationsClient

public virtual OperationsClient DeleteCustomClassOperationsClient { get; }

The long-running operations client for DeleteCustomClass.

Property Value
TypeDescription
OperationsClient

DeletePhraseSetOperationsClient

public virtual OperationsClient DeletePhraseSetOperationsClient { get; }

The long-running operations client for DeletePhraseSet.

Property Value
TypeDescription
OperationsClient

DeleteRecognizerOperationsClient

public virtual OperationsClient DeleteRecognizerOperationsClient { get; }

The long-running operations client for DeleteRecognizer.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Speech.SpeechClient GrpcClient { get; }

The underlying gRPC Speech client

Property Value
TypeDescription
SpeechSpeechClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UndeleteCustomClassOperationsClient

public virtual OperationsClient UndeleteCustomClassOperationsClient { get; }

The long-running operations client for UndeleteCustomClass.

Property Value
TypeDescription
OperationsClient

UndeletePhraseSetOperationsClient

public virtual OperationsClient UndeletePhraseSetOperationsClient { get; }

The long-running operations client for UndeletePhraseSet.

Property Value
TypeDescription
OperationsClient

UndeleteRecognizerOperationsClient

public virtual OperationsClient UndeleteRecognizerOperationsClient { get; }

The long-running operations client for UndeleteRecognizer.

Property Value
TypeDescription
OperationsClient

UpdateCustomClassOperationsClient

public virtual OperationsClient UpdateCustomClassOperationsClient { get; }

The long-running operations client for UpdateCustomClass.

Property Value
TypeDescription
OperationsClient

UpdatePhraseSetOperationsClient

public virtual OperationsClient UpdatePhraseSetOperationsClient { get; }

The long-running operations client for UpdatePhraseSet.

Property Value
TypeDescription
OperationsClient

UpdateRecognizerOperationsClient

public virtual OperationsClient UpdateRecognizerOperationsClient { get; }

The long-running operations client for UpdateRecognizer.

Property Value
TypeDescription
OperationsClient

Methods

BatchRecognize(BatchRecognizeRequest, CallSettings)

public virtual Operation<BatchRecognizeResponse, OperationMetadata> BatchRecognize(BatchRecognizeRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationBatchRecognizeResponseOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
BatchRecognizeRequest request = new BatchRecognizeRequest
{
    RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    Files =
    {
        new BatchRecognizeFileMetadata(),
    },
    Config = new RecognitionConfig(),
    ConfigMask = new FieldMask(),
    RecognitionOutputConfig = new RecognitionOutputConfig(),
    ProcessingStrategy = BatchRecognizeRequest.Types.ProcessingStrategy.Unspecified,
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = speechClient.BatchRecognize(request);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = speechClient.PollOnceBatchRecognize(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognize(RecognizerName, RecognitionConfig, FieldMask, IEnumerable<BatchRecognizeFileMetadata>, CallSettings)

public virtual Operation<BatchRecognizeResponse, OperationMetadata> BatchRecognize(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, IEnumerable<BatchRecognizeFileMetadata> files, CallSettings callSettings = null)

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
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all given fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

filesIEnumerableBatchRecognizeFileMetadata

Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 5.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationBatchRecognizeResponseOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
IEnumerable<BatchRecognizeFileMetadata> files = new BatchRecognizeFileMetadata[]
{
    new BatchRecognizeFileMetadata(),
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = speechClient.BatchRecognize(recognizer, config, configMask, files);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = speechClient.PollOnceBatchRecognize(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognize(string, RecognitionConfig, FieldMask, IEnumerable<BatchRecognizeFileMetadata>, CallSettings)

public virtual Operation<BatchRecognizeResponse, OperationMetadata> BatchRecognize(string recognizer, RecognitionConfig config, FieldMask configMask, IEnumerable<BatchRecognizeFileMetadata> files, CallSettings callSettings = null)

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
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all given fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

filesIEnumerableBatchRecognizeFileMetadata

Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 5.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationBatchRecognizeResponseOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
IEnumerable<BatchRecognizeFileMetadata> files = new BatchRecognizeFileMetadata[]
{
    new BatchRecognizeFileMetadata(),
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = speechClient.BatchRecognize(recognizer, config, configMask, files);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = speechClient.PollOnceBatchRecognize(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognizeAsync(BatchRecognizeRequest, CallSettings)

public virtual Task<Operation<BatchRecognizeResponse, OperationMetadata>> BatchRecognizeAsync(BatchRecognizeRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationBatchRecognizeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
BatchRecognizeRequest request = new BatchRecognizeRequest
{
    RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    Files =
    {
        new BatchRecognizeFileMetadata(),
    },
    Config = new RecognitionConfig(),
    ConfigMask = new FieldMask(),
    RecognitionOutputConfig = new RecognitionOutputConfig(),
    ProcessingStrategy = BatchRecognizeRequest.Types.ProcessingStrategy.Unspecified,
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = await speechClient.BatchRecognizeAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = await speechClient.PollOnceBatchRecognizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognizeAsync(BatchRecognizeRequest, CancellationToken)

public virtual Task<Operation<BatchRecognizeResponse, OperationMetadata>> BatchRecognizeAsync(BatchRecognizeRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationBatchRecognizeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
BatchRecognizeRequest request = new BatchRecognizeRequest
{
    RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    Files =
    {
        new BatchRecognizeFileMetadata(),
    },
    Config = new RecognitionConfig(),
    ConfigMask = new FieldMask(),
    RecognitionOutputConfig = new RecognitionOutputConfig(),
    ProcessingStrategy = BatchRecognizeRequest.Types.ProcessingStrategy.Unspecified,
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = await speechClient.BatchRecognizeAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = await speechClient.PollOnceBatchRecognizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognizeAsync(RecognizerName, RecognitionConfig, FieldMask, IEnumerable<BatchRecognizeFileMetadata>, CallSettings)

public virtual Task<Operation<BatchRecognizeResponse, OperationMetadata>> BatchRecognizeAsync(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, IEnumerable<BatchRecognizeFileMetadata> files, CallSettings callSettings = null)

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
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all given fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

filesIEnumerableBatchRecognizeFileMetadata

Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 5.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationBatchRecognizeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
IEnumerable<BatchRecognizeFileMetadata> files = new BatchRecognizeFileMetadata[]
{
    new BatchRecognizeFileMetadata(),
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = await speechClient.BatchRecognizeAsync(recognizer, config, configMask, files);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = await speechClient.PollOnceBatchRecognizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognizeAsync(RecognizerName, RecognitionConfig, FieldMask, IEnumerable<BatchRecognizeFileMetadata>, CancellationToken)

public virtual Task<Operation<BatchRecognizeResponse, OperationMetadata>> BatchRecognizeAsync(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, IEnumerable<BatchRecognizeFileMetadata> files, CancellationToken cancellationToken)

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
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all given fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

filesIEnumerableBatchRecognizeFileMetadata

Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 5.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationBatchRecognizeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
IEnumerable<BatchRecognizeFileMetadata> files = new BatchRecognizeFileMetadata[]
{
    new BatchRecognizeFileMetadata(),
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = await speechClient.BatchRecognizeAsync(recognizer, config, configMask, files);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = await speechClient.PollOnceBatchRecognizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognizeAsync(string, RecognitionConfig, FieldMask, IEnumerable<BatchRecognizeFileMetadata>, CallSettings)

public virtual Task<Operation<BatchRecognizeResponse, OperationMetadata>> BatchRecognizeAsync(string recognizer, RecognitionConfig config, FieldMask configMask, IEnumerable<BatchRecognizeFileMetadata> files, CallSettings callSettings = null)

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
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all given fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

filesIEnumerableBatchRecognizeFileMetadata

Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 5.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationBatchRecognizeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
IEnumerable<BatchRecognizeFileMetadata> files = new BatchRecognizeFileMetadata[]
{
    new BatchRecognizeFileMetadata(),
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = await speechClient.BatchRecognizeAsync(recognizer, config, configMask, files);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = await speechClient.PollOnceBatchRecognizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

BatchRecognizeAsync(string, RecognitionConfig, FieldMask, IEnumerable<BatchRecognizeFileMetadata>, CancellationToken)

public virtual Task<Operation<BatchRecognizeResponse, OperationMetadata>> BatchRecognizeAsync(string recognizer, RecognitionConfig config, FieldMask configMask, IEnumerable<BatchRecognizeFileMetadata> files, CancellationToken cancellationToken)

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
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all given fields in [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

filesIEnumerableBatchRecognizeFileMetadata

Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 5.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationBatchRecognizeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
IEnumerable<BatchRecognizeFileMetadata> files = new BatchRecognizeFileMetadata[]
{
    new BatchRecognizeFileMetadata(),
};
// Make the request
Operation<BatchRecognizeResponse, OperationMetadata> response = await speechClient.BatchRecognizeAsync(recognizer, config, configMask, files);

// Poll until the returned long-running operation is complete
Operation<BatchRecognizeResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRecognizeResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRecognizeResponse, OperationMetadata> retrievedResponse = await speechClient.PollOnceBatchRecognizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRecognizeResponse retrievedResult = retrievedResponse.Result;
}

Create()

public static SpeechClient Create()

Synchronously creates a SpeechClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SpeechClientBuilder.

Returns
TypeDescription
SpeechClient

The created SpeechClient.

CreateAsync(CancellationToken)

public static Task<SpeechClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a SpeechClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SpeechClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskSpeechClient

The task representing the created SpeechClient.

CreateCustomClass(LocationName, CustomClass, string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> CreateCustomClass(LocationName parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this CustomClass will be created. The expected format is projects/{project}/locations/{location}.

customClassCustomClass

Required. The CustomClass to create.

customClassIdstring

The ID to use for the CustomClass, which will become the final component of the CustomClass's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.CreateCustomClass(parent, customClass, customClassId);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceCreateCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClass(CreateCustomClassRequest, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> CreateCustomClass(CreateCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
    CustomClass = new CustomClass(),
    ValidateOnly = false,
    CustomClassId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.CreateCustomClass(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceCreateCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClass(string, CustomClass, string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> CreateCustomClass(string parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. The project and location where this CustomClass will be created. The expected format is projects/{project}/locations/{location}.

customClassCustomClass

Required. The CustomClass to create.

customClassIdstring

The ID to use for the CustomClass, which will become the final component of the CustomClass's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.CreateCustomClass(parent, customClass, customClassId);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceCreateCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClassAsync(LocationName, CustomClass, string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> CreateCustomClassAsync(LocationName parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this CustomClass will be created. The expected format is projects/{project}/locations/{location}.

customClassCustomClass

Required. The CustomClass to create.

customClassIdstring

The ID to use for the CustomClass, which will become the final component of the CustomClass's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.CreateCustomClassAsync(parent, customClass, customClassId);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClassAsync(LocationName, CustomClass, string, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> CreateCustomClassAsync(LocationName parent, CustomClass customClass, string customClassId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this CustomClass will be created. The expected format is projects/{project}/locations/{location}.

customClassCustomClass

Required. The CustomClass to create.

customClassIdstring

The ID to use for the CustomClass, which will become the final component of the CustomClass's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.CreateCustomClassAsync(parent, customClass, customClassId);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClassAsync(CreateCustomClassRequest, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> CreateCustomClassAsync(CreateCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
    CustomClass = new CustomClass(),
    ValidateOnly = false,
    CustomClassId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.CreateCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClassAsync(CreateCustomClassRequest, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> CreateCustomClassAsync(CreateCustomClassRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestCreateCustomClassRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
    CustomClass = new CustomClass(),
    ValidateOnly = false,
    CustomClassId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.CreateCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClassAsync(string, CustomClass, string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> CreateCustomClassAsync(string parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. The project and location where this CustomClass will be created. The expected format is projects/{project}/locations/{location}.

customClassCustomClass

Required. The CustomClass to create.

customClassIdstring

The ID to use for the CustomClass, which will become the final component of the CustomClass's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.CreateCustomClassAsync(parent, customClass, customClassId);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreateCustomClassAsync(string, CustomClass, string, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> CreateCustomClassAsync(string parent, CustomClass customClass, string customClassId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentstring

Required. The project and location where this CustomClass will be created. The expected format is projects/{project}/locations/{location}.

customClassCustomClass

Required. The CustomClass to create.

customClassIdstring

The ID to use for the CustomClass, which will become the final component of the CustomClass's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.CreateCustomClassAsync(parent, customClass, customClassId);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

CreatePhraseSet(LocationName, PhraseSet, string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> CreatePhraseSet(LocationName parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this PhraseSet will be created. The expected format is projects/{project}/locations/{location}.

phraseSetPhraseSet

Required. The PhraseSet to create.

phraseSetIdstring

The ID to use for the PhraseSet, which will become the final component of the PhraseSet's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.CreatePhraseSet(parent, phraseSet, phraseSetId);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceCreatePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSet(CreatePhraseSetRequest, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> CreatePhraseSet(CreatePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreatePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
CreatePhraseSetRequest request = new CreatePhraseSetRequest
{
    PhraseSet = new PhraseSet(),
    ValidateOnly = false,
    PhraseSetId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.CreatePhraseSet(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceCreatePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSet(string, PhraseSet, string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> CreatePhraseSet(string parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. The project and location where this PhraseSet will be created. The expected format is projects/{project}/locations/{location}.

phraseSetPhraseSet

Required. The PhraseSet to create.

phraseSetIdstring

The ID to use for the PhraseSet, which will become the final component of the PhraseSet's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.CreatePhraseSet(parent, phraseSet, phraseSetId);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceCreatePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSetAsync(LocationName, PhraseSet, string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> CreatePhraseSetAsync(LocationName parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this PhraseSet will be created. The expected format is projects/{project}/locations/{location}.

phraseSetPhraseSet

Required. The PhraseSet to create.

phraseSetIdstring

The ID to use for the PhraseSet, which will become the final component of the PhraseSet's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSetAsync(LocationName, PhraseSet, string, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> CreatePhraseSetAsync(LocationName parent, PhraseSet phraseSet, string phraseSetId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this PhraseSet will be created. The expected format is projects/{project}/locations/{location}.

phraseSetPhraseSet

Required. The PhraseSet to create.

phraseSetIdstring

The ID to use for the PhraseSet, which will become the final component of the PhraseSet's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSetAsync(CreatePhraseSetRequest, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> CreatePhraseSetAsync(CreatePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreatePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CreatePhraseSetRequest request = new CreatePhraseSetRequest
{
    PhraseSet = new PhraseSet(),
    ValidateOnly = false,
    PhraseSetId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.CreatePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSetAsync(CreatePhraseSetRequest, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> CreatePhraseSetAsync(CreatePhraseSetRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestCreatePhraseSetRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CreatePhraseSetRequest request = new CreatePhraseSetRequest
{
    PhraseSet = new PhraseSet(),
    ValidateOnly = false,
    PhraseSetId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.CreatePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSetAsync(string, PhraseSet, string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> CreatePhraseSetAsync(string parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. The project and location where this PhraseSet will be created. The expected format is projects/{project}/locations/{location}.

phraseSetPhraseSet

Required. The PhraseSet to create.

phraseSetIdstring

The ID to use for the PhraseSet, which will become the final component of the PhraseSet's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreatePhraseSetAsync(string, PhraseSet, string, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> CreatePhraseSetAsync(string parent, PhraseSet phraseSet, string phraseSetId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentstring

Required. The project and location where this PhraseSet will be created. The expected format is projects/{project}/locations/{location}.

phraseSetPhraseSet

Required. The PhraseSet to create.

phraseSetIdstring

The ID to use for the PhraseSet, which will become the final component of the PhraseSet's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

CreateRecognizer(LocationName, Recognizer, string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> CreateRecognizer(LocationName parent, Recognizer recognizer, string recognizerId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this Recognizer will be created. The expected format is projects/{project}/locations/{location}.

recognizerRecognizer

Required. The Recognizer to create.

recognizerIdstring

The ID to use for the Recognizer, which will become the final component of the Recognizer's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Recognizer recognizer = new Recognizer();
string recognizerId = "";
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.CreateRecognizer(parent, recognizer, recognizerId);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceCreateRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizer(CreateRecognizerRequest, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> CreateRecognizer(CreateRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
CreateRecognizerRequest request = new CreateRecognizerRequest
{
    Recognizer = new Recognizer(),
    ValidateOnly = false,
    RecognizerId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.CreateRecognizer(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceCreateRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizer(string, Recognizer, string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> CreateRecognizer(string parent, Recognizer recognizer, string recognizerId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. The project and location where this Recognizer will be created. The expected format is projects/{project}/locations/{location}.

recognizerRecognizer

Required. The Recognizer to create.

recognizerIdstring

The ID to use for the Recognizer, which will become the final component of the Recognizer's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Recognizer recognizer = new Recognizer();
string recognizerId = "";
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.CreateRecognizer(parent, recognizer, recognizerId);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceCreateRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizerAsync(LocationName, Recognizer, string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> CreateRecognizerAsync(LocationName parent, Recognizer recognizer, string recognizerId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this Recognizer will be created. The expected format is projects/{project}/locations/{location}.

recognizerRecognizer

Required. The Recognizer to create.

recognizerIdstring

The ID to use for the Recognizer, which will become the final component of the Recognizer's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Recognizer recognizer = new Recognizer();
string recognizerId = "";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.CreateRecognizerAsync(parent, recognizer, recognizerId);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizerAsync(LocationName, Recognizer, string, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> CreateRecognizerAsync(LocationName parent, Recognizer recognizer, string recognizerId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentLocationName

Required. The project and location where this Recognizer will be created. The expected format is projects/{project}/locations/{location}.

recognizerRecognizer

Required. The Recognizer to create.

recognizerIdstring

The ID to use for the Recognizer, which will become the final component of the Recognizer's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Recognizer recognizer = new Recognizer();
string recognizerId = "";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.CreateRecognizerAsync(parent, recognizer, recognizerId);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizerAsync(CreateRecognizerRequest, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> CreateRecognizerAsync(CreateRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CreateRecognizerRequest request = new CreateRecognizerRequest
{
    Recognizer = new Recognizer(),
    ValidateOnly = false,
    RecognizerId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.CreateRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizerAsync(CreateRecognizerRequest, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> CreateRecognizerAsync(CreateRecognizerRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestCreateRecognizerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CreateRecognizerRequest request = new CreateRecognizerRequest
{
    Recognizer = new Recognizer(),
    ValidateOnly = false,
    RecognizerId = "",
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.CreateRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizerAsync(string, Recognizer, string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> CreateRecognizerAsync(string parent, Recognizer recognizer, string recognizerId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. The project and location where this Recognizer will be created. The expected format is projects/{project}/locations/{location}.

recognizerRecognizer

Required. The Recognizer to create.

recognizerIdstring

The ID to use for the Recognizer, which will become the final component of the Recognizer's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Recognizer recognizer = new Recognizer();
string recognizerId = "";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.CreateRecognizerAsync(parent, recognizer, recognizerId);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

CreateRecognizerAsync(string, Recognizer, string, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> CreateRecognizerAsync(string parent, Recognizer recognizer, string recognizerId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentstring

Required. The project and location where this Recognizer will be created. The expected format is projects/{project}/locations/{location}.

recognizerRecognizer

Required. The Recognizer to create.

recognizerIdstring

The ID to use for the Recognizer, which will become the final component of the Recognizer's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Recognizer recognizer = new Recognizer();
string recognizerId = "";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.CreateRecognizerAsync(parent, recognizer, recognizerId);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceCreateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteCustomClass(CustomClassName, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> DeleteCustomClass(CustomClassName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to delete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.DeleteCustomClass(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceDeleteCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClass(DeleteCustomClassRequest, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> DeleteCustomClass(DeleteCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
DeleteCustomClassRequest request = new DeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.DeleteCustomClass(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceDeleteCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClass(string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> DeleteCustomClass(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to delete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.DeleteCustomClass(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceDeleteCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClassAsync(CustomClassName, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> DeleteCustomClassAsync(CustomClassName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to delete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.DeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClassAsync(CustomClassName, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> DeleteCustomClassAsync(CustomClassName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to delete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.DeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClassAsync(DeleteCustomClassRequest, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> DeleteCustomClassAsync(DeleteCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
DeleteCustomClassRequest request = new DeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.DeleteCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClassAsync(DeleteCustomClassRequest, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> DeleteCustomClassAsync(DeleteCustomClassRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestDeleteCustomClassRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
DeleteCustomClassRequest request = new DeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.DeleteCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClassAsync(string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> DeleteCustomClassAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to delete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.DeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeleteCustomClassAsync(string, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> DeleteCustomClassAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to delete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.DeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

DeletePhraseSet(DeletePhraseSetRequest, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> DeletePhraseSet(DeletePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeletePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
DeletePhraseSetRequest request = new DeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.DeletePhraseSet(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceDeletePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSet(PhraseSetName, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> DeletePhraseSet(PhraseSetName name, CallSettings callSettings = null)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to delete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.DeletePhraseSet(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceDeletePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSet(string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> DeletePhraseSet(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to delete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.DeletePhraseSet(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceDeletePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSetAsync(DeletePhraseSetRequest, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> DeletePhraseSetAsync(DeletePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeletePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
DeletePhraseSetRequest request = new DeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.DeletePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSetAsync(DeletePhraseSetRequest, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> DeletePhraseSetAsync(DeletePhraseSetRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestDeletePhraseSetRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
DeletePhraseSetRequest request = new DeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.DeletePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSetAsync(PhraseSetName, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> DeletePhraseSetAsync(PhraseSetName name, CallSettings callSettings = null)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to delete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.DeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSetAsync(PhraseSetName, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> DeletePhraseSetAsync(PhraseSetName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to delete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.DeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSetAsync(string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> DeletePhraseSetAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to delete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.DeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeletePhraseSetAsync(string, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> DeletePhraseSetAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to delete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.DeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

DeleteRecognizer(DeleteRecognizerRequest, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> DeleteRecognizer(DeleteRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
DeleteRecognizerRequest request = new DeleteRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.DeleteRecognizer(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceDeleteRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizer(RecognizerName, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> DeleteRecognizer(RecognizerName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameRecognizerName

Required. The name of the Recognizer to delete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.DeleteRecognizer(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceDeleteRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizer(string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> DeleteRecognizer(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the Recognizer to delete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.DeleteRecognizer(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceDeleteRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizerAsync(DeleteRecognizerRequest, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> DeleteRecognizerAsync(DeleteRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
DeleteRecognizerRequest request = new DeleteRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.DeleteRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizerAsync(DeleteRecognizerRequest, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> DeleteRecognizerAsync(DeleteRecognizerRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestDeleteRecognizerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
DeleteRecognizerRequest request = new DeleteRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    ValidateOnly = false,
    Etag = "",
    AllowMissing = false,
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.DeleteRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizerAsync(RecognizerName, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> DeleteRecognizerAsync(RecognizerName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameRecognizerName

Required. The name of the Recognizer to delete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.DeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizerAsync(RecognizerName, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> DeleteRecognizerAsync(RecognizerName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameRecognizerName

Required. The name of the Recognizer to delete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.DeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizerAsync(string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> DeleteRecognizerAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the Recognizer to delete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.DeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

DeleteRecognizerAsync(string, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> DeleteRecognizerAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the Recognizer to delete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.DeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceDeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

GetConfig(ConfigName, CallSettings)

public virtual Config GetConfig(ConfigName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameConfigName

Required. The name of the config to retrieve. There is exactly one config resource per project per location. The expected format is projects/{project}/locations/{location}/config.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Config

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
ConfigName name = ConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
Config response = speechClient.GetConfig(name);

GetConfig(GetConfigRequest, CallSettings)

public virtual Config GetConfig(GetConfigRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Config

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
GetConfigRequest request = new GetConfigRequest
{
    ConfigName = ConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Config response = speechClient.GetConfig(request);

GetConfig(string, CallSettings)

public virtual Config GetConfig(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the config to retrieve. There is exactly one config resource per project per location. The expected format is projects/{project}/locations/{location}/config.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Config

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/config";
// Make the request
Config response = speechClient.GetConfig(name);

GetConfigAsync(ConfigName, CallSettings)

public virtual Task<Config> GetConfigAsync(ConfigName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameConfigName

Required. The name of the config to retrieve. There is exactly one config resource per project per location. The expected format is projects/{project}/locations/{location}/config.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
ConfigName name = ConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
Config response = await speechClient.GetConfigAsync(name);

GetConfigAsync(ConfigName, CancellationToken)

public virtual Task<Config> GetConfigAsync(ConfigName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameConfigName

Required. The name of the config to retrieve. There is exactly one config resource per project per location. The expected format is projects/{project}/locations/{location}/config.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
ConfigName name = ConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
Config response = await speechClient.GetConfigAsync(name);

GetConfigAsync(GetConfigRequest, CallSettings)

public virtual Task<Config> GetConfigAsync(GetConfigRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetConfigRequest request = new GetConfigRequest
{
    ConfigName = ConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Config response = await speechClient.GetConfigAsync(request);

GetConfigAsync(GetConfigRequest, CancellationToken)

public virtual Task<Config> GetConfigAsync(GetConfigRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetConfigRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetConfigRequest request = new GetConfigRequest
{
    ConfigName = ConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
Config response = await speechClient.GetConfigAsync(request);

GetConfigAsync(string, CallSettings)

public virtual Task<Config> GetConfigAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the config to retrieve. There is exactly one config resource per project per location. The expected format is projects/{project}/locations/{location}/config.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/config";
// Make the request
Config response = await speechClient.GetConfigAsync(name);

GetConfigAsync(string, CancellationToken)

public virtual Task<Config> GetConfigAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the config to retrieve. There is exactly one config resource per project per location. The expected format is projects/{project}/locations/{location}/config.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/config";
// Make the request
Config response = await speechClient.GetConfigAsync(name);

GetCustomClass(CustomClassName, CallSettings)

public virtual CustomClass GetCustomClass(CustomClassName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to retrieve. The expected format is projects/{project}/locations/{location}/customClasses/{custom_class}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
CustomClass response = speechClient.GetCustomClass(name);

GetCustomClass(GetCustomClassRequest, CallSettings)

public virtual CustomClass GetCustomClass(GetCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
GetCustomClassRequest request = new GetCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
CustomClass response = speechClient.GetCustomClass(request);

GetCustomClass(string, CallSettings)

public virtual CustomClass GetCustomClass(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to retrieve. The expected format is projects/{project}/locations/{location}/customClasses/{custom_class}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
CustomClass response = speechClient.GetCustomClass(name);

GetCustomClassAsync(CustomClassName, CallSettings)

public virtual Task<CustomClass> GetCustomClassAsync(CustomClassName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to retrieve. The expected format is projects/{project}/locations/{location}/customClasses/{custom_class}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
CustomClass response = await speechClient.GetCustomClassAsync(name);

GetCustomClassAsync(CustomClassName, CancellationToken)

public virtual Task<CustomClass> GetCustomClassAsync(CustomClassName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to retrieve. The expected format is projects/{project}/locations/{location}/customClasses/{custom_class}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
CustomClass response = await speechClient.GetCustomClassAsync(name);

GetCustomClassAsync(GetCustomClassRequest, CallSettings)

public virtual Task<CustomClass> GetCustomClassAsync(GetCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetCustomClassRequest request = new GetCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
CustomClass response = await speechClient.GetCustomClassAsync(request);

GetCustomClassAsync(GetCustomClassRequest, CancellationToken)

public virtual Task<CustomClass> GetCustomClassAsync(GetCustomClassRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetCustomClassRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetCustomClassRequest request = new GetCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
CustomClass response = await speechClient.GetCustomClassAsync(request);

GetCustomClassAsync(string, CallSettings)

public virtual Task<CustomClass> GetCustomClassAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to retrieve. The expected format is projects/{project}/locations/{location}/customClasses/{custom_class}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
CustomClass response = await speechClient.GetCustomClassAsync(name);

GetCustomClassAsync(string, CancellationToken)

public virtual Task<CustomClass> GetCustomClassAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to retrieve. The expected format is projects/{project}/locations/{location}/customClasses/{custom_class}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
CustomClass response = await speechClient.GetCustomClassAsync(name);

GetPhraseSet(GetPhraseSetRequest, CallSettings)

public virtual PhraseSet GetPhraseSet(GetPhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetPhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PhraseSet

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
GetPhraseSetRequest request = new GetPhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
};
// Make the request
PhraseSet response = speechClient.GetPhraseSet(request);

GetPhraseSet(PhraseSetName, CallSettings)

public virtual PhraseSet GetPhraseSet(PhraseSetName name, CallSettings callSettings = null)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to retrieve. The expected format is projects/{project}/locations/{location}/phraseSets/{phrase_set}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PhraseSet

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
PhraseSet response = speechClient.GetPhraseSet(name);

GetPhraseSet(string, CallSettings)

public virtual PhraseSet GetPhraseSet(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to retrieve. The expected format is projects/{project}/locations/{location}/phraseSets/{phrase_set}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PhraseSet

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
PhraseSet response = speechClient.GetPhraseSet(name);

GetPhraseSetAsync(GetPhraseSetRequest, CallSettings)

public virtual Task<PhraseSet> GetPhraseSetAsync(GetPhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetPhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetPhraseSetRequest request = new GetPhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
};
// Make the request
PhraseSet response = await speechClient.GetPhraseSetAsync(request);

GetPhraseSetAsync(GetPhraseSetRequest, CancellationToken)

public virtual Task<PhraseSet> GetPhraseSetAsync(GetPhraseSetRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetPhraseSetRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetPhraseSetRequest request = new GetPhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
};
// Make the request
PhraseSet response = await speechClient.GetPhraseSetAsync(request);

GetPhraseSetAsync(PhraseSetName, CallSettings)

public virtual Task<PhraseSet> GetPhraseSetAsync(PhraseSetName name, CallSettings callSettings = null)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to retrieve. The expected format is projects/{project}/locations/{location}/phraseSets/{phrase_set}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
PhraseSet response = await speechClient.GetPhraseSetAsync(name);

GetPhraseSetAsync(PhraseSetName, CancellationToken)

public virtual Task<PhraseSet> GetPhraseSetAsync(PhraseSetName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to retrieve. The expected format is projects/{project}/locations/{location}/phraseSets/{phrase_set}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
PhraseSet response = await speechClient.GetPhraseSetAsync(name);

GetPhraseSetAsync(string, CallSettings)

public virtual Task<PhraseSet> GetPhraseSetAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to retrieve. The expected format is projects/{project}/locations/{location}/phraseSets/{phrase_set}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
PhraseSet response = await speechClient.GetPhraseSetAsync(name);

GetPhraseSetAsync(string, CancellationToken)

public virtual Task<PhraseSet> GetPhraseSetAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to retrieve. The expected format is projects/{project}/locations/{location}/phraseSets/{phrase_set}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
PhraseSet response = await speechClient.GetPhraseSetAsync(name);

GetRecognizer(GetRecognizerRequest, CallSettings)

public virtual Recognizer GetRecognizer(GetRecognizerRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recognizer

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
GetRecognizerRequest request = new GetRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
};
// Make the request
Recognizer response = speechClient.GetRecognizer(request);

GetRecognizer(RecognizerName, CallSettings)

public virtual Recognizer GetRecognizer(RecognizerName name, CallSettings callSettings = null)

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
nameRecognizerName

Required. The name of the Recognizer to retrieve. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recognizer

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Recognizer response = speechClient.GetRecognizer(name);

GetRecognizer(string, CallSettings)

public virtual Recognizer GetRecognizer(string name, CallSettings callSettings = null)

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
namestring

Required. The name of the Recognizer to retrieve. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recognizer

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Recognizer response = speechClient.GetRecognizer(name);

GetRecognizerAsync(GetRecognizerRequest, CallSettings)

public virtual Task<Recognizer> GetRecognizerAsync(GetRecognizerRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizer

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetRecognizerRequest request = new GetRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
};
// Make the request
Recognizer response = await speechClient.GetRecognizerAsync(request);

GetRecognizerAsync(GetRecognizerRequest, CancellationToken)

public virtual Task<Recognizer> GetRecognizerAsync(GetRecognizerRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizer

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
GetRecognizerRequest request = new GetRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
};
// Make the request
Recognizer response = await speechClient.GetRecognizerAsync(request);

GetRecognizerAsync(RecognizerName, CallSettings)

public virtual Task<Recognizer> GetRecognizerAsync(RecognizerName name, CallSettings callSettings = null)

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
nameRecognizerName

Required. The name of the Recognizer to retrieve. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizer

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Recognizer response = await speechClient.GetRecognizerAsync(name);

GetRecognizerAsync(RecognizerName, CancellationToken)

public virtual Task<Recognizer> GetRecognizerAsync(RecognizerName name, CancellationToken cancellationToken)

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
nameRecognizerName

Required. The name of the Recognizer to retrieve. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizer

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Recognizer response = await speechClient.GetRecognizerAsync(name);

GetRecognizerAsync(string, CallSettings)

public virtual Task<Recognizer> GetRecognizerAsync(string name, CallSettings callSettings = null)

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
namestring

Required. The name of the Recognizer to retrieve. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizer

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Recognizer response = await speechClient.GetRecognizerAsync(name);

GetRecognizerAsync(string, CancellationToken)

public virtual Task<Recognizer> GetRecognizerAsync(string name, CancellationToken cancellationToken)

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
namestring

Required. The name of the Recognizer to retrieve. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizer

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Recognizer response = await speechClient.GetRecognizerAsync(name);

ListCustomClasses(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListCustomClassesResponse, CustomClass> ListCustomClasses(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists CustomClasses.

Parameters
NameDescription
parentLocationName

Required. The project and location of CustomClass resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListCustomClassesResponseCustomClass

A pageable sequence of CustomClass resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListCustomClassesResponse, CustomClass> response = speechClient.ListCustomClasses(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (CustomClass item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListCustomClassesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (CustomClass item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<CustomClass> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (CustomClass item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCustomClasses(ListCustomClassesRequest, CallSettings)

public virtual PagedEnumerable<ListCustomClassesResponse, CustomClass> ListCustomClasses(ListCustomClassesRequest request, CallSettings callSettings = null)

Lists CustomClasses.

Parameters
NameDescription
requestListCustomClassesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListCustomClassesResponseCustomClass

A pageable sequence of CustomClass resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
ListCustomClassesRequest request = new ListCustomClassesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedEnumerable<ListCustomClassesResponse, CustomClass> response = speechClient.ListCustomClasses(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (CustomClass item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListCustomClassesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (CustomClass item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<CustomClass> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (CustomClass item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCustomClasses(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListCustomClassesResponse, CustomClass> ListCustomClasses(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists CustomClasses.

Parameters
NameDescription
parentstring

Required. The project and location of CustomClass resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListCustomClassesResponseCustomClass

A pageable sequence of CustomClass resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListCustomClassesResponse, CustomClass> response = speechClient.ListCustomClasses(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (CustomClass item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListCustomClassesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (CustomClass item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<CustomClass> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (CustomClass item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCustomClassesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListCustomClassesResponse, CustomClass> ListCustomClassesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists CustomClasses.

Parameters
NameDescription
parentLocationName

Required. The project and location of CustomClass resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListCustomClassesResponseCustomClass

A pageable asynchronous sequence of CustomClass resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListCustomClassesResponse, CustomClass> response = speechClient.ListCustomClassesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((CustomClass item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListCustomClassesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (CustomClass item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<CustomClass> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (CustomClass item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCustomClassesAsync(ListCustomClassesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListCustomClassesResponse, CustomClass> ListCustomClassesAsync(ListCustomClassesRequest request, CallSettings callSettings = null)

Lists CustomClasses.

Parameters
NameDescription
requestListCustomClassesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListCustomClassesResponseCustomClass

A pageable asynchronous sequence of CustomClass resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
ListCustomClassesRequest request = new ListCustomClassesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedAsyncEnumerable<ListCustomClassesResponse, CustomClass> response = speechClient.ListCustomClassesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((CustomClass item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListCustomClassesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (CustomClass item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<CustomClass> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (CustomClass item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCustomClassesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListCustomClassesResponse, CustomClass> ListCustomClassesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists CustomClasses.

Parameters
NameDescription
parentstring

Required. The project and location of CustomClass resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListCustomClassesResponseCustomClass

A pageable asynchronous sequence of CustomClass resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListCustomClassesResponse, CustomClass> response = speechClient.ListCustomClassesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((CustomClass item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListCustomClassesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (CustomClass item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<CustomClass> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (CustomClass item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPhraseSets(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListPhraseSetsResponse, PhraseSet> ListPhraseSets(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists PhraseSets.

Parameters
NameDescription
parentLocationName

Required. The project and location of PhraseSet resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPhraseSetsResponsePhraseSet

A pageable sequence of PhraseSet resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListPhraseSetsResponse, PhraseSet> response = speechClient.ListPhraseSets(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (PhraseSet item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPhraseSetsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PhraseSet item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PhraseSet> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PhraseSet item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPhraseSets(ListPhraseSetsRequest, CallSettings)

public virtual PagedEnumerable<ListPhraseSetsResponse, PhraseSet> ListPhraseSets(ListPhraseSetsRequest request, CallSettings callSettings = null)

Lists PhraseSets.

Parameters
NameDescription
requestListPhraseSetsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPhraseSetsResponsePhraseSet

A pageable sequence of PhraseSet resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
ListPhraseSetsRequest request = new ListPhraseSetsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedEnumerable<ListPhraseSetsResponse, PhraseSet> response = speechClient.ListPhraseSets(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (PhraseSet item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPhraseSetsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PhraseSet item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PhraseSet> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PhraseSet item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPhraseSets(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListPhraseSetsResponse, PhraseSet> ListPhraseSets(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists PhraseSets.

Parameters
NameDescription
parentstring

Required. The project and location of PhraseSet resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPhraseSetsResponsePhraseSet

A pageable sequence of PhraseSet resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListPhraseSetsResponse, PhraseSet> response = speechClient.ListPhraseSets(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (PhraseSet item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPhraseSetsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PhraseSet item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PhraseSet> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PhraseSet item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPhraseSetsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListPhraseSetsResponse, PhraseSet> ListPhraseSetsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists PhraseSets.

Parameters
NameDescription
parentLocationName

Required. The project and location of PhraseSet resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPhraseSetsResponsePhraseSet

A pageable asynchronous sequence of PhraseSet resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListPhraseSetsResponse, PhraseSet> response = speechClient.ListPhraseSetsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PhraseSet item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPhraseSetsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PhraseSet item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PhraseSet> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PhraseSet item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPhraseSetsAsync(ListPhraseSetsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListPhraseSetsResponse, PhraseSet> ListPhraseSetsAsync(ListPhraseSetsRequest request, CallSettings callSettings = null)

Lists PhraseSets.

Parameters
NameDescription
requestListPhraseSetsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPhraseSetsResponsePhraseSet

A pageable asynchronous sequence of PhraseSet resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
ListPhraseSetsRequest request = new ListPhraseSetsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedAsyncEnumerable<ListPhraseSetsResponse, PhraseSet> response = speechClient.ListPhraseSetsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PhraseSet item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPhraseSetsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PhraseSet item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PhraseSet> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PhraseSet item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPhraseSetsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListPhraseSetsResponse, PhraseSet> ListPhraseSetsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists PhraseSets.

Parameters
NameDescription
parentstring

Required. The project and location of PhraseSet resources to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPhraseSetsResponsePhraseSet

A pageable asynchronous sequence of PhraseSet resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListPhraseSetsResponse, PhraseSet> response = speechClient.ListPhraseSetsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PhraseSet item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPhraseSetsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PhraseSet item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PhraseSet> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PhraseSet item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRecognizers(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListRecognizersResponse, Recognizer> ListRecognizers(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Recognizers.

Parameters
NameDescription
parentLocationName

Required. The project and location of Recognizers to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecognizersResponseRecognizer

A pageable sequence of Recognizer resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListRecognizersResponse, Recognizer> response = speechClient.ListRecognizers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Recognizer item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRecognizersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Recognizer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Recognizer> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Recognizer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRecognizers(ListRecognizersRequest, CallSettings)

public virtual PagedEnumerable<ListRecognizersResponse, Recognizer> ListRecognizers(ListRecognizersRequest request, CallSettings callSettings = null)

Lists Recognizers.

Parameters
NameDescription
requestListRecognizersRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecognizersResponseRecognizer

A pageable sequence of Recognizer resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
ListRecognizersRequest request = new ListRecognizersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedEnumerable<ListRecognizersResponse, Recognizer> response = speechClient.ListRecognizers(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Recognizer item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRecognizersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Recognizer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Recognizer> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Recognizer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRecognizers(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListRecognizersResponse, Recognizer> ListRecognizers(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Recognizers.

Parameters
NameDescription
parentstring

Required. The project and location of Recognizers to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecognizersResponseRecognizer

A pageable sequence of Recognizer resources.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListRecognizersResponse, Recognizer> response = speechClient.ListRecognizers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Recognizer item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRecognizersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Recognizer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Recognizer> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Recognizer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRecognizersAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRecognizersResponse, Recognizer> ListRecognizersAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Recognizers.

Parameters
NameDescription
parentLocationName

Required. The project and location of Recognizers to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecognizersResponseRecognizer

A pageable asynchronous sequence of Recognizer resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListRecognizersResponse, Recognizer> response = speechClient.ListRecognizersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recognizer item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRecognizersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Recognizer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Recognizer> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Recognizer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRecognizersAsync(ListRecognizersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListRecognizersResponse, Recognizer> ListRecognizersAsync(ListRecognizersRequest request, CallSettings callSettings = null)

Lists Recognizers.

Parameters
NameDescription
requestListRecognizersRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecognizersResponseRecognizer

A pageable asynchronous sequence of Recognizer resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
ListRecognizersRequest request = new ListRecognizersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedAsyncEnumerable<ListRecognizersResponse, Recognizer> response = speechClient.ListRecognizersAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recognizer item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRecognizersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Recognizer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Recognizer> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Recognizer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRecognizersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRecognizersResponse, Recognizer> ListRecognizersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Recognizers.

Parameters
NameDescription
parentstring

Required. The project and location of Recognizers to list. The expected format is projects/{project}/locations/{location}.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecognizersResponseRecognizer

A pageable asynchronous sequence of Recognizer resources.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListRecognizersResponse, Recognizer> response = speechClient.ListRecognizersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recognizer item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRecognizersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Recognizer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Recognizer> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Recognizer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceBatchRecognize(string, CallSettings)

public virtual Operation<BatchRecognizeResponse, OperationMetadata> PollOnceBatchRecognize(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of BatchRecognize.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationBatchRecognizeResponseOperationMetadata

The result of polling the operation.

PollOnceBatchRecognizeAsync(string, CallSettings)

public virtual Task<Operation<BatchRecognizeResponse, OperationMetadata>> PollOnceBatchRecognizeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of BatchRecognize.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationBatchRecognizeResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateCustomClass(string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> PollOnceCreateCustomClass(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateCustomClass .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The result of polling the operation.

PollOnceCreateCustomClassAsync(string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> PollOnceCreateCustomClassAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateCustomClass.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A task representing the result of polling the operation.

PollOnceCreatePhraseSet(string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> PollOnceCreatePhraseSet(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreatePhraseSet.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The result of polling the operation.

PollOnceCreatePhraseSetAsync(string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> PollOnceCreatePhraseSetAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreatePhraseSet.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateRecognizer(string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> PollOnceCreateRecognizer(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateRecognizer.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The result of polling the operation.

PollOnceCreateRecognizerAsync(string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> PollOnceCreateRecognizerAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateRecognizer.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteCustomClass(string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> PollOnceDeleteCustomClass(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteCustomClass .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The result of polling the operation.

PollOnceDeleteCustomClassAsync(string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> PollOnceDeleteCustomClassAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteCustomClass.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A task representing the result of polling the operation.

PollOnceDeletePhraseSet(string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> PollOnceDeletePhraseSet(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeletePhraseSet.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The result of polling the operation.

PollOnceDeletePhraseSetAsync(string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> PollOnceDeletePhraseSetAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeletePhraseSet.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteRecognizer(string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> PollOnceDeleteRecognizer(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteRecognizer.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The result of polling the operation.

PollOnceDeleteRecognizerAsync(string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> PollOnceDeleteRecognizerAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteRecognizer.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A task representing the result of polling the operation.

PollOnceUndeleteCustomClass(string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> PollOnceUndeleteCustomClass(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UndeleteCustomClass .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The result of polling the operation.

PollOnceUndeleteCustomClassAsync(string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> PollOnceUndeleteCustomClassAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UndeleteCustomClass.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A task representing the result of polling the operation.

PollOnceUndeletePhraseSet(string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> PollOnceUndeletePhraseSet(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UndeletePhraseSet .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The result of polling the operation.

PollOnceUndeletePhraseSetAsync(string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> PollOnceUndeletePhraseSetAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UndeletePhraseSet.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A task representing the result of polling the operation.

PollOnceUndeleteRecognizer(string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> PollOnceUndeleteRecognizer(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UndeleteRecognizer .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The result of polling the operation.

PollOnceUndeleteRecognizerAsync(string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> PollOnceUndeleteRecognizerAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UndeleteRecognizer.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateCustomClass(string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> PollOnceUpdateCustomClass(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateCustomClass .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The result of polling the operation.

PollOnceUpdateCustomClassAsync(string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> PollOnceUpdateCustomClassAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateCustomClass.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdatePhraseSet(string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> PollOnceUpdatePhraseSet(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdatePhraseSet.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The result of polling the operation.

PollOnceUpdatePhraseSetAsync(string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> PollOnceUpdatePhraseSetAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdatePhraseSet.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateRecognizer(string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> PollOnceUpdateRecognizer(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateRecognizer.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The result of polling the operation.

PollOnceUpdateRecognizerAsync(string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> PollOnceUpdateRecognizerAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateRecognizer.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A task representing the result of polling the operation.

Recognize(RecognizeRequest, CallSettings)

public virtual RecognizeResponse Recognize(RecognizeRequest request, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
requestRecognizeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecognizeResponse

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
RecognizeRequest request = new RecognizeRequest
{
    Config = new RecognitionConfig(),
    RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    Content = ByteString.Empty,
    ConfigMask = new FieldMask(),
};
// Make the request
RecognizeResponse response = speechClient.Recognize(request);

Recognize(RecognizerName, RecognitionConfig, FieldMask, ByteString, CallSettings)

public virtual RecognizeResponse Recognize(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, ByteString content, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

contentByteString

The audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecognizeResponse

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
ByteString content = ByteString.Empty;
// Make the request
RecognizeResponse response = speechClient.Recognize(recognizer, config, configMask, content);

Recognize(RecognizerName, RecognitionConfig, FieldMask, string, CallSettings)

public virtual RecognizeResponse Recognize(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, string uri, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

uristring

URI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: gs://bucket_name/object_name (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecognizeResponse

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
string uri = "";
// Make the request
RecognizeResponse response = speechClient.Recognize(recognizer, config, configMask, uri);

Recognize(string, RecognitionConfig, FieldMask, ByteString, CallSettings)

public virtual RecognizeResponse Recognize(string recognizer, RecognitionConfig config, FieldMask configMask, ByteString content, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

contentByteString

The audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecognizeResponse

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
ByteString content = ByteString.Empty;
// Make the request
RecognizeResponse response = speechClient.Recognize(recognizer, config, configMask, content);

Recognize(string, RecognitionConfig, FieldMask, string, CallSettings)

public virtual RecognizeResponse Recognize(string recognizer, RecognitionConfig config, FieldMask configMask, string uri, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

uristring

URI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: gs://bucket_name/object_name (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecognizeResponse

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
string uri = "";
// Make the request
RecognizeResponse response = speechClient.Recognize(recognizer, config, configMask, uri);

RecognizeAsync(RecognizeRequest, CallSettings)

public virtual Task<RecognizeResponse> RecognizeAsync(RecognizeRequest request, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
requestRecognizeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizeRequest request = new RecognizeRequest
{
    Config = new RecognitionConfig(),
    RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    Content = ByteString.Empty,
    ConfigMask = new FieldMask(),
};
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(request);

RecognizeAsync(RecognizeRequest, CancellationToken)

public virtual Task<RecognizeResponse> RecognizeAsync(RecognizeRequest request, CancellationToken cancellationToken)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
requestRecognizeRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizeRequest request = new RecognizeRequest
{
    Config = new RecognitionConfig(),
    RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    Content = ByteString.Empty,
    ConfigMask = new FieldMask(),
};
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(request);

RecognizeAsync(RecognizerName, RecognitionConfig, FieldMask, ByteString, CallSettings)

public virtual Task<RecognizeResponse> RecognizeAsync(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, ByteString content, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

contentByteString

The audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
ByteString content = ByteString.Empty;
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, content);

RecognizeAsync(RecognizerName, RecognitionConfig, FieldMask, ByteString, CancellationToken)

public virtual Task<RecognizeResponse> RecognizeAsync(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, ByteString content, CancellationToken cancellationToken)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

contentByteString

The audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
ByteString content = ByteString.Empty;
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, content);

RecognizeAsync(RecognizerName, RecognitionConfig, FieldMask, string, CallSettings)

public virtual Task<RecognizeResponse> RecognizeAsync(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, string uri, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

uristring

URI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: gs://bucket_name/object_name (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
string uri = "";
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, uri);

RecognizeAsync(RecognizerName, RecognitionConfig, FieldMask, string, CancellationToken)

public virtual Task<RecognizeResponse> RecognizeAsync(RecognizerName recognizer, RecognitionConfig config, FieldMask configMask, string uri, CancellationToken cancellationToken)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerRecognizerName

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

uristring

URI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: gs://bucket_name/object_name (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName recognizer = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
string uri = "";
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, uri);

RecognizeAsync(string, RecognitionConfig, FieldMask, ByteString, CallSettings)

public virtual Task<RecognizeResponse> RecognizeAsync(string recognizer, RecognitionConfig config, FieldMask configMask, ByteString content, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

contentByteString

The audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
ByteString content = ByteString.Empty;
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, content);

RecognizeAsync(string, RecognitionConfig, FieldMask, ByteString, CancellationToken)

public virtual Task<RecognizeResponse> RecognizeAsync(string recognizer, RecognitionConfig config, FieldMask configMask, ByteString content, CancellationToken cancellationToken)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

contentByteString

The audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
ByteString content = ByteString.Empty;
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, content);

RecognizeAsync(string, RecognitionConfig, FieldMask, string, CallSettings)

public virtual Task<RecognizeResponse> RecognizeAsync(string recognizer, RecognitionConfig config, FieldMask configMask, string uri, CallSettings callSettings = null)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

uristring

URI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: gs://bucket_name/object_name (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
string uri = "";
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, uri);

RecognizeAsync(string, RecognitionConfig, FieldMask, string, CancellationToken)

public virtual Task<RecognizeResponse> RecognizeAsync(string recognizer, RecognitionConfig config, FieldMask configMask, string uri, CancellationToken cancellationToken)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
recognizerstring

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

configRecognitionConfig

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

configMaskFieldMask

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

uristring

URI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: gs://bucket_name/object_name (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecognizeResponse

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string recognizer = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
RecognitionConfig config = new RecognitionConfig();
FieldMask configMask = new FieldMask();
string uri = "";
// Make the request
RecognizeResponse response = await speechClient.RecognizeAsync(recognizer, config, configMask, uri);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

StreamingRecognize(CallSettings, BidirectionalStreamingSettings)

public virtual SpeechClient.StreamingRecognizeStream StreamingRecognize(CallSettings callSettings = null, BidirectionalStreamingSettings streamingSettings = null)

Performs bidirectional streaming speech recognition: receive results while sending audio. This method is only available via the gRPC API (not REST).

Parameters
NameDescription
callSettingsCallSettings

If not null, applies overrides to this RPC call.

streamingSettingsBidirectionalStreamingSettings

If not null, applies streaming overrides to this RPC call.

Returns
TypeDescription
SpeechClientStreamingRecognizeStream

The client-server stream.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize streaming call, retrieving the stream object
using SpeechClient.StreamingRecognizeStream response = speechClient.StreamingRecognize();

// Sending requests and retrieving responses can be arbitrarily interleaved
// Exact sequence will depend on client/server behavior

// Create task to do something with responses from server
Task responseHandlerTask = Task.Run(async () =>
{
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<StreamingRecognizeResponse> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        StreamingRecognizeResponse responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed
});

// Send requests to the server
bool done = false;
while (!done)
{
    // Initialize a request
    StreamingRecognizeRequest request = new StreamingRecognizeRequest
    {
        RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
        StreamingConfig = new StreamingRecognitionConfig(),
    };
    // Stream a request to the server
    await response.WriteAsync(request);
    // Set "done" to true when sending requests is complete
}

// Complete writing requests to the stream
await response.WriteCompleteAsync();
// Await the response handler
// This will complete once all server responses have been processed
await responseHandlerTask;

UndeleteCustomClass(CustomClassName, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> UndeleteCustomClass(CustomClassName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to undelete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.UndeleteCustomClass(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeleteCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClass(UndeleteCustomClassRequest, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> UndeleteCustomClass(UndeleteCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUndeleteCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
UndeleteCustomClassRequest request = new UndeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.UndeleteCustomClass(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeleteCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClass(string, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> UndeleteCustomClass(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to undelete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.UndeleteCustomClass(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeleteCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClassAsync(CustomClassName, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> UndeleteCustomClassAsync(CustomClassName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to undelete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UndeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClassAsync(CustomClassName, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> UndeleteCustomClassAsync(CustomClassName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameCustomClassName

Required. The name of the CustomClass to undelete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UndeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClassAsync(UndeleteCustomClassRequest, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> UndeleteCustomClassAsync(UndeleteCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUndeleteCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UndeleteCustomClassRequest request = new UndeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UndeleteCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClassAsync(UndeleteCustomClassRequest, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> UndeleteCustomClassAsync(UndeleteCustomClassRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUndeleteCustomClassRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UndeleteCustomClassRequest request = new UndeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UndeleteCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClassAsync(string, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> UndeleteCustomClassAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to undelete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UndeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeleteCustomClassAsync(string, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> UndeleteCustomClassAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the CustomClass to undelete. Format: projects/{project}/locations/{location}/customClasses/{custom_class}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UndeleteCustomClassAsync(name);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSet(PhraseSetName, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> UndeletePhraseSet(PhraseSetName name, CallSettings callSettings = null)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to undelete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.UndeletePhraseSet(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeletePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSet(UndeletePhraseSetRequest, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> UndeletePhraseSet(UndeletePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUndeletePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
UndeletePhraseSetRequest request = new UndeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.UndeletePhraseSet(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeletePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSet(string, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> UndeletePhraseSet(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to undelete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.UndeletePhraseSet(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeletePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSetAsync(PhraseSetName, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UndeletePhraseSetAsync(PhraseSetName name, CallSettings callSettings = null)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to undelete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UndeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSetAsync(PhraseSetName, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UndeletePhraseSetAsync(PhraseSetName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namePhraseSetName

Required. The name of the PhraseSet to undelete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UndeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSetAsync(UndeletePhraseSetRequest, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UndeletePhraseSetAsync(UndeletePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUndeletePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UndeletePhraseSetRequest request = new UndeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UndeletePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSetAsync(UndeletePhraseSetRequest, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UndeletePhraseSetAsync(UndeletePhraseSetRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUndeletePhraseSetRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UndeletePhraseSetRequest request = new UndeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UndeletePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSetAsync(string, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UndeletePhraseSetAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to undelete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UndeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeletePhraseSetAsync(string, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UndeletePhraseSetAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the PhraseSet to undelete. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UndeletePhraseSetAsync(name);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeletePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizer(RecognizerName, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> UndeleteRecognizer(RecognizerName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameRecognizerName

Required. The name of the Recognizer to undelete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.UndeleteRecognizer(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeleteRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizer(UndeleteRecognizerRequest, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> UndeleteRecognizer(UndeleteRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUndeleteRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
UndeleteRecognizerRequest request = new UndeleteRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.UndeleteRecognizer(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeleteRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizer(string, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> UndeleteRecognizer(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the Recognizer to undelete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.UndeleteRecognizer(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceUndeleteRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizerAsync(RecognizerName, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> UndeleteRecognizerAsync(RecognizerName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameRecognizerName

Required. The name of the Recognizer to undelete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UndeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizerAsync(RecognizerName, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> UndeleteRecognizerAsync(RecognizerName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameRecognizerName

Required. The name of the Recognizer to undelete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
RecognizerName name = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UndeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizerAsync(UndeleteRecognizerRequest, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> UndeleteRecognizerAsync(UndeleteRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUndeleteRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UndeleteRecognizerRequest request = new UndeleteRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UndeleteRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizerAsync(UndeleteRecognizerRequest, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> UndeleteRecognizerAsync(UndeleteRecognizerRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUndeleteRecognizerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UndeleteRecognizerRequest request = new UndeleteRecognizerRequest
{
    RecognizerName = RecognizerName.FromProjectLocationRecognizer("[PROJECT]", "[LOCATION]", "[RECOGNIZER]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UndeleteRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizerAsync(string, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> UndeleteRecognizerAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. The name of the Recognizer to undelete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UndeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UndeleteRecognizerAsync(string, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> UndeleteRecognizerAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. The name of the Recognizer to undelete. Format: projects/{project}/locations/{location}/recognizers/{recognizer}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recognizers/[RECOGNIZER]";
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UndeleteRecognizerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUndeleteRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UpdateConfig(Config, FieldMask, CallSettings)

public virtual Config UpdateConfig(Config config, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
configConfig

Required. The config to update.

The config's name field is used to identify the config to be updated. The expected format is projects/{project}/locations/{location}/config.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Config

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
Config config = new Config();
FieldMask updateMask = new FieldMask();
// Make the request
Config response = speechClient.UpdateConfig(config, updateMask);

UpdateConfig(UpdateConfigRequest, CallSettings)

public virtual Config UpdateConfig(UpdateConfigRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Config

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
UpdateConfigRequest request = new UpdateConfigRequest
{
    Config = new Config(),
    UpdateMask = new FieldMask(),
};
// Make the request
Config response = speechClient.UpdateConfig(request);

UpdateConfigAsync(Config, FieldMask, CallSettings)

public virtual Task<Config> UpdateConfigAsync(Config config, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
configConfig

Required. The config to update.

The config's name field is used to identify the config to be updated. The expected format is projects/{project}/locations/{location}/config.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
Config config = new Config();
FieldMask updateMask = new FieldMask();
// Make the request
Config response = await speechClient.UpdateConfigAsync(config, updateMask);

UpdateConfigAsync(Config, FieldMask, CancellationToken)

public virtual Task<Config> UpdateConfigAsync(Config config, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
NameDescription
configConfig

Required. The config to update.

The config's name field is used to identify the config to be updated. The expected format is projects/{project}/locations/{location}/config.

updateMaskFieldMask

The list of fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
Config config = new Config();
FieldMask updateMask = new FieldMask();
// Make the request
Config response = await speechClient.UpdateConfigAsync(config, updateMask);

UpdateConfigAsync(UpdateConfigRequest, CallSettings)

public virtual Task<Config> UpdateConfigAsync(UpdateConfigRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdateConfigRequest request = new UpdateConfigRequest
{
    Config = new Config(),
    UpdateMask = new FieldMask(),
};
// Make the request
Config response = await speechClient.UpdateConfigAsync(request);

UpdateConfigAsync(UpdateConfigRequest, CancellationToken)

public virtual Task<Config> UpdateConfigAsync(UpdateConfigRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdateConfigRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskConfig

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdateConfigRequest request = new UpdateConfigRequest
{
    Config = new Config(),
    UpdateMask = new FieldMask(),
};
// Make the request
Config response = await speechClient.UpdateConfigAsync(request);

UpdateCustomClass(CustomClass, FieldMask, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> UpdateCustomClass(CustomClass customClass, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
customClassCustomClass

Required. The CustomClass to update.

The CustomClass's name field is used to identify the CustomClass to update. Format: projects/{project}/locations/{location}/customClasses/{custom_class}.

updateMaskFieldMask

The list of fields to be updated. If empty, all fields are considered for update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
CustomClass customClass = new CustomClass();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.UpdateCustomClass(customClass, updateMask);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceUpdateCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UpdateCustomClass(UpdateCustomClassRequest, CallSettings)

public virtual Operation<CustomClass, OperationMetadata> UpdateCustomClass(UpdateCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCustomClassOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
UpdateCustomClassRequest request = new UpdateCustomClassRequest
{
    CustomClass = new CustomClass(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<CustomClass, OperationMetadata> response = speechClient.UpdateCustomClass(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = speechClient.PollOnceUpdateCustomClass(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UpdateCustomClassAsync(CustomClass, FieldMask, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> UpdateCustomClassAsync(CustomClass customClass, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
customClassCustomClass

Required. The CustomClass to update.

The CustomClass's name field is used to identify the CustomClass to update. Format: projects/{project}/locations/{location}/customClasses/{custom_class}.

updateMaskFieldMask

The list of fields to be updated. If empty, all fields are considered for update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClass customClass = new CustomClass();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UpdateCustomClassAsync(customClass, updateMask);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UpdateCustomClassAsync(CustomClass, FieldMask, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> UpdateCustomClassAsync(CustomClass customClass, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
NameDescription
customClassCustomClass

Required. The CustomClass to update.

The CustomClass's name field is used to identify the CustomClass to update. Format: projects/{project}/locations/{location}/customClasses/{custom_class}.

updateMaskFieldMask

The list of fields to be updated. If empty, all fields are considered for update.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
CustomClass customClass = new CustomClass();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UpdateCustomClassAsync(customClass, updateMask);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UpdateCustomClassAsync(UpdateCustomClassRequest, CallSettings)

public virtual Task<Operation<CustomClass, OperationMetadata>> UpdateCustomClassAsync(UpdateCustomClassRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateCustomClassRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdateCustomClassRequest request = new UpdateCustomClassRequest
{
    CustomClass = new CustomClass(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UpdateCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UpdateCustomClassAsync(UpdateCustomClassRequest, CancellationToken)

public virtual Task<Operation<CustomClass, OperationMetadata>> UpdateCustomClassAsync(UpdateCustomClassRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdateCustomClassRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCustomClassOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdateCustomClassRequest request = new UpdateCustomClassRequest
{
    CustomClass = new CustomClass(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<CustomClass, OperationMetadata> response = await speechClient.UpdateCustomClassAsync(request);

// Poll until the returned long-running operation is complete
Operation<CustomClass, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
CustomClass result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<CustomClass, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateCustomClassAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    CustomClass retrievedResult = retrievedResponse.Result;
}

UpdatePhraseSet(PhraseSet, FieldMask, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> UpdatePhraseSet(PhraseSet phraseSet, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
phraseSetPhraseSet

Required. The PhraseSet to update.

The PhraseSet's name field is used to identify the PhraseSet to update. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}.

updateMaskFieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire PhraseSet resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
PhraseSet phraseSet = new PhraseSet();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.UpdatePhraseSet(phraseSet, updateMask);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceUpdatePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UpdatePhraseSet(UpdatePhraseSetRequest, CallSettings)

public virtual Operation<PhraseSet, OperationMetadata> UpdatePhraseSet(UpdatePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdatePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPhraseSetOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
UpdatePhraseSetRequest request = new UpdatePhraseSetRequest
{
    PhraseSet = new PhraseSet(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = speechClient.UpdatePhraseSet(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = speechClient.PollOnceUpdatePhraseSet(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UpdatePhraseSetAsync(PhraseSet, FieldMask, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UpdatePhraseSetAsync(PhraseSet phraseSet, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
phraseSetPhraseSet

Required. The PhraseSet to update.

The PhraseSet's name field is used to identify the PhraseSet to update. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}.

updateMaskFieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire PhraseSet resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSet phraseSet = new PhraseSet();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UpdatePhraseSetAsync(phraseSet, updateMask);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UpdatePhraseSetAsync(PhraseSet, FieldMask, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UpdatePhraseSetAsync(PhraseSet phraseSet, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
NameDescription
phraseSetPhraseSet

Required. The PhraseSet to update.

The PhraseSet's name field is used to identify the PhraseSet to update. Format: projects/{project}/locations/{location}/phraseSets/{phrase_set}.

updateMaskFieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire PhraseSet resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
PhraseSet phraseSet = new PhraseSet();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UpdatePhraseSetAsync(phraseSet, updateMask);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UpdatePhraseSetAsync(UpdatePhraseSetRequest, CallSettings)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UpdatePhraseSetAsync(UpdatePhraseSetRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdatePhraseSetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdatePhraseSetRequest request = new UpdatePhraseSetRequest
{
    PhraseSet = new PhraseSet(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UpdatePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UpdatePhraseSetAsync(UpdatePhraseSetRequest, CancellationToken)

public virtual Task<Operation<PhraseSet, OperationMetadata>> UpdatePhraseSetAsync(UpdatePhraseSetRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdatePhraseSetRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationPhraseSetOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdatePhraseSetRequest request = new UpdatePhraseSetRequest
{
    PhraseSet = new PhraseSet(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<PhraseSet, OperationMetadata> response = await speechClient.UpdatePhraseSetAsync(request);

// Poll until the returned long-running operation is complete
Operation<PhraseSet, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PhraseSet result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PhraseSet, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdatePhraseSetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PhraseSet retrievedResult = retrievedResponse.Result;
}

UpdateRecognizer(Recognizer, FieldMask, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> UpdateRecognizer(Recognizer recognizer, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
recognizerRecognizer

Required. The Recognizer to update.

The Recognizer's name field is used to identify the Recognizer to update. Format: projects/{project}/locations/{location}/recognizers/{recognizer}.

updateMaskFieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire Recognizer resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
Recognizer recognizer = new Recognizer();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.UpdateRecognizer(recognizer, updateMask);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceUpdateRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UpdateRecognizer(UpdateRecognizerRequest, CallSettings)

public virtual Operation<Recognizer, OperationMetadata> UpdateRecognizer(UpdateRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRecognizerOperationMetadata

The RPC response.

Example
// Create client
SpeechClient speechClient = SpeechClient.Create();
// Initialize request argument(s)
UpdateRecognizerRequest request = new UpdateRecognizerRequest
{
    Recognizer = new Recognizer(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<Recognizer, OperationMetadata> response = speechClient.UpdateRecognizer(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = speechClient.PollOnceUpdateRecognizer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UpdateRecognizerAsync(Recognizer, FieldMask, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> UpdateRecognizerAsync(Recognizer recognizer, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
recognizerRecognizer

Required. The Recognizer to update.

The Recognizer's name field is used to identify the Recognizer to update. Format: projects/{project}/locations/{location}/recognizers/{recognizer}.

updateMaskFieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire Recognizer resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
Recognizer recognizer = new Recognizer();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UpdateRecognizerAsync(recognizer, updateMask);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UpdateRecognizerAsync(Recognizer, FieldMask, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> UpdateRecognizerAsync(Recognizer recognizer, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
NameDescription
recognizerRecognizer

Required. The Recognizer to update.

The Recognizer's name field is used to identify the Recognizer to update. Format: projects/{project}/locations/{location}/recognizers/{recognizer}.

updateMaskFieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire Recognizer resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
Recognizer recognizer = new Recognizer();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UpdateRecognizerAsync(recognizer, updateMask);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UpdateRecognizerAsync(UpdateRecognizerRequest, CallSettings)

public virtual Task<Operation<Recognizer, OperationMetadata>> UpdateRecognizerAsync(UpdateRecognizerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateRecognizerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdateRecognizerRequest request = new UpdateRecognizerRequest
{
    Recognizer = new Recognizer(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UpdateRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}

UpdateRecognizerAsync(UpdateRecognizerRequest, CancellationToken)

public virtual Task<Operation<Recognizer, OperationMetadata>> UpdateRecognizerAsync(UpdateRecognizerRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdateRecognizerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRecognizerOperationMetadata

A Task containing the RPC response.

Example
// Create client
SpeechClient speechClient = await SpeechClient.CreateAsync();
// Initialize request argument(s)
UpdateRecognizerRequest request = new UpdateRecognizerRequest
{
    Recognizer = new Recognizer(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<Recognizer, OperationMetadata> response = await speechClient.UpdateRecognizerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Recognizer, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Recognizer result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Recognizer, OperationMetadata> retrievedResponse = await speechClient.PollOnceUpdateRecognizerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Recognizer retrievedResult = retrievedResponse.Result;
}