// THE VOICES PAGE (voices.spec.ts; lib/report/castCli.mjs, components/projects/VoicesPanel.tsx): a cut of two clips // of "Host Man" (the real voice: speakers.json names them) and three post items -- // // reports/voices-fixture/ // k01, k02 Host's clips (a 150 Hz voice and its octave), each window in the corpus under voicescast // p-1 @hostman "Host's first line, read aloud." -- its picked take orpheus ยท zac (a 262 Hz tone) // p-2 @hostman answers @guest's post (a parent): no take yet // p-3 @guest "The guest's own line." -- no take yet // speakers.json Host Man: k01, k02 (the cast finds him by his name) // // The cast (/.umtool/cast.json) is the spec's to write and remove. The editor is the suite's stub (its tts // writes a tone; its voice-convert copies), the speaker embedder the test kit's fake (VOICE_MATCH_* in // playwright.config.ts). Synthetic, like every fixture. import { mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; export const VOICES = "voices-fixture"; const write = (dir, name, doc) => { mkdirSync(dir, { recursive: true }); writeFileSync(path.join(dir, name), typeof doc === "string" ? doc : JSON.stringify(doc, null, 2) + "\n"); }; /** @param {{ reports: string, channels: string, manifest: Function, ff: (args: string[]) => void }} o */ export function makeVoicesFixture({ reports, channels, manifest, ff }) { const chan = "voicescast"; const timeline = []; for (const id of ["k01", "k02"]) { const vid = `voice-${id}`; const vdir = path.join(channels, chan, "data", vid); mkdirSync(path.join(vdir, "clips"), { recursive: true }); write(vdir, "transcript.cues.json", { title: `Host ${vid}`, uploadDate: "20250101", channel: "Voices Cast", webpageUrl: `https://example.invalid/watch?v=${vid}`, duration: 20, cues: [{ start: 2, end: 4.5, text: "slow news day." }] }); ff([ "-f", "lavfi", "-i", "color=c=gray:size=160x90:rate=15:duration=6", "-f", "lavfi", "-i", "aevalsrc=0.3*sin(2*PI*150*t)+0.15*sin(2*PI*300*t):s=48000:d=6", "-map", "0:v", "-map", "1:a", "-t", "6", "-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac", "-ar", "48000", "-ac", "2", path.join(vdir, "clips", "0.00-6.00.mp4"), ]); timeline.push({ type: "clip", id, channel: chan, video: vid, start: 0.5, end: 5.5, cutStart: 2, cutEnd: 4.5, cite: 2, section: 0, lock: true, quote: "slow news day." }); } const dir = path.join(reports, VOICES); const post = (id, handle, author, text, o = {}) => ({ type: "post", id: `p-${id}`, post: `voicescast-x/${id}`, platform: "x", author, handle, date: `2026-10-30T1${id}:00:00.000Z`, text, url: `https://x.com/${handle}/status/${id}`, engagement: { likes: 1 }, section: 0, ...o, }); const takes = path.join(dir, "narration", "posts", "1"); mkdirSync(takes, { recursive: true }); ff(["-f", "lavfi", "-i", "sine=frequency=262:sample_rate=48000:duration=2", "-ac", "1", "-c:a", "pcm_s16le", path.join(takes, "take-1.orpheus-zac.wav")]); timeline.push( post("1", "hostman", "Host Man", "Host's first line, read aloud.", { narration: { script: "Host's first line, read aloud.", takes: [{ file: "narration/posts/1/take-1.orpheus-zac.wav", engine: "orpheus", voice: "zac", seconds: 2, script: "Host's first line, read aloud.", at: "2026-11-02T00:00:00.000Z" }], pick: 0 }, }), post("2", "hostman", "Host Man", "Host answers the guest.", { parents: [{ id: "20", handle: "guest", author: "The Guest", date: "2026-10-30T09:00:00.000Z", text: "The guest asks a question first." }], narration: { script: "Host answers the guest." }, }), post("3", "guest", "The Guest", "The guest's own line.", { narration: { script: "The guest's own line." } }), ); write(dir, "video.manifest.json", manifest(VOICES, "The Voices Fixture", { siteOrigin: "https://archive.example", channelSlug: chan }, timeline)); write(dir, "speakers.json", { speakers: [{ name: "Host Man", clips: ["k01", "k02"] }] }); return dir; }