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.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6ca65c50982bb18108e43378d58a84733673249f03f275b450e416d3c4e7155 |
|
MD5 | b9ca15f481a3d7a34d6864ded97376b2 |
|
BLAKE2b-256 | 77a4b86e45174b4d6c9e0b8b3084c3ffd647c4e1440193f4db3fcce1ae3e2377 |