/hildegard:hildegard-soundfrom hildegard
Cleans voice recordings, removes hum/hiss, mixes music under speech, builds podcast intros/radio spots, generates free narration and sound effects, and measures loudness using Python 3, FFmpeg, and Node scripts.
Ships in hildegard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Clean, voice, mix and measure audio with tested scripts that need only Python 3 and FFmpeg (node for the free voice
and effects). The user's request wins over every default here. Never write your own filter graph, gain curve or ducking
envelope: the scripts and recipes below are tested and yours won't be.
If you read nothing else, do these steps.
No shell or tools here (a chat, or tools turned off)? Then you are writing a plan: give the user the commands in order, with their file names, and the checks to run after. Never write tool-call markup or claim a result you did not get.
python3 scripts/clean_voice.py voice_raw.wav voice.wav --lufs -16 --peak -1.5 (no Python allowed: copy Recipe A
from references/recipes.md exactly). No recording and no budget:
node scripts/voice.mjs --file script.txt --out voice.wav (Kokoro, Apache-2.0, free for commercial use; label it
as an AI voice).FREESOUND_API_KEY=... node scripts/sfx.mjs --engine freesound --prompt "hand plane on oak" --seconds 3 --out fx1.wav
(a free key from freesound.org). The default tangoflux engine is free but for personal and school work only.python3 scripts/duck_mix.py voice.wav music.wav out.wav --voice-start 4 --fade-in 3 --tail 4 --fade-out 4.
Lines over a bed with a closing sting at an exact length: python3 scripts/spot.py out.wav --music music.wav --sting sting.wav --lines line1.wav line2.wav --total 20.
Effects at set times: the adelay mix in references/free-voice-and-sfx.md.python3 scripts/measure.py out.wav --lufs -16 --peak -1.5 with the targets from step 1, and fix
every miss (see Check before you deliver).The user runs it with FFmpeg alone (they said so, or you are writing a plan in a chat): give these tested commands with their file names and numbers, never a script they don't have. They record, clean, mix with the music ducked under the voice, and measure:
ffmpeg -f pulse -i default -ac 1 -ar 48000 -t 25 voice_raw.wav # Linux mic; stop early with q
ffmpeg -i voice_raw.wav -af "highpass=f=80,lowpass=f=12000,afftdn=nf=-25,acompressor=threshold=-20dB:ratio=3:attack=5:release=100,loudnorm=I=-16:TP=-1.5:LRA=7" -ar 48000 voice.wav
ffmpeg -i music.wav -i voice.wav -i fx.wav -filter_complex "[1:a]adelay=4000:all=1,apad,asplit[vo][key];[0:a]volume=-6dB[m];[m][key]sidechaincompress=threshold=0.02:ratio=10:attack=20:release=400[duck];[2:a]adelay=2000:all=1[fx];[duck][vo][fx]amix=inputs=3:normalize=0:duration=first,atrim=0:20,afade=t=out:st=17:d=3,loudnorm=I=-16:TP=-1.5:LRA=11[a]" -map "[a]" -ar 48000 intro.wav
ffmpeg -i intro.wav -af ebur128=peak=true -f null - 2>&1 | grep -E "^\s+(I|Peak):"
ffmpeg -i intro.wav -c:a libmp3lame -b:a 192k intro.mp3
The voice enters at 4 s (adelay=4000), the effect at 2 s, the music drops about 20 dB under the voice, and the
piece is cut to 20 s with a 3 s fade (atrim, afade); change those numbers to the timeline. The music must run at
least as long as the piece. Tested: 20.0 s, -15.6 LUFS, peak -4 dBFS. For an exact two-pass loudness, paste Recipe B or C below.
| Job | Script |
|---|---|
| Clean a voice: hum, hiss, rumble, quiet passages, loudness | python3 scripts/clean_voice.py voice_raw.wav out.wav --lufs -16 --peak -1.5; one-script version: Recipe A in references/recipes.md |
| Music under speech (announcement, sermon, voice-over); the music drops 16 dB under the voice | python3 scripts/duck_mix.py, or paste Recipe B |
| A radio spot or intro: lines in order, a bed, a sting, an exact length | python3 scripts/spot.py, or paste Recipe C from references/recipes.md |
| Free narration (Kokoro and others) and sound effects | node scripts/voice.mjs, node scripts/sfx.mjs; engines, licenses and exit codes in references/free-voice-and-sfx.md |
| Premium voices through the listener's own Puter account | open references/puter-voice.html in a browser |
| A 3D spatial scene or a frame-clocked demo mix | python3 scripts/spatial_mix.py spec.json out.wav; see references/spatial-audio.md |
| Measure loudness, true peak, hum and clipping | python3 scripts/measure.py out.wav (it reads a video's sound too) |
| Cut clips into a reel with titles and music | hildegard-video-edit |
If you can deliver only one script, paste a recipe exactly and change only the file names and numbers on its first lines. Recipes write a WAV and print the delivered loudness and true peak on their last two lines.
Run python3 scripts/measure.py out.wav --lufs -16 --peak -1 (use the targets from the brief). With no Python, read the
last two lines each recipe prints.
hum lines say clean. If one says HUM, the notch step did not run; fix that and measure again.CLIPPING.You can't hear the result, so report the measured numbers rather than describing the sound, and ask the user to listen to the quiet parts and the loudest part.
Why they look like this, and what to keep if you change one: references/recipes.md. Tested on recordings with hum at 50 and 60 Hz, heavy rumble, heavy hiss, big level dips, pops and clipped peaks. They
need only ffmpeg, ffprobe, awk and sed.
Edit START (seconds of music before the voice), FADEIN, FADEOUT, TAIL (seconds after the last word) and the target. The music drops 16 dB while the voice speaks and comes back in pauses of 0.6 s or more. It is read from the voice with silencedetect, so it needs no sidechain graph. It never cuts the voice: if TOTAL ends before the last spoken word it stops and says how many seconds over. Raise TOTAL, or run it with ALLOW_OVERRUN=1 to let the total grow to the last word plus TAIL.
#!/usr/bin/env bash
# Music under a voice-over: the music drops 16 dB while the voice speaks and comes back in pauses of 0.6 s or more. Edit the names and
# numbers on the next lines, then run: bash process.sh
set -euo pipefail
VOICE=${VOICE:-voice.wav}; MUSIC=${MUSIC:-music.wav}; OUT=${OUT:-out.wav}
START=${START:-4}; FADEIN=${FADEIN:-3}; FADEOUT=${FADEOUT:-4}; TAIL=${TAIL:-4}; DUCK=${DUCK:-16}; REL=${REL:--8}
TARGET=${TARGET:--16}; PEAK=${PEAK:--1.5}; TOTAL=${TOTAL:-} # TOTAL empty = START + the voice's last word + TAIL; ALLOW_OVERRUN=1 grows a TOTAL that is too short
TMP=$(mktemp -d); trap 'rm -rf "$TMP"' EXIT
# 1) where the voice speaks: silencedetect finds pauses of 0.6 s or more; speech is what lies between them.
VD=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$VOICE")
MEAN=$(ffmpeg -hide_banner -i "$VOICE" -af volumedetect -f null - 2>&1 | sed -n 's/.*mean_volume: \(-*[0-9.]*\) dB.*/\1/p')
NOISE=$(awk -v m="$MEAN" 'BEGIN{n=m-16; if(n>-30)n=-30; if(n<-55)n=-55; print n}')
ffmpeg -hide_banner -i "$VOICE" -af "silencedetect=noise=${NOISE}dB:d=0.6" -f null - 2>&1 | grep -o 'silence_\(start\|end\): [0-9.]*' > "$TMP/sil.txt" || true
# The music gain curve: 1 = full, 10^(-DUCK/20) while the voice speaks, with ramps of 0.3 s before and 0.5 s after each stretch of speech.
SEG=$(awk -v vd="$VD" '/start/{s[++n]=$2} /end/{e[++m]=$2} END{a=0; for(i=1;i<=n;i++){ if(s[i]>a+0.05) print a, s[i]; a=(i<=m)?e[i]:vd } if(a<vd-0.05) print a, vd}' "$TMP/sil.txt")
EXPR=$(printf '%s\n' "$SEG" | awk -v st="$START" -v d="$DUCK" 'BEGIN{g=10^(-d/20)} {a=$1+st; b=$2+st; x=x (x?"+":"") sprintf("clip((t-%.3f)/0.3,0,1)*clip((%.3f-t)/0.5,0,1)", a-0.3, b+0.5)} END{printf "1-(1-%.5f)*min(1,%s)", g, x}')
LASTEND=$(printf '%s\n' "$SEG" | awk 'END{print $2}')
FULL=$(awk -v s="$START" -v e="$LASTEND" -v t="$TAIL" 'BEGIN{printf "%.2f", s+e+t}')
if [ -z "$TOTAL" ]; then TOTAL=$FULL
elif awk -v t="$TOTAL" -v s="$START" -v e="$LASTEND" 'BEGIN{exit !(t < s+e+0.1)}'; then
OVER=$(awk -v t="$TOTAL" -v s="$START" -v e="$LASTEND" 'BEGIN{printf "%.2f", s+e+0.1-t}')
[ "${ALLOW_OVERRUN:-0}" = 1 ] || { echo "the voice speaks until $(awk -v s="$START" -v e="$LASTEND" 'BEGIN{printf "%.2f", s+e}') s but TOTAL is $TOTAL s: $OVER s over. Use a TOTAL of at least $(awk -v t="$TOTAL" -v o="$OVER" 'BEGIN{printf "%.1f", int((t+o)*10+0.999999)/10}'), a shorter voice or a smaller START, or ALLOW_OVERRUN=1 to let the total grow. Nothing was written." >&2; exit 1; }
echo "note: the voice needs $OVER s more than TOTAL, so the total grows from $TOTAL s to $FULL s" >&2; TOTAL=$FULL
fi
# 2) music level: set REL dB from the voice's own loudness, before ducking.
lufs() { ffmpeg -hide_banner -nostats -i "$1" ${2:-} -af ebur128 -f null - 2>&1 | sed -n 's/.* I: *\(-*[0-9.]*\) LUFS.*/\1/p' | tail -1; }
VL=$(lufs "$VOICE"); ML=$(lufs "$MUSIC")
MG=$(awk -v v="$VL" -v m="$ML" -v r="$REL" 'BEGIN{printf "%.2f", v+r-m}')
# 3) mix: voice delayed by START, music looped if short, cut to TOTAL, ducked, faded in and out.
ffmpeg -hide_banner -loglevel error -y -i "$VOICE" -stream_loop -1 -i "$MUSIC" -filter_complex "[0:a]aformat=channel_layouts=stereo,afade=t=in:d=0.01,adelay=${START}s:all=1[v];[1:a]aformat=channel_layouts=stereo,atrim=duration=$TOTAL,asetpts=PTS-STARTPTS,volume=${MG}dB,volume='$EXPR':eval=frame:precision=float,afade=t=in:d=$FADEIN,afade=t=out:st=$(awk -v t=$TOTAL -v f=$FADEOUT 'BEGIN{print t-f}'):d=$FADEOUT[m];[v][m]amix=inputs=2:duration=longest:normalize=0" -t "$TOTAL" -c:a pcm_f32le "$TMP/mix.wav"
# 4) loudness in two passes, then what you delivered.
M=$(ffmpeg -hide_banner -i "$TMP/mix.wav" -af "loudnorm=I=$TARGET:TP=$PEAK:LRA=11:print_format=json" -f null - 2>&1 | sed -n '/^{/,/^}/p')
v() { printf '%s' "$M" | sed -n "s/.*\"$1\" : \"\([^\"]*\)\".*/\1/p"; }
SR=$(ffprobe -v error -select_streams a:0 -show_entries stream=sample_rate -of csv=p=0 "$VOICE")
ffmpeg -hide_banner -loglevel error -y -i "$TMP/mix.wav" -af "loudnorm=I=$TARGET:TP=$PEAK:LRA=11:measured_I=$(v input_i):measured_TP=$(v input_tp):measured_LRA=$(v input_lra):measured_thresh=$(v input_thresh):offset=$(v target_offset):linear=true" -ar "$SR" -c:a pcm_s16le "$OUT"
ffmpeg -hide_banner -nostats -i "$OUT" -af ebur128=peak=true -f null - 2>&1 | grep -E "^\s+(I|Peak):" | tail -2
voice.mjs asks for
--consent). Never imitate a real person's voice otherwise; refuse and say why. Label AI voices.voice.mjs run per line or paragraph), so a bad line can be redone alone.references/slop.md. Generic "epic" music and robotic
narration are the sound of slop.Recording the user's own voice. Linux: the first line of the FFmpeg-alone block; macOS: -f avfoundation -i ":0" in its place. Record 10 s of room silence first and keep the mic a hand's width away.
Instrumental music, a jingle or a bed made by script: hildegard-music. A song: HG/hildegard/references/song-suno.md.
Brief music by length in seconds, tempo, key, named instruments and where it sits (under dialogue: no lead melody
where words are), never by an artist.
Every shot has a sound even if nothing "happens": a room tone, wind, distant traffic. Silence reads as broken. Layer:
Change the ambience exactly on the cut when the place changes; overlap it a few frames (a J or L cut) to carry the viewer across.
duck_mix.py.python3 scripts/measure.py final.wav. clipping or loudness failing means fix the mix, not the limiter.Tell the user what is in the mix, its measured loudness and true peak, and where every sound came from (their files, a free source and its license, an AI voice and its license). For spatial work, report the measured checks and say plainly that personal HRTF perception needs human ears.
references/free-voice-and-sfx.md (opens in a new tab)references/puter-voice.html (opens in a new tab)references/recipes.md (opens in a new tab)references/slop.md (opens in a new tab)references/spatial-audio.md (opens in a new tab)scripts/audio_io.mjs (opens in a new tab)scripts/clean_voice.py (opens in a new tab)scripts/duck_mix.py (opens in a new tab)scripts/measure.py (opens in a new tab)scripts/sfx.mjs (opens in a new tab)scripts/spatial_mix.py (opens in a new tab)scripts/spot.py (opens in a new tab)scripts/test/voice-sfx.test.mjs (opens in a new tab)scripts/voice.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
17 skills in this plugin
/hildegardUse for /hildegard, /art, /vus, /mus, /suno and any request to make, edit or write creative work; routes images, video, sound, music, 3D, games, web and every kind of writing./hildegard-3dUse when making a 3D model, sculpture, figurine, game asset, relief or lithophane in Blender, OpenSCAD or code, checked each round for views, watertightness and size./hildegard-artUse when making art, an image, illustration, key art, mood board or visual style with the user's image model; posters and covers with words go to hildegard-design.Other plugins' skills for the same job
npx claudepluginhub students-of-local/hildegard --plugin hildegard