Skip to main content

yaapt.torch

Implementation of the YAAPT pitch tracker in PyTorch.
This version relies solely on PyTorch, does not hog all CPU threads (making it possible to use in a dataloader), is torch.jit-able, and is batch compatible.

Setup

For using (no development required)

pip install yaapt.torch

To install for development, clone the repository, and then run the following from within the root directory.

pip install -e .

Usage

import torchaudio, yaapt_torch
audio, sr = torchaudio.load("audio.wav")

yaapt_opts = {
    "sr": sr,
    "frame_length": 35.0,
    "frame_space": 20.0,
    "nccf_thresh1": 0.25,
    "tda_frame_length": 25.0,
}

pitch = yaapt_torch.yaapt(
    audio, # (Batch, feature) torch.tensor input
    yaapt_opts,
)
print(pitch) # (Batch, F0) torch.tensor output

Credits

This repository aims to wrap up these implementations in easy-installable PyPi packages, which can be used directly in PyTorch based neural network training.

Release files for yaapt.torch 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yaapt.torch 1.0.0
File Size Uploaded
yaapt.torch-1.0.0.tar.gz 15.9 kB Details

Release files / yaapt.torch-1.0.0.tar.gz

Download URL yaapt.torch-1.0.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
59e7770ac304f862916a88e0a462873d49b3ae404b774f5bf77e84debfcf6af0
BLAKE2b-256 checksum
How to use checksums
8450be9d5e6f2e1b61e9ca835d7fe7fb1f5f3f4925b2c16c66d903ce39ec8680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page