VoiceGem

How to dictate a snake_case name in Python or Rust

Say “snake case” followed by the words of the name and VoiceGem joins them with underscores in lowercase: “snake case max retry count” returns max_retry_count. Reaching the same result through the underscore symbol takes five spoken phrases instead of one, because each underscore binds only its two adjacent tokens.

A ten-word Python definition 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
def fetch_user_records(user_id):

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

Step by step

  1. 1

    Say “snake case” before the name

    Speak the command first. VoiceGem tries a casing command at every position, so it works at the start of a line or in the middle of a parameter list.

  2. 2

    Say the words

    Speak each word separately. The command lowercases every word and joins the run with underscores, which is most of what writing Python involves.

  3. 3

    Give each parameter its own command

    Say “snake case” again inside the parentheses. A run ends at the open paren, so a parameter name needs a fresh command to be joined.

  4. 4

    The manual route

    Type the name with Shift-hyphen between words. Python developers do this constantly and it is one of the strongest arguments for the casing commands existing at all.

One snake case command replaces five spoken underscore phrases

Two mechanisms in VoiceGem produce underscores. The symbol entry binds the tokens either side of it, so a three-word name needs “private underscore counter underscore value” — five phrases. The casing command takes the whole run at once, so the same name is “snake case private counter value” — four words with no punctuation named at all.

Speaking punctuation is the part of dictation people find tiring, and the casing commands are the part of the Deterministic Pass that removes it. A Python file is mostly snake_case identifiers, so this single command carries most of the value for a Python developer.

Where doing it by hand breaks down

A two-word snake_case name is one Shift-hyphen and nobody needs help. The keyboard is fine for short names and always will be.

Function definitions are the shape that pays. A def line with a three-word name and two snake_case parameters is six underscores and three identifiers, and the underscores are the interruptions rather than the words. Dictating the whole signature in VoiceGem means saying the three names and two structural phrases, which is closer to how the definition existed in your head.

Doing this somewhere else? a longer run through the casing converter, the camel case command specifically, the constant case command, step by step, or the same thing for the kebab case command.

Common questions

Say “underscore snake case private counter”. The symbol lands first and VoiceGem's casing command joins the run that follows, giving _private_counter.

Yes. A casing run ends at the open paren, so each parameter name inside the brackets needs its own “snake case”.

Yes. Every word in the run is lowercased before it is joined, so capitalisation in your speech makes no difference to the output.

Paste a list of names and convert them all to snake case at once.

Open the tool