How to Listen to Google Docs
• By Elliott Tong
To listen to a Google Doc, install the Alexandria Chrome extension, then open any document. Alexandria triggers Google's accessible SVG layer (since Docs renders to canvas, not DOM), extracts text rect-by-rect, and reconstructs paragraphs from the page tiles. Click the play button in the title bar toolbar to hear your document read aloud with word-by-word highlighting. The extension tracks which page each paragraph lives on, so highlighting stays accurate even as Google recycles tiles while you scroll.
Why Listen to Documents Instead of Reading Them?
Long documents demand a different kind of attention than emails or articles. A project spec, a contract, a research paper — these are reading tasks you schedule rather than grab in passing. That makes them good candidates for listening.
Listening helps in a few specific ways:
You can review your own writing
Hearing your draft read aloud catches errors you miss when reading silently. Missing words, awkward phrasing, run-on sentences — they become obvious when you hear them. Copywriters and editors have used this technique for decades.
You can process dense material
Technical documents, legal contracts, and academic papers are exhausting to read visually. Listening lets you absorb the content while giving your eyes a rest. Dual coding — hearing words while seeing them highlighted — improves retention over reading alone [Paivio, University of Western Ontario].
You can multitask on familiar content
When you're reviewing a document you've already read, listening lets you refresh the content while doing something else. This is especially useful before a meeting where you need to discuss a shared doc.
Accessibility
For people with dyslexia, visual impairments, or reading fatigue, listening is not a shortcut — it's the primary way to consume long-form text. Word-by-word highlighting provides an anchor that screen readers don't offer.
How Alexandria Works with Google Docs
Alexandria's Google Docs adapter (2466 lines of custom code) solves a problem that most TTS extensions cannot: Google Docs renders text to canvas, not DOM, so there is no ordinary text for an extension to read. Here's how it works:
Triggering the accessible SVG layer
Google Docs uses canvas rendering by default, which displays pixels — not text nodes. When Alexandria loads, it sets window._docs_annotate_canvas_by_ext to trigger Google's accessible SVG layer. This layer places transparent SVG rects over the canvas, each with an aria-label containing the text of that line. Without this layer, there is literally no text to extract [GoogleDocsAdapter.js, lines 7-21].
Reconstructing paragraphs rect-by-rect
Each SVG rect contains a line of text (or part of a line, for formatting runs like bold text). Alexandria groups these rects into paragraphs using Google's g[data-section-type] elements, which represent actual paragraph boundaries. This is more accurate than guessing from vertical gaps [GoogleDocsAdapter.js, groupLinesIntoParagraphsByGElements()].
Handling page tile recycling
Google Docs only renders visible content. As you scroll, it creates and destroys 'tiles' (.kix-canvas-tile-content) — the DOM for page 5 might be recycled to show page 3's content. Alexandria uses each tile's style.zIndex as the stable page identifier (a discovery from Speechify's approach) and tracks every sentence by its document position: page number, paragraph order within the page, and sentence order within the paragraph [GoogleDocsAdapter.js, getPageZIndexForRect(), lines 78-90].
Pixel-perfect word positioning
For word-by-word highlighting, Alexandria needs to know where each word starts within a line. It uses Canvas 2D measureText() for pixel-perfect width calculation, handling variable-width fonts (i vs m), kerning, and ligatures. This is more accurate than character-ratio approximation [GoogleDocsAdapter.js, getCanvasContext(), lines 340-359].
Real-time edit detection
If you edit the document while listening, Alexandria detects the change via MutationObserver watching aria-label mutations on SVG rect elements. It re-extracts the affected paragraphs and re-anchors the current playback position, so you don't lose your place [GoogleDocsAdapter.js, watchForTextChanges()].
Tips for Listening to Google Docs Effectively
Use it for final review
After you've drafted and revised a document, listen to the whole thing before sharing. Errors that your eyes skip will jump out when you hear them. This is how many professional writers do their final pass.
Start at a comfortable speed
Documents are often more complex than articles. Start at 1x or 1.25x until you're comfortable with the content, then increase. Alexandria's free tier goes up to 5x, but comprehension drops above 2x for dense material.
Let highlighting guide you
Word-by-word highlighting keeps you anchored, even when you glance away. This is especially useful for documents with headings, bullets, and tables where you want to see the structure while hearing the content.
Listen to shared docs before meetings
If someone sent you a doc to review before a meeting, listen to it while commuting or doing chores. You'll arrive at the meeting with the content fresh, without dedicating screen time to reading.