-
Notifications
You must be signed in to change notification settings - Fork 0
How To Use the Audio Analysis Toolkit
This document provides a practical, end‑to‑end guide to using the toolkit: from configuration to execution and result inspection.
It complements:
- Adding a New Analysis
- Adding Visualizations
and focuses on how to operate the system, not how to extend it.
Input Audio
↓
YAML Configuration
↓
Runner Execution
↓
Analyses
↓
Results (JSON)
↓
Optional Visualizations
The toolkit expects:
- one or more audio files,
- readable by the underlying audio backend,
- mono or multi‑channel (handled transparently).
No preprocessing (resampling, channel folding, normalization) is assumed unless explicitly configured.
for demonstration purposes put your audio file in : small-audio-toolkit\Analysis_Workspace\04_input_sounds or use the provided one small-audio-toolkit\Analysis_Workspace\04_input_sounds\sound.wav
The YAML protocol defines what is executed.
please, please, please read : the protocol doc to understand how important it is
and also, if you dare, the protocol schema description
Typical structure:
analyses:
spectral:
enabled: true
methods:
- name: "fft"
params:
window: hann
n_fft: 4096
time_frequency:
enabled: true
methods:
- name: "stft"
params:
hop_length: 512Rules:
- disabled categories are skipped entirely,
- parameters override method defaults,
- execution order follows the configuration order.
for demonstration purposes, we will use an existing one named "protocol_baseline_full.yaml" file in : small-audio-toolkit\Analysis_Workspace\01_protocols\01_Baseline
but you could have edited your own one, and in this case, the good location should be small-audio-toolkit\Analysis_Workspace\01_protocols\02_Focused\your_protocol.yaml
Visualization is globally controlled via the protocol in this paragraph:
visualization:
enabled: true
formats: [png]
dpi: 150
figsize: [10, 4]If disabled:
- analyses still compute
visualization_data, - no figures are generated.
for demonstration purposes use this output folder : small-audio-toolkit\Analysis_Workspace\05_results\test1
Execution is handled by the runner:
- loads protocol,
- builds the execution context,
- dispatches analyses via the registry,
- collects results,
- optionally triggers visualization.
The runner performs no analysis logic.
in a CMD window , go to your_path\small-audio-toolkit
use the following command : python 01_run_analysis.py Analysis_Workspace\04_input_sounds\sound.wav --config Analysis_Workspace\01_protocols\01_Baseline\protocol_baseline_full.yaml --output Analysis_Workspace\05_results\test1 and let the process run.
All outputs are exported as structured JSON:
- one entry per analysis method,
- raw measurements preserved,
- metrics and optional anomaly scores included.
The JSON is the primary, authoritative output.
in this demonstration contextt the results will be located in : small-audio-toolkit\Analysis_Workspace\05_results\test1
Generated plots:
- are strictly descriptive,
- never influence results,
- are reproducible from the JSON data.
Directory layout typically follows:
output/
├─ results.json
└─ visualizations/
├─ image1.png
└─ ImageN.png
Use this mode for:
- batch processing,
- statistical post‑analysis,
- automated pipelines.
Use this mode for:
- exploratory analysis,
- sanity checks,
- reporting and documentation.
- analyses never depend on visualizations,
- visualizations never recompute data,
- the runner only orchestrates,
- interpretation is always external to the toolkit.
- analysis not executed → check registry + YAML name
- empty plots → verify
visualization_data - missing channels → inspect
context.audio_data - inconsistent results → confirm parameters and defaults
| Task | Responsibility |
|---|---|
| Define what runs | YAML protocol |
| Compute data | Analyses |
| Orchestrate | Runner |
| Store results | JSON export |
| Display data | Visualization layer |
This guide describes the correct way to use the toolkit, while keeping its architectural guarantees intact.