sonoscope (Python & Jupyter)
The sonoscope Python package provides a standard AnyWidget for interactive audio exploration directly within notebooks.
Installation
Section titled “Installation”pip install sonoscope# or with uvuv add sonoscopefrom sonoscope import Sonoscopeimport numpy as np
# Load audio from filewidget = Sonoscope.from_file("speech.wav", cmap="magma", frequency_scale="mel")widgetInitializing from NumPy Arrays
Section titled “Initializing from NumPy Arrays”import numpy as npfrom sonoscope import Sonoscope
sample_rate = 22050t = np.linspace(0, 2.0, sample_rate * 2, endpoint=False)chirp = np.sin(2 * np.pi * (100 + 1000 * t) * t)
Sonoscope.from_array(chirp, sample_rate=sample_rate, cmap="viridis")Supported Environments
Section titled “Supported Environments”- JupyterLab & Jupyter Notebook (v7+)
- VS Code Interactive Python & Notebooks
- Marimo Reactive Notebooks
- Google Colab