Skip to main 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:

ParameterValueDescription
content-typeapplication/json
x-zoom-s2t-keyScriptix Batch API TokenAPI key of type batch needed for authorization

JSON Body Schema

KeyTypeDescription
languagestringSet the language for this session. A list of available languages can be retrieved from the API portal.
webhook_urlstring(Optional) If set a HTTPS callback will be made to a web endpoint once the transcription is done.
webhook_methodstring(Optional) Enum: POST, PUT. Specify the method to use for the HTTP callback. Requires callback_url to be set.
webhook_headersstring[](Optional) Array of headers that needs to be present in the callback request. Requires callback_url to be set.
keep_sourcebooleanDefault: 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_sourcestring(Optional) If set, will immediately start the session by downloading a file on the provided URL.
punctuationbooleanDefault: false. If set to true punctuation will be enabled.
multichannelbooleanDefault: 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.
documentCreateDocument(Optional) If set, creates automatically a document after creation.
meta_datadict[str, str](Optional) Save metadata for the session.

JSON Payload

Basic example

{
"language": "en"
}

**Example "JSON Payload" ** for URL downloading

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

Responses

Status codeDescriptionPayload
200New session initializedResponse body with session ID
400Invalid languageError message
401UnauthorizedAuthentication error
415Content InvalidInvalid content-type
422Body InvalidInvalid request body
500Server ErrorInternal 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"
}
}