Saturday, 30 November 2019

slow down spoken audio (not from mp3/wav) using python

I need to slow down short bursts of spoken audio, captured over a mic and then play it out in realtime in a python script. I can capture and playback audio fine without changing the speed using an input and an output stream using PyAudio but I can't work out how to slow it down.

I've seen this post which uses pydub does something similar for audio from a file but can't work out how to modify it for my purposes.

Just to stress the key point from the question title, "(not from mp3/wav or any other file type)" as I want to do this in realtime with short bursts, idealy ~0.1s so just want to work with data read in from a PyAudio stream.

Does anyone who has experience with pydub know if it might do what I need?

NB I realise that the output would lag further and further behind and that there might be buffering issues however I'm just doing this for short bursts of upto 30 seconds and only want to slow the speech down by ~10%.



from slow down spoken audio (not from mp3/wav) using python

No comments:

Post a Comment