# ardev1161/libaudition architecture

> Architecture diagram of the GitHub repository ardev1161/libaudition, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ardev1161/libaudition
- Repository: https://github.com/ardev1161/libaudition

## Overview

libaudition is an application-agnostic C++ toolkit for acoustic perception, not a standalone capture application. Its principal workflow is to provide audio to composable DSP and backend-neutral perception blocks, then use classification, spatial identity, speech, and temporal-event components to produce source- and event-level observations; applications own scheduling and recording policy. The README documents these capabilities and the composition of temporal detection with event assembly. Sampled code confirms selected adapter and asynchronous-ingress relationships; links not directly evidenced are omitted.

Main entry points: [`backends/odas/src/odas_spatial_engine.cpp`](https://github.com/ardev1161/libaudition/blob/main/backends/odas/src/odas_spatial_engine.cpp) (ODAS spatial engine), [`backends/clap/src/clap_audio_embedder.cpp`](https://github.com/ardev1161/libaudition/blob/main/backends/clap/src/clap_audio_embedder.cpp) (CLAP audio embedding), [`src/pipeline/temporal_acoustic_event_detector.cpp`](https://github.com/ardev1161/libaudition/blob/main/src/pipeline/temporal_acoustic_event_detector.cpp) (Temporal event detector), [`src/pipeline/per_source_speech_runtime.cpp`](https://github.com/ardev1161/libaudition/blob/main/src/pipeline/per_source_speech_runtime.cpp) (Per-source speech)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audio["Audio and DSP"]
  node_audio_types["Audio buffers<br/>[audio_buffer.hpp]"]
  node_frontend["Audio frontend<br/>[audio_frontend.cpp]"]
  node_wav["WAV I/O<br/>[wav_io.cpp]"]
end

subgraph group_perception["Perception adapters"]
  node_spatial["ODAS spatial engine"]
  node_odas_runtime["ODAS runtime<br/>[odas_runtime.hpp]"]
  node_classifier["Source classification"]
  node_efficientat["EfficientAT tagger"]
  node_yamnet["YAMNet tagger"]
  node_clap_embed["CLAP audio embedding"]
  node_clap_features["CLAP features<br/>[clap_features.hpp]"]
  node_authenticity["Authenticity detection"]
end

subgraph group_source["Source and speech"]
  node_speech_runtime["Per-source speech"]
  node_speech_ingress["Async speech ingress"]
  node_recording["Recording session"]
end

subgraph group_events["Events and analysis"]
  node_temporal_detector["Temporal event detector"]
  node_event_assembler["Acoustic event assembler"]
  node_temporal_patterns["Temporal pattern matching"]
end

subgraph group_memory["Identity and memory"]
  node_spatial_identity["Spatial identity"]
  node_identity_resolver["Identity resolver"]
  node_prototype_matcher["Sound prototype matching"]
end

node_app(("Application"))

node_app -->|"provides audio"| node_audio_types
node_app -->|"composes DSP"| node_frontend
node_app -->|"uses classification"| node_classifier
node_app -->|"uses spatial analysis"| node_spatial
node_app -->|"uses speech"| node_speech_runtime
node_app -->|"uses event detection"| node_temporal_detector
node_app -->|"uses analysis"| node_temporal_patterns
node_app -.->|"uses authenticity"| node_authenticity
node_app -->|"sets recording policy"| node_recording
node_spatial -->|"processes audio"| node_odas_runtime
node_clap_embed -->|"extracts features"| node_clap_features
node_speech_ingress -->|"dispatches audio"| node_speech_runtime
node_temporal_detector -->|"composes transitions"| node_event_assembler
node_app -.->|"selects tagger"| node_efficientat
node_app -.->|"selects tagger"| node_yamnet
node_app -.->|"selects adapter"| node_clap_embed
node_app -.->|"composes identity"| node_identity_resolver
node_app -.->|"uses matching"| node_prototype_matcher
node_app -.->|"composes identity"| node_spatial_identity
node_app -.->|"uses audio I/O"| node_wav

click node_audio_types "https://github.com/ardev1161/libaudition/blob/main/include/audition/audio/audio_buffer.hpp"
click node_frontend "https://github.com/ardev1161/libaudition/blob/main/src/dsp/audio_frontend.cpp"
click node_wav "https://github.com/ardev1161/libaudition/blob/main/src/io/wav_io.cpp"
click node_spatial "https://github.com/ardev1161/libaudition/blob/main/backends/odas/src/odas_spatial_engine.cpp"
click node_odas_runtime "https://github.com/ardev1161/libaudition/blob/main/backends/odas/src/detail/odas_runtime.hpp"
click node_classifier "https://github.com/ardev1161/libaudition/blob/main/src/pipeline/source_classification_runtime.cpp"
click node_efficientat "https://github.com/ardev1161/libaudition/blob/main/backends/efficientat/src/efficientat_audio_tagger.cpp"
click node_yamnet "https://github.com/ardev1161/libaudition/blob/main/backends/yamnet/src/yamnet_audio_tagger.cpp"
click node_clap_embed "https://github.com/ardev1161/libaudition/blob/main/backends/clap/src/clap_audio_embedder.cpp"
click node_clap_features "https://github.com/ardev1161/libaudition/blob/main/backends/clap/src/detail/clap_features.hpp"
click node_authenticity "https://github.com/ardev1161/libaudition/blob/main/backends/aasist/src/aasist_authenticity_detector.cpp"
click node_speech_runtime "https://github.com/ardev1161/libaudition/blob/main/src/pipeline/per_source_speech_runtime.cpp"
click node_speech_ingress "https://github.com/ardev1161/libaudition/blob/main/include/audition/speech/async_speech_ingress_worker.hpp"
click node_recording "https://github.com/ardev1161/libaudition/blob/main/include/audition/recording/source_recording_session.hpp"
click node_spatial_identity "https://github.com/ardev1161/libaudition/blob/main/src/pipeline/spatial_identity.cpp"
click node_identity_resolver "https://github.com/ardev1161/libaudition/blob/main/src/memory/source_identity_resolver.cpp"
click node_prototype_matcher "https://github.com/ardev1161/libaudition/blob/main/src/memory/sound_prototype_matcher.cpp"
click node_temporal_detector "https://github.com/ardev1161/libaudition/blob/main/src/pipeline/temporal_acoustic_event_detector.cpp"
click node_event_assembler "https://github.com/ardev1161/libaudition/blob/main/src/pipeline/acoustic_event_assembler.cpp"
click node_temporal_patterns "https://github.com/ardev1161/libaudition/blob/main/include/audition/temporal/streaming_pattern_matcher.hpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_audio_types,node_frontend,node_wav toneBlue
class node_spatial,node_odas_runtime,node_classifier,node_efficientat,node_yamnet,node_clap_embed,node_clap_features,node_authenticity toneAmber
class node_speech_runtime,node_speech_ingress,node_recording toneMint
class node_temporal_detector,node_event_assembler,node_temporal_patterns toneRose
class node_spatial_identity,node_identity_resolver,node_prototype_matcher,node_app toneIndigo
```

## Components

### Audio and DSP

- [Audio buffers](https://github.com/ardev1161/libaudition/blob/main/include/audition/audio/audio_buffer.hpp): `include/audition/audio/audio_buffer.hpp`
- [Audio frontend](https://github.com/ardev1161/libaudition/blob/main/src/dsp/audio_frontend.cpp): `src/dsp/audio_frontend.cpp`
- [WAV I/O](https://github.com/ardev1161/libaudition/blob/main/src/io/wav_io.cpp): `src/io/wav_io.cpp`

### Perception adapters

- [ODAS spatial engine](https://github.com/ardev1161/libaudition/blob/main/backends/odas/src/odas_spatial_engine.cpp): `backends/odas/src/odas_spatial_engine.cpp`
- [ODAS runtime](https://github.com/ardev1161/libaudition/blob/main/backends/odas/src/detail/odas_runtime.hpp): `backends/odas/src/detail/odas_runtime.hpp`
- [Source classification](https://github.com/ardev1161/libaudition/blob/main/src/pipeline/source_classification_runtime.cpp): `src/pipeline/source_classification_runtime.cpp`
- [EfficientAT tagger](https://github.com/ardev1161/libaudition/blob/main/backends/efficientat/src/efficientat_audio_tagger.cpp): `backends/efficientat/src/efficientat_audio_tagger.cpp`
- [YAMNet tagger](https://github.com/ardev1161/libaudition/blob/main/backends/yamnet/src/yamnet_audio_tagger.cpp): `backends/yamnet/src/yamnet_audio_tagger.cpp`
- [CLAP audio embedding](https://github.com/ardev1161/libaudition/blob/main/backends/clap/src/clap_audio_embedder.cpp): `backends/clap/src/clap_audio_embedder.cpp`
- [CLAP features](https://github.com/ardev1161/libaudition/blob/main/backends/clap/src/detail/clap_features.hpp): `backends/clap/src/detail/clap_features.hpp`
- [Authenticity detection](https://github.com/ardev1161/libaudition/blob/main/backends/aasist/src/aasist_authenticity_detector.cpp): `backends/aasist/src/aasist_authenticity_detector.cpp`

### Source and speech

- [Per-source speech](https://github.com/ardev1161/libaudition/blob/main/src/pipeline/per_source_speech_runtime.cpp): `src/pipeline/per_source_speech_runtime.cpp`
- [Async speech ingress](https://github.com/ardev1161/libaudition/blob/main/include/audition/speech/async_speech_ingress_worker.hpp): `include/audition/speech/async_speech_ingress_worker.hpp`
- [Recording session](https://github.com/ardev1161/libaudition/blob/main/include/audition/recording/source_recording_session.hpp): `include/audition/recording/source_recording_session.hpp`

### Events and analysis

- [Temporal event detector](https://github.com/ardev1161/libaudition/blob/main/src/pipeline/temporal_acoustic_event_detector.cpp): `src/pipeline/temporal_acoustic_event_detector.cpp`
- [Acoustic event assembler](https://github.com/ardev1161/libaudition/blob/main/src/pipeline/acoustic_event_assembler.cpp): `src/pipeline/acoustic_event_assembler.cpp`
- [Temporal pattern matching](https://github.com/ardev1161/libaudition/blob/main/include/audition/temporal/streaming_pattern_matcher.hpp): `include/audition/temporal/streaming_pattern_matcher.hpp`

### Identity and memory

- [Spatial identity](https://github.com/ardev1161/libaudition/blob/main/src/pipeline/spatial_identity.cpp): `src/pipeline/spatial_identity.cpp`
- [Identity resolver](https://github.com/ardev1161/libaudition/blob/main/src/memory/source_identity_resolver.cpp): `src/memory/source_identity_resolver.cpp`
- [Sound prototype matching](https://github.com/ardev1161/libaudition/blob/main/src/memory/sound_prototype_matcher.cpp): `src/memory/sound_prototype_matcher.cpp`

### Other components

- **Application**

## Connections

- Application → Audio buffers: provides audio (evidence: `README.md`)
- Application → Audio frontend: composes DSP (evidence: `README.md`)
- Application → Source classification: uses classification (evidence: `README.md`)
- Application → ODAS spatial engine: uses spatial analysis (evidence: `README.md`)
- Application → Per-source speech: uses speech (evidence: `README.md`)
- Application → Temporal event detector: uses event detection (evidence: `README.md`)
- Application → Temporal pattern matching: uses analysis (evidence: `README.md`)
- Application → Authenticity detection: uses authenticity (evidence: `README.md`)
- Application → Recording session: sets recording policy (evidence: `README.md`)
- ODAS spatial engine → ODAS runtime: processes audio (evidence: `backends/odas/src/odas_spatial_engine.cpp`)
- CLAP audio embedding → CLAP features: extracts features (evidence: `backends/clap/src/clap_audio_embedder.cpp`)
- Async speech ingress → Per-source speech: dispatches audio (evidence: `include/audition/speech/async_speech_ingress_worker.hpp`)
- Temporal event detector → Acoustic event assembler: composes transitions (evidence: `README.md`)
- Application → EfficientAT tagger: selects tagger (evidence: `README.md`)
- Application → YAMNet tagger: selects tagger (evidence: `README.md`)
- Application → CLAP audio embedding: selects adapter (evidence: `README.md`)
- Application → Identity resolver: composes identity (evidence: `README.md`)
- Application → Sound prototype matching: uses matching (evidence: `README.md`)
- Application → Spatial identity: composes identity (evidence: `README.md`)
- Application → WAV I/O: uses audio I/O (evidence: `README.md`)
