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
| How | Suits | |
|---|---|---|
| A saved vocabulary | vocabulary_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 list | A 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. Withmultichannel=trueit 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).
| Field | Values | Default | What it does |
|---|---|---|---|
vocabulary_id | a vocabulary id, voc_... | A saved vocabulary of your workspace. | |
vocabulary | a JSON list of up to 250 entries, as a string | The file's own entries, added to the saved ones. | |
vocabulary_strength | 0 to 2 | 1 | How 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.wavExpected 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": [...]}vocabularyis there only when the request had a vocabulary:id, the saved vocabulary's, ornullfor 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.
| Strength | What it does |
|---|---|
0 | Does 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. |
2 | Finds 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_strengthonly, 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
0to9, 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 Septembrieas "strada treisprezece septembrie", and a letter Romanian does not use as the nearest one it does (Mülleras "muller"). It writes the entry as you listed it. - Upper and lower case are the same entry: of
vatis techandVatis Techone 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
finalmessages carry the entries as listed, wherever they were recognised, withpunctuation,numbersandentitiesapplied 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.partialmessages lean towards the entries too. Their text is the raw words being spoken, lowercase, as always.session.startedshows inconfigwhat was applied, never the entries:vocabulary_idwhen you sent one, andvocabulary_strengthandvocabulary_entrieswhen the query hasvocabulary_idorvocabulary_strength.vocabulary_entriesis how many entries the saved vocabulary had when the session started (0 without one). The three keys are absent otherwise.vocabulary.appliedanswers eachvocabularymessage 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,textandsegments, withpunctuationandnumbersapplied around them, and says what was applied invocabulary(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.
| Strength | Listed terms recognised, live sessions |
|---|---|
| no vocabulary | 57 % |
1 (default) | 69 % |
2 | 74 % |
- 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=alawsessions 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țialisted, "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
| What | Limit |
|---|---|
| Entries in a session's own list | 250 a message |
| Entries in a file's own list | 250, in vocabulary |
| Entries in a saved vocabulary | 10,000 |
| Characters in an entry | 100 |
| Saved vocabularies | 100 a workspace |
| A saved vocabulary's name | 1 to 64 letters, digits, dots, dashes or underscores; no two of a workspace alike |
| The JSON body of Create or Update | 8 MB |
vocabulary_strength | 0 to 2 |
| Price | nothing 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) | When | What 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"}}param | When | What to do |
|---|---|---|
vocabulary[3] | That entry of the file's own list breaks the rules. | Fix the entry at that place (Writing entries). |
vocabulary | Not a JSON list of strings, or more than 250 entries. | Send a JSON list of at most 250. |
vocabulary_id | No vocabulary of your workspace has that id, or it was deleted. | Check the id: List vocabularies. |
vocabulary_strength | Not a number from 0 to 2. | Send a number from 0 to 2. |
| the field sent | A 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 code | When |
|---|---|
400 invalid_parameter | A 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_parameter | No name when creating one. |
403 admin_only | A Member key creating, changing or deleting one. |
404 not_found | No vocabulary of your workspace has that id. |
409 name_taken | Another vocabulary of your workspace has that name. |
409 vocabulary_limit | A 101st vocabulary: delete one first. |
413 request_too_large | A JSON body over 8 MB. |
Next steps
- Create a vocabulary: every field and answer of the saved vocabularies' endpoints.
- Messages: every message of a session,
vocabularyandvocabulary.appliedamong them. - Query parameters: every option of a session.
- Create a transcript: every field of a file's request, the vocabulary's among them.