Skip to content

Published timelines get their voiceover as one MP3 - #48

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

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

Conversation

@ashrawan

Copy link
Copy Markdown
Owner

What this changes

A published timeline's voiceover is now one MP3, laid out the same way as a wiki view's:

  • When it is made. It is made when a timeline is published, and again when its voiceover changes while it is published.
  • How it is made. The function voiceover gets a new action, record. It has the server voice say every line as an MP3, several at a time in one request. It then joins the lines frame by frame with 0.35 s of silence between them and records where each line starts. There is no re-encoding: supabase/functions/voiceover/mp3.js, joinMp3().
  • Where it is kept. The file goes to the public store at views/<username>/<slug>/<voice>/<v>.mp3. Older files for that timeline are deleted, and the words and cues are kept beside the wiki's. The page saves the answer on the row as voice.audio, so every reader plays from the one file.
  • Unchanged words are not paid for twice. The same words in the same voice are made only once.
  • Taking a timeline down deletes its file. An unpublished timeline's voice stays on the reader's device only.
  • Per-line sound files are no longer kept on the server. Neither the function nor the page reads them any more, and the browser keeps the lines it was sent.

Why

He asked for it: the user timelines should be consistent with the wiki (one file, same address shape), and the per-line files were "complicated". MP3 frames stand on their own, so joining them costs almost no CPU, which matters within an edge function's limits.

Kind

  • New entry
  • Correction to an entry
  • New view
  • Image or icon
  • The page (site/)
  • Scripts, rules, tests or docs

Sources

  • None (no dates or facts changed)

Screenshots

Nothing on the page looks different.

Checklist

  • node scripts/build.mjs --check prints 0 errors
  • node --test passes (138, including a new test for joining MP3s)
  • 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
  • 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)

Not tested yet:

  • The function has not been deployed.
  • No signed-in run of the full path.
  • Whether the hosted voice answers with response_format: "mp3".

Joining was checked with ffmpeg on two test MP3s: no decode errors, the lengths were right, and the silences landed where the cues say.

The function must be redeployed with the new mp3.js file beside index.ts.


Generated by Claude Code

…, the page plays it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
…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
… 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
@netlify

netlify Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit ed74de6
🔍 Latest deploy log https://app.netlify.com/projects/ubiquitous-smakager-593fec/deploys/6b0a83467319addf2c79c17e
😎 Deploy Preview https://deploy-preview-48--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.

…s a month

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

The time line at the foot wrote years in the bar's four characters (660B, 14G for 13.8 billion years
ago); it now writes them as the rest of the page does (660 BCE, 13.8B years ago), with room kept so a
year never runs into the next name, on the page and in the film. The year pill named the room the road
leaves before the first entry (801 BCE for Japan, whose first entry is 660 BCE); it now names the
entries' own first and last years.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
The strip placed entries by their left edge with a guessed shift, so the marker stood about 7 px
before the dot, and before play it stood short of the first. Entries are now placed by the middle of
their dot as measured, the marker stands on the first dot before play, rests on a card's dot while the
camera rests there (and play waits for the line), and glides to the next dot only while the camera
moves. The marker also follows the strip when the bar on the left steps away for play. The film's
marker starts on the first dot too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCuMSjEB5X8rPj3mTFiKDZ
@ashrawan
ashrawan merged commit 9211fb4 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