Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aloud — a Speechify recreation

Aloud turns anything you can read into something you can hear. It is a from-scratch recreation of the core Speechify experience: a personal listening library where you drop in text, articles, or documents and have them read aloud with real-time word highlighting and adjustable speed.

Everything runs in the browser using the Web Speech API — no server, no accounts, no API keys. Your library is stored in localStorage, and the voices come from whatever is installed on your device.

Features

  • Library — save documents by pasting text or uploading .txt, .md, or .pdf files (PDFs are parsed client-side with pdf.js)
  • Word-by-word highlighting — the current word lights up as it's spoken, with the active sentence tinted behind it
  • Click to jump — click any sentence to start reading from there; click the dial strip to seek anywhere in the document
  • Speed control — 0.5× to 3×, applied live, with the time-remaining estimate updating to match
  • Voice picker — choose any speech voice installed on your device
  • Keyboard controlsSpace to play/pause, / to skip by sentence
  • Persistent preferences — your speed and voice choices are remembered

Running it

It's a static site — no build step.

cd speechify-clone
python3 -m http.server 8000
# open http://localhost:8000

Or open index.html directly in a browser (PDF upload requires serving over HTTP in some browsers).

Works best in Chrome, Edge, and Safari. Firefox supports the Web Speech API but does not emit word-boundary events for all voices, so highlighting may fall back to sentence-level.

How it works

  • Text is split into sentences, and each sentence into word spans, all rendered as clickable elements.
  • Speech is queued one sentence at a time (SpeechSynthesisUtterance per sentence) — this makes pause/seek/speed changes reliable across browsers, since speechSynthesis behaves inconsistently with long utterances.
  • Word highlighting is driven by the utterance's boundary events, mapping each charIndex back to the corresponding word span.
  • Time remaining is estimated from word count at ~170 words per minute, scaled by the playback rate.

Project layout

index.html      — both views (library + reader) in one page
css/style.css   — all styling
js/app.js       — storage, text processing, speech engine, UI

License

MIT

About

Aloud — a Speechify recreation: browser TTS reader with word-by-word highlighting, speed control, and a local document library

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages