Skip to content

Commit aa8e47e

Browse files
committed
fix(media-use): regenerate the skills manifest and keep audio.mjs's header at its limit
1 parent 9823712 commit aa8e47e

3 files changed

Lines changed: 19 additions & 7 deletions

File tree

‎skills-manifest.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"files": 13
1919
},
2020
"media-use": {
21-
"hash": "44ef2d115fa8bebd",
22-
"files": 118
21+
"hash": "d4221a4cd4118c29",
22+
"files": 120
2323
},
2424
"remotion-to-hyperframes": {
2525
"hash": "73b82d19db2ed8c9",

‎skills/media-use/audio/scripts/audio.mjs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
// "provider": "auto", // auto|heygen|elevenlabs|kokoro|gemini (override: --provider)
1818
// "lang": "en", "speed": 1.0,
1919
// "lines": [ // one TTS unit each; id joins back to the caller's model
20-
// { "id": "01", "text": "...", "sfx": ["whoosh", "ui click"] },
21-
// // the person's own recording: `speed` stretches it (pitch kept) and scales `words`;
22-
// // without `words` the recording is transcribed
23-
// { "id": "02", "audio": "take.m4a", "words": [{ "text": "Hello", "start": 0.1, "end": 0.5 }] }
20+
// { "id": "01", "text": "...", "sfx": ["whoosh", "ui click"] }
2421
// ],
2522
// "bgm": { "mode": "retrieve", // retrieve|generate|none (override: --bgm-mode / --no-bgm)
2623
// "query": "calm cinematic underscore", // mood for retrieval

‎skills/media-use/audio/scripts/lib/media-record.test.mjs‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { test } from "node:test";
33
import { mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
44
import { join } from "node:path";
55
import { tmpdir } from "node:os";
6-
import { findByPrompt, readManifest } from "../../../scripts/lib/manifest.mjs";
6+
import { AGENT_SOURCES, findByPrompt, readManifest } from "../../../scripts/lib/manifest.mjs";
77
import { agentWritePath, recordInManifest, voicePaths, writtenAssets } from "./media-record.mjs";
88

99
const noBgm = { bgm: null, bgmFields: { bgm_pending: false } };
@@ -222,3 +222,18 @@ test("a record never takes the id of a download still in flight", (t) => {
222222
["bgm_002"],
223223
);
224224
});
225+
226+
// An engine-written copy stays an agent source, or every rerun would write a numbered copy beside it
227+
// (AGENT_SOURCES, manifest.mjs); what says it is the person's own voice is the provider and intent.
228+
test("a recording line is recorded as your own recording, still an engine-written file", () => {
229+
const [asset] = writtenAssets({
230+
only: new Set(["tts"]),
231+
lines: [{ id: "01", audio: "take.m4a" }],
232+
voices: [{ id: "01", path: "assets/voice/01.wav", duration_s: 2, source: "recording" }],
233+
ttsProvider: "recording",
234+
});
235+
236+
assert.equal(asset.provider, "recording");
237+
assert.equal(asset.intent, "your own recording");
238+
assert.ok(AGENT_SOURCES.includes(asset.source));
239+
});

0 commit comments

Comments
 (0)