← Back to Blog

Short answer: Colab has no dictation button, so you need a Mac-level tool that types wherever your cursor is. Click into a cell first, confirm you see a blinking cursor, then hold your key and speak. Dictate text cells, comments, and docstrings; type the code itself.

Free to start Dictate into any app on your Mac or iPhone — hold a key, speak, release. Download for MaciPhone

Notebooks have a documentation problem, and everyone who works in them knows it. The analysis gets done, the cells run, the chart comes out right, and the notebook gets shared with nothing between the cells except a heading that says "EDA" and a comment that says # fix this later.

The reason is not laziness. It is that writing prose and writing code use different gears, and switching between them costs more than the prose is worth in the moment. You just spent twenty minutes getting a join to behave. Stopping to type three paragraphs about why you dropped those rows feels like taxation. So you do not, and three weeks later you cannot reconstruct your own reasoning.

Dictation is unusually well suited to fixing that specific gap, because the explanation already exists in your head in spoken form. You could explain the join to a colleague in fifteen seconds. Typing it takes two minutes. That gap is the whole opportunity.

Google Colab makes this slightly awkward in ways that are worth understanding before you start, because it is a browser application with its own focus model and its own ideas about what your keyboard is for.

Colab has no dictation button, and that is the important fact

Colab runs in a browser tab. It has no microphone button, no voice input menu, and no dictation setting anywhere in its interface. There is nothing to enable.

What that means practically is that dictation has to come from a layer below Colab: something running on your Mac that inserts text at whatever cursor happens to be active. If the tool types at the cursor, Colab does not need to know it exists, and it works identically in a code cell, a text cell, the comment sidebar, and the notebook title field.

This is a different situation from an app with a built-in voice feature, where the app controls the experience. Here you control it, and the only requirement Colab imposes is that you have a real cursor in a real editable field before you speak. That sounds obvious and it is the single most common way this goes wrong, for reasons covered below.

What is actually worth dictating in a notebook

Be selective. Notebooks contain at least four kinds of text, and dictation is excellent for two of them, decent for one, and a poor fit for the last.

Text cells. Excellent. This is the highest-value target by a wide margin. Section headings, the paragraph explaining what a section does, the caveat about how the data was collected, the interpretation under a chart. This is ordinary prose and it dictates as easily as an email.

Docstrings and comment blocks. Excellent. The multi-line explanation above a function, the note about why a threshold is 0.85, the warning that a cell takes eleven minutes to run. These are prose that happens to live inside a code cell.

Markdown structure. Decent. Bulleted lists, numbered steps, and simple emphasis work fine once you know how to speak the punctuation. Tables are miserable and you should type them.

Code itself. Poor fit, and you should not fight this. Identifiers, brackets, indentation, and operators are dense in symbols and light in words, which is precisely the shape that dictation handles worst. A line of code has maybe four dictatable words and nine pieces of punctuation. Type the code. This is not a limitation to work around, it is the correct division of labour, and the same conclusion our guide to dictating code comments arrives at from the other direction.

The rule that survives contact with real work: speak the reasoning, type the syntax.

If you follow only that rule and ignore everything else on this page, you will still capture most of the value, because the reasoning is the part that never gets written and the syntax is the part that always does.

Setting it up on a Mac

You need a dictation tool that works at the system level rather than inside one app. Install it, grant it microphone access and the accessibility permission that lets it watch for your key, and pick a hotkey.

Hotkey choice matters more in Colab than in most apps, because Colab claims a lot of keyboard real estate. It uses Command-M as a prefix for notebook commands, plus the usual Command-Enter and Shift-Enter for running cells, and the browser itself has claims on top of that. Pick something Colab will never want.

Good options on a Mac:

Avoid anything with Command-M in it, anything that collides with browser shortcuts, and any single letter. Test your choice by holding it in a code cell and confirming that Colab does not react.

With Voice Keyboard Pro the interaction is: hold your key, speak, release, and the words appear at the cursor. Because it types at the cursor rather than opening a panel, Colab treats the result exactly like typing, which means undo works normally, autosave to Drive fires normally, and collaborative editing sees it as a normal edit.

The focus trap, which is where most people lose text

This is the Colab-specific thing to internalise.

Colab is a notebook, so there is a difference between a cell being selected and a cell being focused for editing. A selected cell is highlighted and responds to notebook commands. A focused cell has a blinking text cursor inside it. Those are not the same state, and after you press Escape, click a cell's margin, or run a cell, you can easily be in the first without being in the second.

Dictate into a selected-but-not-focused cell and the text goes nowhere. It is not inserted, and there is nothing to undo, and you have just lost a paragraph you had composed in your head.

The habit that prevents it takes half a second:

  1. Click directly on the text area of the cell, not its margin or its toolbar.
  2. Confirm you can see a blinking cursor.
  3. Then hold your key and speak.

Colab is friendlier here than a classic notebook interface, because it routes most notebook commands through a Command-M prefix instead of making bare letters into commands. That means a stray dictated word into a selected cell usually does nothing rather than deleting the cell. Useful, but it does not save the paragraph you just spoke.

The related habit is to look before you speak after every cell run. Running a cell with Shift-Enter moves you to the next cell, and where your cursor ends up is not always where you assumed. If you have ever had dictated text land in the wrong place elsewhere on your Mac, the diagnosis in our guide to dictated text appearing in the wrong place applies here too.

Working in text cells

Create a text cell and Colab shows you the markdown source alongside a live preview. Dictate into the source side.

Speaking markdown is mostly a matter of knowing which symbols to name:

The pattern that emerges is consistent: dictate the words, type the marks. Markdown is a small number of characters carrying a lot of meaning, and reaching for them is fast. Sentences are a large number of characters carrying less, and that is where speech wins.

One thing worth doing deliberately is punctuation. Dictation tools insert commas and periods reasonably well from your phrasing, but paragraph breaks need to be explicit. Get comfortable saying "new paragraph" so that a two-minute explanation comes out as three readable paragraphs instead of one wall. Our notes on dictating line and paragraph breaks cover the phrasing that works.

Docstrings and comment blocks in code cells

This is the workflow that changes how much documentation actually gets written.

Write the function. Then, before moving on, put the cursor inside the triple quotes and speak the docstring: what it takes, what it returns, and the thing that is not obvious from reading it. Three sentences. Fifteen seconds.

The reason this works is that the knowledge is at its freshest right then. You just made the decisions. A day later you would have to reconstruct them, and reconstruction is what makes documentation feel expensive. Speaking removes almost all of the cost at the exact moment the cost is lowest.

Two things to watch inside code cells:

Autocomplete. Colab offers completions as text appears in a code cell. If a completion popup is open, a subsequent Return or Tab can accept it instead of doing what you wanted. When dictating a long comment, glance at the cell after inserting and dismiss any popup with Escape before you press Return. Note that Escape also takes you out of edit mode, so you will need to click back in.

Auto-indent. The editor maintains indentation, which is usually helpful and occasionally produces a comment block that steps to the right on each line. Easy to fix after the fact, easier to avoid by dictating a comment as a single block and adding the line breaks yourself.

Equations in text cells

Colab renders LaTeX inside text cells between dollar signs, which is one of the better reasons to write real text cells instead of comments.

Dictating mathematics directly is not realistic. Symbol density is the problem again, and a spoken equation has too many ways to be ambiguous. The workable split is to type the equation and dictate everything around it: what it represents, why this form, what the terms mean, what assumption it depends on.

That surrounding prose is what makes an equation useful to a reader six months later, and it is exactly what nobody writes. If you do work with a lot of notation, our guide to dictating math symbols and equations goes into where the boundary sits.

Teaching your vocabulary the words you actually use

Data work is full of terms that no general-purpose transcription has strong priors for. Library names, dataset names, column names, internal project names, the abbreviations your team uses in every meeting. Left alone, a transcription engine will render them as the nearest common English words, and you will fix the same three mistakes for the rest of the year.

Voice Keyboard Pro's Smart Vocabulary handles this. You add the terms you use and the replacement rules for how they should be written, and they come out right from then on. It is worth ten minutes at the start:

The compounding effect is the point. These terms appear in almost every sentence you dictate about your work, so fixing them once removes a correction you would otherwise make hundreds of times. This matters more for notebooks than for general writing, because notebook prose is unusually dense with proper nouns.

Colab quirks that catch people out

Runtime disconnects do not lose your text. When the runtime disconnects after idle time, you lose your variables and have to re-run cells. Your notebook content is autosaved to Drive and is unaffected. So a disconnect while you are writing documentation is annoying rather than destructive, and it is a good moment to write the text cells you have been putting off, since none of that needs a live runtime.

The comment sidebar is a normal text field. Colab supports Google Docs style comments on cells. The comment box takes dictated text like anything else, and review comments are exactly the kind of writing people abbreviate into uselessness because typing them is tedious. Speaking the full thought costs nothing.

Sharing means someone will read this. A notebook you keep to yourself and a notebook you share are different documents with different standards. If it is going to be shared, the ten minutes of dictated text cells is the difference between a file someone can use and a file someone has to interrogate you about.

Browser quirks are real. Colab in Chrome and Colab in Safari behave slightly differently around focus and autocomplete. If dictated text starts landing oddly in one browser and not the other, the browser is the variable. Our fix list for dictation problems in Chrome on a Mac covers the general shape of that.

A realistic session

Here is what the workflow looks like when it is working, rather than as a list of tips.

You open a notebook and start with the data. Load, inspect, clean. You type all of that, because it is code. When you have loaded the data and looked at it, you insert a text cell and speak four sentences: where this data came from, what date range it covers, what you had to drop and why, what you are not confident about. Twenty seconds.

You work through the analysis. Every time you make a decision that a reader would question, you put a comment above the cell and speak one sentence explaining it. Five seconds each. These are the sentences that normally do not get written, and they are the ones that matter most.

You produce a chart. Underneath it you insert a text cell and speak what it shows, including the thing that is interesting and the thing that looks interesting but is an artifact. Fifteen seconds.

At the end you go to the top and speak a summary: what question this notebook answers, what the answer is, what would change it. A minute.

Total added time, on the order of three or four minutes across a session. What you get is a notebook that reads as an argument rather than a transcript of keystrokes. The reason this is achievable by voice and not by typing is not that speech is magic. It is that four minutes of speaking is fifteen minutes of typing, and fifteen minutes is over the threshold where people decide to do it later.

If you want the broader version of this argument across the rest of a data workflow, our guide to voice typing for data scientists covers the surfaces beyond notebooks, and the same cell-by-cell mechanics apply if you work in a local notebook instead, as covered in dictating in Jupyter notebooks.

What about identifiers and case conventions

Sometimes you do want to say a variable name inside a comment, and case conventions are where dictation output looks wrong even when the words are right. Speech does not carry underscores or capitalisation.

Two practical approaches. For occasional use, dictate the words plainly and fix the case by hand, which is a couple of keystrokes. For names you say constantly, add them to Smart Vocabulary with the exact written form you want, and they will come out correctly formatted every time.

We go deeper on this in dictating camelCase and snake_case, including why trying to speak the punctuation for identifiers is usually slower than typing them.

On iPad and iPhone

Colab runs in a mobile browser, and it is genuinely usable for reading a notebook, leaving comments, and editing text cells. It is not where you write code.

For those cases, Voice Keyboard Pro's iPhone keyboard has a microphone button built into the keyboard itself, so it works in the browser the same way it works anywhere else. Voice Edit is useful here specifically because tapping to reposition a cursor on a phone is unpleasant: you speak the change you want rather than aiming at a character. Reviewing a colleague's notebook on a phone and leaving real comments instead of "looks good" is a reasonable use of ten minutes on a train.

Honest limits

On the privacy question, since notebook commentary often describes data you cannot talk about casually: Voice Keyboard Pro's servers store only operational pings. No audio and no transcript content is retained.

Frequently asked questions

Does Google Colab have a built-in dictation feature?

No. There is no microphone button and no voice setting anywhere in Colab. Dictation has to come from a system-level tool on your Mac that types at the cursor, which Colab then treats as ordinary typing.

Can I dictate actual Python code?

You can, and you will spend longer correcting it than typing it would have taken. Code is dense in symbols and light in words, which is the worst case for speech. Dictate comments, docstrings, and text cells; type the code.

Why does my dictated text sometimes not appear at all?

Almost always because the cell was selected but not focused for editing. Click into the text area, confirm a blinking cursor, then speak. This is the single most common failure in notebook interfaces.

Will dictated text break Colab's autosave or version history?

No. A tool that inserts at the cursor produces an edit indistinguishable from typing, so autosave to Drive, undo, and revision history all behave normally.

How do I stop library names coming out wrong?

Add them to Smart Vocabulary with the spelling and capitalisation you want. Library names, dataset names, and team acronyms are the terms worth adding first, because they recur in nearly every sentence you dictate about your work.

Does this work in JupyterLab or VS Code notebooks too?

Yes. A system-level dictation tool is not tied to Colab. The focus discipline is the same everywhere, and it matters more in a classic notebook interface, where bare letters in command mode do trigger notebook commands.

Voice Keyboard Pro
Hold your key · Speak · Release

The words land at your cursor in whatever app you are already in — Mail, Slack, Word, a browser form. No dictation window, nothing to copy across.

Free forever for casual use · Apple Silicon & Intel