# sven-0414/n8n architecture

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

- Interactive diagram: https://gitdiagram.com/sven-0414/n8n
- Repository: https://github.com/sven-0414/n8n

## Overview

This repository documents a local n8n-driven media transcription pipeline. New media is detected by n8n, processed by a FastAPI service through audio extraction and speech recognition, then cleaned by an Ollama language model. Results are saved under out/ and the original is moved to done/. The tree contains outputs and configuration but no application source, so component paths are null where no implementation path is present; relationships are based on the README only.

Main entry points: [`out`](https://github.com/sven-0414/n8n/tree/main/out) (Raw Transcript)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_n8n["n8n Watcher"]
  node_fastapi["FastAPI Service"]
end

subgraph group_processing["Media Processing"]
  node_ffmpeg["ffmpeg Extraction"]
  node_whisper["whisper.cpp"]
  node_vad["Silero VAD"]
  node_ollama["Ollama Cleanup"]
end

subgraph group_outputs["Transcript Outputs"]
  node_raw["Raw Transcript"]
  node_subtitles["SRT Subtitles"]
  node_cleaned["Cleaned Transcript"]
  node_done["Processed Media"]
end

node_file_source(("Incoming Media"))

node_file_source -->|"arrives in inbox"| node_n8n
node_n8n -->|"calls"| node_fastapi
node_fastapi -->|"extracts audio"| node_ffmpeg
node_fastapi -->|"sends audio"| node_whisper
node_whisper -->|"skips silence"| node_vad
node_whisper -->|"writes text"| node_raw
node_whisper -->|"writes timestamps"| node_subtitles
node_fastapi -->|"sends transcript"| node_ollama
node_ollama -->|"writes cleaned text"| node_cleaned
node_n8n -->|"moves original"| node_done

click node_raw "https://github.com/sven-0414/n8n/tree/main/out"
click node_subtitles "https://github.com/sven-0414/n8n/tree/main/out"
click node_cleaned "https://github.com/sven-0414/n8n/tree/main/out"

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_n8n,node_fastapi toneBlue
class node_ffmpeg,node_whisper,node_vad,node_ollama toneAmber
class node_raw,node_subtitles,node_cleaned,node_done toneMint
class node_file_source toneIndigo
```

## Components

### Orchestration

- **n8n Watcher**
- **FastAPI Service**

### Media Processing

- **ffmpeg Extraction**
- **whisper.cpp**
- **Silero VAD**
- **Ollama Cleanup**

### Transcript Outputs

- [Raw Transcript](https://github.com/sven-0414/n8n/tree/main/out): `out`
- [SRT Subtitles](https://github.com/sven-0414/n8n/tree/main/out): `out`
- [Cleaned Transcript](https://github.com/sven-0414/n8n/tree/main/out): `out`
- **Processed Media**

### Other components

- **Incoming Media**

## Connections

- Incoming Media → n8n Watcher: arrives in inbox (evidence: `README.md`)
- n8n Watcher → FastAPI Service: calls (evidence: `README.md`)
- FastAPI Service → ffmpeg Extraction: extracts audio (evidence: `README.md`)
- FastAPI Service → whisper.cpp: sends audio (evidence: `README.md`)
- whisper.cpp → Silero VAD: skips silence (evidence: `README.md`)
- whisper.cpp → Raw Transcript: writes text (evidence: `README.md`)
- whisper.cpp → SRT Subtitles: writes timestamps (evidence: `README.md`)
- FastAPI Service → Ollama Cleanup: sends transcript (evidence: `README.md`)
- Ollama Cleanup → Cleaned Transcript: writes cleaned text (evidence: `README.md`)
- n8n Watcher → Processed Media: moves original (evidence: `README.md`)
