How to dictate a Go function with multiple return values
A Go signature returns two values, which means two bracket pairs and a comma. VoiceGem turns “func camel case get user open paren ctx pascal case context close paren open paren star pascal case user comma error close paren” into a complete declaration with two gaps for gofmt to close.
An eighteen-word Go signature takes about 21 seconds to type and about 6.6 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.)
func getUser(ctx Context)(* User, error)This tool runs entirely in your browser. Nothing you type is sent anywhere, stored, or logged.
Step by step
- 1
Say “func” then a casing command
Speak “func camel case get user”. Go uses camelCase and PascalCase for unexported and exported names, so the casing command choice carries meaning here.
- 2
Speak the parameter list
Say the parameter name then its type with no punctuation between them. Go puts the type after the name, and both are plain words that pass straight through VoiceGem untouched.
- 3
Speak the return pair as a second bracket group
Say “close paren open paren” to move from parameters to returns. The two groups arrive adjacent with no space, which gofmt separates on save.
- 4
Say “star” for a pointer, then close the gap
Speak the phrase before the type. The asterisk is spaced for multiplication, so a pointer return arrives as * User and needs the space removed.
Go's exported-name convention makes the casing command choice meaningful
Capitalisation is not style in Go, it is visibility. A PascalCase name is exported from its package and a camelCase name is not, which means saying “pascal case” instead of “camel case” changes what your code does rather than how it reads.
VoiceGem gives both styles their own command, so the distinction survives dictation exactly. The Deterministic Pass has no opinion about which you meant and never adjusts capitalisation to match a surrounding convention — the command you said is the case you get.
Where the manual way breaks
Go is a deliberately small language and its signatures are short. A one-parameter func is faster typed, and Go's tooling completes type names as you go.
Error-handling blocks are the repetitive shape worth speaking. The if err != nil pattern with a two-value return appears dozens of times in a Go file, and dictating it in VoiceGem is one utterance for a construct that spans three lines. Gofmt then normalises the spacing without being asked.
Doing this somewhere else? speech-to-code converter, in one place, the same thing for dictating Go doc comments, dictating Bash functions specifically, or dictating Java methods specifically.
Common questions
Only through the casing command you say. “Pascal case” gives an exported name and “camel case” gives an unexported one, and VoiceGem never adjusts either.
The asterisk entry is spaced for multiplication. Gofmt closes the gap on save, so the artifact does not survive a normal Go workflow.
Say “colon equals”. The colon attaches left and the equals keeps its spacing, so the two characters land together.
Dictate the if err != nil block and see it land in one utterance.
Open the tool