TorchFX is a modern Python library for high-performance digital signal processing in audio, leveraging PyTorch and GPU acceleration. Built for researchers, engineers, and developers who need fast, flexible, and differentiable audio processing.
✨ Key Features
- ⚡ GPU Acceleration - Built on PyTorch for high-performance audio processing on CUDA-enabled devices
- 🔗 Composable Pipelines - Chain filters with the pipe operator (
|) for sequential processing - ➕ Parallel Processing - Combine filters with the add operator (
+) for parallel filter combination - 🧠 PyTorch Native - All filters are
torch.nn.Modulesubclasses, enabling gradient-based optimization - 🎯 Simple & Intuitive - Clean, object-oriented API designed for ease of use
- ⚙️ Highly Extensible - Create custom filters and effects by extending base classes
- 📊 Performance Optimized - Substantial performance gains over SciPy for long and multichannel signals
🚀 Quick Start
Installation
pip install torchfx
Or install from source:
git clone https://github.com/matteospanio/torchfx
cd torchfx
pip install -e .
Basic Example
import torch
from torchfx import Wave
from torchfx.filter import LoButterworth, ParametricEQ
# Load audio
wave = Wave.from_file("audio.wav")
# Create filters
lowpass = LoButterworth(cutoff=5000, order=4, fs=wave.fs)
eq = ParametricEQ(frequency=1000, q=2.0, gain=3.0, fs=wave.fs)
# Sequential processing with pipe operator (|)
processed = wave | lowpass | eq
# Parallel processing with add operator (+)
stereo_enhancer = lowpass + eq
enhanced = wave | stereo_enhancer
# Save result
processed.save("output.wav")
📚 Documentation
- Full Documentation - Complete guides and API reference
- Getting Started - Installation and first steps
- Tutorials - Practical examples and use cases
- API Reference - Detailed API documentation
- Blog - Updates, releases, and insights
🛠️ Development
- Contributing Guide - How to contribute to TorchFX
- Style Guide - Coding standards and conventions
- Roadmap - Future plans and priorities
We welcome contributions from everyone! Please read our Contributing Guide to get started.
📖 Citation
If you use TorchFX in your research, please cite our paper:
@conference{Spanio2025torchfx,
author = {Spanio, Matteo and Rodà, Antonio},
title = {TORCHFX: A MODERN APPROACH TO AUDIO DSP WITH PYTORCH AND GPU ACCELERATION},
year = {2025},
journal = {Proceedings of the International Conference on Digital Audio Effects, DAFx},
pages = {390 – 395},
url = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-105028935688&partnerID=40&md5=552e54afc1a074cbd1b7e8ed4ad1c010},
type = {Conference paper},
}
License
This project is licensed under the terms of the GNU General Public License v3.0. See the LICENSE file for details.
Third-Party Acknowledgments
This project uses the following third-party libraries:
Their respective license texts are included in the licenses/ directory.
Metadata
Release files for torchfx 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| torchfx-0.9.0.tar.gz | 774.5 kB | With provenance | Details for torchfx-0.9.0.tar.gz |
Built distributions (wheels)
Total release size: 8.4 MB
Release files / torchfx-0.9.0.tar.gz
| Download URL | torchfx-0.9.0.tar.gz |
|---|---|
| Size | 774.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
370b0d91ccbf9c4086712669c7abb97ea8cd2ea509d96c65676228308bed128a
|
|
BLAKE2b-256 checksum How to use checksums |
9920c68a170d1e7a8730ad7560e8a6d7e8301402b41d7b367110021e923ec3c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp314-cp314-win_amd64.whl
| Download URL | torchfx-0.9.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 695.7 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3470e10df343ea1a7c5c317d1d3e7f2a58f2559d3896740e9daacd876ba7f723
|
|
BLAKE2b-256 checksum How to use checksums |
8baeab0b27f46ea7e1bff352cc48e3f351f8ef362d2a1694a38d22f16b76a806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.9.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 486.2 kB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
bcb175d7eb5b8acfe9f6f79e69822de2a2418fc680763db730e3fd09d6824f0d
|
|
BLAKE2b-256 checksum How to use checksums |
30aedd1d48522e985f23b334ff66b4aabd67ff19bbf9a29368b259d1592c68fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | torchfx-0.9.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 348.4 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5bc4d72d5517af6a7014d65fdaa24f937ace41f408cb5ca4f5532ff5933298a7
|
|
BLAKE2b-256 checksum How to use checksums |
dd48a4eb5c47f50e81d8d93bfa8d2044dde8ee2a8b9b9c5ee017c452046acd23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp313-cp313-win_amd64.whl
| Download URL | torchfx-0.9.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 681.5 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
32e699008726ada38d05cbb22a934e77de6501413ad2a3dbfb46def7cc7c9b18
|
|
BLAKE2b-256 checksum How to use checksums |
03b2bae8e2023467c1c6cf4edcc868b1aab9a1a0fc78eab93b08ee6c90fedbd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.9.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 485.9 kB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e042f6e0b064999c93b02f677a14691a9f4236494091455fcae925db15aac982
|
|
BLAKE2b-256 checksum How to use checksums |
e0c4897a2b7db996899099bef2b4920fa2ebfdb8d43c988708033fd8667c2ef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | torchfx-0.9.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 348.3 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a0cb68a681e200081580dfb708d6cf560b58115d9129cb9bde640545f98b5c15
|
|
BLAKE2b-256 checksum How to use checksums |
5540ee48c888a0f692e28c1a9439b87310925da2235db1ac35e71a1c74c86ec5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp312-cp312-win_amd64.whl
| Download URL | torchfx-0.9.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 681.4 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e7f4d3c49cce114f07197095dd2a61b4460fd756056688d6300b01bbfc820758
|
|
BLAKE2b-256 checksum How to use checksums |
a0654ecf337be463a19ab831ebd228457bced7cc73b9c7c090be0dfac667172d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.9.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 485.9 kB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
df0538d9f5b9207796f38f0e21a2aff6ee7bb236542ba2c36fe82f0f593cd745
|
|
BLAKE2b-256 checksum How to use checksums |
3e79b77e7360ad6b9cae0f7c2e086cda801ffaad9832e29a845f8b246e8dba08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | torchfx-0.9.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 348.2 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1d3215e5c033dc144a7c641474a51ec95af1b83d68650327ea084222be63370d
|
|
BLAKE2b-256 checksum How to use checksums |
62b26b9f791d388cf7483cf9c68b443f614cabec6249948d0e0496ddc2ccf4c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp311-cp311-win_amd64.whl
| Download URL | torchfx-0.9.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 680.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
606e18bacf2dc59395e28a0c7206887411b7caff21754991154b1baea9ae57d2
|
|
BLAKE2b-256 checksum How to use checksums |
00847c0b8305c466e0cae282a047beafa93745b6bfb1ea56b50442cd8ca686c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.9.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 484.5 kB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c5a88f113ad4489d1b1ce1dac30f8a969bb8e82d7f0657a30620518bdc16dd33
|
|
BLAKE2b-256 checksum How to use checksums |
ff2adf0a19f2fd167a8804b72ba840650be3600e6705a66b2864c97cdfda9af0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | torchfx-0.9.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 347.6 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
28f4367b06960d195d6d84bf1e06b3bf45cca3ed35bcb035bb8578b7f80ceb46
|
|
BLAKE2b-256 checksum How to use checksums |
202c8c2a0f6f5ae07d1d33b0c1478c4b5ddda4b6753c19554a0fcea8822e3299
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp310-cp310-win_amd64.whl
| Download URL | torchfx-0.9.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 679.7 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5e787e5d7f18f92f8bd9ba7f8d608140b99a650cd2c879e3bf9f89191ad07070
|
|
BLAKE2b-256 checksum How to use checksums |
d869f3973498a0514216df1b5e1a09b74610ef07108d4b5a8ddaa4500f8232e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.9.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 483.4 kB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b452cb677ae695e65ed9f664eb3ac71f5491bc54fc2e214feece9cf411d7b7f3
|
|
BLAKE2b-256 checksum How to use checksums |
90dd1204c97367affe24512774493e125cc70017636a6502d3da8c1c0b04f5a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / torchfx-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | torchfx-0.9.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 346.4 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d918f90b88693d09a978b67d9e23f126dbead5b4e1c4c95114731ac32dd27d5
|
|
BLAKE2b-256 checksum How to use checksums |
57c7c9405f5ba9dd629df0bd3afb17e4efbce35db53c51787fb60db564c946fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logSecurity for torchfx 0.9.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 16 files in this release have been uploaded with provenance metadata.
Attestation for torchfx-0.9.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 Nov 7, 2026.
Transparency logA 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.