VoiceGem

How to dictate a closing square bracket

Say “close bracket” or “right bracket” to produce ]. The character attaches to the left only, which closes the subscript flush against the index while leaving a space available for the next token: “rows open bracket index close bracket” assembles as rows[index] and the following word stays separate.

A ten-word assignment through a subscript takes roughly 12 seconds to type and roughly 3.7 seconds to say. (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
rows[index] = new value

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

Step by step

  1. 1

    Speak the index, then the closer

    Say “close bracket” as soon as the subscript is complete. The character attaches left, so it lands flush behind whatever you just said with no intervening space.

  2. 2

    Stack closers for nested access

    Say “close bracket open bracket” to move straight from one dimension into the next. VoiceGem looks each phrase up separately, so board[r][c] needs no pause and no cursor movement.

  3. 3

    Add a slice colon where the language wants one

    Say “colon” inside the brackets for a Python slice. The colon also attaches left, so text[:3] comes out with the colon tight against the opening bracket.

  4. 4

    By hand

    Press the ] key, or let auto-pairing supply it and type over the top. Both are one keystroke, and for a single subscript both beat speaking.

Stacked closers need no pause, because VoiceGem tokenizes on whitespace

Nested subscripts are the case where dictation tends to fail in tools built on a language model, because the model has to infer how many brackets you meant. VoiceGem does no inference: the transcript is split on whitespace, each token is looked up, and “close bracket open bracket” produces exactly ][ every time.

Run-to-run stability is the property that makes this usable at speed. A formatter that is right nine times in ten forces you to read every line you dictated, which erases the time the dictation saved. The Deterministic Pass gives the same output for the same words on every run, so you can learn it the way you learn a keyboard shortcut.

Where the manual way breaks for nested access

Typing ] once is trivial. Typing it inside three levels of auto-paired brackets is a small ordering puzzle, and the failure mode is a bracket left in the wrong place that the compiler reports on a different line than the one you got wrong.

Long index chains and slice expressions are where saying it out loud starts to win. A slice with a step, a negative index and a trailing member access is a single spoken sentence in VoiceGem and about four separate hand positions on a keyboard.

Doing this somewhere else? speech-to-code converter, in one place, what changes for the closing curly brace, the closing parenthesis, step by step, or the same thing for the opening curly brace.

Common questions

Say “open bracket”, the start index, “colon”, the end index, then “close bracket”. Both the colon and the closing bracket attach left, so text[:3] comes out tight rather than spaced.

No. VoiceGem splits the transcript on whitespace and looks up each token independently, so consecutive closers produce consecutive characters.

The closing bracket attaches on the left only. Nothing is joined on its right, so the token after it stays separate — which is what an assignment after a subscript needs.

Send a slice expression through the pass and check every character.

Open the tool