# eembc/audiomark architecture

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

- Interactive diagram: https://gitdiagram.com/eembc/audiomark
- Repository: https://github.com/eembc/audiomark

## Overview

AudioMark is an embedded audio keyword-spotting benchmark. Its documented workflow takes two microphone signals through beamforming/direction finding, echo cancellation and noise reduction, MFCC feature extraction, and DS-CNN keyword classification. The benchmark coordinator and individual DSP implementations are named in the build excerpt, but their source bodies were not sampled; subsystem links follow the documented workflow. The ARM model and Speex echo-canceller source are present in the tree. Grouping distinguishes the audio pipeline, DSP internals, inference, and platform port. Some documented implementation paths are absent from the supplied tree, so they are not represented as source nodes.

Main entry points: [`src/ee_audiomark.c`](https://github.com/eembc/audiomark/blob/main/src/ee_audiomark.c) (Pipeline coordinator), [`src/ee_kws.c`](https://github.com/eembc/audiomark/blob/main/src/ee_kws.c) (Keyword spotting), [`src/ee_aec_f32.c`](https://github.com/eembc/audiomark/blob/main/src/ee_aec_f32.c) (Echo cancellation), [`src/ee_anr_f32.c`](https://github.com/eembc/audiomark/blob/main/src/ee_anr_f32.c) (Noise reduction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Audio pipeline"]
  node_coordinator["Pipeline coordinator<br/>[ee_audiomark.c]"]
  node_beamforming["Beamforming + DOA<br/>[ee_abf_f32.c]"]
  node_aec["Echo cancellation<br/>[ee_aec_f32.c]"]
  node_anr["Noise reduction<br/>[ee_anr_f32.c]"]
  node_mfcc["MFCC features<br/>[ee_mfcc_f32.c]"]
end

subgraph group_dsp["DSP internals"]
  node_speexaec["Speex MDF<br/>[mdf.c]"]
  node_speexanr["Speex preprocessing<br/>[preprocess.c]"]
end

subgraph group_inference["Keyword inference"]
  node_kws["Keyword spotting<br/>[ee_kws.c]"]
  node_nnweights["NN weights<br/>[ee_nn_tables.c]"]
  node_armmodel["ARM model port<br/>[ds_cnn_model.cpp]"]
end

subgraph group_platform["Platform runtime"]
  node_runner["Benchmark runner<br/>[main.c]"]
end

node_microphones(("Microphones"))
node_audioout(("Keyword result"))

node_microphones -->|"supplies audio"| node_coordinator
node_runner -->|"runs benchmark"| node_coordinator
node_coordinator -->|"processes channels"| node_beamforming
node_coordinator -->|"cancels echo"| node_aec
node_coordinator -->|"reduces noise"| node_anr
node_coordinator -->|"extracts features"| node_mfcc
node_coordinator -->|"classifies features"| node_kws
node_aec -->|"uses MDF"| node_speexaec
node_anr -->|"uses preprocessing"| node_speexanr
node_kws -->|"uses weights"| node_nnweights
node_kws -.->|"uses model port"| node_armmodel
node_kws -->|"returns keyword"| node_audioout

click node_runner "https://github.com/eembc/audiomark/blob/main/main.c"
click node_coordinator "https://github.com/eembc/audiomark/blob/main/src/ee_audiomark.c"
click node_beamforming "https://github.com/eembc/audiomark/blob/main/src/ee_abf_f32.c"
click node_aec "https://github.com/eembc/audiomark/blob/main/src/ee_aec_f32.c"
click node_anr "https://github.com/eembc/audiomark/blob/main/src/ee_anr_f32.c"
click node_mfcc "https://github.com/eembc/audiomark/blob/main/src/ee_mfcc_f32.c"
click node_kws "https://github.com/eembc/audiomark/blob/main/src/ee_kws.c"
click node_nnweights "https://github.com/eembc/audiomark/blob/main/src/ee_nn_tables.c"
click node_armmodel "https://github.com/eembc/audiomark/blob/main/ports/arm/ds_cnn_model.cpp"
click node_speexaec "https://github.com/eembc/audiomark/blob/main/lib/speexdsp/libspeexdsp/mdf.c"
click node_speexanr "https://github.com/eembc/audiomark/blob/main/lib/speexdsp/libspeexdsp/preprocess.c"

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_coordinator,node_beamforming,node_aec,node_anr,node_mfcc toneBlue
class node_speexaec,node_speexanr toneAmber
class node_kws,node_nnweights,node_armmodel toneMint
class node_runner toneRose
class node_microphones,node_audioout toneIndigo
```

## Components

### Audio pipeline

- [Pipeline coordinator](https://github.com/eembc/audiomark/blob/main/src/ee_audiomark.c): `src/ee_audiomark.c`
- [Beamforming + DOA](https://github.com/eembc/audiomark/blob/main/src/ee_abf_f32.c): `src/ee_abf_f32.c`
- [Echo cancellation](https://github.com/eembc/audiomark/blob/main/src/ee_aec_f32.c): `src/ee_aec_f32.c`
- [Noise reduction](https://github.com/eembc/audiomark/blob/main/src/ee_anr_f32.c): `src/ee_anr_f32.c`
- [MFCC features](https://github.com/eembc/audiomark/blob/main/src/ee_mfcc_f32.c): `src/ee_mfcc_f32.c`

### DSP internals

- [Speex MDF](https://github.com/eembc/audiomark/blob/main/lib/speexdsp/libspeexdsp/mdf.c): `lib/speexdsp/libspeexdsp/mdf.c`
- [Speex preprocessing](https://github.com/eembc/audiomark/blob/main/lib/speexdsp/libspeexdsp/preprocess.c): `lib/speexdsp/libspeexdsp/preprocess.c`

### Keyword inference

- [Keyword spotting](https://github.com/eembc/audiomark/blob/main/src/ee_kws.c): `src/ee_kws.c`
- [NN weights](https://github.com/eembc/audiomark/blob/main/src/ee_nn_tables.c): `src/ee_nn_tables.c`
- [ARM model port](https://github.com/eembc/audiomark/blob/main/ports/arm/ds_cnn_model.cpp): `ports/arm/ds_cnn_model.cpp`

### Platform runtime

- [Benchmark runner](https://github.com/eembc/audiomark/blob/main/main.c): `main.c`

### Other components

- **Microphones**
- **Keyword result**

## Connections

- Microphones → Pipeline coordinator: supplies audio
- Benchmark runner → Pipeline coordinator: runs benchmark
- Pipeline coordinator → Beamforming + DOA: processes channels
- Pipeline coordinator → Echo cancellation: cancels echo
- Pipeline coordinator → Noise reduction: reduces noise
- Pipeline coordinator → MFCC features: extracts features
- Pipeline coordinator → Keyword spotting: classifies features
- Echo cancellation → Speex MDF: uses MDF
- Noise reduction → Speex preprocessing: uses preprocessing
- Keyword spotting → NN weights: uses weights
- Keyword spotting → ARM model port: uses model port
- Keyword spotting → Keyword result: returns keyword
