Guides🎤Voice commandsCommands with a spoken parameter
Advanced7 min readPro

Commands with a spoken parameter

One command, many targets: the six slots InkSpoke understands and how spoken values are cleaned up.

Instead of one command per application, write one command with a slot: open {app} handles every app you have favourited.

The six slots

This is a fixed set. Anything else is flagged as an unknown parameter in the editor:

SlotForHow the spoken value is handled
{app}An applicationFuzzy-matched against your Voice Favourites
{text}Free text to typePassed through as spoken
{query}A search termPassed through as spoken
{url}A web address"dot" → ., "slash" → /, "at" → @; https:// added if missing
{path}A file path"slash" → your OS separator, "tilde" or "home" → ~, "up" → ..
{key}A key to pressParsed as a key name
!
Slots like {channel} or {recipient} are not supported. The editor will warn you, and at runtime the value is passed through with no handling.

Writing one

example · phrase → action
open {app}          →  Open app,  target: {app}
switch to {app}     →  Bring to front, target: {app}
type {text}         →  Send keys, text: {text}

Behind the scenes each phrase is compiled to an anchored pattern where literal words must match and the slot captures the rest. When several commands could match, the one with the most literal words wins — so open google beats open {app} for that exact phrase.

How {app} finds the right app

The spoken tail is scored against your Voice Favourites — exact name, then alias, then first word, then partial match, then a similarity comparison. A strong match runs immediately. A middling one offers a "Did you mean?" prompt with up to five suggestions. A weak one tells you it could not match.

Aliases live on the favourite, not the command. If "VS Code" is never recognised, add "code" or "editor" as an alias on that favourite rather than writing another command.

Where this runs out of road

Because the recogniser only emits words from a fixed list, long or unpredictable values are unreliable. InkSpoke does try to recover them — when it recognises a known literal prefix, it replays the buffered audio through an unrestricted pass to capture what followed.

It works well for a filename or a short phrase. It is not a good way to dictate a full URL or a long search query, which is why no such templates ship.

Next in this track

Keep going.