Repository navigation
Troubleshooting
Start here:
blackvoice doctorIt lists every Python package, system tool, model and microphone, marks what is missing, and prints the exact command to fix each gap. Most problems on this page are visible in its output.
If the symptom is that speaking does nothing, run this as well. It answers
the one question doctor cannot — whether audio actually reaches the program:
blackvoice micThe bar should move when you talk. If it does not, the fault is below Black Voice, and the output names where to look.
For more detail:
blackvoice -v run --no-ui # debug logging in the terminal
tail -f ~/.cache/blackvoice/blackvoice.logPortAudio is missing or no input device is available.
sudo apt install portaudio19-dev # then reinstall the Python package
pip install --force-reinstall sounddevice
blackvoice devicesIf devices lists nothing, the problem is below Black Voice — check
arecord -l and your desktop's sound settings.
It falls back to headless automatically. To get the tray back:
pip install PyQt6Some GNOME setups need the AppIndicator extension. The overlay and voice both
still work — trigger it with the wake word or blackvoice text.
Models missing. doctor will say so.
blackvoice setupWrong microphone.
blackvoice devicesThen set the index:
Speaking too quietly. Lower the threshold:
"audio": { "silence_threshold": 0.008 }Or skip it — click the tray icon, which needs no wake word at all.
“black” is close to back, block, blank, lack and slack. A two-word trigger is much more reliable:
"wake": { "phrases": ["hey black", "ok black"] }"audio": { "silence_timeout": 2.0 }audio.calibrate_noise (on by default) should already fix most of this by
itself: it measures your room's actual ambient noise for about a second at
the start of each command and raises the effective threshold to clear it,
rather than trusting one fixed number for every room. See what it computed
for your room:
blackvoice micThat prints the configured floor next to the live calibrated threshold. If listening still runs long after that:
- Lower
silence_timeout— recognition now tests loudness several times a second rather than once per half-second block, so it no longer needs the padding older versions did:"audio": { "silence_timeout": 0.6 }
- A genuinely loud, constant background noise (a fan, traffic) can still
raise the calibrated threshold enough to miss quiet speech. Raise
calibration_marginif it is over-correcting, or turn calibration off and set a fixed floor yourself if your room's noise is unusually inconsistent:"audio": { "calibrate_noise": false, "silence_threshold": 0.02 }
First find out whether it is recognition or routing:
blackvoice text "the exact phrase"If text mode does the right thing, recognition is the problem. If it does the wrong thing, the routing rules are — open an issue with the phrase.
Install whisper.cpp. It is more accurate than Vosk, and is the single
biggest fix for recognition quality generally. blackvoice doctor calls out
whisper.cpp as missing when it applies to your setup. Fix it with:
blackvoice setup --whisperwhisper.cpp is a native binary and a separate download, not a Python package
— see Configuration for what
blackvoice doctor and blackvoice setup --whisper actually check.
Use a bigger model. The small model is ~50 MB and tuned for commands. Download a larger one from alphacephei.com/vosk/models and point at it:
"speech": { "model_en": "/home/you/models/vosk-model-en-us-0.22" }Lean on the cloud more. Raise the threshold so hybrid mode falls back more often:
"speech": { "fallback_confidence": 0.75 }Or use it exclusively — "mode": "online".
blackvoice say "testing"The engine it picked is printed first. If it says none:
sudo apt install espeak-ngI cannot understand a word of it. espeak-ng is a formant synthesiser; it is tiny and instant, which is why it is the fallback, but plenty of people cannot follow it. Piper sounds like a person:
pip install piper-tts
blackvoice voice --install
blackvoice voice --testThen switch to it in Settings → Speech output, or:
"voice": { "engine": "piper" }The voice is about 60 MB and is fetched on first use.
Still hard to follow but not that bad. Slow it down — the default is 145 words per minute and lower helps:
"voice": { "rate": 120 }sudo apt install pulseaudio-utils # gives you pactlPipeWire users get wpctl from pipewire-utils / wireplumber. Check which one
you have:
which wpctl pactl amixerYou are probably not in the video group:
sudo usermod -aG video $USERLog out and back in. Or install brightnessctl, which handles permissions
itself:
sudo apt install brightnessctlInstall any one of these: gnome-screenshot, spectacle, grim (Wayland),
scrot (X11), maim, imagemagick.
sudo apt install playerctl
playerctl status # must show a running playerCheck the name Black Voice would use:
which firefox
blackvoice -v text "open firefox"The debug log shows what it resolved to. Set an explicit default if auto-detection picks the wrong one:
"skills": { "browser": "firefox" }blackvoice -v text says "Opening firefox" but nothing appears —
and only when the wake word triggers it, not from this debug command:
check journalctl --user -u blackvoice.service for is not a snap cgroup
or capability cap_dac_override not found. That combination means a
snap-packaged app (Firefox on Ubuntu, by default) is being refused by
snapd's own confinement, because the systemd service's NoNewPrivileges
hardening blocks the privilege snap-confine needs to start - the debug
command above never reproduces it, since it runs outside that service's
own cgroup. Fixed in 0.7.2 by launching apps through their own transient
systemd-run --user unit instead of as a direct child of the service; if
you still see it on a current install, systemctl --user status blackvoice.service and confirm NoNewPrivileges and ProtectSystem in
packaging/blackvoice.service still match what actually shipped.
Working as intended — see Security Model. If you are sure,
edit safety.blocked_patterns yourself. Note that upgrades never modify an
existing config, so your edits stay.
ollama serve # in another terminal
ollama pull llama3.2export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEYSet it in the systemd unit too if you run it as a service, otherwise the variable will not be there:
Environment=ANTHROPIC_API_KEY=sk-ant-..."ai": { "max_tokens": 256 }The system prompt already asks for at most three sentences; a local model may
ignore it. Adjust ai.system_prompt directly.
Restart it — the config is read once at startup.
systemctl --user restart blackvoiceCheck the file parses:
python -m json.tool ~/.config/blackvoice/config.jsonA broken config falls back to defaults with a message on stderr rather than crashing.
They never do. blocked_patterns was written to your config on first run and is
not touched again.
blackvoice config --resetIt drains the microphone after speaking, so this should not happen. If it does,
you likely have a loop-back device selected — pick a real microphone with
blackvoice devices.
systemctl --user status blackvoice
journalctl --user -u blackvoice -n 50Starts before audio is ready. The unit already sleeps 3 seconds; raise it:
ExecStartPre=/bin/sleep 10No display. The tray needs a graphical session. For headless operation:
Environment=BLACKVOICE_UI_ENABLED=falseStops when you log out. That is by design — it is a user service tied to your graphical session.
Open an issue at RudraLabs-dev/blackvoice/issues with:
blackvoice doctor # paste the whole output
blackvoice --version
uname -a
echo "$XDG_CURRENT_DESKTOP $XDG_SESSION_TYPE"
tail -50 ~/.cache/blackvoice/blackvoice.logFor a command that is misheard or mishandled, include the exact phrase and what
blackvoice text "that phrase" does — that separates a recognition problem from
a routing one immediately.
Black Voice — a Rudra Labs product · Repository · MIT licensed
This wiki is generated from the wiki/ folder in the repository. Edits made
here are overwritten on the next sync — send a pull request instead.
Using it
Understanding it
Extending it
Help