# a-audio (adapter system)

Leumas a-audio adapter pack — ffmpeg-backed audio tools (convert-format, trim, mix, to-8d-audio, vocal-removal, remix-worker, ...). ffmpeg deps are lazy-imported by individual adapters; this...


Audio processing **capability pack**. Ported from `leumas-middleware/lib/a.audio` — 32 ffmpeg-backed
operations. Stripped: express `server.mjs`, `frontend/`, `bin/`, `docs/`, `processed_audio/` fixtures,
`queue.csv`.

The real implementations (`export default async function …`) live under
[`./adapters/<name>/index.mjs`](./adapters) and are imported **lazily** — the pack loads and lists its
tools without `fluent-ffmpeg` or the ffmpeg binary present; the dependency is only touched when a tool
is actually invoked. `index.js` marshals the `args` object into each implementation's positional
parameters using that adapter's `metadata.json` input order (two object-arg tools —
`audio-breakdown`, `remix-worker` — receive the whole args object).

> Requires `fluent-ffmpeg` (+ a system `ffmpeg`) at call time. `audio-breakdown`, `generate-tone`,
> and `remix-worker` shell out via `child_process` (and a Python worker for remix). These do
> filesystem I/O into a `processed_audio/` output dir.

## Tools (`adapters`)

| tool | args | result |
|------|------|--------|
| `change-volume` | `{ audioFilePath, volumeChangeDb }` | output path |
| `change-pitch` | `{ audioFilePath, semitones }` | output path |
| `change-speed` | `{ audioFilePath, speedMultiplier }` | output path |
| `fade-in` / `fade-out` | `{ audioFilePath, durationSeconds }` | output path |
| `trim` | `{ audioFilePath, startTimeSeconds, endTimeSeconds }` | output path |
| `extract-segment` | `{ audioFilePath, startTimeSeconds, durationSeconds }` | output path |
| `concatenate` | `{ audioFilePaths, outputFileName }` | output path |
| `mix-audio` | `{ audioFilePaths, outputFilePath }` | output path |
| `convert-format` | `{ audioFilePath, outputFormat }` | output path |
| `get-duration` / `get-metadata` | `{ audioFilePath }` | duration / metadata |

Others: add-echo-delay, add-reverb, add-silence, apply-equalizer, audio-breakdown, change-bit-rate,
change-sample-rate, detect-silence, generate-tone, loop-audio, mono-to-stereo, noise-reduction,
normalize-volume, remix-worker, remove-silence, reverse-audio, stereo-to-mono, to-8d-audio,
transcribe-audio, vocal-removal. Input order for each is in its `adapters/<name>/metadata.json`.


---
Source: shared/engines/adapters/domain/a-audio/README.md
Canonical: https://docs.leumas.tech/p/adapters/adapter-a-audio
