I am using librosa library to do data analysis on an audio file in .wav format. But it seems librosa can only read or write audio file in form of an array apart from feature extraction. I would also like to play the audio file with my analysis code.
In Ipython notebook, I can use Ipython.display.audio to play audio directly in Ipython ntoebook, but when I convert code to .py, I doesn't work, so I need something that can be used for the same purpose.
chunk_sizeyou define yourself, it's nothing you have to know in advance. It's just number of bytes that will be read in one go. If by "overhead" you mean "I don't want to type that much", consider e.g. pypi.org/project/playsound