Skip to content

Default voiceovers for every wiki view, one MP3 a view - #47

Merged
ashrawan merged 23 commits into
mainfrom
claude/project-thread-a9lcvq
Nov 28, 2026
Merged

ashrawan merged 23 commits into
mainfrom
claude/project-thread-a9lcvq

Conversation

@ashrawan

@ashrawan ashrawan commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Requested by Shrawan · project thread

What this changes

Every one of the 231 wiki views now has a ready-made voiceover in Heart: one MP3 for each view, kept in the public store, plus a list of where each card's line starts and ends. When play starts, the page downloads that one file and plays each card's part of it, for every reader, signed in or not. Nothing has to be made in the browser and nothing goes through the server voice.

  • data/community/wiki/voices/<view>.json: a script for every view (Dinosaurs already had one, Japan was written first for review, and the other 229 were written from each view's own entries), with audio (voice, version, cues) filled in.
  • tools/voice/make.mjs has Kokoro say every line, joins the lines into one MP3 with ffmpeg, and writes the timings into the voices file. VOICE_THREADS lets several runs share one computer.
  • tools/voice/publish.mjs, tools/voice/all.mjs and the new function voice-store send the MP3 to the store along with the words. Each version is a new file, the old one is removed, and only editors can do this.
  • The build checks audio and puts it into the view file. In site/voice.js the lines are cut from the one file, and if the file can't be fetched the page falls back to the usual way of making lines.

Most of the sound was made on a Mac's GPU with mlx-audio (the same Kokoro voice, phonemized by misaki), and 6 views were made in the cloud with kokoro-js. Both produce the same file layout, version hash and timings format, but a few words may sound slightly different between the two.

Why

Asked for: a default voiceover for every wiki view, with the audio made once and served from Cloudflare.

Kind

  • The page (site/)
  • Scripts, rules, tests or docs

Sources

  • No dates were added. The scripts restate each view's own entries in new words.

Screenshots

Nothing new is drawn on the page. The change is the sound and the subtitle at the foot.

To try it: open any wiki view, for example /wiki/japan or /wiki/sports, and press play.

Checklist

  • node scripts/build.mjs --check prints 0 errors
  • node --test passes
  • Every date I added or changed has a source listed on the entry
  • I did not change the id of an existing entry or view
  • Screenshots are included, or nothing on the page changes
  • If I changed the page, the browser console is clean at 1440 and 390 px (checked at 1440 only, with map tiles blocked)
  • An AI assistant helped with this change, and I checked its facts against the sources (tick only if it applies)
  • I agree my contribution is licensed as described in LICENSE (MIT for code, CC BY-NC-SA 4.0 for content)

Checked: all 231 views are in the store, and for the spot-checked files (Sports, Ancient Egypt, Nepal) the length matches the timings. The function voice-store is deployed. The editor-key path in supabase/functions/voiceover and scripts/voices.mjs is in this branch but not deployed, since the scripts were written here instead.


🤖 Generated with Claude Code

https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ

…, the page plays it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
@netlify

netlify Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for ubiquitous-smakager-593fec ready!

Name Link
🔨 Latest commit f803e41
🔍 Latest deploy log https://app.netlify.com/projects/ubiquitous-smakager-593fec/deploys/6b0a7946db327ac42d4f01a0
😎 Deploy Preview https://deploy-preview-47--ubiquitous-smakager-593fec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…th the editors' key

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
…tore, resumable, on several computers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
… with several runs side by side

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
@ashrawan ashrawan changed the title Default voiceovers as one MP3 a view (Dinosaurs, Japan first) Default voiceovers for every wiki view, one MP3 a view Nov 28, 2026
@ashrawan
ashrawan marked this pull request as ready for review November 28, 2026 05:10
… voice there (Make it your own to change it)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
…with a short pause; music under the voice quieter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
…stands on the dot of the entry in front

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
…goes on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
@ashrawan
ashrawan merged commit 0837f55 into main Nov 28, 2026
5 checks passed
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.

2 participants