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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: torch_stft-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 a5fbe596acecde5fc8e993834ae5fa7cd8e39a38be9111763607d230e06fdc9e
MD5 fa86b3e33b7bd85bd38ca4cfc11bf6b0
BLAKE2b-256 66c0fab3d40f2161ef38d7ad0f2439c1c6262735f0f6b3e088eab13eba2dbb20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torch_stft-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50fb567419656a118ef820a63d02498bc66d07487d86457c35902e4cde1aa1c2
MD5 053deb7c331e65899aa0ddbb4201a382
BLAKE2b-256 e6c3d4ae45ef35c176faab2290f4a8b8a8559cad9c4906bb4ff8910303cbaa97

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