You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A comprehensive DSP toolkit providing signal generation, spectral analysis,
filtering, effects, and more. All functions accept and return NumPy arrays.
Installation
pip install pyminidsp
Pre-built wheels are available for:
Linux x86-64
macOS ARM64 (Apple Silicon)
Python 3.9, 3.10, 3.11, 3.12, 3.13
Building from Source
If you need to build from source (e.g. unsupported platform or development):
# Clone the miniDSP C library
git clone https://github.com/wooters/miniDSP.git
# Create virtual environment
uv venv
# Install pyminidsp (set MINIDSP_SRC to point to the C library)
MINIDSP_SRC=./miniDSP uv sync
For development (includes test dependencies):
MINIDSP_SRC=./miniDSP uv sync --extra dev
Quick Start
importpyminidspasmd# Generate a 440 Hz sine wave (1 second at 44.1 kHz)signal=md.sine_wave(44100, amplitude=1.0, freq=440.0, sample_rate=44100.0)
# Compute the magnitude spectrummag=md.magnitude_spectrum(signal)
# Compute MFCCs from a framecoeffs=md.mfcc(signal[:512], sample_rate=44100.0, num_mels=26, num_coeffs=13)
# Apply a low-pass biquad filterlpf=md.BiquadFilter(md.LPF, freq=1000.0, sample_rate=44100.0)
filtered=lpf.process_array(signal)
# Clean up FFT caches when donemd.shutdown()