Monday, February 26, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 17503  / 1 Year ago, sun, december 25, 2022, 2:32:54

I have about 20 audio files(.wav) in a folder , this is how I combine this wave files



sox *.wav output.wav


I want to add delay or silence between each wave .



I have tried pad , but it's just put the silence only at the start and end of output.wav .


More From » command-line

 Answers
6

You need to insert a silent track between each track as you specify them so you end up with something like:



sox track1.wav silence.wav track2.wav silence.wav ... output.wav 


You can do that manually (as above), or we can loop the current directory with an inline for-loop. Something like this should work:



sox -n -r 44100 -c 2 /tmp/silence.wav trim 0.0 2
sox $(for f in *.wav; do echo -n "$f /tmp/silence.wav "; done) output.wav


The silence-generator is stolen from here.


[#19738] Monday, December 26, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dileble

Total Points: 169
Total Questions: 105
Total Answers: 141

Location: Sao Tome and Principe
Member since Wed, Dec 29, 2021
2 Years ago
;