Skip to content

v2.0#18

Merged
julia-kafarska merged 1 commit into
mainfrom
ebook-reader
Jun 16, 2026
Merged

v2.0#18
julia-kafarska merged 1 commit into
mainfrom
ebook-reader

Conversation

@julia-kafarska

Copy link
Copy Markdown
Member

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:

  1. The sentence is the atomic unit for TTS, highlight, scroll, and seek. Blocks
    (paragraphs/headings) are just render containers.
  2. Main stays stateless about document content. The renderer owns parsing and the parsed
    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

  • npm run check passes (lint + format + knip + typecheck)
  • npm test passes
  • I've tested this locally (npm run electron:dev)

@julia-kafarska julia-kafarska merged commit 05d9240 into main Jun 16, 2026
1 check passed
@julia-kafarska julia-kafarska deleted the ebook-reader branch June 16, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant