9

I love how sox has the ability to split an audio file on silence. The issue I'm haivng is that occasionally my audio tracks end with fadeouts, or notes decaying into reverb (subtle sounds that sox will mistake for silence). I'm trying to adjust the sox command to split the tracks on silence, but LEAVE a LITTLE silence after each split. I can't figure out exactly how to do it. here's the command I have so far:

sox in.wav out.wav silence 1 2 0.5% 1 4.0 0.9% : newfile : restart

Any help with this would be greatly appreciated!

5
  • sox is GPL and included in distros, why it is not unix-specific?
    – user55518
    Commented Jun 30, 2014 at 21:34
  • Because you can install sox on windows systems, and is really unrelated to unix itself. It is software that happens to run on unix, as well as other operating systems.
    – pepper
    Commented Jul 2, 2014 at 18:46
  • OK, got it. However if you say this, then Sox will be also not Windows specific, because you can install Sox on Unx systems, right? Cygwin is a Unx like platform for Windows but has with Windows very little in common (except for developers). There is also a GTK+ widgets port for Windows, but many developers tend to have their software platform independent. I'd say this is the right place for Sox.
    – user55518
    Commented Jul 2, 2014 at 20:04
  • stackoverflow i think is about programming , but sox is a utility programme , i guess we better move it to superuser . Commented Jan 29, 2015 at 11:20
  • 1
    @soubunmei this is completely on topic here. As long as something runs on *nix, it is welcome here. Whether it runs on other platforms as well is irrelevant. In any case, this question is too old to migrate (the limit is 60 days).
    – terdon
    Commented Jan 29, 2015 at 12:55

1 Answer 1

1

To add some silence, you need a chunk of silence and append it to your file

sox -n -r 44100 -c 2 silence.wav trim 0.0 3.0

and

sox filetopad.mp3 silence.wav output.wav

as described Padding an audio file with silence using sox.

2
  • This is not quite the question though. Sox looks for silence based on a volume factor. In music you'll often have an instance of decay, subtle echo, overtones heard after a note has been played. If those are too quiet, or there is other noise on the recording, it's impossible to get sox to not trim those musical moments off. In the end, I found my answer using perl, not sox, thus the request for stack overflow migration.
    – pepper
    Commented Jul 2, 2014 at 18:40
  • @pepper , do you mind posting your perl solution here ( maybe after editing the title of question non-sox-specific ) ? Commented Jan 29, 2015 at 11:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .