File operations and other tools for working with .WAV files
Project description
wavtoolkit
wavtoolkit is a lightweight Python library for extracting and analyzing metadata from WAV files. Useful for inspecting audio files without diving into low-level byte handling.
It uses wave_chunk_parser for parsing complex RIFF structures and pyloudnorm for loudness analysis.
Features
-
Extracts key metadata:
- Title, artist, category (from
INFOandcartchunks) - Audio format (sample rate, channels, bit depth)
- File properties (size, creation time, modification time)
- Loudness metrics (Integrated LUFS, Peak)
- Title, artist, category (from
-
Lazy-loading design:
- Metadata is parsed on-demand
- Efficient and modular
-
Simple API, ready for scripting
Installation
pip install wavtoolkit
Usage
import os
from wavtoolkit import WavFile
wavs = [WavFile(f) for f in os.listdir() if f.endswith(".wav")]
for wav in wavs:
# Filename
print('\n', wav.filename)
# Title and duration
print(f" {wav}")
# Loudness metrics (LUFS, Peak)
for k, v in wav.loudness.items():
print(f" {k}: {v.item()}")
# Metadata from INFO chunks
for k, v in wav.metadata_info.items():
v = v.decode() if isinstance(v, bytes) else v
print(f" [{k}] {v}")
# Metadata from CART chunks
print(f" {wav.cart_metadata or ''}\n")
Example output:
Why wavtoolkit?
- Leverages existing libraries (
wave_chunk_parser,pyloudnorm) - No low-level hacks — just clean, high-level metadata access
- Modular design for integration into pipelines or tools
License
MIT
Credits
Coming Soon (?)
- Cue point parsing
- JSON metadata export
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 wavtoolkit-1.0.3.tar.gz.
File metadata
- Download URL: wavtoolkit-1.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.2.1-PRoot-Distro
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a940c5f337c79335994d519a21deae6f3fd549ec1790ee0b2a11a0e8cfada30
|
|
| MD5 |
0d4309cbcc98093158ea5b67cc423682
|
|
| BLAKE2b-256 |
6ef05d2df73f15ca51034e4e438e63d91085f2a4d565ad2d3e8744b8b1bbc1fc
|
File details
Details for the file wavtoolkit-1.0.3-py3-none-any.whl.
File metadata
- Download URL: wavtoolkit-1.0.3-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.2.1-PRoot-Distro
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e71218d5841148a376fda34e0ea011103197f3fd04bfee33c43660596b8e23c9
|
|
| MD5 |
9d10374f016e2e7695229b474e6e7c35
|
|
| BLAKE2b-256 |
6b8301c058e8592f844fa9b83cdf10740931ce1b790e3c323538e7eb35717e45
|