VoiceGem

How to dictate Rust names across three conventions in one file

Rust runs three naming conventions simultaneously: snake_case for functions and variables, PascalCase for types and traits, SCREAMING_SNAKE_CASE for constants and statics. VoiceGem has a command for each, and switching between them mid-sentence needs nothing more than saying the next command.

An eight-word const declaration is about 9.2 seconds of typing against about 2.9 seconds of speech. (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
const DEFAULT_BUFFER_CAPACITY: usize = 8192

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

Step by step

  1. 1

    Say “snake case” for functions and bindings

    Speak the command before a function name or a let binding. Rust's convention for both is snake_case, and clippy will warn if you deviate.

  2. 2

    Say “pascal case” for types and traits

    Switch commands for a struct, enum or trait name. Each casing command ends the previous run, so no separator is needed between them.

  3. 3

    Say “screaming snake case” for constants

    Use the three-word phrase, or “constant case” or “scream case” — all three reach the same style. VoiceGem matches longest-first, so the three-word form is consumed whole.

  4. 4

    By hand

    Type all three, with shift for the pascal capitals, Shift-hyphen for the snake underscores and caps lock for the constants. Three conventions means three different keyboard modes in one file.

Rust asks for three keyboard modes in one file and VoiceGem asks for three words

Naming in Rust is unusually strict: clippy warns on a non-snake_case function, a non-PascalCase type and a non-SCREAMING_SNAKE constant, so all three conventions genuinely coexist in every file. Typing them means shift for one, Shift-hyphen for another and caps lock for the third.

Casing commands remove the mode entirely. A line that declares a snake_case binding from a PascalCase constructor with a CONSTANT_CASE argument needs three spoken commands and no modifier keys, and the Deterministic Pass ends each run automatically when the next command arrives.

Where doing it by hand breaks down

Rust IDEs complete type and function names after a few characters, which is faster than speaking for anything already defined. Completion and dictation solve different halves of the problem.

New names are the half completion cannot help with. The first time a type is written there is nothing to complete, and Rust's convention of long descriptive type names means that first write is expensive. Dictating it in VoiceGem is the words you were already going to choose.

Doing this somewhere else? the casing converter on this site, how dictating Rust doc comments works, dictating Rust functions, or naming things in Go by voice, step by step.

Common questions

No. Each casing command ends the previous run automatically, so two names in a row need only the two commands.

Any of “screaming snake case”, “constant case” or “scream case”. All three reach the same style in VoiceGem's table.

Only if you choose the wrong command. VoiceGem applies exactly the style you named and never adjusts capitalisation to match surrounding code.

Convert a Rust name between snake, pascal and screaming snake.

Open the tool