Skip to content

Jupyter & Colab

Terminal window
pip install "signavis[widget]"
from signavis import Player
Player("bird.wav", viewMode="spectrogram")

The player is displayed when the object is the last expression in a cell, as with a matplotlib figure.

from signavis import AudioWorkbenchWidget
w = AudioWorkbenchWidget("bird.wav")
w.set_annotations([{"start": 1.0, "end": 2.0, "species": "Turdus merula"}])
w

Annotations drawn in the player are available in w.annotations.

Player("bird.wav", spectrogram_data=spec) # 2D float32, frames × mels

Alternatively, pass a pre-rendered image as spectrogram_image (PNG bytes, matplotlib figure, PIL image).

Try it in Colab · All options