How to dictate a Rust function signature with references
A Rust signature needs “thin arrow” for the return type and “ampersand” for a borrow. VoiceGem turns “fn snake case parse line open paren input colon ampersand str close paren thin arrow pascal case result” into fn parse_line(input: & str) -> Result, with the reference space to close.
A sixteen-word Rust signature costs about 18 seconds on a keyboard and about 5.9 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.)
fn parse_line(input: & str) -> ResultThis tool runs entirely in your browser. Nothing you type is sent anywhere, stored, or logged.
Step by step
- 1
Say “fn” then a casing command
Speak “fn snake case parse line”. The keyword passes through untouched and the casing command joins the following words with an underscore.
- 2
Say “ampersand” for a borrowed parameter
Speak the phrase before the type. A space follows it, because VoiceGem's ampersand entry is spaced for the binary bitwise operator rather than for a reference.
- 3
Say “thin arrow” for the return type
Use the qualified phrase every time. The bare word reaches the fat arrow, which does not parse in a Rust signature.
- 4
Close two gaps afterwards
Remove the space after the ampersand and inside any generic. Rustfmt will do both on save, so the practical cost is one keystroke or none.
Rust needs exactly two fixes after dictation, and rustfmt makes both
References and generics are the two places VoiceGem's spacing is wrong for Rust. The ampersand keeps its spaces because its table entry serves the bitwise operator, and angle brackets keep theirs because they serve the comparison operators — so & str and Vec < T > both arrive spaced.
Both are exactly the kind of thing rustfmt normalises without being asked, which puts Rust in a better position than it first appears. Dictate the signature, save the file, and the two artifacts are gone before you have read the line.
Where the manual way breaks
Rust signatures are typed comfortably with an editor that completes type names, and a short fn is quicker by hand. Nothing about a two-parameter function calls for dictation.
Module paths are the case that changes the arithmetic. A use statement with three path segments is a run of double colons and PascalCase names, and both dictate cleanly in VoiceGem — the double colon binds on both sides and the casing command builds each segment. That is one of the strongest dictation shapes in any language on this list.
Doing this somewhere else? speech-to-code converter, with nothing to install, dictating Rust doc comments, how dictating Bash functions works, or how dictating Go functions works.
Common questions
VoiceGem's ampersand entry is spaced for the bitwise operator rather than for a reference. Rustfmt closes the gap on save.
Yes, very well. The double colon attaches on both sides and each segment comes from a casing command, so a three-level path needs no cleanup.
You get the fat arrow, which does not parse in a Rust signature. Say the qualified phrase every time.
Dictate a use statement with three path segments and check it.
Open the tool