VoiceGem

How to dictate a tab to indent a line of code

Say “tab” or “indent” to emit a tab character, so “tab return value” assembles as an indented return statement. The command emits one tab per phrase, so a second level of indentation means saying it twice — VoiceGem never infers depth from the surrounding code.

A fifteen-word indented Python body takes about 17 seconds on a keyboard and about 5.5 seconds aloud. (sources: Dhakal, Feit, Kristensson & Oulasvirta, “Observations on Typing from 136 Million Keystrokes”, CHI 2018, 168,000 participants, 136 million keystrokes; Yuan, Liberman & Cieri, “Towards an Integrated Understanding of Speaking Rate in Conversation”, Interspeech 2006, 2,438 American English telephone conversations (Switchboard corpus). The speech figure is conversational rate, not a measured dictation rate — no such measurement exists.)

What lands in your editor
def run_task():
	return None

This tool runs entirely in your browser. Nothing you type is sent anywhere, stored, or logged.

Step by step

  1. 1

    Break the line first

    Say “new line” before the indent. Whitespace commands are emitted in the order spoken, so the break has to come first.

  2. 2

    Say “tab” once per level

    Speak the command as many times as you need levels. VoiceGem emits exactly one tab per phrase and never works out how deep you should be.

  3. 3

    Say the statement

    Speak the body of the line. Words outside the lookup table pass through untouched, so keywords and identifiers arrive as spoken.

  4. 4

    The manual path

    Press Tab, or let your editor indent for you when you press Return inside a block. Editors are genuinely good at this and dictation does not replace it.

VoiceGem emits one tab per phrase and never infers indentation depth

Counting levels is the reader's job. The Deterministic Pass has no model of block structure, no idea how deep the cursor already is, and no way to know whether your file uses tabs or spaces — so a second level of nesting means saying the command a second time.

The alternative would require parsing, and parsing is what separates this from the tools that guess. Indentation inferred from context is exactly the kind of decision that varies between runs, and in Python a wrong guess about depth changes what the code does rather than how it looks.

Where the manual way breaks

Editors handle indentation well: press Return inside a block and most of them indent for you, correctly, in the style your project uses. Dictation does not improve on that and this page will not claim it does.

Python bodies dictated as a whole are the case worth speaking. A def line, a docstring and two indented statements is one utterance in VoiceGem, and the alternative is stopping to reach for Return and Tab between each line. Dictate the block, then let your formatter convert tabs to whatever your project actually uses.

Doing this somewhere else? speech-to-code converter, in one place, the new paragraph command specifically, or the new line command specifically.

Common questions

Say “tab” twice. VoiceGem emits one tab per phrase and never infers how deep the line should be.

A tab character. Run your formatter afterwards if your project uses spaces — VoiceGem has no way to know which your file wants.

Yes. Both phrases reach the same command in VoiceGem's table and emit an identical tab character.

Dictate a Python function body and count the tabs you said.

Open the tool