Skip to main content

An STFT/iSTFT for PyTorch

Project description

STFT/iSTFT in PyTorch

An STFT/iSTFT written up in PyTorch using 1D Convolutions. Requirements are a recent version PyTorch, numpy, and librosa (for loading audio in test_stft.py). Thanks to Shrikant Venkataramani for sharing code this was based off of and Rafael Valle for catching bugs and adding the proper windowing logic. Uses Python 3.

Install easily with pip:

pip install torch_stft

Test it by just cloning this repo and run:

pip install -r requirements.txt
python -m pytest .

Unfortunately, since it's implemented with 1D Convolutions, some filter_length/hop_length combinations can result in out of memory errors on your GPU when run on sufficiently large input.

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

torch_stft-0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

torch_stft-0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file torch_stft-0.1.tar.gz.

File metadata

  • Download URL: torch_stft-0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.7.2

File hashes

Hashes for torch_stft-0.1.tar.gz
Algorithm Hash digest
SHA256 fff33d3a2bacc379e445e54fbd91423cc460f0d41c502b5f901bbda1db8d6f9a
MD5 e268b81f1408a247bac4abb62af611ee
BLAKE2b-256 5d7611084cc4bfe27d14eaa71ecf500b14f8b590710470fa780d605cfab8502d

See more details on using hashes here.

File details

Details for the file torch_stft-0.1-py3-none-any.whl.

File metadata

  • Download URL: torch_stft-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.7.2

File hashes

Hashes for torch_stft-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2634e07106d68a265baa22617e98cdefa1f76cb1829985fb0abad1a01703f0
MD5 f078a2a392cf4570f580f1d17d1292f1
BLAKE2b-256 d1547441e451417c37fe36144e498a10d003051591f4ada4df3f64a055af9e4a

See more details on using hashes here.

Supported by

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