# Cloud Speech V2 Client - Class SpeechAdaptation (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 SpeechAdaptation.

Provides "hints" to the speech recognizer to favor specific words and phrases
in the results. PhraseSets can be specified as an inline resource, or a
reference to an existing PhraseSet resource.

Generated from protobuf message `google.cloud.speech.v2.SpeechAdaptation`

## Namespace

Google \\ Cloud \\ Speech \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ phrase_sets` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.SpeechAdaptation.AdaptationPhraseSet>` A list of inline or referenced PhraseSets. |
| `↳ custom_classes` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet. |

### getPhraseSets

A list of inline or referenced PhraseSets.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.SpeechAdaptation.AdaptationPhraseSet>` |   |

### setPhraseSets

A list of inline or referenced PhraseSets.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.SpeechAdaptation.AdaptationPhraseSet>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCustomClasses

A list of inline CustomClasses. Existing CustomClass resources can be
referenced directly in a PhraseSet.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` |   |

### setCustomClasses

A list of inline CustomClasses. Existing CustomClass resources can be
referenced directly in a PhraseSet.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-speech/latest/V2.CustomClass>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |