rotational beat estimation model
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file phasefinder-0.0.3.tar.gz.
File metadata
- Download URL: phasefinder-0.0.3.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79468026ad3cbd2515366a7b4040fe71bd04dd3bd42176c6a45199ae89a2fb9a
|
|
| MD5 |
8eff96d06bc83ddd0ab8df53ecc414a8
|
|
| BLAKE2b-256 |
7bccc54c80579ca399189c2ed3fdc0cda27686de37a0c3dcd754aa09c3e84785
|
File details
Details for the file phasefinder-0.0.3-py3-none-any.whl.
File metadata
- Download URL: phasefinder-0.0.3-py3-none-any.whl
- Upload date:
- Size: 146.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef7945c5c6581250ef67f0ddfa2bfcae7385e1d15b605a69809795c50c108ae2
|
|
| MD5 |
9fdaa0ef5b45fbdb563b68a74db6ec0e
|
|
| BLAKE2b-256 |
4a667fc9be2af99a203185ce1341c4f8ed22026a3310f2b11eb6c1ddf44cf8e8
|