phasefinder is a beat estimation model that predicts metric position as rotational phase, heavily inspired by this paper.
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 timesclick_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
-
Estimate beats and BPM:
python -m phasefinder.infer path/to/audio.wav --bpm
-
Generate a click track:
python -m phasefinder.infer path/to/audio.wav --format click_track --audio_output output.wav
-
Save results to a JSON file:
python -m phasefinder.infer path/to/audio.wav --bpm --json_output results.json
-
Estimate beats without applying the cleaning function:
python -m phasefinder.infer path/to/audio.wav --noclean
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
phasefinder-0.0.4.tar.gz
(136.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
phasefinder-0.0.4-py3-none-any.whl
(147.3 kB
view details)
File details
Details for the file phasefinder-0.0.4.tar.gz.
File metadata
- Download URL: phasefinder-0.0.4.tar.gz
- Upload date:
- Size: 136.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f735499ac4225b6d26b2d21bc150a48f3b0bc9835844e2377216a5a248e4284
|
|
| MD5 |
7ec7591223f26da97ba82e2745cf84c7
|
|
| BLAKE2b-256 |
9cdf2afbe341d7073ece5d0cb4a7f106e590f6eafff41a4825186b6245260740
|
File details
Details for the file phasefinder-0.0.4-py3-none-any.whl.
File metadata
- Download URL: phasefinder-0.0.4-py3-none-any.whl
- Upload date:
- Size: 147.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eee8e508a1ed9a5844e819075e8925663cf0d93da332e9a0a574be9a2edcdd73
|
|
| MD5 |
c469a2f5a3d58577e32171097a0f5803
|
|
| BLAKE2b-256 |
53b71057d08a5d0c224fc135611084a10c1d52523904dc5208464ed9a9133df8
|