TTS
Get a TTS request
GET
https://api.tunio.ai/ v1/ tts/ requests/ {request_id}Get the state of a TTS request. audio_url is present only while the state is completed; the file is deleted and the state becomes expired 7 days after completion.
路径参数
| 名称 | 类型 | 说明 |
|---|---|---|
| request_idRequired | string | Request ID |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| request | object | The TTS request. |
| audio_url | string | CDN link to the file, present only while completed and not expired. |
| completed_at | string | When the request finished, successfully or not. |
| cost | string | Cost in credits, as a decimal string: the estimate while pending or processing, the amount charged once completed, 0 when failed. |
| created_at | string | When the request was accepted. |
| duration | integer | Length of the audio in seconds, set once completed. |
| error | string | Machine-readable failure code, set only when state is failed; null otherwise. |
| expires_at | string | When the audio file is deleted, 7 days after completion. |
| format | string | Format of the resulting file. |
| model_id | string | Voice the text is spoken with. |
| request_id | string | Request ID. |
| speed | number | Tempo multiplier. |
| state | string | pending, processing, completed, failed or expired (audio removed 7 days after completion). |
| text | string | Text being synthesized. |
| success | boolean | Always true. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |