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.
Release files for torchfx 0.8.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 | |
|---|---|---|---|
| torchfx-0.8.0.tar.gz | 749.8 kB | Details |
Built distributions (wheels)
Total release size: 8.0 MB
Release files / torchfx-0.8.0.tar.gz
| Download URL | torchfx-0.8.0.tar.gz |
|---|---|
| Size | 749.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f6958ae09806ee90c1c6a5fafe700f27b69f5d705e07a0d01619638ea339802
|
|
BLAKE2b-256 checksum How to use checksums |
525f57b56f8db65006fa64c97664fdddbb5e8c9a1f3bf72d775f97eeb658d72a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp314-cp314-win_amd64.whl
| Download URL | torchfx-0.8.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 673.1 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d8ef851a2027b4ed62d24877f4e0ec5dd108834d1942241a07337a5e0b66f017
|
|
BLAKE2b-256 checksum How to use checksums |
d97e5f175591932e382450147e9e63a3899fda58958978bf721b1f963c80da10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.8.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 458.6 kB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7652c992e78cf34f8fd1f248030c9d4f83b4dbb96d878e8f7dcab015439140d2
|
|
BLAKE2b-256 checksum How to use checksums |
a5a0a59a359ffe37953825739f1828f5309bb8517e03d2c640a54c607f7f76c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | torchfx-0.8.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 325.8 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cd795ff197b5e568b991006e20a0ed43acfc264cd98315d901cf1e6e94fae7c8
|
|
BLAKE2b-256 checksum How to use checksums |
a85ece103ddf0d095a27b4d23f1b3d8e5bfaa5932f71b5b00b681a8d966d0a36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp313-cp313-win_amd64.whl
| Download URL | torchfx-0.8.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 659.0 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b82300d3016b5d02f0dc9e928b425d7ff7546ede53ecfc74dd2470c632940891
|
|
BLAKE2b-256 checksum How to use checksums |
23b4e0e5ce813644ddc6a0b5d42fc87f92ba9bb0a8234d0a7cbd85fef5fa5f5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.8.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 458.5 kB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c011c1d28d25a6cc564cfb624720d9fd3a183cade09279819ab50175b32ccdb8
|
|
BLAKE2b-256 checksum How to use checksums |
345335df16a0158693fbf31b1490856c602623000c3ce1d53dd0de4e88a09353
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | torchfx-0.8.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 325.7 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
00f4cab51174ba173594e4f4e10f7590c391b02bc6ac492757290d5d28d05822
|
|
BLAKE2b-256 checksum How to use checksums |
90b2d1174f618da911952865b6e5125f674f85b8c055b44fed69206821d0629e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp312-cp312-win_amd64.whl
| Download URL | torchfx-0.8.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 659.0 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d2bca9c0ceea178162f48bd633638e1385132309796514f5cd67813833de009e
|
|
BLAKE2b-256 checksum How to use checksums |
d97b5f0882392ecbc99f30c2f217e76be26d693d0ea4dbe4b7566ae15192395f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.8.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 458.6 kB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a45fcb3482ceae8b20a3d36f416898fc0fb7a2fdb87a1b45091722e96ea93ec3
|
|
BLAKE2b-256 checksum How to use checksums |
19eb81ecff71d11546cce1c87f160671a02b6a04b2fa120eead52608ba51c0ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | torchfx-0.8.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 325.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c21f9a29c9eb770b9d683824bbe10c02fe3030e86882ae0b58595f8228e12d2e
|
|
BLAKE2b-256 checksum How to use checksums |
05ef713fc2d6715c8af5e0ae31a3b7fb432c2743d4e20cab47dfa664146bef9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp311-cp311-win_amd64.whl
| Download URL | torchfx-0.8.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 657.7 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f72f84a8f690c3af4e32fd6dc2380bc827bde31406a4e0c87b1681c2c8ff4ebf
|
|
BLAKE2b-256 checksum How to use checksums |
a5d88f010908ce86f57df82428ae2be4e7a5e031cda3131cd792062ed7178aac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.8.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 457.7 kB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
bd5b80ebc1b40c5fe07fe649b8626137d0d971a83e5e26251943ca16a872ad75
|
|
BLAKE2b-256 checksum How to use checksums |
8419f94f926e4492ca67886fce39ef616b584c93fccb371125c2f96403078264
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | torchfx-0.8.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 324.9 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c12a121416c14ce3fb0d3df67098cc3e0ab3add71b15c13c2199d8922d3099fa
|
|
BLAKE2b-256 checksum How to use checksums |
10c257eac4c43113929d4cb1b0c902d4bbe9d2027a6efce991d39ba2d8adf419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp310-cp310-win_amd64.whl
| Download URL | torchfx-0.8.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 656.7 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8a70acc23900f4a18c3b57ec0083ef9de732fc774a42ea58f76d1ccc00d6a430
|
|
BLAKE2b-256 checksum How to use checksums |
e3d57167bc7cbe9640a8456b957d1e28ed99637fd9312b6467017d0fbd95f171
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | torchfx-0.8.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 457.5 kB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7e83fcada66266eaf904128bdf628e587aca7e84bd252c1d3f0d68efa7750551
|
|
BLAKE2b-256 checksum How to use checksums |
b3a0e7ac7581f78b9fd4c5df431aca28d85882ee240961fe5603e32fb0a65a86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency logRelease files / torchfx-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | torchfx-0.8.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 323.4 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
16a660cb7d999315a25e9cf65add9e0a9f70210fa829deab0c6e49a1e3287829
|
|
BLAKE2b-256 checksum How to use checksums |
ed69c17bb7299854b76c808c163aeb30e3c6450a3e655bee653da3336f8bd6c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 26, 2026.
Transparency log