VoiceGem

How to dictate a percent sign for modulo and format strings

Say “percent” or “modulo” to produce a percent sign spaced on both sides, so “index modulo length” assembles as index % length. The alias pair is unusual in VoiceGem's table because the two words name the character and the operation rather than being two names for the same thing.

An eleven-word wrap-around calculation takes about 13 seconds to type and about 4 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
nextIndex =(i + 1) % rows.length

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

Step by step

  1. 1

    Say “modulo” for remainder arithmetic

    Speak the operands with the phrase between them. The percent sign attaches on neither side, so the expression comes out spaced like formatted source.

  2. 2

    Say “percent” for a placeholder

    Use the character name when you mean a printf-style token. Both phrasings reach the same table entry, so the choice is only about what you were thinking.

  3. 3

    Wrap the whole expression in brackets

    Say “open paren”, the addition, “close paren”, then “modulo”. Bracket precedence is yours to state, because VoiceGem emits characters and never reasons about operator precedence.

  4. 4

    Typing it instead

    Press Shift-5. It is a single chord and for one operator it is quicker than saying three syllables.

Two aliases that mean different things and produce the same character

“Percent” names the character and “modulo” names the operation, which makes this entry different from most aliases in VoiceGem's table. Elsewhere the alternatives are near-synonyms — “open paren” and “left paren” both describe the same mark — while here one word describes the glyph and the other describes what it does in arithmetic.

Covering both is a small thing that removes a real hesitation. A developer writing remainder arithmetic thinks the word modulo and a developer writing a format string thinks the word percent, and the Deterministic Pass accepts whichever one arrives without any difference in output.

Where the manual way breaks

Shift-5 is one chord and a lone operator is not a dictation problem. Typing it is faster.

Wrap-around index arithmetic is the line worth speaking. A modulo expression with a bracketed addition inside it means four punctuation characters around three identifiers, and getting the brackets in the wrong place is an off-by-one that survives review. Dictating the whole expression through VoiceGem places the brackets exactly where you said them.

Doing this somewhere else? speech-to-code converter, on your own input, the asterisk, the caret specifically, or the forward slash specifically.

Common questions

No. Both phrases reach the same entry in VoiceGem's table and emit the same character with the same spacing.

Yes. Say “percent s” or “percent d” and the letter passes through untouched, because only table phrases are converted.

No. The Deterministic Pass emits characters and never reasons about precedence, so say the brackets you want.

Dictate a wrap-around index and check the bracket placement.

Open the tool