Fast differentiable audio transforms (STFT, mel, MFCC, CQT, chroma) on CPU and GPU
Project description
auvux-dsp
Fast differentiable audio transforms (STFT, iSTFT, mel, MFCC, CQT/VQT, chroma) plus differentiable scalar/temporal features (spectral moments & flatness, RMS, spectral flux, onset strength, tempogram) with native CPU backends (vDSP on macOS, PFFFT elsewhere) and GPU support (Metal, CUDA). Forward and backward passes run in native kernels; PyTorch autograd plugs in when you pass a torch tensor, and torch is never required otherwise.
import auvux.dsp as dsp
mel = dsp.MelSpectrogram(sr=44100, n_fft=2048, hop_length=512, n_mels=128)
S = mel(y) # numpy in -> numpy out
S = mel(y, backend="gpu") # Metal / CUDA kernels
y = torch.tensor(clip, requires_grad=True)
loss = mel(y, output="db").sum() # native forward
loss.backward() # native adjoint kernel, no torch recompute
pip install auvux-dsp --pre # preview release; drop --pre once 0.1.0 is out
Performance
Benchmarks against librosa and torchaudio (forward passes and full training
steps, CPU / staged GPU / GPU-resident) live in benchmarks/benchmark.py:
python benchmarks/benchmark.py
Results table to be published with the first release.
Complex STFT layout
Complex spectra are returned as (..., bins, frames) backed by frame-major
memory — each frame's spectrum contiguous, the freq axis strided. This is the
same physical layout both references use (librosa allocates its stft output
order='F'; torch.stft returns a transposed view over frame-major memory),
so values and bytes match librosa, and the GPU-resident path returns a
tensor with the exact strides torch.stft produces. It is also what makes
the STFT fast: no backend ever materializes the bins-major transpose. istft
accepts both this layout (zero-copy) and compact C-order arrays. Float
outputs (power/db/mel/...) are ordinary C-contiguous arrays.
Status: under construction.
- CPU (vDSP/PFFFT): STFT, ISTFT, MelSpectrogram, MFCC, CQT, VQT, Chroma — forward and native backward, librosa-parity tested, torch autograd built in.
- Differentiable features: SpectralMoments (centroid, bandwidth, skewness, kurtosis, flatness, slope, decrease, crest, entropy), RMS, SpectralFlux, OnsetStrength, Tempogram — native forward + analytic adjoint, librosa-parity / torch-grad tested.
- Composed descriptors (built on the transforms above, so they inherit the GPU
path and stay differentiable): SpectralContrast, BandEnergy, Tonnetz,
ChromaCENS, FourierTempogram. Plus
delta(Savitzky-Golay derivative) andpoolpost-processing over any feature matrix. - Metal: every native transform on GPU (n_fft <= 4096), forward + backward, parity-tested against the CPU path. torch MPS tensors stay on the GPU end to end (DLPack), and backend="auto" routes them there — no flags needed.
- CUDA: kernel-for-kernel twin of the Metal backend including the resident paths; parity-tested on NVIDIA hardware (RTX 4090, CUDA 12.9), with pinned double-buffered staging for the numpy-in/numpy-out GPU paths.
- Pending: iCQT.
Development
pip install scikit-build-core pybind11 numpy pytest
./scripts/dev-build.sh
pytest
Note for packagers: python/auvux/ is a PEP 420 namespace package — it must
never contain an __init__.py, or it will shadow sibling auvux-*
distributions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auvux_dsp-0.1.0.dev3.tar.gz.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3.tar.gz
- Upload date:
- Size: 180.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c292358d240ac799f6ed2cb2b99c4dcb1c113a97a566bc44d51ee92e9ed63f30
|
|
| MD5 |
949e576d96f3c88605a7f417ebe3c872
|
|
| BLAKE2b-256 |
3b99ae358c3d1846b5d4316140d80f4526541d779e03e027d4694e1a10252c1a
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98fc6bd06cb7e555e2dbcec3078b072e9604a2eaa11797937e051ea0ec3d1c03
|
|
| MD5 |
08ada9bf185108eda4f17b8ebe21e97c
|
|
| BLAKE2b-256 |
2f89817f157fdffc974f75a4f8984c2b8689f6115e5f4acce172be3d2b4153a8
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca44ebb6eada2e24f1a0781ad4947062c04cd51f33cf1fc79f1537a54a53718
|
|
| MD5 |
30201befe8e859c2a0dc5b825120d900
|
|
| BLAKE2b-256 |
b44d9d8bd99ab976e75202c245ac4f1d34494f580b018eac8e3bd95371022d5f
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9330a5f4cd8bede7dde00a9335b3e49bf57e5cc3ab13aee7ed7a30117e806c4b
|
|
| MD5 |
9942b32dc598f94c63215ba6eeaeb513
|
|
| BLAKE2b-256 |
83bc04317c16072c0868fbe94bbf6994410cdb665ed3bde96bb8c82cc238870f
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 327.0 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c10242f45255b6fbc41cbe51de01d7367afc2b462ae87d06afa292e6ddcfbe7
|
|
| MD5 |
55e4bb58e0607a6d0883d3f9c16c5516
|
|
| BLAKE2b-256 |
257770f3d82692ef547a4f5a5d8c7e951fe24da466162a9b9397b30ec25000a5
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 362.5 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e38b483cb7c90c7a09f9bc6580903f6ba9f1fd9b40ca0d1f3f90e0e04cb35447
|
|
| MD5 |
e2eda2b33bcbc1e328f916351e28862c
|
|
| BLAKE2b-256 |
cf787df866f683102c5320089751ee96f82b888fc982053b9dd565a15048d581
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df11ada67fc701153746dc3053cb3824e6e52f9ed425130c5a45a80ec78d0a81
|
|
| MD5 |
eeb7bbe8f04036532bfc0f09416db75f
|
|
| BLAKE2b-256 |
35d273a7a123304fd5cd30a95608f48e53d94709409ff47d12ff1ce48dec9212
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fca0dc091c9884ace2c01661a7b545c17b2a1716b0d6c7a3a069990fa666813a
|
|
| MD5 |
9d02324792a433a1dcd90c4e63c42d93
|
|
| BLAKE2b-256 |
5ba8e96230c5774a85b5cb438deedf42f89f72882a87ab4d06c549c06eb45e88
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
646dda1355460f4a106ed88a7d772f55406af42c09ca8e022edd2ec4d1a82a00
|
|
| MD5 |
ef1321f7dd42cfe9bf1ee4c85ca94e0c
|
|
| BLAKE2b-256 |
8ed472ee50b20755e81ba1bb8adc79bcbdab0af04029a2a57a1f3cb554272a46
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 327.0 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31183dfed0e4058b8df52bcb0c8b64c6787017c760a1df6772757928f78f1b30
|
|
| MD5 |
689e5db28b60417448834dd1edf2c3e8
|
|
| BLAKE2b-256 |
916dc3d475168e7e1c9b085394ec6092b21f53aef5a3a44dc897e2cac10c5e57
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp312-cp312-macosx_10_13_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 362.5 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53f3e289a398b5340bc5d0b95fdbfdf9a4d553e8c46c5c9484b805ca75c4efe0
|
|
| MD5 |
b4247c5264f8a9fc204384bf0ae83ad0
|
|
| BLAKE2b-256 |
0694ecc9a22c1119cff0ac69bba470e44cb6cf6a21730b126988d43f85b112c1
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5211e459623d46cd6136b0723e462965dffe7c8688bf84975343e75cecb0a40
|
|
| MD5 |
a2f816fefda0ceb05a417770283060bd
|
|
| BLAKE2b-256 |
63adc52bd953a66f1d55d06e811405e700c1849cfd6776f2f4332211837abf12
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b94b1eae3bfdce3bf0eae424f33ae660236dbaabd8a9176208aa0194a2aab64
|
|
| MD5 |
9b5997c63244a889ae74962758e03fed
|
|
| BLAKE2b-256 |
c9071d140251833db9a2931382d29677e08cb96efee5873fc092db2b6639e025
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1243f3a2f3df971df861cbb04cbc9db5f70d1a9ba41e97aac2955b271ad0d4af
|
|
| MD5 |
351bf94ab317771af5cc5b557988bfbd
|
|
| BLAKE2b-256 |
1a9f5d9f713a5a2df42df16fa900ce364cef4cdbde34a81324c88f52f903cfa7
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 326.6 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be6d0a61989854419d074569f49796c37c4837d591cbf3a303086d25cedb489e
|
|
| MD5 |
e1abe07a6c305de5d686db7519e9802f
|
|
| BLAKE2b-256 |
98f9cc6443ce87991c0b546c76d39ba2ebd08638bef961d19a89c77e8d536f93
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 359.0 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdcdbe6fc8de0a1dcb7a778335b85b83f98c0b1ee4772f1843014aae859ff586
|
|
| MD5 |
fd903c302aa96b7875287fadc1731b51
|
|
| BLAKE2b-256 |
e1a77d75af18fb376d65f033a4592227f1795b6dbe455e40b9a33d0140857b73
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36bbce9462028b7ed39a4b6058a2f5ff32a5b0045165fef30176195955d75dcb
|
|
| MD5 |
30ca8174f7c5a9e408df919b6a2cfe2f
|
|
| BLAKE2b-256 |
f801be98b80cd2e1e966c9bb5386c89a44a9847cd0041f4e8ba33c293925370d
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e010a81c93495563864e74943f9051ec90d2c7b1b79f925ffb48d4cf7ff47fc1
|
|
| MD5 |
cbbcabcf4540ee7231df27e0565a5a0d
|
|
| BLAKE2b-256 |
bd3822cbcfcd0e754fcda79c4231cc8a707eafb893da9428de7c0e8457a06087
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cae12d2d3ca81218c380c872e60f1bbfe97b617729b26a9febf30525dddda61
|
|
| MD5 |
862564e0db0e7ab1bd3fa7d25c37d5f5
|
|
| BLAKE2b-256 |
19275db2e1c47bc12fa11effe2eadf84656aaad9b4953a6cfe49617eb5fb7998
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 325.3 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b4938c0c1d1afba260c51386d07c00e353dd6dd18b5110660422115d075a55a
|
|
| MD5 |
1c5762c607792b17b645c50bb43ad95c
|
|
| BLAKE2b-256 |
37d130cf2f45ea78229d95df108f401bdc7b6af25508c95d346b7de2bfd1d591
|
File details
Details for the file auvux_dsp-0.1.0.dev3-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: auvux_dsp-0.1.0.dev3-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 357.6 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
411db345435064391ef0093ade49768fcc91fa7229e9bc20ec8795f37b4d6a24
|
|
| MD5 |
87628e38a519c0cbde337b8fae5cc28b
|
|
| BLAKE2b-256 |
e952dd918078934151da2f52726645159a07d74d71bdc2d12fe7f99a0b2220d3
|