VoiceGem

How to dictate a Python docstring in one utterance

Python's triple-quoted docstring is the only documentation syntax in this set that dictates whole. Saying “double quote double quote double quote” three times returns """ with no spaces, and the sentence between the delimiters passes through the Deterministic Pass untouched.

A fourteen-word docstring takes about 16 seconds to type and about 5.1 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.)

What lands in your editor
"""Returns the parsed configuration for the given path"""

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

Step by step

  1. 1

    Say “double quote” three times

    Speak the phrase three times in a row. Each quote attaches on both sides, so the three characters land adjacent with nothing between them.

  2. 2

    Say the documentation as ordinary English

    Speak the sentence naturally. Words outside VoiceGem's lookup table pass through untouched, which makes prose the easiest thing in a Python file to dictate.

  3. 3

    Close with three more

    Say the phrase three times again. The closing delimiter binds backward onto the last word, so the docstring closes flush.

  4. 4

    Watch for the word “dot”

    Avoid saying dot inside the prose. It is a table phrase and becomes a period bound on both sides, which is the one collision that reliably catches people writing documentation.

Python docstrings are the best documentation dictation target on this site

Two things line up. The delimiter is a repeated quote character, and quotes attach on both sides in VoiceGem's table, so three of them close up perfectly — unlike every slash-and-asterisk marker in the other five languages, which arrive spaced.

Then the content is prose. The Deterministic Pass passes unrecognised words through untouched, so a paragraph of documentation costs exactly as many spoken words as it contains, with no punctuation phrases at all beyond the delimiters.

Where the manual way breaks

Typing a one-line docstring is quick and most editors insert the delimiters for you when you type three quotes. Short summaries need no help.

Long explanatory docstrings are the ones that do not get written. Documentation that explains why a decision was made rather than what a function does is the most valuable kind and the most tedious to type, and the tedium is why it is usually skipped. Dictating it in VoiceGem costs what saying it costs, which changes the calculation for the paragraph nobody writes.

Doing this somewhere else? the browser-based speech-to-code converter, how dictating Go doc comments works, dictating Javadoc comments, step by step, or the same thing for dictating JSDoc comments.

Common questions

Yes. Each VoiceGem quote attaches on both sides, so saying the phrase three times returns three adjacent characters with no spaces between them.

Almost. The hash binds rightward onto the first word, so one space needs adding back after the marker.

Any that are table phrases — dot, comma, colon, period, equal, star, times, slash, pipe, bang, hash, scope and tab are the ones that catch people out.

Dictate a three-sentence docstring and see it land intact.

Open the tool