<div>import matplotlib.pyplot as plt</div><div>import scipy.io.wavfile as wav</div><div>import sys</div><div><br></div><div>if __name__ == '__main__':</div><div> data = wav.read(sys.argv[1])</div><div> plt.plot(data[1])</div>
<div> plt.show()</div><div> </div><div>The python code to show wave data from a command line file name is above. You can modify it easily to output a .png image. Read matplotlib documentation.</div><br><div class="gmail_quote">
On Tue, Jan 10, 2012 at 4:00 PM, Vytautas Jancauskas <span dir="ltr"><<a href="mailto:unaudio@gmail.com">unaudio@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Vytautas Jancauskas</b> <span dir="ltr"><<a href="mailto:unaudio@gmail.com" target="_blank">unaudio@gmail.com</a>></span><br>
Date: Tue, Jan 10, 2012 at 3:59 PM<br>Subject: Re: [LAU] sndfile-waveform PNG generator ?<br>To: Robin Gareus <<a href="mailto:robin@gareus.org" target="_blank">robin@gareus.org</a>><br><br><br>It's fairly trivial to write one your own with python using scipy. Should be in the ballpark of 20 lines or so.<div>
<div><br><br><div class="gmail_quote">On Tue, Jan 10, 2012 at 2:47 PM, Robin Gareus <span dir="ltr"><<a href="mailto:robin@gareus.org" target="_blank">robin@gareus.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi *,<br>
<br>
Is there a command-line tool akin to `sndfile-spectrogram` that<br>
generates an image (preferably PNG) of an audio wave-form?<br>
<br>
I found endless GUI apps, but command-line tools are scarce.<br>
<br>
TIA<br>
robin<br>
_______________________________________________<br>
Linux-audio-user mailing list<br>
<a href="mailto:Linux-audio-user@lists.linuxaudio.org" target="_blank">Linux-audio-user@lists.linuxaudio.org</a><br>
<a href="http://lists.linuxaudio.org/listinfo/linux-audio-user" target="_blank">http://lists.linuxaudio.org/listinfo/linux-audio-user</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><span style="clear:both">"Cheshire-Puss," she began, "would you tell me, please,<br>
                which way I ought to go from here?"<br>
"That depends a good deal on where you want to get to," said the Cat.<br>
"I don't care much where--" said Alice.<br>
"Then it doesn't matter which way you go," said the Cat.</span><br><br>
</font></span></div><br><br clear="all"><div><br></div>-- <br><span style="clear:both">"Cheshire-Puss," she began, "would you tell me, please,<br>
                which way I ought to go from here?"<br>
"That depends a good deal on where you want to get to," said the Cat.<br>
"I don't care much where--" said Alice.<br>
"Then it doesn't matter which way you go," said the Cat.</span><br><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="clear:both">"Cheshire-Puss," she began, "would you tell me, please,<br>
                which way I ought to go from here?"<br>
"That depends a good deal on where you want to get to," said the Cat.<br>
"I don't care much where--" said Alice.<br>
"Then it doesn't matter which way you go," said the Cat.</span><br><br>