Given an MP3 I would like to extract the waveform from the file into an image (.png)
Is there a package that can do what I need ?
Building on the answer of qubodup
# install stuff
apt install gnuplot
apt install sox
apt install libsox-fmt-mp3
#create plaintext file of amplitude values
sox sound.mp3 sound.dat
# run script saved on audio.gpi file
gnuplot audio.gpi
You can also comment the "set output ..." line in the configuration file and do
gnuplot audio.gpi > my_sound.png
The configuration file is audio.gpi in this case and inside it has
#!/usr/bin/env gnuplot
set datafile commentschars ";"
set terminal png #size 800,400
set output "sound.png"
unset border
unset xtics
unset ytics
set key off
plot "sound.dat" with lines
Which produces images like the following
I wanted no axis, no legend, png (much smaller than svg).