Skip to main content

sonoscope

PyPI version CI License: MIT

Interactive WebGL2 and WebAssembly audio visualization widget for JupyterLab, VS Code, Google Colab, and Marimo.

pip install sonoscope

or with uv:

uv add sonoscope

Usage

import numpy as np
from sonoscope import Sonoscope

# 1. From local file path (no HTTP server required, syncs via binary traitlets)
widget = Sonoscope.from_file("soundscape.wav")

# 2. From NumPy array and sample rate
sr = 22050
y = np.sin(2 * np.pi * 440 * np.linspace(0, 5, sr * 5, endpoint=False))
widget = Sonoscope.from_array(y, sample_rate=sr, cmap="plasma", frequency_scale="mel")

# 3. From remote URL
widget = Sonoscope.from_url("https://example.com/soundscape.mp3")

# Display in notebook
widget

Development

We recommend using uv for development. It will automatically manage virtual environments and dependencies for you.

uv run jupyter lab example.ipynb

Alternatively, create and manage your own virtual environment:

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
jupyter lab example.ipynb

The widget front-end code bundles its JavaScript dependencies. After setting up Python, make sure to install these dependencies locally:

npm install

While developing, you can run the following in a separate terminal to automatically rebuild JavaScript as you make changes:

npm run dev

Open example.ipynb in JupyterLab, VS Code, or your favorite editor to start developing. Changes made in js/ will be reflected in the notebook.

Metadata

Release files for sonoscope 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sonoscope 0.2.0
File Size Uploaded Provenance
sonoscope-0.2.0.tar.gz 72.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sonoscope 0.2.0
File Interpreter ABI Platform
sonoscope-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 146.0 kB

Release files / sonoscope-0.2.0.tar.gz

Download URL sonoscope-0.2.0.tar.gz
Size 72.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d755a4fdbce2deb1d0064ce4a438b0cb5bad80dbdd503cb86efbde54a429bf03
BLAKE2b-256 checksum
How to use checksums
899ea9c226de116745bdece9bdaec216194cfe7af62c2ee481185efd08d71de3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / sonoscope-0.2.0-py3-none-any.whl

Download URL sonoscope-0.2.0-py3-none-any.whl
Size 73.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2aadae00c103e870a7d6a5ca8de935ccfd47fb0b49f142f4be2eff6f1574aee7
BLAKE2b-256 checksum
How to use checksums
1afa1ee4e2b0ebf60791b24474c976bf1cc12c04248b0ff2be9a4c23fa8b0b48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Security for sonoscope 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sonoscope-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page