Updated 2022-05-21 0
Viewed 9 times

I'm trying to write an app, which will let the user to load an audio file, display it as a waveform and place markers, which will point where audio has to be sliced. I will also add that at most cases, loaded audio files are going to have quite long duration - about 20 minutes. I'm coding in Python with soundfile module for loading audio file and matplotlib for displaying the waveform and placing markers. The problem is that just loading and displaying a waveform for such a long audio is taking about 11 seconds. But there is even more serious problem - I want to let user to place markers with a fine accurancy so possibility to zoom the waveform is crucial - unfortunately zooming is basically drawing and displaying a new waveform with different amount of samples than before. So it takes at least few seconds from calling a zoom-in and actually displaying the zoomed waveform (after running a program it displays the whole audio as a default so first zoom-in is taking about 5 seconds, next one also 5 seconds, next one 4 seconds etc. Bassically it is getting shorter with every zoom-in since a program has to draw and display smaller piece of audio). I'm wondering how it's possible that other audio software (e.g. Audacity) don't have this problem - in Audacity, the same 20 minutes long file is getting loaded in 5 seconds (twice as fast as in mine program) and it zooms with no latency or at least it seems so. Am I using wrong tools for this kind of program or what's going on? Can someone help?

🔴 No definitive solution yet