v2.0#18
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a full document / ebook reader to Out Loud, taking it from a "type and speak"
utility to an app that reads whole books aloud. Supports TXT, EPUB, PDF, DOCX, DOC,
MOBI, and HTML, with synchronized word/sentence highlighting, auto-scroll, chapter/page
navigation, and an adaptive sidebar. The reader is an in-place mode: the existing
quick-speak window stays the default, and opening a document grows the window and swaps
to the reader layout. Also ships a Recents library (recently opened documents) and
anonymous, content-free telemetry (PostHog). Tagged as v2.0.
Why
The original TTS path generates the entire input at once and holds all of it in RAM —
the worker keeps every chunk and concatenates one giant waveform, and the renderer
caches every decoded AudioBuffer forever. That's fine for a paragraph and fatal for a
book. There was also no cancellation, and streaming speed was silently broken.
Rather than retrofit that path, this PR adds a parallel, bounded-memory pipeline and
leaves quick-speak untouched. Two principles drive the design:
(paragraphs/headings) are just render containers.
document (it has a native DOMParser, and jszip/pdfjs run there), so main is only file
dialog + byte reads + worker bridge + window resize + recents — no parser dependencies
New dependencies: jszip + pdfjs-dist (renderer), word-extractor (main, for legacy .doc).
Architecture and data model are documented in docs/app/reader.md.
Checklist