PATCH rendition/…/preferences/tts/…
Allows partial updates of a text-to-speech preferences.
Resource URL
https://www.drillster.com/api/2.1.1/rendition/{drillable}/preferences/tts/{language}
Parameters
Field | Type | Description |
---|---|---|
drillable required |
String | The ID of the drill. Example value: 06dkCv4mDVORJKlnwmyzng |
language required |
String | The language code of the voice to convert text to speech. Scheme: ISO 639-1. Example value: en |
Response
A 2.1.1 TtsPreferences object, with the text-to-speech preferences updated.
Example request
PATCH https://www.drillster.com/api/2.1.1/rendition/06dkCv4mDVORJKlnwmyzng/preferences/tts/en
Content-Type: application/json-patch+json
Request body
[
{
"op":"replace",
"path":"/country",
"value":"AU"
},
{
"op":"replace",
"path":"/gender",
"value":"female"
}
]
Response
{
"language":"en",
"country":"AU",
"gender":"FEMALE",
"speed":"NORMAL"
}
Error responses
The following error situations are possible:
ID | Response code | Description |
---|---|---|
drill_not_found |
404 (Not found) | Drill does not exist in the system or is not in the repertoire of the requesting account |
language_not_found |
404 (Not found) | The specified language was not found |
invalid_country |
400 (Bad request) | An empty country code was provided |
invalid_gender |
400 (Bad request) | A voice gender other than MALE or FEMALE was provided |
invalid_speed |
400 (Bad request) | A voice speed other than SLOW , NORMAL or FAST was provided |
patch_error |
500 (Internal error) | There was an error trying to update text-to-speech preferences. This might be caused by an incorrect path, unknown operation or invalid object provided in one of the patch commands |
Last updated on