How can I create a waveform image of an MP3 in Linux?

前端 未结 7 1099
旧时难觅i
旧时难觅i 2021-02-01 21:03

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 ?

7条回答
  •  既然无缘
    2021-02-01 21:42

    This is a standard function in SoX (command line tool for sound, Windows & Linux) Check the 'spectrogram' function on http://sox.sourceforge.net/sox.html

    "The spectrogram is rendered in a Portable Network Graphic (PNG) file, and shows time in the X-axis, frequency in the Y-axis, and audio signal magnitude in the Z-axis. Z-axis values are represented by the colour (or optionally the intensity) of the pixels in the X-Y plane. If the audio signal contains multiple channels then these are shown from top to bottom starting from channel 1 (which is the left channel for stereo audio)."

提交回复
热议问题