Skip to main content

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), RMS, SpectralFlux, OnsetStrength, Tempogram — native forward + analytic adjoint, librosa-parity / torch-grad tested.
  • Metal: all of the above 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auvux_dsp-0.1.0.dev2.tar.gz (166.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

auvux_dsp-0.1.0.dev2-cp313-cp313-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.13Windows x86-64

auvux_dsp-0.1.0.dev2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

auvux_dsp-0.1.0.dev2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

auvux_dsp-0.1.0.dev2-cp313-cp313-macosx_11_0_arm64.whl (317.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

auvux_dsp-0.1.0.dev2-cp313-cp313-macosx_10_13_x86_64.whl (352.7 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

auvux_dsp-0.1.0.dev2-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12Windows x86-64

auvux_dsp-0.1.0.dev2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

auvux_dsp-0.1.0.dev2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

auvux_dsp-0.1.0.dev2-cp312-cp312-macosx_11_0_arm64.whl (317.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

auvux_dsp-0.1.0.dev2-cp312-cp312-macosx_10_13_x86_64.whl (352.7 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

auvux_dsp-0.1.0.dev2-cp311-cp311-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11Windows x86-64

auvux_dsp-0.1.0.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

auvux_dsp-0.1.0.dev2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

auvux_dsp-0.1.0.dev2-cp311-cp311-macosx_11_0_arm64.whl (317.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

auvux_dsp-0.1.0.dev2-cp311-cp311-macosx_10_9_x86_64.whl (349.2 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

auvux_dsp-0.1.0.dev2-cp310-cp310-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10Windows x86-64

auvux_dsp-0.1.0.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

auvux_dsp-0.1.0.dev2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

auvux_dsp-0.1.0.dev2-cp310-cp310-macosx_11_0_arm64.whl (316.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

auvux_dsp-0.1.0.dev2-cp310-cp310-macosx_10_9_x86_64.whl (347.9 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file auvux_dsp-0.1.0.dev2.tar.gz.

File metadata

  • Download URL: auvux_dsp-0.1.0.dev2.tar.gz
  • Upload date:
  • Size: 166.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for auvux_dsp-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 58b3d428e9e6a947e0954dedb4612143d406c8c279d383e0d89c3dc486ad2755
MD5 1584a266c7d632b7b66a2fdf461d700d
BLAKE2b-256 24afe580c6c32f53389a2c5361ec48aab26357f0811201de61148d9e79e1037f

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6b33b9cd065509695b1115b81183c6329935cc99173b5846e1f31d987b4a8bc6
MD5 abb4c4c1dd4d90a088ac666f50422f30
BLAKE2b-256 9b78a645c44c831a787b6a692cb586c8a58f803eb5285c4ec76c0be7af0ac923

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 983119811b0261f2ee8125018e32b26e1867e827fb73bdc44f9b9450b81e8432
MD5 bc1a97b91d5b237235265c15625a4f82
BLAKE2b-256 ac660d0a4bd2f92a6408db97833589e4f4f765cc5bedcddd0ba7d574e2112ae1

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 febf44463cfe3f82595982d23fabdb6bf9b6a1e2d789c2796bdb2df7f30444d1
MD5 2cac14de8df573d1220b91c64e4dfb0e
BLAKE2b-256 e596ee5b2e36b480aa254baa5c9bb9378faded3d8d23a1ba7444a336148aa4c2

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa7c5054c736ed9e9817ae3e6789198032a91efe9209361ac55e2d3be35565db
MD5 05e803d1feb1ad2a8fe457bd454ce352
BLAKE2b-256 7c007c8f200989cf5ea73d9bdf331fd552c39c60a62f3d695252320c33a4f261

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 78c78766af6cf4d4f97c3dcccf83e750c36de077c0ed81fccadffc2ae39c58ab
MD5 2d9ebc6c4571ce57355a8364b3bf772c
BLAKE2b-256 174cd3984692f0b5a1bf0b8533b6fcf671966d1f8159b6aaf6626e789e05c351

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f1b9ccd68c7c2eab3564bd129e2e982895d576866269973d5ec3cec40f523d6a
MD5 67afe0df35b65a5c7d894df3f9337ac9
BLAKE2b-256 79606e6af1a693ddbe0fc205aee8a7efb6a938b3220db01e7121ddc786e58152

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 007b0618de8ba8edbb672a5820df87ce91d8045cd5fa448dd28c73cf6851ec81
MD5 56753f1e96105ca12c6e128e998f184a
BLAKE2b-256 13ae9d118212442c090a264533658527e8730d9a379ac18e5468d9ceff7f45f1

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 752f674abccf7609ab91b573c2af68adc24c1c91c07f0eaba7b3de9fab900738
MD5 c78e46285ff39f56c4b599a65092ce71
BLAKE2b-256 03aa6eda3db1308e1385acf1b1ae0c859f44057d50c57ddeccfb072c0c5be407

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ff15428d8258ea15ca96c9d64a02c5bc6968b759b6a8f90790652d33b7b8f6f
MD5 c00bea704edca161c50acef83c3c880b
BLAKE2b-256 1c8da71bec997f1eacf360e4d81e988de3b2e59021aef34187d158a962fb138a

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9a3c51c3d20ec5f5ff8e77c7a8cdd95b6ba06bf92809e4491a5387de7b77a3da
MD5 adcba9019bfc12a74c6931ad813a084b
BLAKE2b-256 1f242975a77d640846d4fce8ed2a38134c331cb372faffa90d9892b2cb240234

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6519b64e2567d4da9e053e77b223ec6e5ec11bbdf249a864f16bf78591b24357
MD5 0b667632b8a7709cc83fac725d6c2e1e
BLAKE2b-256 0d1ca71eb52de45efc472b2a5760744896f79b31ae5e214ef91f44b55e7f774d

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 abfdc7261f2213c7424eb25b663fb7c82d56e879977710f9b2f7268321ac93a8
MD5 3638b104eeca0f1afe608fb873297975
BLAKE2b-256 3be1e31563d865542b80fdfa5748d8f0014cc8ccb0808728108bd048a752671a

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 74492850c216c278cea5a19b6095c5825ea7cd8bb424d0d341ff987aaee56152
MD5 1499344de463bbb45f613d976cccac84
BLAKE2b-256 6a237936e89ae339384d6f913f3a57142150e1d1fa553eb90042c3568e2832b6

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c59ef8ea8f0adfa2ed2a547623a42bdb2c55ea6f9837241431c1c5d001d240b
MD5 cb7b5a9b1f4c273fbc3741ce454c4f54
BLAKE2b-256 50df65f80743e424a573a3b6fd8fe67b1f8f5ead493594e0fd4cb466ec4609b1

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 817233b7e6c865855898eb6449d378207966283f5c9062ed2e0474a9ef582194
MD5 2ee8936e818b0871302c576027539998
BLAKE2b-256 29e1f44c22e649511bca8cea4100a0d702556891f04d6310259ce84ce3658022

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 270684390da639c291f0ec4187180fba010a84d5bbdaf517146ccf7c6f0af162
MD5 06bcf284e781a373cf11af58aaf3c6ab
BLAKE2b-256 8cb2198418705a9333d76f2bd3e2503daab04650c22a60860dadb83656b75832

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7aafa5ca369a56db0a961d8e70b3ad30606c608a0d19843bc3710eab9afa2c38
MD5 b7f0292de3313fa96436ec33ac2e8259
BLAKE2b-256 13feb3797853740d105bd3f2d78b3b622c43d421e99366dad99b324fc0ad9dbe

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d4211230e5c08e8cb80a50cab76a3ba99c13bf0325f2b672729f56e7e9946bfd
MD5 7b4115a845e6478a6a97f76c0f866ac5
BLAKE2b-256 7048e13ca4f7111d7f8cfaad5a61279945b55642145d67fe35b1b5104c591e21

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b361c77e9d253cda4b43ea0706c78b35e4af53aeebea03a1b2d2c3094eafbf72
MD5 a0d97936af51fd4c3a0a7bce1053a2f5
BLAKE2b-256 97a390feacbc764a2106152bb1048ab402dba379ba8b4350107e595f6ee04ae4

See more details on using hashes here.

File details

Details for the file auvux_dsp-0.1.0.dev2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for auvux_dsp-0.1.0.dev2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e47bb2d7e21bef1eba8de32f515f7b3773fbf8f8df49be88a9710fb3792839bc
MD5 5bd8c015e24a0274527602d0b29d0bcf
BLAKE2b-256 4124505fa7197af08a663753d9d96e6388b51072693b21403003e6396e436ca5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page