---
name: character-barks
description: Generate short in-character vocal barks (one or two words) for a cast whose voices are already established in their video clips, by cloning each voice from the clips with Seed Audio. Covers building the reference, the prompt, trimming the generator's artifacts, loudness-matching the set, the engine import settings that keep playback from stalling video, and when a bark should and should not play. Invoke when a character needs a reaction sound in the interface.
---

# Character barks

A sanitized copy of one of the Claude Code skills behind the AI pipeline on [stolenduck.com](https://stolenduck.com/?role=ai). The job: give a cast of video characters short reaction sounds for the interface, a word or two in each character's own voice, cloned from the clips the audience already knows them by. It was written for one moment in one game; the method is general. Project names, paths, asset names and character names are removed.

## Pipeline

1. **Build a voice reference** from solo clips. To-camera interviews are ideal: one speaker, clean, in character. Confirm who is speaking from each clip's transcript rather than its filename. Extract the audio, concatenate two or three clips, normalize:

   ```
   ffmpeg -i clip.mov -vn -ac 1 -ar 44100 ref_1.wav
   ffmpeg -i ref_1.wav -i ref_2.wav -filter_complex "concat=n=2:v=0:a=1,loudnorm" ref.wav
   ```

   Ten to twenty seconds is plenty.

2. **Generate** with Seed Audio, passing the reference:

   ```
   model:            Seed Audio
   audio reference:  ref.wav
   prompt:           "Voice matching the reference audio: <persona> saying a short <direction> '<word>', <adjectives>, close-mic, clean studio quality, completely dry, no music, no sound effects, no background noise, under 1.5 seconds"
   ```

3. **Trim.** Seed Audio often appends a stray blip or a music sting in the last ~30 ms and pads the start. Map the speech with `silencedetect=n=-35dB:d=0.08`, trim the lead-in, and cut or fade before any trailing artifact. When the output runs to the end with no trailing silence, leave the tail alone: an aggressive fade cuts into good audio.

4. **Loudness-match the set.** Peak-normalize every clip to −3 dB (`volumedetect`, then `volume=XdB`), so no character shouts over another.

5. **Register** one file per character in the interface sound bank, keyed by character name and matched case-insensitively against every name the character goes by, because call sites pass whichever they have.

6. **Fix the import settings.** The engine's default for a fresh audio import is a compressed format with preload off, which decompresses synchronously on first play. Over a playing video that main-thread stall drops frames: a visible lag and a black flash. The convention for interface sounds is uncompressed PCM, decompress on load, preload on. In some engine versions the preload flag lives inside the per-platform sample settings, not at the importer's top level.

## Lessons learned

- **Prompt energy dominates reference energy.** "Bright, bubbly" prompts came out over-caffeinated even against a calm reference; a seductive read needed "low, soft, sultry, breathy, unhurried, almost a whisper." If a male voice comes out falsetto, add "deep masculine voice, confident low register" explicitly.
- Generate one take per line and iterate on the direction; the director cherry-picks. Expect two or three rounds per character.
- Directions that landed: a quick, punchy "Let's go!" in a deep register; an understated, deep "Nice." with a slight accent; a measured "Perfect." with executive poise; a slow, breathy "Oooh...".
- If the direction keeps missing, rebuild the reference from clips whose energy matches the target read instead of pushing adjectives harder.
- A word in a character's own language generates fine with "natural <language> pronunciation" in the prompt.

## Playback design: once per event, up front, opt-in

- A bark plays **once per event**, as the event's visual starts, never once per particle or per point. A voice repeated per point is annoying and cannot be pitch-laddered the way a chime can; the per-point sound stays a tonal chime with a pitch ladder and a short rate limit.
- It plays **up front**, because the next video clip, with its own dialogue, may start while the event's visuals are still running; a bark delayed to the end talks over the next line.
- It is **opt-in per call site**. In an acted scene a bark reads as the character speaking in-scene, which is jarring, so the command that triggers the event defaults to the chime only and enables the voice only where the character is not already on screen talking, such as a messaging screen or a to-camera interview.
