VoiceGem

How to dictate an exclamation mark for negation and force-unwrap

Say “bang”, “exclamation” or “exclamation point” to produce an exclamation mark bound on both sides, so “bang ready” assembles as !ready with no space. Combining it with a casing command works in one breath: “bang camel case is ready” returns !isReady.

A nine-word negated guard costs about 10 seconds on the keyboard against about 3.3 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
if!hasValidSession { return null

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

Step by step

  1. 1

    Say “bang” immediately before the operand

    Speak the phrase, then the value. The exclamation mark attaches on both sides, so it binds tight against whatever follows with no space to clean up.

  2. 2

    Combine it with a casing command

    Say “bang camel case is ready” to negate a name you are also building. VoiceGem applies the symbol, then the casing command consumes the following words into one identifier.

  3. 3

    Repeat it for double negation

    Say “bang bang” for the coerce-to-boolean idiom. Because the character attaches on both sides, the two marks land adjacent and against the operand.

  4. 4

    By hand

    Press Shift-1. It is a simple chord, and for a lone negation typing is faster than saying the word.

The exclamation mark composes with casing commands in a single pass

At each position the Deterministic Pass tries a casing command first, then a symbol phrase, then a whitespace command, then passes the word through. Saying “bang camel case is ready” hits the symbol entry and then the casing entry on the next token, and the casing command greedily consumes the following plain words into one identifier.

Composition in one pass is what makes a negated boolean a single utterance. Nothing is re-scanned, no second stage runs, and VoiceGem produces !isReady from six spoken words with the same walk it uses for a single character.

Where the manual way breaks

Shift-1 is one of the easier chords on the keyboard and a lone exclamation mark is not worth dictating. The honest baseline holds here as everywhere.

Negated guards with long names are the case for speaking. A condition like a missing-session check is one operator and one four-word camelCase identifier, and the identifier is where the typing cost is. Dictating it in VoiceGem gives you the negation and the whole name from one sentence, with the exclamation mark bound tight against the identifier automatically.

Doing this somewhere else? the same speech-to-code converter this demo runs, what changes for the single ampersand, the same thing for the logical AND operator, or the logical OR operator specifically.

Common questions

Say “bang camel case” then the words of the name. VoiceGem applies the symbol, then the casing command joins the following words into one identifier.

No. It attaches on both sides, which is one of only ten entries in VoiceGem's table that do, so it binds tight against its operand.

“Bang” is shortest and is what most developers say. All three reach the same table entry and produce identical output.

Dictate a negated guard with a four-word name and time it.

Open the tool