# Poll the Result of the TTS

This endpoint retrieves the result of a TTS task based on the taskId. Which you get returned as a string prior in the `/createTTS`&#x20;

Note please to avoid overloading the API that you should poll the endpoint every 1-2 seconds.

## Example request

***

Post: <https://api.revoice.live/resultTTS>

<table><thead><tr><th width="175">Parameters</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>taskId</td><td>String</td><td>The JobId for TTS request. should be acquired prior to making this request in the <a href="make-a-tts-request">/createTTS request</a></td></tr></tbody></table>

```http
POST https://api.revoice.live/resultTTS

Content-Type: application/json

{
  "taskId": "46876676774653688410"
}

```

### Example Response

***

response structure:

<table><thead><tr><th width="156">Parameters</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>errorId</td><td>Integer</td><td>For a successful request the errorId will be always 0, if there has been an error it will be above 0. The status is not affected by this.</td></tr><tr><td>status</td><td>String</td><td>The processing status of your request.<br>"pending" = queued by the processing node<br>"processing" = being processed by the processing node<br>"completed" = TTS generation completed by node<br>"failed" = Processing node failed to process TTS request<br></td></tr><tr><td>message</td><td>String</td><td>Contains description on the status of the request</td></tr><tr><td>audio_data</td><td>String</td><td>the audio data encoded as base64, decode it for use</td></tr></tbody></table>

### Example Response

successful response:

```json
{
  "errorId": 0,
  "status": "completed",
  "message": "ML Node successfully processed text-to-speech request",
  "audio_data": "base64encodeddata..."
}
```

failed response:

```json
{
  "errorId": 1,
  "status": "failed",
  "message": "ML Node is overloaded or weight is invalid"
}
```
