# Google Cloud Media Translation V1beta1 Client - Class StreamingTranslateSpeechRequest (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 StreamingTranslateSpeechRequest.

The top-level message sent by the client for the `StreamingTranslateSpeech`
method. Multiple `StreamingTranslateSpeechRequest` messages are sent. The
first message must contain a `streaming_config` message and must not contain
`audio_content` data. All subsequent messages must contain `audio_content`
data and must not contain a `streaming_config` message.

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

## Namespace

Google \\ Cloud \\ MediaTranslation \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ streaming_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-media-translation/latest/V1beta1.StreamingTranslateSpeechConfig` Provides information to the recognizer that specifies how to process the request. The first `StreamingTranslateSpeechRequest` message must contain a `streaming_config` message. |
| `↳ audio_content` | `string` The audio data to be translated. Sequential chunks of audio data are sent in sequential `StreamingTranslateSpeechRequest` messages. The first `StreamingTranslateSpeechRequest` message must not contain `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` messages must contain `audio_content` data. The audio bytes must be encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64). |

### getStreamingConfig

Provides information to the recognizer that specifies how to process the
request. The first `StreamingTranslateSpeechRequest` message must contain
a `streaming_config` message.

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

### hasStreamingConfig

### setStreamingConfig

Provides information to the recognizer that specifies how to process the
request. The first `StreamingTranslateSpeechRequest` message must contain
a `streaming_config` message.

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

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

### getAudioContent

The audio data to be translated. Sequential chunks of audio data are sent
in sequential `StreamingTranslateSpeechRequest` messages. The first
`StreamingTranslateSpeechRequest` message must not contain
`audio_content` data and all subsequent `StreamingTranslateSpeechRequest`
messages must contain `audio_content` data. The audio bytes must be
encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with
all bytes fields, protobuffers use a pure binary representation (not
base64).

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

### hasAudioContent

### setAudioContent

The audio data to be translated. Sequential chunks of audio data are sent
in sequential `StreamingTranslateSpeechRequest` messages. The first
`StreamingTranslateSpeechRequest` message must not contain
`audio_content` data and all subsequent `StreamingTranslateSpeechRequest`
messages must contain `audio_content` data. The audio bytes must be
encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with
all bytes fields, protobuffers use a pure binary representation (not
base64).

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

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

### getStreamingRequest

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