The notification-area icon

A microphone in the notification area that shows whether the dictation types, listens, sleeps or is off, and a menu that changes the language, the Vosk model and the Whisper refinement without restarting.

vosk-cli-dictation-tray is a separate, optional program. It draws a microphone in the notification area and drives the running dictation through its control socket; the dictation runs the same without it.

The icon's menu in English: a status line reading "Dictating — English — Vosk light + Whisper small", the entries to turn dictation off, enter deep sleep, finish and copy the text and cancel the session, then the Language, Model, Refinement and Correction submenus, with the Language, Model and Refinement submenus open on the right and the current choice marked in each.

Install the icon

The icon comes as a second package, of the same version as the main one:

# Debian 12+, Ubuntu 24.04+, Mint 22+...
sudo apt install ./vosk-cli-dictation-tray_0.6.1~beta_all.deb

# Fedora
sudo dnf install ./vosk-cli-dictation-tray-0.6.1~beta-1.fc44.noarch.rpm

# openSUSE Leap
sudo zypper install ./vosk-cli-dictation-tray-0.6.1~beta-1.leap160.noarch.rpm

# Arch Linux
sudo pacman -U ./vosk-cli-dictation-tray-0.6.1_beta-1-any.pkg.tar.zst

Its graphics library, PySide6 (Qt for Python), is not packaged by the distributions. The package installs it with pip into a private virtual environment, once, on first configuration: network access is needed at that point only. Then start vosk-cli-dictation-tray from the applications menu or a terminal. A second launch answers that the icon is already running.

From a Git checkout:

cd tray
python3 -m venv venv && venv/bin/pip install -e .
venv/bin/vosk-cli-dictation-tray

The four states

Colour and shape give the state, so the icon stays readable when red and green look alike.

IconStateWhat the tool does
Red microphone with sound wavesDICTÉEthe microphone is open and the voice is typed
Orange solid microphoneÉCOUTEthe microphone is open, dictation is off, the wake phrase is awaited
Blue microphone under a crescent moonVEILLEthe microphone is released
Green outlined microphonenoneno dictation is running; a click starts it

A left click starts the dictation when none runs and toggles it otherwise. The tooltip repeats the status line and reads “Loading model…” while a model loads.

The menu

A right click opens the menu, in this order:

  1. a status line that does not react: state, language, engine;
  2. turn dictation on or off, enter or leave deep sleep, finish and copy the text, cancel the session;
  3. Language: follow the system, or one of the five languages; a language with no installed model is marked “to download”;
  4. Model: light or full; a missing model shows its size, and choosing it starts the download, with a notification at the end;
  5. Refinement: none, or a Whisper size marked GPU or CPU (Whisper refinement); greyed, with its reason, while faster-whisper is not installed;
  6. Correction: greyed, with its reason: the correction of the text by a local language model is not shipped;
  7. “Revert to the configuration”, which forgets the choices made in the menu;
  8. activate voice dictation or quit it (started detached from any terminal, its output in ~/.local/state/vosk-cli-dictation/instance.log), “Launch the icon at login”, quit the icon. Quitting the icon leaves the dictation running.

The package registers the icon for the next login; unchecking “Launch the icon at login” removes it for your account.

Change language, model or refinement without restarting

A choice in the menu loads the new model beside the old one, which keeps serving; the swap happens between two utterances, in the same process, and the text of the session in progress is kept. If the load fails, the old model stays and the icon says so in a notification. The menu choices are remembered in ~/.local/state/vosk-cli-dictation/selection.yaml and read again at the next launch; config.yaml is never rewritten.

The language follows the system

With default_model: system, the factory value, the dictation takes the language of LC_ALL, otherwise LC_MESSAGES, otherwise LANG, when a model of that language is installed, and English otherwise. The order of priority is the -l option, then the choice remembered from the menu, then default_model. vosk-cli-dictation --diagnose prints the language and the model with their origin (cli, selection, config or system).

Light and full models

Each of the five languages has a light model (about 50 MB) and a full one (1.3 to 1.9 GB). The full model is downloaded from the menu or by the command line, which refuses to start without three times its size in free disk space, because the archive and its content coexist for a while:

vosk-cli-dictation --download-model fr --model-size big

On the project’s test set, French word errors fall from 15.4 % with the light model to 10.1 % with the full one; the memory after loading rises from 170–210 MB to about 3.3 GB (4.4 GB in German, 3.4 GB in Spanish, 3.6 GB in Chinese on a Raspberry Pi 4).

The same state, without the icon

The icon reads one line of JSON, which the command prints too:

vosk-cli-dictation --info
OK {"state":"ÉCOUTE","lang":"fr","lang_source":"config","langs":["de","en","fr"],"model":"vosk-model-small-fr-0.22","models":[{"folder":"vosk-model-small-fr-0.22","size":"small"},{"folder":"vosk-model-fr-0.22","size":"big"}],"refine":"none","refine_stats":{"done":0,"timeout":0,"error":0,"rejected":0,"skipped":0,"mean_ms":0},"device":"cpu","correction":"none","loading":false,"last_error":null,"refine_options":["none","whisper:tiny","whisper:base","whisper:small","whisper:medium","whisper:large-v3-turbo"],"refine_reason":null,"refine_download":null}

The changes the menu sends are lines of text on the same socket, set-lang, set-model, set-refine and reset-selection, described in man vosk-cli-dictation.