// A CHARACTER's ORPHEUS TUNING (character-tuning.spec.ts; components/projects/CharacterTuning.tsx, lib/report/castCli.mjs // `cast set|try|stale`): one character of this video's own, "teller" (orpheus · tara), and the reads it makes -- // // reports/tuning-fixture/ // p-1 @invented_teller_fixture its picked take orpheus · tara, made with the DEFAULTS (a 262 Hz tone): stale once a tuning is kept // p-2 @invented_teller_fixture its picked take made with its line's OWN tuning (temperature 0.9): never stale // p-3 @invented_teller_fixture its picked take RECORDED: never stale // narration/characters.json teller, no tuning yet // // The cast (/.umtool/cast.json) is not used: the character is this video's own. The editor is the suite's // stub (its tts writes a tone and reports the tuning it was asked). Invented people, like every fixture. import { mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; export const TUNING = "tuning-fixture"; export const TUNING_LINE = "The teller says the bridge over the river was closed for the whole long winter."; 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, manifest: Function, ff: (args: string[]) => void }} o */ export function makeTuningFixture({ reports, manifest, ff }) { const dir = path.join(reports, TUNING); const made = (o = {}) => ({ temperature: 0.55, top_p: 0.85, top_k: 50, min_p: 0, repeat_penalty: 1.2, takes: 3, ...o }); const post = (id, text, take) => ({ type: "post", id: `p-${id}`, post: `tuningx/${id}`, platform: "x", author: "The Teller", handle: "invented_teller_fixture", date: `2026-10-30T1${id}:00:00.000Z`, text, url: `https://x.com/invented_teller_fixture/status/${id}`, engagement: { likes: 1 }, section: 0, narration: { script: text, takes: [{ seconds: 2, script: text, at: "2026-11-02T00:00:00.000Z", ...take }], pick: 0 }, }); const tone = (rel) => { mkdirSync(path.dirname(path.join(dir, rel)), { recursive: true }); ff(["-f", "lavfi", "-i", "sine=frequency=262:sample_rate=48000:duration=2", "-ac", "1", "-c:a", "pcm_s16le", path.join(dir, rel)]); }; const timeline = [ post("1", TUNING_LINE, { file: "narration/posts/1/take-1.orpheus-tara.wav", engine: "orpheus", voice: "tara", tuning: made(), reading: 0 }), post("2", "The teller answers a second question about the ferry and its fares.", { file: "narration/posts/2/take-1.orpheus-tara.wav", engine: "orpheus", voice: "tara", tuning: made({ temperature: 0.9 }), reading: 0, tuningAsked: true }), post("3", "The teller reads this one aloud in a voice of his own.", { file: "narration/posts/3/take-1.recorded.wav", engine: "recorded", voice: "operator" }), ]; for (const e of timeline) tone(e.narration.takes[0].file); write(dir, "video.manifest.json", manifest(TUNING, "The Tuning Fixture", {}, timeline)); write(path.join(dir, "narration"), "characters.json", { format: "umtool-project-characters", version: 1, characters: [{ id: "teller", name: "The Teller", handles: ["invented_teller_fixture"], synthetic: { voice: "orpheus:tara" } }], }); return dir; }