How to concatenate audio tracks and make them start a certain moment using Python?

17 Views Asked by At

I have a list of audio tracks of different length. My goal is to use pydub to concantenate the audio tracks and make sure that each one of them starts at a give timestamp.

For example:

  • track1 starts at 0s and ends after 9s
  • track2 starts at 11s and ends after 4s
  • track3 starts at 16s and ends after 5s

and so on. Of course the audio track is shorter than the time required for the next audio track to start in order to avoid cuts.

Could you please suggest me a smart and elegant way to do so using the pydub library in Python?

0

There are 0 best solutions below