Skip to content

Initiate batch session

Initiate a new asynchronous Speech to Text session for a specific language.

URL: POST https://api.scriptix.io/api/v3/speech-to-text/session

Request headers

The following headers need to be present

Parameter Value Description
content-type application/json
x-zoom-s2t-key Scriptix Batch API Token API key of type batch needed for authorization

JSON Body Schema

Key Type Description
language string Set the language for this session. A list of available languages can be retrieved from the API portal.
webhook_url string (Optional) If set a HTTPS callback will be made to a web endpoint once the transcription is done.
webhook_method string (Optional) Enum: POST, PUT. Specify the method to use for the HTTP callback. Requires callback_url to be set.
webhook_headers string[] (Optional) Array of headers that needs to be present in the callback request. Requires callback_url to be set.
keep_source boolean Default: false. If set to true the uploaded file will be saved on scriptix servers to be used in the editors. Files will be re-encoded to low quality.
media_source string (Optional) If set, will immediately start the session by downloading a file on the provided URL
punctuation boolean Default: false. If set to true punctuation will be enabled.
multichannel boolean Default: false. Enable multichannel support, if activated all channels (eg. left and right) are treated separately. This is useful in setups where each speaker gets their own channel (eg. call centers, or meeting halls). If used with equal channels the result of the speech to text session will result in (unwanted) doubles.
document CreateDocument (Optional) If set, creates automatically an document after creation
meta_data dict[str, str] (Optional) Save metadata for the session

JSON Payload

{
    "language": "en-us"
}

Example "JSON Payload" for URL downloading

{
    "keep_source": true | false,
    "media_source": "https://x-location/x-file.mp3",
    "language": "en-US",
    "meta_data": {
        "key": "value"
        "duration": "100"
    }
}

Responses

Status code Description Payload
200 New session initialized
400 Invalid language
401 Unauthorized
415 Content Invalid
422 Body Invalid
500 Server Error

"Successful creation"

On successful creation an API response with the created session id will be provided.

{
  "count": 1,
  "total_results": 1,
  "result": {
    "duration": 0,
    "error": "string",
    "filename": "string",
    "media_type": "string",
    "media_url": "string",
    "session_id": "string",
    "status": "string"
  }
}
An example:
{
    "count": 1,
    "total_results": 1,
    "result": {
        "duration": 117,
        "error": null,
        "filename": "https---x-filelocation.com-x-file.mp3",
        "media_type": "audio",
        "media_url": "https://s3.gra.cloud.ovh.net/scriptix-data-dev/account-1/32d91a4f00000100000256e470-https---...8c722639a3662d2cf2a8349f7",
        "session_id": "32d91a4f00000100000256e470",
        "status": "uploaded"
    }
}