# Cloud Speech V2 Client - Class SpeechClient (2.5.1)

2.5.1 (latest) 2.5.0 2.4.0 2.3.0 2.2.1 2.1.1 2.0.1 1.20.1 1.19.2 1.18.3 1.16.0 1.15.0 1.14.3 1.13.1 1.12.0 1.11.2 1.10.0 1.9.1 1.8.0 1.7.0 Reference documentation and code samples for the Cloud Speech V2 Client class SpeechClient.

Service Description: Enables speech transcription and resource management.

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods.

Many parameters require resource names to be formatted in a particular way. To
assist with these names, this class includes a format method for each type of
name, and additionally a parseName method to extract the individual identifiers
contained within formatted names that are returned by the API.

## Namespace

Google \\ Cloud \\ Speech \\ V2 \\ Client

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array|https://docs.cloud.google.com/php/docs/reference/gax/latest/Options.ClientOptions.html` Optional. Options for configuring the service API wrapper. |
| `↳ apiEndpoint` | `string` The address of the API remote host. May optionally include the port, formatted as " |
| `↳ credentials` | `https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html|https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html` This option should only be used with a pre-constructed [Google\\Auth\\FetchAuthTokenInterface](https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html) or [Google\\ApiCore\\CredentialsWrapper](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html) object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. **Important** : If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly `use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Cloud\Speech\V2\SpeechClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new SpeechClient(['credentials' => $creds]);` <https://cloud.google.com/docs/authentication/external/externally-sourced-credentials> |
| `↳ credentialsConfig` | `array` Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see [Google\\ApiCore\\CredentialsWrapper::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html#_Google_ApiCore_CredentialsWrapper__build__) . |
| `↳ disableRetries` | `bool` Determines whether or not retries defined by the client configuration should be disabled. Defaults to `false`. |
| `↳ clientConfig` | `string|array` Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
| `↳ transport` | `string|https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html` The transport used for executing network requests. May be either the string `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. *Advanced usage* : Additionally, it is possible to pass in an already instantiated [Google\\ApiCore\\Transport\\TransportInterface](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html) object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored. |
| `↳ transportConfig` | `array` Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = \[ 'grpc' =\> \[...\], 'rest' =\> \[...\], \]; See the [Google\\ApiCore\\Transport\\GrpcTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.GrpcTransport.html#_Google_ApiCore_Transport_GrpcTransport__build__) and [Google\\ApiCore\\Transport\\RestTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.RestTransport.html#_Google_ApiCore_Transport_RestTransport__build__) methods for the supported options. |
| `↳ clientCertSource` | `callable` A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
| `↳ logger` | `false|Psr\Log\LoggerInterface` A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
| `↳ universeDomain` | `string` The service domain for the client. Defaults to 'googleapis.com'. |

### batchRecognize

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.

The async variant is [SpeechClient::batchRecognizeAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__batchRecognizeAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.BatchRecognizeRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.BatchRecognizeResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\BatchRecognizeRequest;
    use Google\Cloud\Speech\V2\BatchRecognizeResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Rpc\Status;

    /**
     * @param string $formattedRecognizer 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. Please see
     *                                    {@see SpeechClient::recognizerName()} for help formatting this field.
     */
    function batch_recognize_sample(string $formattedRecognizer): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new BatchRecognizeRequest())
            ->setRecognizer($formattedRecognizer);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->batchRecognize($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var BatchRecognizeResponse $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');

        batch_recognize_sample($formattedRecognizer);
    }

### createCustomClass

Creates a [CustomClass](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass).

The async variant is [SpeechClient::createCustomClassAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__createCustomClassAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CreateCustomClassRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CreateCustomClassRequest;
    use Google\Cloud\Speech\V2\CustomClass;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The project and location where this CustomClass will be created.
     *                                The expected format is `projects/{project}/locations/{location}`. Please see
     *                                {@see SpeechClient::locationName()} for help formatting this field.
     */
    function create_custom_class_sample(string $formattedParent): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $customClass = new CustomClass();
        $request = (new CreateCustomClassRequest())
            ->setCustomClass($customClass)
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->createCustomClass($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var CustomClass $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');

        create_custom_class_sample($formattedParent);
    }

### createPhraseSet

Creates a [PhraseSet](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet).

The async variant is [SpeechClient::createPhraseSetAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__createPhraseSetAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CreatePhraseSetRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CreatePhraseSetRequest;
    use Google\Cloud\Speech\V2\PhraseSet;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The project and location where this PhraseSet will be created.
     *                                The expected format is `projects/{project}/locations/{location}`. Please see
     *                                {@see SpeechClient::locationName()} for help formatting this field.
     */
    function create_phrase_set_sample(string $formattedParent): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $phraseSet = new PhraseSet();
        $request = (new CreatePhraseSetRequest())
            ->setPhraseSet($phraseSet)
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->createPhraseSet($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var PhraseSet $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');

        create_phrase_set_sample($formattedParent);
    }

### createRecognizer

Creates a [Recognizer](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer).

The async variant is [SpeechClient::createRecognizerAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__createRecognizerAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CreateRecognizerRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CreateRecognizerRequest;
    use Google\Cloud\Speech\V2\Recognizer;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The project and location where this Recognizer will be created.
     *                                The expected format is `projects/{project}/locations/{location}`. Please see
     *                                {@see SpeechClient::locationName()} for help formatting this field.
     */
    function create_recognizer_sample(string $formattedParent): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $recognizer = new Recognizer();
        $request = (new CreateRecognizerRequest())
            ->setRecognizer($recognizer)
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->createRecognizer($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Recognizer $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');

        create_recognizer_sample($formattedParent);
    }

### deleteCustomClass

Deletes the [CustomClass](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass).

The async variant is [SpeechClient::deleteCustomClassAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__deleteCustomClassAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.DeleteCustomClassRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CustomClass;
    use Google\Cloud\Speech\V2\DeleteCustomClassRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the CustomClass to delete.
     *                              Format:
     *                              `projects/{project}/locations/{location}/customClasses/{custom_class}`
     *                              Please see {@see SpeechClient::customClassName()} for help formatting this field.
     */
    function delete_custom_class_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new DeleteCustomClassRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->deleteCustomClass($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var CustomClass $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');

        delete_custom_class_sample($formattedName);
    }

### deletePhraseSet

Deletes the [PhraseSet](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet).

The async variant is [SpeechClient::deletePhraseSetAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__deletePhraseSetAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.DeletePhraseSetRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\DeletePhraseSetRequest;
    use Google\Cloud\Speech\V2\PhraseSet;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the PhraseSet to delete.
     *                              Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
     *                              Please see {@see SpeechClient::phraseSetName()} for help formatting this field.
     */
    function delete_phrase_set_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new DeletePhraseSetRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->deletePhraseSet($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var PhraseSet $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');

        delete_phrase_set_sample($formattedName);
    }

### deleteRecognizer

Deletes the [Recognizer](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer).

The async variant is [SpeechClient::deleteRecognizerAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__deleteRecognizerAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.DeleteRecognizerRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\DeleteRecognizerRequest;
    use Google\Cloud\Speech\V2\Recognizer;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the Recognizer to delete.
     *                              Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
     *                              Please see {@see SpeechClient::recognizerName()} for help formatting this field.
     */
    function delete_recognizer_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new DeleteRecognizerRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->deleteRecognizer($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Recognizer $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');

        delete_recognizer_sample($formattedName);
    }

### getConfig

Returns the requested [Config](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Config).

The async variant is [SpeechClient::getConfigAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__getConfigAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetConfigRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Config` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\Config;
    use Google\Cloud\Speech\V2\GetConfigRequest;

    /**
     * @param string $formattedName 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`. Please see
     *                              {@see SpeechClient::configName()} for help formatting this field.
     */
    function get_config_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new GetConfigRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Config $response */
            $response = $speechClient->getConfig($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::configName('[PROJECT]', '[LOCATION]');

        get_config_sample($formattedName);
    }

### getCustomClass

Returns the requested
[CustomClass](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass).

The async variant is [SpeechClient::getCustomClassAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__getCustomClassAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetCustomClassRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CustomClass;
    use Google\Cloud\Speech\V2\GetCustomClassRequest;

    /**
     * @param string $formattedName The name of the CustomClass to retrieve. The expected format is
     *                              `projects/{project}/locations/{location}/customClasses/{custom_class}`. Please see
     *                              {@see SpeechClient::customClassName()} for help formatting this field.
     */
    function get_custom_class_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new GetCustomClassRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var CustomClass $response */
            $response = $speechClient->getCustomClass($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');

        get_custom_class_sample($formattedName);
    }

### getPhraseSet

Returns the requested
[PhraseSet](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet).

The async variant is [SpeechClient::getPhraseSetAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__getPhraseSetAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetPhraseSetRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\GetPhraseSetRequest;
    use Google\Cloud\Speech\V2\PhraseSet;

    /**
     * @param string $formattedName The name of the PhraseSet to retrieve. The expected format is
     *                              `projects/{project}/locations/{location}/phraseSets/{phrase_set}`. Please see
     *                              {@see SpeechClient::phraseSetName()} for help formatting this field.
     */
    function get_phrase_set_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new GetPhraseSetRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var PhraseSet $response */
            $response = $speechClient->getPhraseSet($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');

        get_phrase_set_sample($formattedName);
    }

### getRecognizer

Returns the requested
[Recognizer](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer). Fails with
[NOT_FOUND](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__NOT_FOUND) if the requested Recognizer doesn't
exist.

The async variant is [SpeechClient::getRecognizerAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__getRecognizerAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetRecognizerRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\GetRecognizerRequest;
    use Google\Cloud\Speech\V2\Recognizer;

    /**
     * @param string $formattedName The name of the Recognizer to retrieve. The expected format is
     *                              `projects/{project}/locations/{location}/recognizers/{recognizer}`. Please see
     *                              {@see SpeechClient::recognizerName()} for help formatting this field.
     */
    function get_recognizer_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new GetRecognizerRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Recognizer $response */
            $response = $speechClient->getRecognizer($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');

        get_recognizer_sample($formattedName);
    }

### listCustomClasses

Lists CustomClasses.

The async variant is [SpeechClient::listCustomClassesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__listCustomClassesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.ListCustomClassesRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CustomClass;
    use Google\Cloud\Speech\V2\ListCustomClassesRequest;

    /**
     * @param string $formattedParent The project and location of CustomClass resources to list. The
     *                                expected format is `projects/{project}/locations/{location}`. Please see
     *                                {@see SpeechClient::locationName()} for help formatting this field.
     */
    function list_custom_classes_sample(string $formattedParent): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new ListCustomClassesRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $speechClient->listCustomClasses($request);

            /** @var CustomClass $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');

        list_custom_classes_sample($formattedParent);
    }

### listPhraseSets

Lists PhraseSets.

The async variant is [SpeechClient::listPhraseSetsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__listPhraseSetsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.ListPhraseSetsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\ListPhraseSetsRequest;
    use Google\Cloud\Speech\V2\PhraseSet;

    /**
     * @param string $formattedParent The project and location of PhraseSet resources to list. The
     *                                expected format is `projects/{project}/locations/{location}`. Please see
     *                                {@see SpeechClient::locationName()} for help formatting this field.
     */
    function list_phrase_sets_sample(string $formattedParent): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new ListPhraseSetsRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $speechClient->listPhraseSets($request);

            /** @var PhraseSet $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');

        list_phrase_sets_sample($formattedParent);
    }

### listRecognizers

Lists Recognizers.

The async variant is [SpeechClient::listRecognizersAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__listRecognizersAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.ListRecognizersRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\ListRecognizersRequest;
    use Google\Cloud\Speech\V2\Recognizer;

    /**
     * @param string $formattedParent The project and location of Recognizers to list. The expected
     *                                format is `projects/{project}/locations/{location}`. Please see
     *                                {@see SpeechClient::locationName()} for help formatting this field.
     */
    function list_recognizers_sample(string $formattedParent): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new ListRecognizersRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $speechClient->listRecognizers($request);

            /** @var Recognizer $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');

        list_recognizers_sample($formattedParent);
    }

### recognize

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

The async variant is [SpeechClient::recognizeAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__recognizeAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.RecognizeRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.RecognizeResponse` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\RecognizeRequest;
    use Google\Cloud\Speech\V2\RecognizeResponse;

    /**
     * @param string $formattedRecognizer 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. Please see
     *                                    {@see SpeechClient::recognizerName()} for help formatting this field.
     */
    function recognize_sample(string $formattedRecognizer): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new RecognizeRequest())
            ->setRecognizer($formattedRecognizer);

        // Call the API and handle any network failures.
        try {
            /** @var RecognizeResponse $response */
            $response = $speechClient->recognize($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');

        recognize_sample($formattedRecognizer);
    }

### streamingRecognize

Performs bidirectional streaming speech recognition: receive results while
sending audio. This method is only available via the gRPC API (not REST).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `callOptions` | `array` Optional. |
| `↳ timeoutMillis` | `int` Timeout to use for this call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/BidiStream.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\BidiStream;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\StreamingRecognizeRequest;
    use Google\Cloud\Speech\V2\StreamingRecognizeResponse;

    /**
     * @param string $formattedRecognizer 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. Please see
     *                                    {@see SpeechClient::recognizerName()} for help formatting this field.
     */
    function streaming_recognize_sample(string $formattedRecognizer): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new StreamingRecognizeRequest())
            ->setRecognizer($formattedRecognizer);

        // Call the API and handle any network failures.
        try {
            /** @var BidiStream $stream */
            $stream = $speechClient->streamingRecognize();
            $stream->writeAll([$request,]);

            /** @var StreamingRecognizeResponse $element */
            foreach ($stream->closeWriteAndReadAll() as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');

        streaming_recognize_sample($formattedRecognizer);
    }

### undeleteCustomClass

Undeletes the [CustomClass](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass).

The async variant is [SpeechClient::undeleteCustomClassAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__undeleteCustomClassAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UndeleteCustomClassRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CustomClass;
    use Google\Cloud\Speech\V2\UndeleteCustomClassRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the CustomClass to undelete.
     *                              Format:
     *                              `projects/{project}/locations/{location}/customClasses/{custom_class}`
     *                              Please see {@see SpeechClient::customClassName()} for help formatting this field.
     */
    function undelete_custom_class_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new UndeleteCustomClassRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->undeleteCustomClass($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var CustomClass $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');

        undelete_custom_class_sample($formattedName);
    }

### undeletePhraseSet

Undeletes the [PhraseSet](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet).

The async variant is [SpeechClient::undeletePhraseSetAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__undeletePhraseSetAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UndeletePhraseSetRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\PhraseSet;
    use Google\Cloud\Speech\V2\UndeletePhraseSetRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the PhraseSet to undelete.
     *                              Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
     *                              Please see {@see SpeechClient::phraseSetName()} for help formatting this field.
     */
    function undelete_phrase_set_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new UndeletePhraseSetRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->undeletePhraseSet($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var PhraseSet $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');

        undelete_phrase_set_sample($formattedName);
    }

### undeleteRecognizer

Undeletes the [Recognizer](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer).

The async variant is [SpeechClient::undeleteRecognizerAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__undeleteRecognizerAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UndeleteRecognizerRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\Recognizer;
    use Google\Cloud\Speech\V2\UndeleteRecognizerRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the Recognizer to undelete.
     *                              Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
     *                              Please see {@see SpeechClient::recognizerName()} for help formatting this field.
     */
    function undelete_recognizer_sample(string $formattedName): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = (new UndeleteRecognizerRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->undeleteRecognizer($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Recognizer $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');

        undelete_recognizer_sample($formattedName);
    }

### updateConfig

Updates the [Config](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Config).

The async variant is [SpeechClient::updateConfigAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__updateConfigAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdateConfigRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Config` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\Config;
    use Google\Cloud\Speech\V2\UpdateConfigRequest;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function update_config_sample(): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $config = new Config();
        $request = (new UpdateConfigRequest())
            ->setConfig($config);

        // Call the API and handle any network failures.
        try {
            /** @var Config $response */
            $response = $speechClient->updateConfig($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### updateCustomClass

Updates the [CustomClass](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass).

The async variant is [SpeechClient::updateCustomClassAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__updateCustomClassAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdateCustomClassRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\CustomClass;
    use Google\Cloud\Speech\V2\UpdateCustomClassRequest;
    use Google\Rpc\Status;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function update_custom_class_sample(): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $customClass = new CustomClass();
        $request = (new UpdateCustomClassRequest())
            ->setCustomClass($customClass);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->updateCustomClass($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var CustomClass $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### updatePhraseSet

Updates the [PhraseSet](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet).

The async variant is [SpeechClient::updatePhraseSetAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__updatePhraseSetAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdatePhraseSetRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\PhraseSet;
    use Google\Cloud\Speech\V2\UpdatePhraseSetRequest;
    use Google\Rpc\Status;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function update_phrase_set_sample(): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $phraseSet = new PhraseSet();
        $request = (new UpdatePhraseSetRequest())
            ->setPhraseSet($phraseSet);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->updatePhraseSet($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var PhraseSet $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### updateRecognizer

Updates the [Recognizer](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer).

The async variant is [SpeechClient::updateRecognizerAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__updateRecognizerAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdateRecognizerRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Speech\V2\Client\SpeechClient;
    use Google\Cloud\Speech\V2\Recognizer;
    use Google\Cloud\Speech\V2\UpdateRecognizerRequest;
    use Google\Rpc\Status;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function update_recognizer_sample(): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $recognizer = new Recognizer();
        $request = (new UpdateRecognizerRequest())
            ->setRecognizer($recognizer);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $speechClient->updateRecognizer($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Recognizer $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### getLocation

Gets information about a location.

The async variant is [SpeechClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__getLocationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.GetLocationRequest.html` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.Location.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Location\GetLocationRequest;
    use Google\Cloud\Location\Location;
    use Google\Cloud\Speech\V2\Client\SpeechClient;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function get_location_sample(): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = new GetLocationRequest();

        // Call the API and handle any network failures.
        try {
            /** @var Location $response */
            $response = $speechClient->getLocation($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### listLocations

Lists information about the supported locations for this service.

This method can be called in two ways:

**List all public locations:** Use the path `GET /v1/locations`.
**List project-visible locations:** Use the path
`GET /v1/projects/{project_id}/locations`. This may include public
locations as well as private or other locations specifically visible
to the project.

The async variant is [SpeechClient::listLocationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Client.SpeechClient#_Google_Cloud_Speech_V2_Client_SpeechClient__listLocationsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\Location\ListLocationsRequest;
    use Google\Cloud\Location\Location;
    use Google\Cloud\Speech\V2\Client\SpeechClient;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function list_locations_sample(): void
    {
        // Create a client.
        $speechClient = new SpeechClient();

        // Prepare the request message.
        $request = new ListLocationsRequest();

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $speechClient->listLocations($request);

            /** @var Location $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### batchRecognizeAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.BatchRecognizeRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### createCustomClassAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CreateCustomClassRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### createPhraseSetAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CreatePhraseSetRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### createRecognizerAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CreateRecognizerRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### deleteCustomClassAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.DeleteCustomClassRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### deletePhraseSetAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.DeletePhraseSetRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### deleteRecognizerAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.DeleteRecognizerRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### getConfigAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetConfigRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Config>` |   |

### getCustomClassAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetCustomClassRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` |   |

### getPhraseSetAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetPhraseSetRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.PhraseSet>` |   |

### getRecognizerAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.GetRecognizerRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Recognizer>` |   |

### listCustomClassesAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.ListCustomClassesRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### listPhraseSetsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.ListPhraseSetsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### listRecognizersAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.ListRecognizersRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### recognizeAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.RecognizeRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.RecognizeResponse>` |   |

### undeleteCustomClassAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UndeleteCustomClassRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### undeletePhraseSetAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UndeletePhraseSetRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### undeleteRecognizerAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UndeleteRecognizerRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### updateConfigAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdateConfigRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.Config>` |   |

### updateCustomClassAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdateCustomClassRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### updatePhraseSetAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdatePhraseSetRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### updateRecognizerAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.UpdateRecognizerRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### getLocationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.GetLocationRequest.html` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.Location.html>` |   |

### listLocationsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\LongRunning\Client\OperationsClient` |   |

### resumeOperation

Resume an existing long running operation that was previously started by a long
running API method. If $methodName is not provided, or does not match a long
running API method, then the operation can still be resumed, but the
OperationResponse object will not deserialize the final response.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of the long running operation |
| `methodName` | `string` The name of the method used to start the operation |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html` |   |

### static::configName

Formats a string containing the fully-qualified path to represent a config
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted config resource. |

### static::cryptoKeyName

Formats a string containing the fully-qualified path to represent a crypto_key
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `keyRing` | `string` |
| `cryptoKey` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted crypto_key resource. |

### static::cryptoKeyVersionName

Formats a string containing the fully-qualified path to represent a
crypto_key_version resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `keyRing` | `string` |
| `cryptoKey` | `string` |
| `cryptoKeyVersion` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted crypto_key_version resource. |

### static::customClassName

Formats a string containing the fully-qualified path to represent a custom_class
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `customClass` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted custom_class resource. |

### static::locationName

Formats a string containing the fully-qualified path to represent a location
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted location resource. |

### static::phraseSetName

Formats a string containing the fully-qualified path to represent a phrase_set
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `phraseSet` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted phrase_set resource. |

### static::recognizerName

Formats a string containing the fully-qualified path to represent a recognizer
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `recognizer` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted recognizer resource. |

### static::parseName

Parses a formatted name string and returns an associative array of the components in the name.

The following name formats are supported:
Template: Pattern

- config: projects/{project}/locations/{location}/config
- cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
- customClass: projects/{project}/locations/{location}/customClasses/{custom_class}
- location: projects/{project}/locations/{location}
- phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set}
- recognizer: projects/{project}/locations/{location}/recognizers/{recognizer}

The optional $template argument can be supplied to specify a particular pattern,
and must match one of the templates listed above. If no $template argument is
provided, or if the $template argument does not match one of the templates
listed, then parseName will check each of the supported templates, and return
the first match.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `formattedName` | `string` The formatted name string |
| `template` | `?string` Optional name of template to match |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` | An associative array from name component IDs to component values. |