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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3ee672b188f014126d4aa9a31216886414e40bfba86ae99c89cfd22af858c55 |
|
MD5 | 3e24cd3d5a0b8cc7575dc6395221f916 |
|
BLAKE2b-256 | 66c2b68ef82bd8d174d91f69e7b9b8c3d4bb0be88f0cb802fdad4ab443dfaf3b |