Skip to main content

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 INFO and cart chunks)
    • Audio format (sample rate, channels, bit depth)
    • File properties (size, creation time, modification time)
    • Loudness metrics (Integrated LUFS, Peak)
  • 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:

Chaos_a_la_Mode_RM_Mixdown_3.wav
  Chaos á la Mode (Re-Remastered) | 475.93s
  IntegratedLUFS: -14.537535931432476
  Peak: 0.8768768310546875
  [IPRD] Something Else
  [IART] DJ Stomp
  [ICRD] 2025
  [IGNR] Trap
  [INAM] Chaos á la Mode (Re-Remastered)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wavtoolkit-1.0.4.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wavtoolkit-1.0.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file wavtoolkit-1.0.4.tar.gz.

File metadata

  • Download URL: wavtoolkit-1.0.4.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

Hashes for wavtoolkit-1.0.4.tar.gz
Algorithm Hash digest
SHA256 35cec45c199f3684674e2c4815f35d1467d4184083c2a6e2aab03cabc618ff39
MD5 09846a492e8c2f77429437ff0b8fe269
BLAKE2b-256 29accb2e04340f0adf6da891102b990eec18b8a23995641d0899c82d7e5dbc69

See more details on using hashes here.

File details

Details for the file wavtoolkit-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: wavtoolkit-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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

Hashes for wavtoolkit-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 db8998ca4e9c9e9c3bf90c9c5bb35dc32735f47f1a62a838be9c7b20a39d9532
MD5 d65e30fa4a284feb09583e314c1479da
BLAKE2b-256 bc2786d5986a0727b758252ed4f1695ab1fda23d5d0f1b4788544c3183cedf37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page