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

Uploaded Source

Built Distribution

torch_pitch_shift-1.0.3-py3-none-any.whl (89.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torch_pitch_shift-1.0.3.tar.gz
  • Upload date:
  • Size: 2.9 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.3.tar.gz
Algorithm Hash digest
SHA256 8c352c672f1f1bb32aa932ed08d2710829f909f0c57181065efec6ab4bde011a
MD5 171f9a627c2fd80ae91cd5a5c0a6247a
BLAKE2b-256 131ea5e2860640b50e49902ec33a7c41cb2d15aab953dcdf4b5cad2b15c06a51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torch_pitch_shift-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 89.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a6ca65c50982bb18108e43378d58a84733673249f03f275b450e416d3c4e7155
MD5 b9ca15f481a3d7a34d6864ded97376b2
BLAKE2b-256 77a4b86e45174b4d6c9e0b8b3084c3ffd647c4e1440193f4db3fcce1ae3e2377

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