Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions schemas/mute.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions tests/smoke.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Loading