0
$\begingroup$

I have a project in which I have a batch of audio files and I need to remove the audio in it from say time 2secs to 5secs i.e. I have a set duration to be removed. How can I do this in python?

$\endgroup$
  • $\begingroup$ What file format? $\endgroup$ – endolith May 21 '18 at 13:36
  • $\begingroup$ Why not to use sox for that? No need to involve Python in my opinion. $\endgroup$ – jojek May 22 '18 at 12:23
  • $\begingroup$ the format is .wav @endolith. Also I need to further process the audio and hence I want to do the process in python $\endgroup$ – Dipankar Shrivastava May 22 '18 at 13:27
1
$\begingroup$

The librosa library is usually used. You can find the files here:

https://github.com/librosa/librosa

$\endgroup$
1
$\begingroup$

The most basic approach probably would be to use scipy's read and write functions for wave files.

An interesting alternative is to use the SoundFile library. As SoundFile is based on libsndfile, a large number of audio formats is supported.

$\endgroup$

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.