ipython/ipython — pull request #3656 by nils-werner (2013-07-16 15:00:21+00:00)
Title: Audio displayobject

This Pullrequest adds a `class Audio(DisplayObject)` to the list of display objects.

The object makes use of HTML5's `` tag to render audio data. Right now, the code generates .WAV PCM-data and includes it as `src="data:audio/wav;base64,..."` into the HTML.

There is currently no way to show the object in Qtconsole or in any other terminal type.

The code that generates the .WAV data is taken from scipy as their implementation is currently only able to write to files and not fill a `ByteIO` type buffer.

I have also submitted a [PR to scipy](https://github.com/scipy/scipy/pull/2632) that will fix this issue. Once it has been merged (and IPython will be using that version of scipy), lines 730 to 750 can be replaced by a simple call to `scipy.io.wavfile.write(data, buffer, rate)`.