I'm loading a file in Python to mess with its audio.
I found the librosa library for that - works great so far, but it takes some time to load the file.
I would like to give a user live feedback on the loading progress so they'll know that nothing's broken.
Anyone know where I can get such a loading progress value from?
Here's my example code:
import time
import librosa
start = time.time()
audio_path = r'C:\Users\....some_music_video_3_min_long.mp4'
audio, sampleRate = librosa.load(audio_path)
end = time.time()
print(f'Elapsed time: {round(end - start, 4)} s')
My output is:
C:\Users\...\venv\lib\site-packages\librosa\core\audio.py:162:
UserWarning: PySoundFile failed. Trying audioread instead.
warnings.warn("PySoundFile failed. Trying audioread instead.")
Elapsed time: 9.3724 s
My goal output between the warning and the time is something like this:
1%
2%
....
100%