diff --git a/schemas/mute.yaml b/schemas/mute.yaml index 772e887..55f6981 100644 --- a/schemas/mute.yaml +++ b/schemas/mute.yaml @@ -1,8 +1,8 @@ Mute: description: >- Silences English profanity in the clip's speech, and any listed `words`. The audio is transcribed when - the edit renders, and the volume drops to zero just before each matching word and returns just after - it. Rich captions transcribed from this clip show the same words masked. Profanity detection is not + the edit renders, and the volume drops to zero over each matching word, with an optional bleep. Rich + captions transcribed from this clip show the same words masked. Profanity detection is not exhaustive: list any word that must not be heard. Cannot be combined with `speed`, `duck` or a volume tween array. type: object @@ -19,4 +19,14 @@ minLength: 1 maxLength: 50 pattern: "^\\S+$" + sound: + description: >- + How muted words sound. `silence` drops the volume to zero over each word; `bleep` does the same and + plays a 1 kHz tone over it. + type: string + enum: + - silence + - bleep + default: silence + example: bleep additionalProperties: false diff --git a/tests/smoke.cjs b/tests/smoke.cjs index 87d6e93..a3ebf9d 100644 --- a/tests/smoke.cjs +++ b/tests/smoke.cjs @@ -142,6 +142,9 @@ async function run() { check("mute rejects an empty word list", () => assert.strictEqual(audioMute({ words: [] }), false)); check("mute rejects a phrase", () => assert.strictEqual(audioMute({ words: ["two words"] }), false)); check("mute rejects unknown keys", () => assert.strictEqual(audioMute({ bleep: true }), false)); + check("mute accepts sound bleep", () => assert.strictEqual(audioMute({ sound: "bleep" }), true)); + check("mute accepts sound silence", () => assert.strictEqual(videoMute({ sound: "silence", words: ["bob"] }), true)); + check("mute rejects an unknown sound", () => assert.strictEqual(audioMute({ sound: "beep" }), false)); check("Parse valid rich-text asset", () => { const result = zodCjs.richTextAssetSchema.parse({