# Cloud Video Intelligence V1 Client - Class SpeechTranscription (2.2.0)

2.2.0 (latest) 2.1.2 2.0.5 1.15.5 1.14.2 1.13.1 1.12.16 Reference documentation and code samples for the Cloud Video Intelligence V1 Client class SpeechTranscription.

A speech recognition result corresponding to a portion of the audio.

Generated from protobuf message `google.cloud.videointelligence.v1.SpeechTranscription`

## Namespace

Google \\ Cloud \\ VideoIntelligence \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ alternatives` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.SpeechRecognitionAlternative>` May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer. |
| `↳ language_code` | `string` Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio. |

### getAlternatives

May contain one or more recognition hypotheses (up to the maximum specified
in `max_alternatives`). These alternatives are ordered in terms of
accuracy, with the top (first) alternative being the most probable, as
ranked by the recognizer.

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

### setAlternatives

May contain one or more recognition hypotheses (up to the maximum specified
in `max_alternatives`). These alternatives are ordered in terms of
accuracy, with the top (first) alternative being the most probable, as
ranked by the recognizer.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.SpeechRecognitionAlternative>` |

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

### getLanguageCode

Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
language tag of the language in this result. This language code was
detected to have the most likelihood of being spoken in the audio.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLanguageCode

Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
language tag of the language in this result. This language code was
detected to have the most likelihood of being spoken in the audio.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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