0

I have a long audio file divided into segments by one (I assume it is always the same) sound, and I want to split it into these segments.

I've tried using code from this question - Split speech audio file on words in python but playing with parameters did not give any results, because silence is not reliable marker in my case.

I want to take that separating sound and replace it with very long silence, so code from that question would actually work for me. Is there any libraries for that? I am not really bound to python, so I can switch to any language that has good library for it. Or if there is no easy way to do it, what materials should I learn to dive deep into this issue and came up with some solution myself?

  • Welcome to SO. Please take the time to read [ask] and the other links found on that page. – wwii Apr 20 '19 at 14:46
  • programmatically your question is very broad and even if libraries existed for everything you are asking for it would require several distinct api calls ... to solve this you must first solve each underlying subproblem ... you could start by nailing ability to find the point in time where a given audio snippet is found in a larger audio ... then knowing the set of such time points there is a command line tool ffmpeg which can clip and audio file into segments based on starting timepoint and duration ... as is your question is very broad ... too broad for a single forum question – Scott Stensland Apr 21 '19 at 11:02
  • Have you tried opening the input audio in a sound editor and see if you can visually spot _"the same sound"_ repeated at different times? One idea might be to create a waveform image of the target sound, then look for (most) similar pixels within the longer waveform of total sound. Another idea might be to put _the sound_'s PCM values into an array then look for sequentially matching PCM values within main sound. – VC.One May 09 '19 at 06:45

0 Answers0