pywebaudioplayer: Bridging the gap between audio processing code in Python and attractive visualisations based on web technology

Johan Pauwels and Mark Sandler

Lately, a number of audio players based on web technology have made it possible for researchers to present their audio-related work in an attractive manner. Tools such as *wavesurfer.js*, *waveform-playlist* and *trackswitch.js* provide highly-configurable players, allowing a more interactive exploration of scientific results that goes beyond simple linear playback.

However, the audio output to be presented is in many cases not generated by the same web technologies. The process of preparing audio data for display therefore requires manual intervention, in order to bridge the resulting gap between programming languages. While this is acceptable for one-time events, such as the preparation of final results, it prevents the usage of such players during the iterative development cycle. Having access to rich audio players already during development would allow researchers to get more instantaneous feedback. The current workflow consists of repeatedly importing audio into a digital audio workstation in order to achieve similar capabilities, a repetitive and time-consuming process.

In order to address these needs, we present *pywebaudioplayer*, a Python package that automates the generation of code snippets for the each of the three aforementioned web audio players. It is aimed at use-cases where audio development in Python is combined with web visualisation. Notable examples are *Jupyter Notebook* and WSGI-compatible web frameworks such as *Flask* or *Django*.

Paper as PDF