Python bindings for WaoN - Wave-to-Notes transcriber
Project description
WaoN Python Bindings
Python bindings for WaoN - Wave-to-Notes transcriber.
Installation
From source
pip install maturin
maturin develop --release
From wheel
pip install waon
Usage
Basic transcription
import waon
import numpy as np
# Transcribe an audio file
midi_bytes = waon.transcribe_file("audio.wav")
with open("output.mid", "wb") as f:
f.write(midi_bytes)
# Transcribe audio data
audio_data = np.array([...], dtype=np.float32)
midi_bytes = waon.transcribe(audio_data, sample_rate=44100)
Advanced usage with options
import waon
# Create custom options
options = waon.WaonOptions()
options.fft_size = 4096
options.hop_size = 2048
options.window_type = "hamming"
options.note_bottom = 36 # C2
options.note_top = 96 # C7
options.velocity_threshold = 0.005
options.use_phase_vocoder = True
# Create context with options
context = waon.WaonContext(
fft_size=4096,
hop_size=2048,
window_type="hamming"
)
# Transcribe
midi_bytes = context.transcribe_file("audio.wav")
# Analyze a single frame
audio_frame = np.array([...], dtype=np.float32)
note_intensities = context.analyze(audio_frame) # Returns 128-element array
API Reference
Functions
transcribe(audio, sample_rate=44100, options=None)- Transcribe audio array to MIDItranscribe_file(path, options=None)- Transcribe audio file to MIDIget_version()- Get library version
Classes
WaonContext- Transcription context for stateful processingWaonOptions- Configuration options for transcription
Window Types
hanning(default)hammingblackmannuttallblackman2,blackman3,blackman4exponentialsineparzenwelchsteeper30,steeper60
License
GPL-2.0-or-later
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 waon-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: waon-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60f272c61bc69834b17a66e9c614976f19654cc76adb6e83fd75459a1882d002
|
|
| MD5 |
a1c24c36261f36f85e9ccbe0171d6868
|
|
| BLAKE2b-256 |
583ce44e608be4743bc06af7706912c1c11a5a6b4b2adde4c93d00b859535eb9
|