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
Metadata
Release files for waon 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| waon-0.1.1-cp39-abi3-manylinux_2_34_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.34+ x86-64 | Details |
Release files / waon-0.1.1-cp39-abi3-manylinux_2_34_x86_64.whl
| Download URL | waon-0.1.1-cp39-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6b55a661d6fc49c5f7fa5249b4d9671d7fa4907e12336e1a5ae41230737f65c2
|
|
BLAKE2b-256 checksum How to use checksums |
666b18bfe944e30e6b351b23044fd8a35a24f23c750a9631891bb75a8e8b9c74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for waon 0.1.1
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.