trim_silence
Detect and remove silent pauses from audio or video files, preserving A/V lip-sync in start_end mode and reporting original duration and seconds saved.
Instructions
Detect and remove silent pauses from audio or video files. Preserves video & audio lip-sync in 'start_end' mode. Returns original duration and seconds saved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Trim mode: 'start_end' removes silence at the start and end (preserving perfect A/V sync on videos); 'all_pauses' removes silent pauses across audio files. Default: 'start_end'. | start_end |
| inputPath | Yes | Path to the source audio or video file. | |
| outputPath | Yes | Destination path for the trimmed file (e.g. './recordings/cleaned.mp4'). | |
| thresholdDb | No | Volume threshold in decibels, between -60dB and -10dB. Audio quieter than this is treated as silence. Default: -35. | |
| minDurationSeconds | No | Minimum silence duration in seconds to trigger a cut. Default: 0.5. |