Commit graph

3 commits

Author SHA1 Message Date
330bc8bde2 migration 0005: idempotent ADD COLUMN IF NOT EXISTS
Caught when redeploying after the 0006 patch: the live DB had
migration 5 stamped with a stale checksum + the column already
present, so neither re-apply nor checksum-only-fix worked cleanly.
Making 0005 idempotent fixes both paths.
2026-05-13 20:32:41 -07:00
2ed3d3373a migration 0006: extend generation_runs.kind to allow narrate_prep
Migration 0005 added the chapters.body_md_tts column but missed
this check constraint update — caught at runtime when
prepare-narration tried to insert kind='narrate_prep'.

Postgres doesn't ALTER CHECK in place; we drop + re-add.
2026-05-13 20:28:59 -07:00
89c35fd9d3 narrate: body_md_tts column + narrate_prep pass + Kokoro routing
Two new things working together:

1. Migration 0005 adds chapters.body_md_tts (nullable). Narrate path
   prefers it over body_md when present — that's the annotated-for-
   audiobook variant. Falls back to body_md if not set.

2. New Forge::narrate_prep pass: author (or House) annotates prose
   with [breath] / [pause:Xs] / [scene] beat markers AND occasional
   humanizing narrator stumbles (em-dash repetition, self-correction,
   hesitation — sparingly, 1-3 per chapter). Apart from stumbles, the
   prose is verbatim. Author voice threads through.

3. New CLI: 'skald prepare-narration --chapter <uuid> [--author slug]
   [--overwrite]'. Records as generation_runs row kind=narrate_prep.

4. skald narrate now routes by voice.source — kokoro_* voices hit
   KOKORO_URL (Apache 2.0 stack, audiobook-tuned with the v0.2 render-
   and-stitch server), everything else hits F5_TTS_URL (voice-cloning
   path). Voice DB row carries source as the dispatch key.

Why no new tag for narrator stumbles: em-dash repetition and self-
correction are just prose patterns Kokoro reads correctly because of
its punctuation cues. No new server-side machinery.
2026-05-13 20:24:38 -07:00