0

Is there any script/tool out there (any language) that will generate .wav file into a waveform image?

Basically I want to upload a small wav file on the web and it will then show an image of waveforms including numbers of seconds (duration).

PS: I did google but no luck.

BSMP
  • 4,596
  • 8
  • 33
  • 44
I'll-Be-Back
  • 10,530
  • 37
  • 110
  • 213
  • You want a spectrogram / STFT render of a wave file? – moonwave99 Sep 01 '12 at 15:56
  • @moonwave99 yea, like Audacity example – I'll-Be-Back Sep 01 '12 at 15:59
  • 3
    This seems like a pretty bald "I didn't Google or search SO but will you find it for me" request. What have you tried? What did and didn't work? – Jared Farrish Sep 01 '12 at 16:03
  • @user791022 if you are referring to [waveforms](http://www.floom.com/images/waveform_hark.gif), there is no frequency involved - just amplitude against time. [Check this answer anyhow](http://stackoverflow.com/questions/9956815/generate-visual-waveform-from-mp3-wav-file-in-windows-2008-server). – moonwave99 Sep 01 '12 at 16:03
  • @moonwave99 yes waveforms.. I thought it was called frequency. My bad. – I'll-Be-Back Sep 01 '12 at 16:10

2 Answers2

2

https://bitbucket.org/corfr/wavegenerator/src

A friend did this one :

You need linux (i successfully use Centos & Ubuntu) Libmad

If i remember that was enough, it generate a .png from a .mp3 file, using libmad so. Code is quite simple to understand, as always feel free to submit improve !

it will generate a waveform pretty close as what you can found on soundcloud for example...

Deisss
  • 179
  • 2
0

EDIT: Since you're looking for waveform, this question is very related.

https://stackoverflow.com/questions/2381243/how-does-soundcloud-com-generate-the-waveform-for-their-mp3-player

EDIT: This answer is valid if you're looking for a way of showing frequence graphically.

SoX ( http://sox.sourceforge.net/ ) can run on Windows and it's installed or available in almost all Linux distribution.

It can generate a spectrogram in .png format. Just call it like this:

sox <inputfile> -n spectrogram

You will find spectrogram.png in the same directory.

Here is an example of a spectrogram produced by SoX:enter image description here

Community
  • 1
  • 1
David Costa
  • 1,738
  • 18
  • 33