Skip to main content

No project description provided

Project description

Torch Pitch Shift

Pitch-shift audio clips quickly with PyTorch (CUDA Supported)!

View on PyPI

Publish to PyPI

Installation

pip install torch_pitch_shift

Usage

# import the libs
import torch
from torch_pitch_shift import *

# create a random sample
NUM_CHANNELS = 2
SAMPLE_RATE = 44100
NUM_SECONDS = 2
sample = torch.rand(NUM_CHANNELS, SAMPLE_RATE * NUM_SECONDS, dtype=torch.float32)
# you can also use CUDA tensors (either with device= or .cuda())!

# construct the pitch shifter
pitch_shift = PitchShifter(SAMPLE_RATE)

# pitch shift the sample
SHIFT_SEMITONES = 5
print(pitch_shift(sample, SHIFT_SEMITONES))

Documentation

Documentation is built into the class and function docstrings. If anyone wants to properly document the package, please feel free to contribute!

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_pitch_shift-1.0.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

torch_pitch_shift-1.0.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file torch_pitch_shift-1.0.0.tar.gz.

File metadata

  • Download URL: torch_pitch_shift-1.0.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for torch_pitch_shift-1.0.0.tar.gz
Algorithm Hash digest
SHA256 26ed7c045afc8db888fd12259227e06dccf792f206b3dfa49089cb6cd74c2c90
MD5 07168a159213a9560cc3ece2bf988c9f
BLAKE2b-256 9b51f40d0c33edb2468bec7997cfb496c0b187afa4d7b4df10779b3019f07f89

See more details on using hashes here.

File details

Details for the file torch_pitch_shift-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: torch_pitch_shift-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for torch_pitch_shift-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf38fee59fed7ab5f5f38ea7550e3837dfb9020374b70b16ed26bdec8b46131
MD5 8c994b53f8bc6bcf5413ac19076d1c1a
BLAKE2b-256 bc1d91b374651255c3e6641a77af247539aceb9822b386c250ebb600121974d8

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