# Method: speech.longrunningrecognize

- [HTTP request](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#body.HTTP_TEMPLATE)
- [Request body](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#body.aspect)
- [TranscriptOutputConfig](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#TranscriptOutputConfig)
  - [JSON representation](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#TranscriptOutputConfig.SCHEMA_REPRESENTATION)

Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. For more information on asynchronous speech recognition, see the [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).

### HTTP request

`POST https://speech.googleapis.com/v1p1beta1/speech:longrunningrecognize`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "config": { object (`https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/RecognitionConfig`) }, "audio": { object (`https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/RecognitionAudio`) }, "outputConfig": { object (`https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#TranscriptOutputConfig`) } } ``` |

| Fields ||
|---|---|
| `config` | ``object (`https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/RecognitionConfig`)`` Required. Provides information to the recognizer that specifies how to process the request. |
| `audio` | ``object (`https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/RecognitionAudio`)`` Required. The audio data to be recognized. |
| `outputConfig` | ``object (`https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1p1beta1/speech/longrunningrecognize#TranscriptOutputConfig`)`` Optional. Specifies an optional destination for the recognition results. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/speech-to-text/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## TranscriptOutputConfig

Specifies an optional destination for the recognition results.

| JSON representation |
|---|
| ``` { // Union field `output_type` can be only one of the following: "gcsUri": string // End of list of possible types for union field `output_type`. } ``` |

| Fields ||
|---|---|
| Union field `output_type`. `output_type` can be only one of the following: ||
| `gcsUri` | `string` Specifies a Cloud Storage URI for the recognition results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist. |