Skip to Content
Vatis TechAPI docs
Real-time transcription

Vocabularies

Give a live session or a file the names and terms it must get right, and get them written exactly as you listed them.

Names of people, companies, streets, medicines and products are the words a transcript gets wrong most often, and often the ones that matter most. A vocabulary is a list of them, written as they should appear: Vatis Tech, Ștefan cel Mare, Paracetamol Sinus, Strada 13 Septembrie. The service listens for them while it transcribes, and writes them as listed.

Live sessions and files

A vocabulary works in Romanian live sessions and in Romanian files sent for batch transcription (Files). It costs nothing extra: a session or a file with a vocabulary is billed by its audio seconds, as any other.

Two ways to give the list

HowSuits
A saved vocabularyvocabulary_id=voc_... in the query of the session, or in the form of the file. An Admin key saves the list once.A long list, up to 10,000 entries, that many sessions and files share.
The request's own listA vocabulary message, sent during the session; for a file, the vocabulary form field.A short list known only when the call starts or the file is sent, or one that changes during the call.

You can use both in one session or file: its own entries add to the saved ones. Both follow the same rules (Writing entries).

A saved vocabulary

Save the list once, then name it in each session or file by its id. A saved vocabulary belongs to the workspace: an Admin key creates, changes and deletes it, and every key of the workspace can list it, read it and use it, a Member key too. The console's Vocabularies page does the same without code: the workspace's owners and admins make and edit the lists there.

Save the list

POST/v1/vocabularies

Body: a JSON object with a name and its entries. Answers 201 and the vocabulary (Create a vocabulary).

curl -sS https://api.eu.vatis.tech/v1/vocabularies \
  -H "Authorization: Bearer $VATIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "streets-bucharest",
    "entries": ["Calea Victoriei", "Strada 13 Septembrie"]
  }'

Expected result: 201 and the vocabulary. Keep its id: sessions name it.

{"id": "voc_3f9c1a2b7d4e", "name": "streets-bucharest", "entry_count": 2,
 "created_at": "2026-11-11T09:14:03Z", "updated_at": "2026-11-11T09:14:03Z",
 "entries": ["Calea Victoriei", "Strada 13 Septembrie"]}

Name it in the session

Add vocabulary_id to the request parameters of the session. The rest of the program is the one of The whole program.

// Request parameters: the model and the saved vocabulary
const params = {
  model_id: "vatis_ro_v9_realtime",
  vocabulary_id: "voc_3f9c1a2b7d4e",
};

Expected result: session.started says what was applied in its config: the id, the strength, and how many entries the saved vocabulary had when the session started (trimmed here).

{"type": "session.started", "model_id": "vatis_ro_v9_realtime", ...,
 "config": {..., "vocabulary_id": "voc_3f9c1a2b7d4e", "vocabulary_strength": 1.0,
            "vocabulary_entries": 2}}

The vocabulary applies from the first word. An id that names no vocabulary of your workspace (a deleted one too) refuses the session: invalid_parameter, param vocabulary_id. A file names it in a form field: Files.

Change it later

Add entries, remove some, replace them all, or rename it (Update a vocabulary). With both, what is removed goes first.

VOCABULARY_ID=voc_3f9c1a2b7d4e

curl -sS -X PATCH https://api.eu.vatis.tech/v1/vocabularies/$VOCABULARY_ID \
  -H "Authorization: Bearer $VATIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"add_entries": ["Bulevardul Iuliu Maniu"]}'
  • New sessions and files only: a session reads its saved vocabulary once, when it starts, and a file when its job is accepted. Open sessions and accepted jobs keep the entries they started with, through a change or a delete.
  • A long list is prepared once and shared by the sessions that use it. The first session after a change may get its first text a moment later.
  • List vocabularies, Get a vocabulary and Delete a vocabulary do the rest.

The session's own list

Send the entries in a message, up to 250 of them:

{"type": "vocabulary", "entries": ["Vatis Tech", "Ispas"]}

Send it when session.started comes, before the audio, and it applies from the first word. The session needs no parameter for it.

// in ws.onmessage
if (message.type === "session.started") {
  console.log("connected");
  // the session's own entries, before the audio
  const entries = ["Vatis Tech", "Ispas"];
  ws.send(JSON.stringify({ type: "vocabulary", entries }));
  sendAudio();
} else if (message.type === "vocabulary.applied") {
  const { entries, total } = message;
  console.log(`vocabulary: ${entries} entries of its own, ${total} in all`);
}

Expected result: once the entries are in effect, the server answers with how many entries the session has of its own, and how many in all, with the saved vocabulary's:

{"type": "vocabulary.applied", "entries": 2, "total": 2}

An entry in both lists counts once in total. A message with a bad entry ends the session: Errors.

Change the list during a session

A voice bot knows what the caller may say next. When it asks for a street, it sends street names; when it asks for a medicine, medicine names. Send a new vocabulary message at any time:

  • It replaces the session's own entries of the message before. An empty list removes them. The saved vocabulary stays.
  • It applies to the audio the service transcribes next, within about two thirds of a second of audio. Audio already transcribed is not transcribed again, so a word said just before the message may miss the new list.
  • Each message gets its own vocabulary.applied, in the order you sent them. With multichannel=true it applies to both channels.
// Sets the session's own entries at any time: they replace the earlier
// ones, and an empty list removes them. The saved vocabulary stays.
function setVocabulary(entries) {
  ws.send(JSON.stringify({ type: "vocabulary", entries }));
}

// the bot just asked for a street
setVocabulary(["Calea Victoriei", "Strada 13 Septembrie", "Piața Unirii"]);

// the street is known: back to no entries of its own
setVocabulary([]);

Expected result: one answer for each message, in order. With a saved vocabulary, total includes its entries.

{"type": "vocabulary.applied", "entries": 3, "total": 3}
{"type": "vocabulary.applied", "entries": 0, "total": 0}

Files

POST/v1/speech-to-text

A file sent for batch transcription takes its vocabulary in three form fields, next to model_id and file (Create a transcript).

FieldValuesDefaultWhat it does
vocabulary_ida vocabulary id, voc_...A saved vocabulary of your workspace.
vocabularya JSON list of up to 250 entries, as a stringThe file's own entries, added to the saved ones.
vocabulary_strength0 to 21How hard the service leans towards the entries (Strength).

Send any of them, or none: a file without them is transcribed as always. vocabulary goes as text, as metadata does: ["Vatis Tech", "Ispas"]. Romanian models only (vatis_ro_v9).

curl -sS https://api.eu.vatis.tech/v1/speech-to-text \
  -H "Authorization: Bearer $VATIS_KEY" \
  -F model_id=vatis_ro_v9 \
  -F vocabulary_id=voc_3f9c1a2b7d4e \
  -F 'vocabulary=["Vatis Tech", "Ispas"]' \
  -F vocabulary_strength=1.5 \
  -F file=@speech.wav

Expected result: the transcript, with the entries written as listed wherever they were recognised, in its words and text, and a vocabulary key that says what was applied (trimmed here):

{"id": "tr_3b41a7db9aba52c0", "status": "completed", ...,
 "vocabulary": {"id": "voc_3f9c1a2b7d4e", "strength": 1.5, "entries": 4},
 "text": "...", "words": [...]}
  • vocabulary is there only when the request had a vocabulary: id, the saved vocabulary's, or null for the file's own entries alone; strength; entries, how many are in effect, the saved and the file's own together (one in both counts once). Never the entries themselves.
  • The saved vocabulary is read when the job is accepted. A change or a delete after that does not reach the job.
  • Nothing of the list is kept after the job ends: the transcript keeps only the counts.
  • Another model takes no vocabulary: the field is refused (Errors).

Strength

vocabulary_strength, in the query of the session or in the form of the file, sets how hard the service leans towards the entries, of both lists. It is a number from 0 to 2, set for the whole session or file.

StrengthWhat it does
0Does not lean at all: an entry is written as listed only when it was heard anyway.
1 (default)The tuned middle: finds many more of the listed words, and barely changes anything else.
2Finds the most listed words, and also writes more of them where they were not said.
  • Example address: wss://api.eu.vatis.tech/v1/speech-to-text/realtime?model_id=vatis_ro_v9_realtime&vocabulary_id=voc_3f9c1a2b7d4e&vocabulary_strength=1.5
  • Sent with vocabulary_strength only, a session has no saved vocabulary, and the strength applies to the lists its messages send.
  • In a file's form: -F vocabulary_strength=1.5.

Writing entries

An entry is a word or a phrase, written as it should appear in the transcript. The same rules hold for both lists, in a session and in a file.

  • 1 to 100 characters: letters (Romanian diacritics and the other letters of the Latin alphabet), digits 0 to 9, spaces, and - ' . inside or after a word: Cluj-Napoca, O'Neill, Dr. Popescu.
  • Every word starts with a letter or a digit. Marks alone (..., -) are refused.
  • Nothing else: no commas, quotes, tabs, other alphabets, or the curly apostrophes and long dashes that word processors put in. Type the plain ' and -.
  • Written as it should appear: capitals, diacritics and digits included. The service listens for the entry as it is said in Romanian: Strada 13 Septembrie as "strada treisprezece septembrie", and a letter Romanian does not use as the nearest one it does (Müller as "muller"). It writes the entry as you listed it.
  • Upper and lower case are the same entry: of vatis tech and Vatis Tech one stays, at the place of the first, with the spelling given last.
  • Spaces: the ones at the ends are trimmed, and a run of spaces between two words counts as one.

A list breaking a rule is refused whole, and the error names the place of the entry (entries[3], a file's vocabulary[3]), never the entry itself. A valid entry never needs escaping in JSON: it has no quote or backslash.

What you get back

  • final messages carry the entries as listed, wherever they were recognised, with punctuation, numbers and entities applied around them as without a vocabulary. An entry that is also a common word (Mare, a surname) is written with its capital in every sentence.
  • partial messages lean towards the entries too. Their text is the raw words being spoken, lowercase, as always.
  • session.started shows in config what was applied, never the entries: vocabulary_id when you sent one, and vocabulary_strength and vocabulary_entries when the query has vocabulary_id or vocabulary_strength. vocabulary_entries is how many entries the saved vocabulary had when the session started (0 without one). The three keys are absent otherwise.
  • vocabulary.applied answers each vocabulary message once its entries are in effect: entries, the session's own; total, with the saved vocabulary's.
  • A file's transcript carries the entries as listed in its words, text and segments, with punctuation and numbers applied around them, and says what was applied in vocabulary (Files).

What to expect

We measured it in live sessions on public Romanian test audio, with a list of 425 names and terms said in it. Your results depend on your audio and your list, so try it on your own calls before you rely on it.

StrengthListed terms recognised, live sessions
no vocabulary57 %
1 (default)69 %
274 %
  • Written as listed: of the listed terms recognised, 99 % were written exactly as listed, against 89 % without a vocabulary.
  • A list that does not apply barely changes anything at strength 1. With 500 entries never said in the audio, the word error rate went from 7.19 % to 7.20 %. At strength 2 it went to 7.32 %, with some listed words written where they were not said.
  • Phone calls gain about as much: on the same audio passed through a telephone line (8 kHz, as encoding=alaw sessions get it), listed terms recognised went from 51 % to 63 % at strength 1 and to 69 % at 2. But entries never said were written two to three times as often as on wideband audio.
  • A long saved list is prepared once and shared by its sessions. The first session after a change may get its first text a moment later.
  • Files gain a little more: on the same test audio sent as files, listed terms recognised went from 55 % to 71 % at strength 1 and to 75 % at 2 (the same recordings over a telephone line: 52 %, 65 % and 70 %). With 500 entries never said, the word error rate went from 6.64 % to 6.65 % at strength 1. The figures in the table are for live sessions.

Getting the best results

  • List the distinctive words the service gets wrong: people, companies, streets, products, medicines, written as they should appear.
  • Do not list everyday words. They are recognised already, and a listed word is written as listed everywhere.
  • Prefer distinctive names. An entry that starts with a common word can pull the word after it: with Comisia de la Veneția listed, "comisia pentru buget" may be written "comisia de buget".
  • A name said far from its spelling may not be found. The service listens for an entry as it would be read in Romanian.
  • On phone calls and in voice bots, list only what the caller may really say at that point. The session's own list fits this: send the street names when the bot asks for the street (Change the list during a session). On 8 kHz audio keep the strength at 1 or lower, and raise it only after checking on your own calls.
  • Start at strength 1. Raise it towards 2 only when listed words are still missed, and check that they do not appear where they were not said.
  • Save the long lists that many sessions and files share, and send the short ones that depend on the call or the file with it.

Limits

WhatLimit
Entries in a session's own list250 a message
Entries in a file's own list250, in vocabulary
Entries in a saved vocabulary10,000
Characters in an entry100
Saved vocabularies100 a workspace
A saved vocabulary's name1 to 64 letters, digits, dots, dashes or underscores; no two of a workspace alike
The JSON body of Create or Update8 MB
vocabulary_strength0 to 2
Pricenothing extra, for sessions and files alike

Every limit of the API: Limits and free credit.

Errors

In a session, a refusal is an error message, then the server closes the connection (Errors in a session). Nothing of a refused message is applied.

{"type": "error", "code": "invalid_parameter",
 "message": "vocabulary_id: no vocabulary with this id", "param": "vocabulary_id"}
code (close code)WhenWhat to do
invalid_parameter (1008)param vocabulary_id: no vocabulary of your workspace has that id, or it was deleted.Check the id: List vocabularies.
invalid_parameter (1008)param vocabulary_strength: not a number from 0 to 2 ("vocabulary_strength: 0 to 2, got 2.5").Send a number from 0 to 2.
invalid_parameter (1008)param entries[3]: that entry breaks the rules, and the message says which. param entries: not a list, or more than 250 entries.Fix the entry at that place (Writing entries).
invalid_parameter (1008)param the field's name: a vocabulary message with another field than type and entries.Send those two only.
invalid_parameter (1008)The speech service cannot take a vocabulary yet: "vocabularies are not available on this server yet: its speech service is an older release" (param vocabulary_id, vocabulary_strength or type). A session is never transcribed without the vocabulary it asked for.Try again later, or connect without the vocabulary.
internal_error (1011)The saved vocabulary cannot be read for a moment, before session.started.Connect again in a few seconds.

A file's request is refused before its job starts, as any other request (Request errors): 400 invalid_parameter, and param names the field. Nothing is transcribed.

{"error": {"code": "invalid_parameter",
 "message": "'vocabulary[1]' must be 1 to 100 characters: ...",
 "param": "vocabulary[1]", "request_id": "req_bf2fed760ba5437ba0933a57"}}
paramWhenWhat to do
vocabulary[3]That entry of the file's own list breaks the rules.Fix the entry at that place (Writing entries).
vocabularyNot a JSON list of strings, or more than 250 entries.Send a JSON list of at most 250.
vocabulary_idNo vocabulary of your workspace has that id, or it was deleted.Check the id: List vocabularies.
vocabulary_strengthNot a number from 0 to 2.Send a number from 0 to 2.
the field sentA model other than vatis_ro_v9, or a speech service that cannot take a vocabulary yet: "vocabularies are not available on this server yet: its speech service is an older release". A file is never transcribed without the vocabulary it asked for.Use the Romanian model; on an older server, try again later or send the file without the vocabulary.

The endpoints of saved vocabularies answer as the rest of the API (Errors):

Status and codeWhen
400 invalid_parameterA field unknown or not valid, an entry breaking the rules (param entries[3], add_entries[3]), more than 10,000 entries, or a query parameter. param names it.
400 missing_parameterNo name when creating one.
403 admin_onlyA Member key creating, changing or deleting one.
404 not_foundNo vocabulary of your workspace has that id.
409 name_takenAnother vocabulary of your workspace has that name.
409 vocabulary_limitA 101st vocabulary: delete one first.
413 request_too_largeA JSON body over 8 MB.

Next steps

On this page