Cloud Speech-to-Text v2 API - Class SpeechClient (1.2.0)

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
Type Description
OperationsClient

CreateCustomClassOperationsClient

public virtual OperationsClient CreateCustomClassOperationsClient { get; }

The long-running operations client for CreateCustomClass.

Property Value
Type Description
OperationsClient

CreatePhraseSetOperationsClient

public virtual OperationsClient CreatePhraseSetOperationsClient { get; }

The long-running operations client for CreatePhraseSet.

Property Value
Type Description
OperationsClient

CreateRecognizerOperationsClient

public virtual OperationsClient CreateRecognizerOperationsClient { get; }

The long-running operations client for CreateRecognizer.

Property Value
Type Description
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
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Speech scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default Speech scopes are:

DeleteCustomClassOperationsClient

public virtual OperationsClient DeleteCustomClassOperationsClient { get; }

The long-running operations client for DeleteCustomClass.

Property Value
Type Description
OperationsClient

DeletePhraseSetOperationsClient

public virtual OperationsClient DeletePhraseSetOperationsClient { get; }

The long-running operations client for DeletePhraseSet.

Property Value
Type Description
OperationsClient

DeleteRecognizerOperationsClient

public virtual OperationsClient DeleteRecognizerOperationsClient { get; }

The long-running operations client for DeleteRecognizer.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual Speech.SpeechClient GrpcClient { get; }

The underlying gRPC Speech client

Property Value
Type Description
SpeechSpeechClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UndeleteCustomClassOperationsClient

public virtual OperationsClient UndeleteCustomClassOperationsClient { get; }

The long-running operations client for UndeleteCustomClass.

Property Value
Type Description
OperationsClient

UndeletePhraseSetOperationsClient

public virtual OperationsClient UndeletePhraseSetOperationsClient { get; }

The long-running operations client for UndeletePhraseSet.

Property Value
Type Description
OperationsClient

UndeleteRecognizerOperationsClient

public virtual OperationsClient UndeleteRecognizerOperationsClient { get; }

The long-running operations client for UndeleteRecognizer.

Property Value
Type Description
OperationsClient

UpdateCustomClassOperationsClient

public virtual OperationsClient UpdateCustomClassOperationsClient { get; }

The long-running operations client for UpdateCustomClass.

Property Value
Type Description
OperationsClient

UpdatePhraseSetOperationsClient

public virtual OperationsClient UpdatePhraseSetOperationsClient { get; }

The long-running operations client for UpdatePhraseSet.

Property Value
Type Description
OperationsClient

UpdateRecognizerOperationsClient

public virtual OperationsClient UpdateRecognizerOperationsClient { get; }

The long-running operations client for UpdateRecognizer.

Property Value
Type Description
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
Name Description
request BatchRecognizeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

files IEnumerableBatchRecognizeFileMetadata

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

files IEnumerableBatchRecognizeFileMetadata

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

files IEnumerableBatchRecognizeFileMetadata

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

files IEnumerableBatchRecognizeFileMetadata

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

files IEnumerableBatchRecognizeFileMetadata

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

files IEnumerableBatchRecognizeFileMetadata

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Type Description
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
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
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
Name Description
parent LocationName

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

customClass CustomClass

Required. The CustomClass to create.

customClassId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

customClass CustomClass

Required. The CustomClass to create.

customClassId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

customClass CustomClass

Required. The CustomClass to create.

customClassId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

customClass CustomClass

Required. The CustomClass to create.

customClassId string

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]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
parent string

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

customClass CustomClass

Required. The CustomClass to create.

customClassId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

customClass CustomClass

Required. The CustomClass to create.

customClassId string

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]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
parent LocationName

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

phraseSet PhraseSet

Required. The PhraseSet to create.

phraseSetId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

phraseSet PhraseSet

Required. The PhraseSet to create.

phraseSetId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

phraseSet PhraseSet

Required. The PhraseSet to create.

phraseSetId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

phraseSet PhraseSet

Required. The PhraseSet to create.

phraseSetId string

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]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
parent string

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

phraseSet PhraseSet

Required. The PhraseSet to create.

phraseSetId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

phraseSet PhraseSet

Required. The PhraseSet to create.

phraseSetId string

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]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
parent LocationName

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

recognizer Recognizer

Required. The Recognizer to create.

recognizerId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

recognizer Recognizer

Required. The Recognizer to create.

recognizerId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

recognizer Recognizer

Required. The Recognizer to create.

recognizerId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

recognizer Recognizer

Required. The Recognizer to create.

recognizerId string

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]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
parent string

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

recognizer Recognizer

Required. The Recognizer to create.

recognizerId string

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]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

recognizer Recognizer

Required. The Recognizer to create.

recognizerId string

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]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name CustomClassName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name CustomClassName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name CustomClassName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name PhraseSetName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name PhraseSetName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name PhraseSetName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name RecognizerName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name RecognizerName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name RecognizerName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name ConfigName

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name ConfigName

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name ConfigName

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name CustomClassName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name CustomClassName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name CustomClassName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name PhraseSetName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name PhraseSetName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name PhraseSetName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name RecognizerName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name RecognizerName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name RecognizerName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
parent LocationName

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent LocationName

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
parent string

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

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

content ByteString

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

uri string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

content ByteString

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

uri string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

content ByteString

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

content ByteString

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

uri string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer RecognizerName

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.

config RecognitionConfig

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.

configMask FieldMask

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.

uri string

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

content ByteString

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

content ByteString

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

uri string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer string

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.

config RecognitionConfig

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.

configMask FieldMask

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.

uri string

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Type Description
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
Name Description
callSettings CallSettings

If not null, applies overrides to this RPC call.

streamingSettings BidirectionalStreamingSettings

If not null, applies streaming overrides to this RPC call.

Returns
Type Description
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
Name Description
name CustomClassName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name CustomClassName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name CustomClassName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name PhraseSetName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name PhraseSetName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name PhraseSetName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name RecognizerName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name RecognizerName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name RecognizerName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
config Config

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.

updateMask FieldMask

The list of fields to be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
config Config

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.

updateMask FieldMask

The list of fields to be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
config Config

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.

updateMask FieldMask

The list of fields to be updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
customClass CustomClass

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

updateMask FieldMask

The list of fields to be updated. If empty, all fields are considered for update.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
customClass CustomClass

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

updateMask FieldMask

The list of fields to be updated. If empty, all fields are considered for update.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
customClass CustomClass

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

updateMask FieldMask

The list of fields to be updated. If empty, all fields are considered for update.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
phraseSet PhraseSet

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

updateMask FieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire PhraseSet resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
phraseSet PhraseSet

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

updateMask FieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire PhraseSet resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
phraseSet PhraseSet

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

updateMask FieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire PhraseSet resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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
Name Description
recognizer Recognizer

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

updateMask FieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire Recognizer resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer Recognizer

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

updateMask FieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire Recognizer resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
recognizer Recognizer

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

updateMask FieldMask

The list of fields to update. If empty, all non-default valued fields are considered for update. Use * to update the entire Recognizer resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

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

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

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

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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;
}