Batch transcription
Parameters
The form fields a request takes and the rules they follow, its headers, and files sent by their address.
Form fields, next to model_id and file. Every one but model_id is optional.
| Field | Values | Default | What it does |
|---|---|---|---|
model_id | vatis_ro_v9, vatis_multi_v1 | required | A model whose mode is batch (GET /v1/models): Romanian, or 99 languages with detection. |
file | a file | An audio or video file in any common format (WAV, MP3, M4A, FLAC, OGG, Opus, MP4, ...), up to 2 GiB. Send this or url. | |
url | an http:// or https:// address, up to 8192 characters | The address of a file: the API downloads it (Files at an address). | |
language_code | ro (also ron); with vatis_multi_v1, one of its languages or several, separated by commas | the model's | With vatis_ro_v9, files are Romanian. With vatis_multi_v1, one code is the file's language; several, such as ro,en, have the language detected among them only, part by part, so a recording that mixes them is transcribed in each; none, detected among all its languages. A language the model does not offer: 400 invalid_parameter. |
diarize | true, false | false | Tells the speakers apart (Speakers). |
num_speakers | 1 to 32 | How many people speak, when you know. Above 8, a slower speaker model with no limit runs. Without diarize it has no effect. | |
multichannel | true, false | false | At most 2 channels, each transcribed alone: the channel is the speaker. Not with diarize. |
remove_fillers | true, false | false | Removes filler words and hesitations from the text. |
punctuation | true, false | true | Punctuation and capitals, the capitals of names too. false: lowercase words without punctuation, and segments cut on pauses alone. |
numbers | digits, words | digits | digits: numbers as digits, times and units in short form (30, 3:30, 70km/h). words: in words (treizeci, trei și treizeci de minute). |
timestamps | word, none | word | none: words keep their text, confidence and speaker; start and end are null. |
vocabulary_id | a vocabulary id, voc_... | A saved vocabulary of your workspace (Vocabulary). | |
vocabulary | a JSON list of up to 250 entries, as a string | The file's own names and terms, added to the saved ones. | |
vocabulary_strength | 0 to 2 | 1 | How hard the service leans towards the entries. |
async | true, false | always on | Taken, and changes nothing: every request is answered 202 at once (Send now, collect later). |
webhook | true, false | false | Also post the result to every enabled webhook when the job ends (Webhooks). |
webhook_id | a webhook's id | Post the result to this webhook only. | |
metadata | a JSON object, as a string, up to 16 KB | Your own data, returned unchanged in the transcript and the webhook delivery. | |
store | true, false | true | false: keep nothing after the webhook delivery. Needs webhook or webhook_id (Keeping nothing). |
exports | any of txt, srt, vtt, separated by commas | The finished transcript also carries these files (Exports). |
Headers and the token
| Name | Values | What it does |
|---|---|---|
Header Authorization | Bearer <api key> | Your API key (Authentication and API keys). |
Header Idempotency-Key | 1 to 255 printable characters | Repeat a request safely (Idempotency). |
Query token | a single-use batch token | Instead of the key, for a web page that uploads a file (Tokens for web pages). The only query parameter this endpoint takes. |
Rules for the fields
- The body is
multipart/form-data. A request with aurland no file may also beapplication/x-www-form-urlencoded. Anything else:400invalid_request. - Booleans are
trueorfalse(also1or0, in any case). An empty value counts as not sent. - Strict fields: an unknown field, a field sent twice, or a second file is
400invalid_parameter, withparamnaming it (Strict parameters). fileandurl: both is400invalid_parameter(paramurl), neither is400missing_parameter(paramfile).- Fields that do not go together,
400invalid_parameter:multichannelwithdiarize(paramdiarize);store=falsewithout a webhook (paramstore);srtorvttinexportswithtimestamps=none(paramexports). - Webhooks:
webhook=truewith no enabled webhook (paramwebhook), or an unknown or turned-offwebhook_id(paramwebhook_id):400invalid_parameter. - Size: the form fields together (all but the file) hold at most 1 MB, in at most 200 parts.
Vocabulary
A Romanian file can take a vocabulary: the names and terms it must get right. Wherever they are recognised, they are written exactly as listed, in words and text. A saved one goes by its id, and the file's own entries as a JSON list, up to 250:
curl -sS -H "Authorization: Bearer $VATIS_KEY" https://api.eu.vatis.tech/v1/speech-to-text \
-F model_id=vatis_ro_v9 -F vocabulary_id=voc_3f9c1a2b7d4e \
-F vocabulary='["Vatis Tech", "Ispas"]' -F file=@speech.wavThe transcript then says what was applied, never the entries: "vocabulary": {"id": "voc_3f9c1a2b7d4e", "strength": 1, "entries": 427}. Romanian models only, at no extra price. How to write entries, the strength, and the errors: Vocabularies.
Files at an address
- The API downloads the file itself, so the address must be reachable from the internet. Loopback, link-local and private network addresses are refused:
400invalid_parameter, at once for an address, in the job for a name that leads to one. - Each redirect is checked like the first address. A download that fails (no answer, an answer other than
200, too many redirects, too slow) fails the job with400invalid_parameter; a file over 2 GiB with413request_too_large; an empty one with400invalid_audio. - The download happens in the job, after the request is answered: a download that fails ends the job
failed, with these errors.