Name | waon JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Python bindings for WaoN - Wave-to-Notes transcriber |
upload_time | 2025-08-06 00:33:58 |
maintainer | None |
docs_url | None |
author | WaoN-rs Development Team |
requires_python | >=3.9 |
license | GPL-2.0-or-later |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# WaoN Python Bindings
Python bindings for WaoN - Wave-to-Notes transcriber.
## Installation
### From source
```bash
pip install maturin
maturin develop --release
```
### From wheel
```bash
pip install waon
```
## Usage
### Basic transcription
```python
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
```python
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 MIDI
- `transcribe_file(path, options=None)` - Transcribe audio file to MIDI
- `get_version()` - Get library version
### Classes
- `WaonContext` - Transcription context for stateful processing
- `WaonOptions` - Configuration options for transcription
### Window Types
- `hanning` (default)
- `hamming`
- `blackman`
- `nuttall`
- `blackman2`, `blackman3`, `blackman4`
- `exponentialsine`
- `parzen`
- `welch`
- `steeper30`, `steeper60`
## License
GPL-2.0-or-later
Raw data
{
"_id": null,
"home_page": null,
"name": "waon",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "WaoN-rs Development Team",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# WaoN Python Bindings\n\nPython bindings for WaoN - Wave-to-Notes transcriber.\n\n## Installation\n\n### From source\n\n```bash\npip install maturin\nmaturin develop --release\n```\n\n### From wheel\n\n```bash\npip install waon\n```\n\n## Usage\n\n### Basic transcription\n\n```python\nimport waon\nimport numpy as np\n\n# Transcribe an audio file\nmidi_bytes = waon.transcribe_file(\"audio.wav\")\nwith open(\"output.mid\", \"wb\") as f:\n f.write(midi_bytes)\n\n# Transcribe audio data\naudio_data = np.array([...], dtype=np.float32)\nmidi_bytes = waon.transcribe(audio_data, sample_rate=44100)\n```\n\n### Advanced usage with options\n\n```python\nimport waon\n\n# Create custom options\noptions = waon.WaonOptions()\noptions.fft_size = 4096\noptions.hop_size = 2048\noptions.window_type = \"hamming\"\noptions.note_bottom = 36 # C2\noptions.note_top = 96 # C7\noptions.velocity_threshold = 0.005\noptions.use_phase_vocoder = True\n\n# Create context with options\ncontext = waon.WaonContext(\n fft_size=4096,\n hop_size=2048,\n window_type=\"hamming\"\n)\n\n# Transcribe\nmidi_bytes = context.transcribe_file(\"audio.wav\")\n\n# Analyze a single frame\naudio_frame = np.array([...], dtype=np.float32)\nnote_intensities = context.analyze(audio_frame) # Returns 128-element array\n```\n\n## API Reference\n\n### Functions\n\n- `transcribe(audio, sample_rate=44100, options=None)` - Transcribe audio array to MIDI\n- `transcribe_file(path, options=None)` - Transcribe audio file to MIDI\n- `get_version()` - Get library version\n\n### Classes\n\n- `WaonContext` - Transcription context for stateful processing\n- `WaonOptions` - Configuration options for transcription\n\n### Window Types\n\n- `hanning` (default)\n- `hamming`\n- `blackman`\n- `nuttall`\n- `blackman2`, `blackman3`, `blackman4`\n- `exponentialsine`\n- `parzen`\n- `welch`\n- `steeper30`, `steeper60`\n\n## License\n\nGPL-2.0-or-later\n",
"bugtrack_url": null,
"license": "GPL-2.0-or-later",
"summary": "Python bindings for WaoN - Wave-to-Notes transcriber",
"version": "0.1.1",
"project_urls": {
"Source Code": "https://github.com/waon-rs/waon-rs"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "666b18bfe944e30e6b351b23044fd8a35a24f23c750a9631891bb75a8e8b9c74",
"md5": "ba1e1631a50a778391105c760d829fb4",
"sha256": "6b55a661d6fc49c5f7fa5249b4d9671d7fa4907e12336e1a5ae41230737f65c2"
},
"downloads": -1,
"filename": "waon-0.1.1-cp39-abi3-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "ba1e1631a50a778391105c760d829fb4",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 1274706,
"upload_time": "2025-08-06T00:33:58",
"upload_time_iso_8601": "2025-08-06T00:33:58.279193Z",
"url": "https://files.pythonhosted.org/packages/66/6b/18bfe944e30e6b351b23044fd8a35a24f23c750a9631891bb75a8e8b9c74/waon-0.1.1-cp39-abi3-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-06 00:33:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "waon-rs",
"github_project": "waon-rs",
"github_not_found": true,
"lcname": "waon"
}