Skip to main content

aud


CI Python 3.10+ License: MIT Code style: black

aud is a Python tool for batch audio file processing, designed for scripting, automation, and extensibility.

Version 2 is a full architectural rewrite focused on correctness, testability, and long-term maintainability rather than feature sprawl.


What’s New in v2

aud v2 replaces the original monolithic implementation with a clean, modular core.

Key changes:

  • Clear separation between intent (operations) and execution (adapters)
  • Deterministic, test-driven behavior across all core functionality
  • Explicit filesystem, audio, and conversion layers
  • Modern packaging and tooling (pyproject.toml, pytest, coverage)
  • A stable foundation for future features

Some ideas present in earlier versions (such as platform-specific export presets) were never fully implemented and are intentionally deferred in v2.


Installation

User installation

pip install aud

Development installation

pip install -e .[dev]

The development extra installs pytest, coverage, formatting, linting, and pre-commit tooling.


Basic Usage

aud operates on directories through the Dir interface.

from aud import Dir

d = Dir("audio")

d.config_set_extensions(["wav"])
d.name_upper()
d.convert_to_mp3()

Operations are applied to the current directory selection and executed through adapters.


Core Concepts

Dir

Dir represents a working directory and the current file selection. It is responsible for:

  • scanning directories
  • filtering files by extension, allowlist, and denylist
  • building execution plans
  • invoking the appropriate adapters

Operations

Operations describe what should happen. They do not perform IO directly.

Examples include:

  • renaming files
  • converting audio formats
  • applying audio effects
  • moving or copying files

Operations are composable and independent of execution.

Adapters

Adapters perform how an operation is executed.

aud currently includes adapters for:

  • filesystem operations
  • audio processing
  • format conversion

This separation keeps behavior explicit and testable.


Supported Operations

Naming

  • uppercase / lowercase
  • prepend / append
  • replace
  • iterate
  • replace spaces

Naming operations rename files on disk via the filesystem adapter.


Filesystem

  • copy
  • move
  • backup
  • zip

Filesystem operations operate on the current selection and return updated file references.


Audio Effects

Audio effects are applied using pydub and include:

  • fade in / fade out
  • normalization
  • gain adjustment
  • high-pass / low-pass filters
  • silence stripping
  • audio joining

Format Conversion

Supported formats include:

  • wav
  • mp3
  • ogg
  • flac

Additional helpers include mono and stereo conversion.


Export Presets

export_for() exists as a placeholder for future platform-specific export presets.

This behavior was never fully implemented in earlier versions and is intentionally deferred in v2. The method is retained as a clear extension point for future development.


Testing

aud uses pytest for all core behavior.

pytest

Tests cover:

  • directory selection logic
  • configuration behavior
  • naming operations
  • filesystem execution
  • audio effects
  • format conversion

Coverage is intentionally focused on core logic rather than CLI entrypoints.


Project Structure

aud/
├── aud.py               # Dir interface
├── cli.py               # CLI entrypoint
├── core/
│   ├── adapters/        # Execution layers
│   ├── operations/     # Intent definitions
│   ├── selection/      # File selection logic
│   ├── models.py
│   └── plan.py
├── exceptions.py
└── __main__.py

Status

aud v2 is stable and fully tested.

The core architecture is complete. Future development will focus on adding new operations and higher-level workflows built on the existing foundation.


License

MIT License

Metadata

Release files for aud 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aud 2.0.1
File Size Uploaded
aud-2.0.1.tar.gz 20.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aud 2.0.1
File Interpreter ABI Platform
aud-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / aud-2.0.1.tar.gz

Download URL aud-2.0.1.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9e7f8efa0bfe102d3653d7fb6d45632f01ef50155118606b6b78b4bc8493ef15
BLAKE2b-256 checksum
How to use checksums
a585016dbc9483653e642328d0f8315463612ba0ad21c2d912d5b703f43f1c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / aud-2.0.1-py3-none-any.whl

Download URL aud-2.0.1-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f97534c119f5908c46fa3b5b6905151b8c09afba29e22add11f2646f2d907c6
BLAKE2b-256 checksum
How to use checksums
1ae4606d755f49e250749486477c038274e9916790cc35353a55553332b6888f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

0.8.6

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

1 release file

0.1.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page