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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: torch_pitch_shift-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cab2addceff9bf411505720ce17ed2f22988f9e78d7df0a420b8f87ab4f8fb65
MD5 3a3e8d67e0575c73c235f09aa1c50ed5
BLAKE2b-256 b5e7df836e3aad3fcf51544a707058cc71b70f391ea2b90b7056788dafdf6577

See more details on using hashes here.

File details

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

File metadata

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

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