Communitygithub.com

clean-voice-sidon

Clean up the voice track of a video (phone or talking-head recording) with the Sidon speech-restoration model on a Modal cloud GPU, then loudness-normalise and remux it into the video. Use on "clean the audio", "enhance my voice", "denoise this video", "fix the phone mic audio".

What is clean-voice-sidon?

clean-voice-sidon is a Claude Code agent skill that clean up the voice track of a video (phone or talking-head recording) with the Sidon speech-restoration model on a Modal cloud GPU, then loudness-normalise and remux it into the video. Use on "clean the audio", "enhance my voice", "denoise this video", "fix the phone mic audio".

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/danielrosehill/Remote-Video-Editing/tree/HEAD/skills/clean-voice-sidon

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Clean the voice in a video with Sidon on Modal

Speech restoration with Sidon v0.1 (sarulab-speech/sidon-v0.1 on Hugging Face), an audio-to-audio model that re-synthesises the voice at 48 kHz. It needs a GPU, so the model runs on Modal; everything else (extracting, loudness, remuxing) is plain ffmpeg on the local machine. The video stream is never re-encoded.

The Modal job is scripts/sidon_enhance.py in this plugin (${CLAUDE_PLUGIN_ROOT}/scripts/sidon_enhance.py).

Model choice (why Sidon)

ModelVerdict
Sidon v0.1Default. Light; an 11-minute file ran in one job on an L4-class GPU for a few cents. Output is clean, full-band, 48 kHz.
NVIDIA RE-USEKeeps more of the speaker's own spectral detail, but ran out of GPU memory on long files (failed on the second 30 s chunk of an 11-minute file). Use only for short clips.
DeepFilterNetRuled out: audible distortion on voice.

Sidon regenerates everything above 8 kHz, so the result is a voice with no room or background left in it. Music and other non-speech sound in the track are lost. If the video has music beds, clean the voice before adding them.

Preferences

Read remote-video-editing/preferences.json under the first data root that exists: $CLAUDE_USER_DATA, then ~/.claude-user-data, then ${XDG_DATA_HOME:-~/.local/share}/claude-plugins. Keys:

KeyDefaultMeaning
modal_commandmodalCommand that runs Modal apps (a wrapper that selects a profile or workspace is fine)
run_notesnoneFree-text instructions on where to run Modal (e.g. another host that holds the auth) and how files reach it. Follow them.
loudness_lufs-14Integrated loudness target (YouTube-style)
true_peak_db-1.5True-peak ceiling

If no file exists and modal token is not set up (modal profile current fails), stop and tell the user to run modal setup first.

Procedure

Work in a folder next to the source video. IN=<video>, MODAL=<modal_command, default modal>.

  1. Extract the audio as mono 48 kHz FLAC:
    ffmpeg -v error -y -i "$IN" -vn -ac 1 -ar 48000 -c:a flac -sample_fmt s16 audio.flac
    
  2. Test on 30 seconds first. Cut a clip from a section with speech (not the first seconds):
    ffmpeg -v error -y -ss 60 -t 30 -i audio.flac -c:a flac test30.flac
    $MODAL run "${CLAUDE_PLUGIN_ROOT}/scripts/sidon_enhance.py" --src test30.flac --out test30_sidon.flac
    
    Hand both files to the user to listen to. Do not run the full file until they approve the sound.
  3. Run the full track:
    $MODAL run "${CLAUDE_PLUGIN_ROOT}/scripts/sidon_enhance.py" --src audio.flac --out audio_sidon.flac
    
    The job prints one line per 96 s chunk. The first run builds the image (a few minutes); later runs reuse it.
  4. Measure loudness (first pass of two-pass loudnorm):
    ffmpeg -hide_banner -nostats -i audio_sidon.flac \
      -af loudnorm=I=-14:TP=-1.5:LRA=11:print_format=json -f null - 2>&1 | grep -A12 '^{'
    
  5. Remux with the measured values. The video is stream-copied:
    ffmpeg -v error -y -i "$IN" -i audio_sidon.flac -map 0:v -map 1:a -c:v copy \
      -af "loudnorm=I=-14:TP=-1.5:LRA=11:measured_I=<input_i>:measured_TP=<input_tp>:measured_LRA=<input_lra>:measured_thresh=<input_thresh>:offset=<target_offset>:linear=true,aresample=48000" \
      -c:a aac -b:a 192k -movflags +faststart "<name>_clean.mp4"
    
    For HEVC sources that must play in Apple players, add -tag:v hvc1.
  6. Verify: ffprobe the duration against the source (should match to within a frame), and cut a 30 s before/after pair at the same offset (-vn -c:a copy) for the user to compare.

Script library

If the user has a script library (find-script, save-script), check it before changing the Modal job, and save any changed version afterwards.

Cost and limits

  • GPU list in the script: L4, A10G, L40S (whichever Modal has free). Timeout 1 hour.
  • The whole file is sent to the function as bytes. Fine for voice tracks up to an hour or two of mono FLAC; for longer material, split the audio, run the parts, and join them with ffmpeg concat.
  • Weights download from Hugging Face on each cold start (public, no token needed).

Related

For local editing, rendering and audio work (Kdenlive, melt, ffmpeg presets, silence cutting), see the complementary-plugins skill in this plugin.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Related Skills