voice_commands
diapason.desktop.voice_commands
¶
Parse spoken commands into desktop tool actions.
finalize_dictation(raw, *, polish=True, llm_polish=None, email_mode=None, use_dictionary=None)
¶
Decide command vs paste; polish only on the paste path.
Command detection runs on raw STT first, then on locally filler-stripped text (no dictionary / LLM) so « um open Spotify » still routes as a command.
is_explicit_voice_command(text)
¶
True only when the user actually uttered an action verb.
A bare app name may be a valid follow-up, but it may also be Whisper's favourite silence hallucination. The realtime fast path therefore acts only on explicit imperatives such as « ouvre Notes ».