Skip to main content

Utility wrapper for torchaudio resamplers.

Project description

##taresamplers - A Utility Wrapper for TorchAudio Resamplers

torchaudio has very efficient resamplers. This is a code snippet that I use so often that I decided to package for my convenience, instead of adding it to every utils.py of every project. Resampling kernels are cached in the background for you, so computation will be much faster after the first few calls.

Simply do:

from torchaudioresamplers import load_and_resample_audio, resample_audio

target_sr = 22050
audio_path = "/tmp/audio.wav"
wav = load_and_resample_audio(audio_path,target_sr)

wav_16k = resample_audio(wav,target_sr,16000)

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

taresamplers-0.0.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taresamplers-0.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file taresamplers-0.0.1.tar.gz.

File metadata

  • Download URL: taresamplers-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for taresamplers-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2f7fa1e40afd6ad40739f52567cec712b4df837120095daafeb8ced9db189a66
MD5 7d55a3eb93e8b6120c247a26e29f61aa
BLAKE2b-256 46851b7a270919f2370629c9aefa4e569dc2a49681804d2fa9162feb10a4bd38

See more details on using hashes here.

File details

Details for the file taresamplers-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: taresamplers-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for taresamplers-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9a7b5988b9c53d930633c0756a331662dea6665489ccf0670b6e28bac9be267
MD5 556e06a0c1674661aa7e1a3d766dd9cd
BLAKE2b-256 d62670ccce02ca33c081a21021f6fb28162232085cec2380124365fc70113e27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page