Skip to main content

phasefinder is a beat estimation model that predicts metric position as rotational phase, heavily inspired by this paper.

full writeup here

usage

python

from phasefinder import Phasefinder

# initialize model
pf = Phasefinder()

# predict beats
audio_path = "path/to/your/audio/file.[wav/mp3/flac/etc]"
beat_times = pf.predict(audio_path)

# predict beats and BPM
beat_times, bpm = pf.predict(audio_path, include_bpm=True)

# generate a click track
output_path = "output_with_clicks.wav"
pf.make_click_track(audio_path, output_path, beats=beat_times)

cli

basic usage

python -m phasefinder.infer path/to/your/audio/file.wav

This will print the estimated beat times to the console.

options

  • --bpm: Include BPM in the output
  • --noclean: Don't apply the cleaning function to the beat times
  • --format {times,click_track}: Choose the output format (default: times)
    • times: Output beat times
    • click_track: Generate an audio file with click track
  • --audio_output PATH: Specify the path for the output audio file with clicks (default: output_with_clicks.wav)
  • --json_output PATH: Save the results to a JSON file

examples

  1. Estimate beats and BPM:

    python -m phasefinder.infer path/to/audio.wav --bpm
    
  2. Generate a click track:

    python -m phasefinder.infer path/to/audio.wav --format click_track --audio_output output.wav
    
  3. Save results to a JSON file:

    python -m phasefinder.infer path/to/audio.wav --bpm --json_output results.json
    
  4. Estimate beats without applying the cleaning function:

    python -m phasefinder.infer path/to/audio.wav --noclean
    

Metadata

Release files for phasefinder 0.0.4

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

Source distribution (sdist)

Source distribution for phasefinder 0.0.4
File Size Uploaded Provenance Actions
phasefinder-0.0.4.tar.gz 136.5 kB Without provenance Details for phasefinder-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for phasefinder 0.0.4
File Interpreter ABI Platform Actions
phasefinder-0.0.4-py3-none-any.whl Python 3 none any Details for phasefinder-0.0.4-py3-none-any.whl

Total release size: 283.7 kB

Release files / phasefinder-0.0.4.tar.gz

Download URL phasefinder-0.0.4.tar.gz
Size 136.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3f735499ac4225b6d26b2d21bc150a48f3b0bc9835844e2377216a5a248e4284
BLAKE2b-256 checksum
How to use checksums
9cdf2afbe341d7073ece5d0cb4a7f106e590f6eafff41a4825186b6245260740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / phasefinder-0.0.4-py3-none-any.whl

Download URL phasefinder-0.0.4-py3-none-any.whl
Size 147.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eee8e508a1ed9a5844e819075e8925663cf0d93da332e9a0a574be9a2edcdd73
BLAKE2b-256 checksum
How to use checksums
53b71057d08a5d0c224fc135611084a10c1d52523904dc5208464ed9a9133df8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for phasefinder 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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