January 14th 2022

General

👍

Updated error response schemas

The new schema for every endpoint is:

Response:

{
    errors: list[str]
}

📘

New Feature: Script Versions

You can now create and maintain a single script in several different versions such as different languages.

You can now nest alternative scriptText values as different versions of your Script. Here's an example of a use-case:

<we could use a creative use-case here, that would be good for a blog article - for example, "Let's say you create a script for an advertisement of your product - X and the content of it has to vary because of different targets. In this example, we're going to target different lingual groups. [...]" And then we fill the examples below with a creative content.>

- Creating versions
POST /script

{
    "projectName": "example",
    "moduleName": "example",
    "scriptName": "example",
    "scriptText": "default text",
    "versions": {
        "es": "text in spanish",
        "fr": "text in french",
        "de": "text in german"
    }
}

If a name field is not provided, then the name is defaulted to default.

You also have the possibility to specify your own scriptId instead of project/module/script names. In such case project/module/script names are set to the same value as scriptId:

{
    "scriptId": "exampleScriptId",
    "scriptText": "default text",
    "versions": {
        "es": "text in spanish",
        "fr": "text in french",
        "de": "text in german"
    }
}

- Updating versions
POST /script

Once a Script resource is created, it can be referred to per combination of project/module/script names or the scriptId. Let's say you want to append more versions to an existing Script resource, and also modify some of the existing versions, while using your custom scriptId.

{
    "scriptId": "exampleScriptId",
    "versions": {
       "es": "edited text in spanish",
       "rus": "text in russian"
    }
}

- Retrieving versions
GET /script/(scriptId)
Query parameters: version

- Deleting versions
DELETE /script/(scriptId)
Query parameters: version

- Producing Speech for version
POST /speech

{
    "scriptId" : "exampleScriptId",
    "voice": "Alena",
    "version": "rus"
}

- Producing Mastering for version
POST /mastering

{
    "scriptId" : "exampleScriptId",
    "version": "rus"
}

Script Resource

👍

Character limits per section and whole scriptText field have been elevated and are now set in context of the string size:

  • 4900 bytes per section string
  • 5.9 MB per scriptText string

👍

Added DELETE method:

  • DELETE /script/(scriptId)
    Query parameters: version

👍

Set character limit for project/module/script names to 60 characters.

  • Long names exceeded our internal metadata limits.

Speech Resource

👍

Bugfixes

  • Fixed a bug where some special characters were not properly encoded.
  • Fixed a bug where the content of some errors from third party providers was missing.
  • Fixed a bug where Scripts with very long names couldn't be produced (character limit).

👍

Improvements

  • Improved the performance of Retro voices.
  • Improved the performance of Speech effects.
  • Improved the responses related to invalid request parameters.

👍

Added version field as part of the new Script versions feature.

👍

No more timeouts on demanding text, POST /speech switches to asynchronous mode after 30 seconds

Now, when a Script takes long to synthesize in the synchronous mode (which is set by default), after 30 seconds it switches to asynchronous mode, returning a status code of 202 with a requestId in the body that can be used to get the status of the synthesis through GET /speech?requestId=<requestId>. A status code of 201 indicates successful creation of the Speech files.

Mastering Resource

👍

Added version field as part of the new Script versions feature.