How to dictate a pipe for union types, shells and Ruby blocks
Say “pipe” or “vertical bar” to produce a single | spaced on both sides, so “string pipe null” assembles as string | null. Spacing suits a TypeScript union and a shell pipeline; Ruby block parameters and regex alternation both want the character closed up and need a cleanup pass.
A nine-word union type takes roughly 10 seconds to type and roughly 3.3 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.)
type result = Success | Failure | nullThis tool runs entirely in your browser. Nothing you type is sent anywhere, stored, or logged.
Step by step
- 1
Say “pipe” between the members
Speak each member of the union with the phrase between them. The character attaches on neither side, which is exactly how TypeScript formats a union type.
- 2
Reuse it for a shell pipeline
Say “pipe” between commands. Shell pipelines are conventionally written with spaces around the character, so the default spacing is right here too.
- 3
Expect to tidy Ruby and regex
Close the spaces after dictating block parameters or an alternation. Both conventions want the pipe tight against its neighbours and VoiceGem's entry is spaced.
- 4
Typing it instead
Press Shift-backslash. It is a single chord above Return and, for one character, faster than saying the word.
The pipe is the one operator where VoiceGem's default spacing is right twice
Two of the pipe's four common uses want spaces around it. A TypeScript union type is conventionally written string | null, and a shell pipeline is conventionally written with spaces on both sides, so the table entry serves both without any cleanup.
Most punctuation in the Deterministic Pass has one convention it fits and others it does not — the asterisk is set for multiplication and wrong for pointers, the slash is set for division and wrong for paths. The pipe is unusual in getting two of its four jobs right from a single pair of flags.
Where the manual way breaks
One chord for one character, and typing it is quicker than saying two syllables. The keyboard wins on the individual mark.
Long union types are the case for dictating. A result type with three named members and a null is four cased identifiers and three operators, and the identifiers are where the typing cost lives. Saying it in VoiceGem builds each PascalCase name from a casing command in the same pass that places the pipes.
Doing this somewhere else? the speech-to-code converter, the single ampersand, the same thing for the logical AND operator, or how the logical OR operator works.
Common questions
Yes. A union is conventionally written string | null with spaces, which is exactly what VoiceGem's entry produces.
Say “pipe”, the parameters separated by “comma”, then “pipe”. Close the spaces afterwards, because Ruby wants the bars tight against the names.
Yes. Both phrasings reach the same entry in VoiceGem's table and produce an identical character.
Dictate a union type and check every member name was built correctly.
Open the tool