VoiceGem

How to dictate a colon for types, dictionaries and CSS

Say “colon” to produce a colon bound to the token before it, so “name colon string” assembles as name: string. One phrase covers every use the character has — type annotations, dictionary keys, Python block openers, slice bounds and CSS declarations — because VoiceGem maps characters rather than meanings.

A twelve-word annotated signature takes about 14 seconds on a keyboard and about 4.4 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
userId: string, active: boolean

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

Step by step

  1. 1

    Say the name, then “colon”, then the type

    Speak the annotation as one phrase. The colon attaches left, producing name: string with the separator tight against the identifier and a space before the type.

  2. 2

    Reuse it for every construct that takes one

    Dictionary keys, Python block openers, slice bounds and CSS declarations all use the same phrase. VoiceGem does not distinguish between them, because the character is the same in every case.

  3. 3

    Combine it with a question mark for optionals

    Say “question mark colon” for an optional property. Both characters attach left, so name?: string comes out with both markers flush against the identifier.

  4. 4

    By hand

    Press Shift-semicolon on a US layout. It is a two-key combination rather than a single press, which makes the colon slightly more worth dictating than the comma — but only slightly.

One colon phrase covers five unrelated language constructs

A type annotation in TypeScript, a dictionary key in Python, a block opener after def, a slice bound and a CSS declaration are five different grammatical roles for one character. VoiceGem's table has one entry, because the Deterministic Pass converts characters and never asks what the character is doing.

Working at the character level is what makes the behaviour learnable. There is no rule to remember about which colon you are dictating and no context in which the phrase does something else — the same two syllables produce the same character in a TypeScript interface, a Python function header and a stylesheet.

Where the manual path breaks

Shift-semicolon is quick and a single annotation is not worth speaking. Anyone who touch types will beat dictation on a lone colon and should keep doing it.

Annotated signatures are where the load adds up. A function with three typed parameters and a return type means six colons, three commas, two brackets and an arrow, all interleaved with identifiers — and every one of those symbols is a modifier chord. Saying the signature is one breath, and VoiceGem places all eleven characters the same way each time, which is the part that makes the result usable without proofreading.

Doing this somewhere else? speech-to-code converter, with nothing to install, the backslash in an escape sequence, how the comma in an argument list works, or the double colon path separator, step by step.

Common questions

Yes. Say “open bracket colon 3 close bracket” for text[:3]. The colon and the closing bracket both attach left, so nothing is spaced apart.

Say “question mark colon” between the name and the type. Both characters bind to the left, producing name?: string with no gaps before the type.

No, and it does not need to. The colon phrase produces the same character in every language, so a CSS declaration and a TypeScript annotation are dictated identically.

Dictate an annotated signature and count the modifier chords you skipped.

Open the tool