VCode home

Install the transcription service on the box

Agents: claude, codex, opencode · On: desktop · optional

bash install.sh voice builds a python venv, downloads a 482 MB speech model, starts v-code-voice.service on loopback, and points VCode at it. After that the mic appears in the composer.

Why you would use it

Dictation is optional per machine. Run this on the box you dictate to. It is a separate command from install/update because of the download size: most machines never want it.

How to use it

  1. Install VCode first (install-as-systemd-units, bash install.sh install); this command needs the env file to exist.

  2. Make sure uv, ffmpeg, curl, tar and sha256sum are on PATH. The script names any that are missing and stops.

  3. Run:

    bash install.sh voice                 # 4 decode threads
    bash install.sh voice --threads 8     # and remember 8 for every later render
    
  4. It ends with systemctl --user status for the units, so you can see the sidecar running.

  5. Follow it with journalctl --user -u v-code-voice -f if a clip fails.

Run it from the main checkout: install, update, voice and voice-browser refuse to run from a linked git worktree.

What you see

The script prints what it did and what it skipped: venv already there, left alone: …, model already there, left alone: …, added VCODE_STT_URL to … or VCODE_STT_URL already set, left alone: …, and set VOICE_THREADS=8 in …. An env file with an empty VCODE_STT_URL gets the warning warning: VCODE_STT_URL is empty in …, so voice stays off.

The sidecar's first journal line is voice sidecar: sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8 on http://127.0.0.1:3446 with 4 threads. GET http://127.0.0.1:3446/health answers {"ok": true, "model": "…"}.

In the app, the mic (#mic) and the cog's Voice group (#settings-voice) appear after the VCode restart the script performs.

Options and settings

Option Default What it changes
--threads N 4 CPU threads sherpa-onnx decodes on. Written to the env file as VOICE_THREADS and read back by every later render
VCODE_STT_URL set to http://127.0.0.1:3446 when absent Where VCode forwards the phone's clip. Never overwritten once present
--state-dir DIR ~/.local/state/v-code Where the venv (voice/venv) and model (voice/models/…) live
--dry-run off Print what would happen and change nothing
Sidecar port 3446 Rendered into ExecStart; the voice unit reads no env file
install --voice off Does the same provisioning at the end of a fresh install

Limits and known gaps