In the next days I'm going to receive an audio dataset for a machine learning project at university. The files I'm going to receive are of 2 kinds: one that is the original entire audio audio sequence and the other that is composed of short sequences of the original file cut and put together in a single "summary" file (one summary for each original file). The problem is that I need to know from which point in time every subsequence was cut, but they cannot provide me with this information. Is there a program to deal with this problem?


Providing they are exact extracts of the audio files you could use python and numpy to load each audio sequence as a numeric array and then search the full audio files, also as a numeric array for the fragment.

Since all of your audio summary sequences are joined together in a single file you will need to find a window size that produces a unique fingerprint to locate in your large file, (I would suggest starting at about 5-10 seconds worth and scan the big file - if you get more than one match increase the sample size. Once you have a unique match you can carry on from that point in both files until they differ - that will give you your position in the full file and the duration of the first clip. You can then take a new fragment from the summary after the end of the match and repeat the process.

  • The problem is that I have many subsequences chained in the summary and I don't know where one ends and the other begins, so I need a way to use this approach and separate all of them correctly in the original file (I hope I explained myself correctly) Aug 28 '18 at 13:30
  • @VincenzoScotti - Very clear - answer updated to address this point. Aug 28 '18 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.