TTS Schemas
JobErrorResult
Example
1 2 3 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| error | string | false | The error that occurred |
JobStatus
The progress status of a job
Example
1 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| JobStatus | string | true | The progress status of a job |
Enumerated Values
| Property | Value |
|---|---|
| JobStatus | complete |
| JobStatus | created |
| JobStatus | queued |
| JobStatus | in_progress |
| JobStatus | failed |
| JobStatus | cancelled |
JobStatusResponse
Example
1 2 3 4 5 6 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| job_id | string | false | The id associated with a job |
| status | JobStatus | false | The progress status of a job |
| created_at | string(date-time) | false | The time that the job was created at |
| modified_at | string(date-time) | false | The time that the job was last modified at |
PaginationInfo
Example
1 2 3 4 5 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| page | integer | false | - |
| per_page | integer | false | - |
| page_count | integer | false | - |
SortableFieldTts
An enumeration.
Example
1 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| SortableFieldTts | string | true | An enumeration. |
Enumerated Values
| Property | Value |
|---|---|
| SortableFieldTts | time |
| SortableFieldTts | label |
| SortableFieldTts | text |
SynthesizedAudioFormat
An enumeration.
Example
1 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| SynthesizedAudioFormat | string | true | An enumeration. |
Enumerated Values
| Property | Value |
|---|---|
| SynthesizedAudioFormat | opus |
| SynthesizedAudioFormat | mp3 |
| SynthesizedAudioFormat | wav |
TtsConfig
Configuration for the job execution
Example
1 2 3 4 5 6 7 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| model | string | true | The name of TTS model to use |
| wait | boolean | true | If set to true, the request blocks until the execution is finished. Otherwise, the request returns job_id which can be used to inquire about the job. For short TTS request, this is typically set to true as the client is expected to wait for the execution. For TTS request > 280 characters, this must be set to false. |
| pitch | number | true | The pitch offset of the generated speech audio |
| tempo | number | true | The tempo of the generated speech audio |
| audio_format | SynthesizedAudioFormat | true | The file format of the generated speech audio |
TtsJobRequest
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| config | TtsConfig | true | The configuration to run a job with |
| request | TtsRequest | false | The text to synthesize |
TtsJobsList
List of TTS jobs
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| pagination | PaginationInfo | true | - |
| length | integer | false | - |
| data | [TtsResponse] | false | - |
TtsModel
The model to use for speech synthesis
Example
1 2 3 4 5 6 7 8 9 10 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| name | string | false | Name of the model |
| label | string | true | Human-readable name of the model |
| language | string | false | Language of the model |
| domain | string | false | The pronunciation style of the TTS model |
| voice | string | false | The alias for the TTS model persona |
| gender | VoiceGender | false | The gender of the TTS model |
| channels | integer | false | The number of channels of the generated audio |
| samplerate | integer | false | The sample rate of the generated audio |
TtsModelList
List of all available TTS models
Example
1 2 3 4 5 6 7 8 9 10 11 12 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| TtsModelList | [TtsModel] | true | List of all available TTS models |
TtsRequest
The request payload for a speech synthesis job
Example
1 2 3 4 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| label | string | true | An optional label to give to the job |
| text | string | false | An optional text to generate speech from |
TtsResponse
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| job_id | string | false | The id associated with a job |
| status | JobStatus | false | The progress status of a job |
| created_at | string(date-time) | false | The time that the job was created at |
| modified_at | string(date-time) | false | The time that the job was last modified at |
| request | TtsRequest | true | The request payload for a speech synthesis job |
| result | true | - | |
| job_config | TtsConfig | true | Configuration for the job execution |
| model | TtsModel | true | The model to use for speech synthesis |
TtsResult
The result of a speech synthesis job
Example
1 2 3 4 5 6 7 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| data | string | true | The audio data in base64 encoding |
| path | string | true | The url to retrieve the audio data from. This url expires in 2 hours |
| format | SynthesizedAudioFormat | true | An enumeration. |
| duration | number | true | The duration of the synthesized speech audio |
| samplerate | integer | true | The sample rate of the synthesized speech audio |
| channels | integer | true | The number of channels of the synthesized speech audio |
VoiceGender
An enumeration.
Example
1 | |
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
| VoiceGender | string | true | An enumeration. |
Enumerated Values
| Property | Value |
|---|---|
| VoiceGender | male |
| VoiceGender | female |