TTS Voices
Schema
A TTS Voice is used to denote how the speaker sounds, this affects the gender and language.
Type Object
| Name | Type | Description |
|---|---|---|
accent_code |
String | Desc. accent_code |
id |
String(format:uuid) | Desc. id |
inserted_at |
String(format:date-time) | An ISO8601 formatted timestamp |
language_code |
String | The language of the voice |
name |
String(1..255) | Name of the TTS Voice |
Desc. accent_code
Any specialized variant or dialect of the language
Desc. id
A Universally unique identifier, which identifies the resource
Example
{
"accent_code": "us",
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"language_code": "en",
"name": "John Doe (en-US)"
}
API
List TTS Voices
GET /api/v1/tts/voices HTTP/1.1
Retrieve a list of all available TTS Voices
The same operation is also available as:
GET /api/v1/voip/tts/voices HTTP/1.1
Query Parameters
| Name | Type | Description |
|---|---|---|
| first | Integer | Query Desc. first |
| last | Integer | Query Desc. last |
| after | String | Query Desc. after |
| before | String | Query Desc. before |
Query Desc. first
The number of items to return starting from the 'after' cursor
Query Desc. last
The number of items to return behind the 'before' cursor
Query Desc. after
The cursor representing the starting point of a 'first' based paging
Query Desc. before
The cursor representing the starting point of a 'last' based paging
Request
GET /api/v1/tts/voices HTTP/1.1
Accept: application/json
Response 200
application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 476
{
"count": 1,
"page_info": {
"end_cursor": "YXJyYXljb25uZWN0aW9uOjQ=",
"has_next_page": true,
"has_previous_page": false,
"start_cursor": "YXJyYXljb25uZWN0aW9uOjA="
},
"results": [
{
"data": {
"accent_code": "us",
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"language_code": "en",
"name": "John Doe (en-US)"
},
"type": "tts_voice"
}
]
}
Response 403
application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
"errors": [
{
"code": "access_denied.no_scope",
"detail": "No scope available to user role",
"params": {
"action": "index",
"level": "guest",
"resource": "resource"
},
"sub_code": "none",
"title": "Access Denied, no scope available"
}
]
}
Retrieve TTS Voice by ID
GET /api/v1/tts/voices/{id} HTTP/1.1
Lookup a TTS Voice Entry by its ID
The same operation is also available as:
GET /api/v1/voip/tts/voices/{id} HTTP/1.1
Path Parameters
| Name | Type | Description |
|---|---|---|
| id | String(format:uuid)! | ID |
Request
GET /api/v1/tts/voices/{id} HTTP/1.1
Accept: application/json
Response 200
application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 225
{
"data": {
"accent_code": "us",
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"language_code": "en",
"name": "John Doe (en-US)"
},
"type": "tts_voice"
}
Response 403
application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
"errors": [
{
"code": "access_denied.no_scope",
"detail": "No scope available to user role",
"params": {
"action": "index",
"level": "guest",
"resource": "resource"
},
"sub_code": "none",
"title": "Access Denied, no scope available"
}
]
}
Response 404
application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
"errors": [
{
"code": "not_found",
"detail": "The specified resource could not be found",
"params": {
"resource": {
"id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
"type": "user"
}
},
"sub_code": "none",
"title": "Not Found"
}
]
}