How to dictate a Java method signature with generics
A Java method signature is modifiers, a return type, a name and a parameter list, and only the generic part needs cleanup. VoiceGem turns “public pascal case list open angle pascal case user close angle camel case find active open paren close paren open brace” into a signature with spaced angle brackets.
A sixteen-word Java method signature costs roughly 18 seconds typed against roughly 5.9 seconds spoken. (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.)
public List < User > findActiveUsers() {This tool runs entirely in your browser. Nothing you type is sent anywhere, stored, or logged.
Step by step
- 1
Say the modifiers as plain words
Speak “public”, “static” or “final” directly. Java keywords are not in VoiceGem's table, so they pass through untouched.
- 2
Build the return type with casing commands
Say “pascal case list open angle pascal case user close angle”. Both type names need their own command, because a casing run ends at the angle bracket.
- 3
Name the method in camelCase
Say “camel case find active users”. Java's method convention is camelCase and the command builds the whole name from the three following words.
- 4
Close the generic spaces
Run your IDE's formatter after dictating. Angle brackets keep their spaces because the same characters are comparison operators, and IntelliJ's reformat closes them.
Java is the language most affected by the angle-bracket spacing
Generics are everywhere in idiomatic Java. A collection type, a map, an optional and a stream all carry type parameters, so a typical method signature has two or three angle brackets and every one of them arrives spaced when dictated through the Deterministic Pass.
The cost is real and it is a formatter keystroke rather than a rewrite. IntelliJ IDEA's reformat-code action closes every gap in one pass, which is why the honest recommendation for Java is to dictate the whole signature and reformat, rather than to dictate around the generics.
Where doing it by hand breaks down
Java IDEs are the best in the business at generating signatures, and IntelliJ will write a getter or an override faster than anyone can say one. Dictation does not compete with code generation.
Long descriptive names are where speaking wins. Java's convention favours explicit method and variable names, and a four-word camelCase name is four internal capitals to type and four words to say. Dictating the name inside a signature you are also dictating means VoiceGem builds it in the same pass as the brackets.
Doing this somewhere else? our speech-to-code converter, dictating Javadoc comments, dictating Bash functions specifically, or dictating Go functions specifically.
Common questions
Angle brackets attach on neither side because the same characters are comparison operators. IntelliJ's reformat-code action closes every gap in one pass.
Yes. Words absent from VoiceGem's lookup table pass through untouched, so public, static, final and throws all arrive as spoken.
Say “at sign pascal case override”. The at sign binds rightward onto the annotation name with no space between them.
Dictate a generic map declaration and see what reformat will fix.
Open the tool