Detect silence and speech segments in audio files with FFmpeg
Ready for 3.0What this workflow does
This workflow has 17 nodes and runs when someone submits an n8n form (“Detect silence in an audio file”). It uses only n8n's built-in nodes.
How it runs
Trigger: When someone submits an n8n form (“Detect silence in an audio file”).
- Prepare Run (Code): runs custom JavaScript code
- Create the temp folder (Execute Command): runs a shell command on the n8n host
- Restore the uploaded file (Code): runs custom JavaScript code
- Save the uploaded file to disk (Read/Write Files from Disk): writes a file to disk
- Detect silence (FFmpeg) (Execute Command): runs a shell command on the n8n host
- Parse the silence report (Code): runs custom JavaScript code
- Route by output mode (Switch): routes items into 2 branches
- Build the trim filter (FFmpeg) (Code): runs custom JavaScript code
- Build SRT markers (Code): runs custom JavaScript code
- Trim the silence (FFmpeg) (Execute Command): runs a shell command on the n8n host
…plus 6 more steps. See the full node list below.
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (5)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Code
n8n-nodes-base.code - Execute Command
n8n-nodes-base.executeCommand - Read/Write Files from Disk
n8n-nodes-base.readWriteFile - Switch
n8n-nodes-base.switch
From the author
Quick overview This workflow accepts an uploaded audio file via an n8n form, runs FFmpeg’s silencedetect filter to measure pauses, and returns a JSON report listing silence and derived speech segments with totals like duration and percent silent. How it works…