Skip to main content

An STFT/iSTFT for PyTorch

Project description

Build Status

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.

Installation

Install easily with pip:

pip install torch_stft

Tests

Test it by just cloning this repo and running

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.

Contributing

Pull requests welcome.

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.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

torch_stft-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torch_stft-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 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.1.tar.gz
Algorithm Hash digest
SHA256 af6a9d1588c9c8f0960e056e799076d73344c324f87df6f673aa8f0f5c880108
MD5 833e448435636ba55f160636258b13c5
BLAKE2b-256 118c4ae6c8d29d0f028bdcede115325526d5a70bbc0d56ed24995cf4ffe62f00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torch_stft-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb9dbb330101f9ef899356eb6bdcfcb8a87bf084394215d08ef5f5f8475ea595
MD5 a2648292a885987c3d23fb3bee99720a
BLAKE2b-256 98c207ebe01c55262721d57c2469de59580e8a3773b366f7f7d9d5cdf47c28a7

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