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 | Request is the TTS request. |
| audio_url | string | AudioURL is the CDN link to the file, present only while completed and not expired. |
| completed_at | string | CompletedAt is when the request finished, successfully or not. |
| cost | string | Cost in credits: the estimate while pending or processing, the amount charged once completed, 0 when failed. |
| created_at | string | CreatedAt is when the request was accepted. |
| duration | integer | Duration of the audio in seconds, set once completed. |
| error | string | Error is a machine-readable failure code, set only when state is failed. |
| expires_at | string | ExpiresAt is when the audio file is deleted, 7 days after completion. |
| format | string | Format of the resulting file. |
| model_id | string | ModelID is the TTS model the text is spoken with. |
| request_id | string | RequestID uniquely identifies the request. |
| speed | number | Speed is the tempo multiplier. |
| state | string | State is pending, processing, completed, failed or expired (audio removed after retention). |
| text | string | Text is the text being synthesized. |
| success | boolean | Success indicates the request completed without errors. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |