# Google Cloud Media Translation V1beta1 Client - Class StreamingTranslateSpeechResponse (0.6.2)

0.6.2 (latest) 0.6.1 0.5.2 0.4.5 0.3.3 0.2.12

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Media Translation V1beta1 Client class StreamingTranslateSpeechResponse.

A streaming speech translation response corresponding to a portion of
the audio currently processed.

Generated from protobuf message `google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse`

## Namespace

Google \\ Cloud \\ MediaTranslation \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Output only. If set, returns a [google.rpc.Status](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html) message that specifies the error for the operation. |
| `↳ result` | `https://docs.cloud.google.com/php/docs/reference/cloud-media-translation/latest/V1beta1.StreamingTranslateSpeechResult` Output only. The translation result that is currently being processed (is_final could be true or false). |
| `↳ speech_event_type` | `int` Output only. Indicates the type of speech event. |

### getError

Output only. If set, returns a [google.rpc.Status](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html) message that
specifies the error for the operation.

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

### hasError

### clearError

### setError

Output only. If set, returns a [google.rpc.Status](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html) message that
specifies the error for the operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getResult

Output only. The translation result that is currently being processed (is_final could be
true or false).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-media-translation/latest/V1beta1.StreamingTranslateSpeechResult|null` |   |

### hasResult

### clearResult

### setResult

Output only. The translation result that is currently being processed (is_final could be
true or false).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-media-translation/latest/V1beta1.StreamingTranslateSpeechResult` |

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

### getSpeechEventType

Output only. Indicates the type of speech event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SpeechEventType](https://docs.cloud.google.com/php/docs/reference/cloud-media-translation/latest/V1beta1.StreamingTranslateSpeechResponse.SpeechEventType). |

### setSpeechEventType

Output only. Indicates the type of speech event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SpeechEventType](https://docs.cloud.google.com/php/docs/reference/cloud-media-translation/latest/V1beta1.StreamingTranslateSpeechResponse.SpeechEventType). |

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