2

I have an audio file I want to split into multiple files. The files are structured into pairs of sound separated by silence. The timeline looks like this with - to represent silence:

-----Sound A1-----Sound A2-----Sound B1-----Sound B2-----

I want to find the boundary between Sound A2 and Sound B1. I want a solution preferably using a combination of Python, OpenCV, and FFmpeg, but any tools that work will do.

b3000
  • 1,547
  • 1
  • 15
  • 27
hekevintran
  • 22,822
  • 32
  • 111
  • 180
  • I don't think OpenCV is appropriate here. You may want to consider [alternatives](http://dsp.stackexchange.com/questions/912/is-there-an-analogous-library-to-opencv-for-audio-analysis).See also [here](http://dsp.stackexchange.com/questions/1522/simplest-way-of-detecting-where-audio-envelopes-start-and-stop) and [here](http://stackoverflow.com/questions/5758485/open-source-code-for-voice-detection-and-discrimination) – Miki Aug 01 '15 at 20:15

1 Answers1

5

Thanks Miki for the links. Aubio is a tool that works perfectly. The program aubioquiet will detect silence boundaries and print their timestamps:

$ aubioquiet temp.wav NOISY: 0.638549 QUIET: 2.008526 NOISY: 4.992290 QUIET: 6.286803 NOISY: 9.258957 QUIET: 10.559275 NOISY: 13.531428 QUIET: 14.622766 NOISY: 17.623945 QUIET: 18.953287 NOISY: 21.931248 QUIET: 23.260590 NOISY: 26.238548 QUIET: 27.643356 NOISY: 30.632925 QUIET: 31.915827 NOISY: 34.882175 QUIET: 36.165081

hekevintran
  • 22,822
  • 32
  • 111
  • 180