No project description provided
Project description
Torch Pitch Shift
Pitch-shift audio clips quickly with PyTorch (CUDA Supported)!
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for torch_pitch_shift-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf38fee59fed7ab5f5f38ea7550e3837dfb9020374b70b16ed26bdec8b46131 |
|
MD5 | 8c994b53f8bc6bcf5413ac19076d1c1a |
|
BLAKE2b-256 | bc1d91b374651255c3e6641a77af247539aceb9822b386c250ebb600121974d8 |