# arsonic-dev/voxera architecture

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

- Interactive diagram: https://gitdiagram.com/arsonic-dev/voxera
- Repository: https://github.com/arsonic-dev/voxera

## Overview

Voxera is a browser-based, full-duplex speech translation and debate interpreter. A participant joins a room, streams microphone audio, and receives live source captions, translated text, and synthesized audio; local playback can stop immediately on barge-in, while the server reports the heard boundary. Retractions and emotion/heat metadata are part of the conversation flow. The graph includes the documented provider integrations and mock modes; their detailed wiring is not fully shown in the sampled source, so those optional links cite the README.

Main entry points: [`web/src/App.tsx`](https://github.com/arsonic-dev/voxera/blob/main/web/src/App.tsx) (Room interface), [`server/src/pipeline.ts`](https://github.com/arsonic-dev/voxera/blob/main/server/src/pipeline.ts) (Participant pipeline), [`server/src/index.ts`](https://github.com/arsonic-dev/voxera/blob/main/server/src/index.ts) (HTTP and WebSocket), [`server/src/translate.ts`](https://github.com/arsonic-dev/voxera/blob/main/server/src/translate.ts) (Translation and metadata)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser conversation"]
  node_app["Room interface<br/>[App.tsx]"]
  node_capture["Mic capture<br/>[recorder.ts]"]
  node_player["Audio player<br/>[player.ts]"]
  node_barge["Barge-in detector<br/>[bargeIn.ts]"]
  node_gallery["Conversation gallery<br/>[Gallery.tsx]"]
end

subgraph group_server["Conversation server"]
  node_protocol["Message protocol<br/>[protocol.ts]"]
  node_gateway["HTTP and WebSocket<br/>[index.ts]"]
  node_rooms[("Room sessions<br/>[rooms.ts]")]
  node_pipeline["Participant pipeline<br/>[pipeline.ts]"]
end

subgraph group_speech["Speech services"]
  node_stt["Speech recognition<br/>[stt.ts]"]
  node_translation["Translation and metadata<br/>[translate.ts]"]
  node_tts["Speech synthesis<br/>[tts.ts]"]
end

subgraph group_providers["External providers"]
  node_speechprovider["Deepgram / ElevenLabs"]
  node_llmprovider["Anthropic / OpenRouter"]
end

node_speaker(("Participants"))

node_speaker -->|"uses"| node_app
node_app -->|"starts capture"| node_capture
node_capture -->|"streams PCM"| node_app
node_app -->|"sends WebSocket audio"| node_gateway
node_gateway -->|"joins participants"| node_rooms
node_gateway -->|"routes audio"| node_pipeline
node_pipeline -->|"sends room messages"| node_rooms
node_pipeline -->|"recognizes speech"| node_stt
node_pipeline -->|"translates segments"| node_translation
node_pipeline -->|"synthesizes audio"| node_tts
node_stt -->|"emits transcripts"| node_pipeline
node_translation -->|"streams translation"| node_pipeline
node_tts -.->|"streams audio"| node_pipeline
node_gateway -->|"handles messages"| node_protocol
node_app -->|"queues playback"| node_player
node_app -->|"monitors microphone"| node_barge
node_barge -->|"cuts playback"| node_player
node_player -->|"reports playback"| node_app
node_app -->|"renders gallery"| node_gallery
node_speaker -.->|"speech services"| node_speechprovider
node_translation -.->|"calls translation API"| node_llmprovider

click node_app "https://github.com/arsonic-dev/voxera/blob/main/web/src/App.tsx"
click node_capture "https://github.com/arsonic-dev/voxera/blob/main/web/src/audio/recorder.ts"
click node_player "https://github.com/arsonic-dev/voxera/blob/main/web/src/audio/player.ts"
click node_barge "https://github.com/arsonic-dev/voxera/blob/main/web/src/audio/bargeIn.ts"
click node_gallery "https://github.com/arsonic-dev/voxera/blob/main/web/src/Gallery.tsx"
click node_protocol "https://github.com/arsonic-dev/voxera/blob/main/shared/protocol.ts"
click node_gateway "https://github.com/arsonic-dev/voxera/blob/main/server/src/index.ts"
click node_rooms "https://github.com/arsonic-dev/voxera/blob/main/server/src/rooms.ts"
click node_pipeline "https://github.com/arsonic-dev/voxera/blob/main/server/src/pipeline.ts"
click node_stt "https://github.com/arsonic-dev/voxera/blob/main/server/src/stt.ts"
click node_translation "https://github.com/arsonic-dev/voxera/blob/main/server/src/translate.ts"
click node_tts "https://github.com/arsonic-dev/voxera/blob/main/server/src/tts.ts"

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_app,node_capture,node_player,node_barge,node_gallery toneBlue
class node_protocol,node_gateway,node_rooms,node_pipeline toneAmber
class node_stt,node_translation,node_tts toneMint
class node_speechprovider,node_llmprovider toneRose
class node_speaker toneIndigo
```

## Components

### Browser conversation

- [Room interface](https://github.com/arsonic-dev/voxera/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Mic capture](https://github.com/arsonic-dev/voxera/blob/main/web/src/audio/recorder.ts): `web/src/audio/recorder.ts`
- [Audio player](https://github.com/arsonic-dev/voxera/blob/main/web/src/audio/player.ts): `web/src/audio/player.ts`
- [Barge-in detector](https://github.com/arsonic-dev/voxera/blob/main/web/src/audio/bargeIn.ts): `web/src/audio/bargeIn.ts`
- [Conversation gallery](https://github.com/arsonic-dev/voxera/blob/main/web/src/Gallery.tsx): `web/src/Gallery.tsx`

### Conversation server

- [Message protocol](https://github.com/arsonic-dev/voxera/blob/main/shared/protocol.ts): `shared/protocol.ts`
- [HTTP and WebSocket](https://github.com/arsonic-dev/voxera/blob/main/server/src/index.ts): `server/src/index.ts`
- [Room sessions](https://github.com/arsonic-dev/voxera/blob/main/server/src/rooms.ts): `server/src/rooms.ts`
- [Participant pipeline](https://github.com/arsonic-dev/voxera/blob/main/server/src/pipeline.ts): `server/src/pipeline.ts`

### Speech services

- [Speech recognition](https://github.com/arsonic-dev/voxera/blob/main/server/src/stt.ts): `server/src/stt.ts`
- [Translation and metadata](https://github.com/arsonic-dev/voxera/blob/main/server/src/translate.ts): `server/src/translate.ts`
- [Speech synthesis](https://github.com/arsonic-dev/voxera/blob/main/server/src/tts.ts): `server/src/tts.ts`

### External providers

- **Deepgram / ElevenLabs**
- **Anthropic / OpenRouter**

### Other components

- **Participants**

## Connections

- Participants → Room interface: uses (evidence: `README.md`)
- Room interface → Mic capture: starts capture (evidence: `web/src/App.tsx`)
- Mic capture → Room interface: streams PCM (evidence: `web/src/audio/recorder.ts`)
- Room interface → HTTP and WebSocket: sends WebSocket audio (evidence: `web/src/App.tsx`)
- HTTP and WebSocket → Room sessions: joins participants (evidence: `server/src/index.ts`)
- HTTP and WebSocket → Participant pipeline: routes audio (evidence: `server/src/index.ts`)
- Participant pipeline → Room sessions: sends room messages (evidence: `server/src/pipeline.ts`)
- Participant pipeline → Speech recognition: recognizes speech (evidence: `server/src/pipeline.ts`)
- Participant pipeline → Translation and metadata: translates segments (evidence: `server/src/pipeline.ts`)
- Participant pipeline → Speech synthesis: synthesizes audio (evidence: `server/src/pipeline.ts`)
- Speech recognition → Participant pipeline: emits transcripts (evidence: `server/src/pipeline.ts`)
- Translation and metadata → Participant pipeline: streams translation (evidence: `server/src/pipeline.ts`)
- Speech synthesis → Participant pipeline: streams audio (evidence: `server/src/pipeline.ts`)
- HTTP and WebSocket → Message protocol: handles messages (evidence: `server/src/index.ts`)
- Room interface → Audio player: queues playback (evidence: `web/src/App.tsx`)
- Room interface → Barge-in detector: monitors microphone (evidence: `web/src/App.tsx`)
- Barge-in detector → Audio player: cuts playback (evidence: `web/src/audio/bargeIn.ts`)
- Audio player → Room interface: reports playback (evidence: `web/src/App.tsx`)
- Room interface → Conversation gallery: renders gallery (evidence: `web/src/App.tsx`)
- Participants → Deepgram / ElevenLabs: speech services (evidence: `README.md`)
- Translation and metadata → Anthropic / OpenRouter: calls translation API (evidence: `README.md`)
