# fatehmtd/vasdk architecture

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

- Interactive diagram: https://gitdiagram.com/fatehmtd/vasdk
- Repository: https://github.com/fatehmtd/vasdk
- Video tour (about a minute): https://gitdiagram.com/fatehmtd/vasdk/video

## Overview

VASDK is a cross-platform C++ voice-assistant framework: applications assemble typed-frame processors and interchangeable speech, reasoning, and transport providers into a voice loop. The documented path runs from audio input through VAD, turn detection, transcription, LLM/tool dispatch, and speech synthesis to audio output. A separate call-center workflow classifies intent, fills goal slots across turns, confirms actions, and can escalate or resume persisted sessions. The graph also includes Android integration, context, and metrics; unsampled provider wiring is represented only where the README documents it.

Main entry points: [`VASDK/src/TranscriptionProcessor.cpp`](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TranscriptionProcessor.cpp) (Transcription), [`VASDK/src/TTSFrameProcessor.cpp`](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TTSFrameProcessor.cpp) (Speech Synthesis), [`VASDK/src/llm/LLMProcessor.cpp`](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/llm/LLMProcessor.cpp) (LLM Reasoning), [`VASDK/src/VADFrameProcessor.cpp`](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/VADFrameProcessor.cpp) (Voice Detection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Pipeline Runtime"]
  node_audio_in["Audio Input"]
  node_pipeline["Pipeline Runtime<br/>[Pipeline.cpp]"]
  node_audio_out["Audio Output"]
  node_transport["Transports"]
end

subgraph group_speech["Voice Providers"]
  node_vad["Voice Detection"]
  node_turn["Turn Detection"]
  node_stt["Transcription"]
  node_stt_backends["STT Providers"]
  node_tts["Speech Synthesis"]
  node_tts_backends["TTS Providers"]
end

subgraph group_agent["Agent Features"]
  node_reason["LLM Reasoning<br/>[LLMProcessor.cpp]"]
  node_tool_dispatch["Tool Dispatch"]
  node_intent["Intent Routing<br/>[IntentRouter.cpp]"]
  node_goal["Goal Manager<br/>[GoalManager.cpp]"]
  node_goal_state[("Goal Persistence")]
end

subgraph group_apps["Applications"]
  node_callcenter["Call Center App"]
  node_android["Android Assistant<br/>[MainActivity.kt]"]
  node_android_engine["Android Engine<br/>[VasdkEngine.kt]"]
  node_model_download["Model Download"]
end

subgraph group_support["Runtime Services"]
  node_context["Context Aggregation"]
  node_metrics["Metrics Reporting"]
end

node_speaker(("Voice User"))

node_speaker -->|"speaks to"| node_audio_in
node_audio_in -->|"audio frames"| node_vad
node_vad -->|"detects speech"| node_turn
node_turn -->|"detects turn"| node_stt
node_stt -->|"transcribes for"| node_reason
node_stt -.->|"uses provider"| node_stt_backends
node_reason -->|"dispatches tools"| node_tool_dispatch
node_reason -->|"sends response"| node_tts
node_tts -.->|"uses provider"| node_tts_backends
node_tts -->|"audio frames"| node_audio_out
node_audio_out -->|"plays audio"| node_speaker
node_pipeline -->|"chains processors"| node_vad
node_callcenter -->|"classifies intent"| node_intent
node_intent -->|"activates goal"| node_goal
node_goal -->|"persists session"| node_goal_state
node_android -->|"starts engine"| node_android_engine
node_android -->|"starts download"| node_model_download
node_android_engine -.->|"configures transport"| node_transport

click node_audio_in "https://github.com/fatehmtd/vasdk/blob/master/VASDK/include/VASDK/TransportInputProcessor.h"
click node_pipeline "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/Pipeline.cpp"
click node_vad "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/VADFrameProcessor.cpp"
click node_turn "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TurnDetectionProcessor.cpp"
click node_stt "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TranscriptionProcessor.cpp"
click node_stt_backends "https://github.com/fatehmtd/vasdk/tree/master/VASDK_3P_IMPL"
click node_reason "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/llm/LLMProcessor.cpp"
click node_tool_dispatch "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/llm/ToolDispatchProcessor.cpp"
click node_tts "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TTSFrameProcessor.cpp"
click node_tts_backends "https://github.com/fatehmtd/vasdk/tree/master/VASDK_3P_IMPL"
click node_audio_out "https://github.com/fatehmtd/vasdk/blob/master/VASDK/include/VASDK/TransportOutputProcessor.h"
click node_transport "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TransportFactory.cpp"
click node_callcenter "https://github.com/fatehmtd/vasdk/blob/master/VASDK_CALLCENTER_APP/callcenter_pipeline.cpp"
click node_intent "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/goal/IntentRouter.cpp"
click node_goal "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/goal/GoalManager.cpp"
click node_goal_state "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/goal/GoalStatePersistence.cpp"
click node_context "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/context/ContextAggregator.cpp"
click node_metrics "https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/MetricsReporter.cpp"
click node_android "https://github.com/fatehmtd/vasdk/blob/master/VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/MainActivity.kt"
click node_android_engine "https://github.com/fatehmtd/vasdk/blob/master/VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/VasdkEngine.kt"
click node_model_download "https://github.com/fatehmtd/vasdk/blob/master/VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/services/ModelDownloadService.kt"

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_in,node_pipeline,node_audio_out,node_transport,node_speaker toneBlue
class node_vad,node_turn,node_stt,node_stt_backends,node_tts,node_tts_backends toneAmber
class node_reason,node_tool_dispatch,node_intent,node_goal,node_goal_state toneMint
class node_callcenter,node_android,node_android_engine,node_model_download toneRose
class node_context,node_metrics toneIndigo
```

## Components

### Pipeline Runtime

- [Audio Input](https://github.com/fatehmtd/vasdk/blob/master/VASDK/include/VASDK/TransportInputProcessor.h): `VASDK/include/VASDK/TransportInputProcessor.h`
- [Pipeline Runtime](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/Pipeline.cpp): `VASDK/src/Pipeline.cpp`
- [Audio Output](https://github.com/fatehmtd/vasdk/blob/master/VASDK/include/VASDK/TransportOutputProcessor.h): `VASDK/include/VASDK/TransportOutputProcessor.h`
- [Transports](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TransportFactory.cpp): `VASDK/src/TransportFactory.cpp`

### Voice Providers

- [Voice Detection](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/VADFrameProcessor.cpp): `VASDK/src/VADFrameProcessor.cpp`
- [Turn Detection](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TurnDetectionProcessor.cpp): `VASDK/src/TurnDetectionProcessor.cpp`
- [Transcription](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TranscriptionProcessor.cpp): `VASDK/src/TranscriptionProcessor.cpp`
- [STT Providers](https://github.com/fatehmtd/vasdk/tree/master/VASDK_3P_IMPL): `VASDK_3P_IMPL`
- [Speech Synthesis](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/TTSFrameProcessor.cpp): `VASDK/src/TTSFrameProcessor.cpp`
- [TTS Providers](https://github.com/fatehmtd/vasdk/tree/master/VASDK_3P_IMPL): `VASDK_3P_IMPL`

### Agent Features

- [LLM Reasoning](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/llm/LLMProcessor.cpp): `VASDK/src/llm/LLMProcessor.cpp`
- [Tool Dispatch](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/llm/ToolDispatchProcessor.cpp): `VASDK/src/llm/ToolDispatchProcessor.cpp`
- [Intent Routing](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/goal/IntentRouter.cpp): `VASDK/src/goal/IntentRouter.cpp`
- [Goal Manager](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/goal/GoalManager.cpp): `VASDK/src/goal/GoalManager.cpp`
- [Goal Persistence](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/goal/GoalStatePersistence.cpp): `VASDK/src/goal/GoalStatePersistence.cpp`

### Applications

- [Call Center App](https://github.com/fatehmtd/vasdk/blob/master/VASDK_CALLCENTER_APP/callcenter_pipeline.cpp): `VASDK_CALLCENTER_APP/callcenter_pipeline.cpp`
- [Android Assistant](https://github.com/fatehmtd/vasdk/blob/master/VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/MainActivity.kt): `VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/MainActivity.kt`
- [Android Engine](https://github.com/fatehmtd/vasdk/blob/master/VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/VasdkEngine.kt): `VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/VasdkEngine.kt`
- [Model Download](https://github.com/fatehmtd/vasdk/blob/master/VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/services/ModelDownloadService.kt): `VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/services/ModelDownloadService.kt`

### Runtime Services

- [Context Aggregation](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/context/ContextAggregator.cpp): `VASDK/src/context/ContextAggregator.cpp`
- [Metrics Reporting](https://github.com/fatehmtd/vasdk/blob/master/VASDK/src/MetricsReporter.cpp): `VASDK/src/MetricsReporter.cpp`

### Other components

- **Voice User**

## Connections

- Voice User → Audio Input: speaks to
- Audio Input → Voice Detection: audio frames
- Voice Detection → Turn Detection: detects speech
- Turn Detection → Transcription: detects turn
- Transcription → LLM Reasoning: transcribes for
- Transcription → STT Providers: uses provider
- LLM Reasoning → Tool Dispatch: dispatches tools
- LLM Reasoning → Speech Synthesis: sends response
- Speech Synthesis → TTS Providers: uses provider
- Speech Synthesis → Audio Output: audio frames
- Audio Output → Voice User: plays audio
- Pipeline Runtime → Voice Detection: chains processors (evidence: `VASDK/src/Pipeline.cpp`)
- Call Center App → Intent Routing: classifies intent
- Intent Routing → Goal Manager: activates goal
- Goal Manager → Goal Persistence: persists session
- Android Assistant → Android Engine: starts engine (evidence: `VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/MainActivity.kt`)
- Android Assistant → Model Download: starts download (evidence: `VASDK_ANDROID/app/src/main/kotlin/com/vasdk/android/MainActivity.kt`)
- Android Engine → Transports: configures transport
