Loading a wav file to a waveform?

Hey, how do I load a wav file from my pc into my program and represent it as a waveform? I just want to detect silence in the file (so if there’s maybe better ways I’d love to hear them too). Couldn’t really find anything online. Thanks!

Maybe this…

I did not try yet, but I was looking for something similar

Otherwise Ffmpeg can detect silence

% ffmpeg -i your_file.wav -af silencedetect=d=0.1 -f null - |& awk '/silence_end/ {print $4,$5}' | awk '{S=$2;printf "%d:%02d:%02d\n",S/(60*60),S%(60*60)/60,S%60}'