# hayko588/audiostream architecture

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

- Interactive diagram: https://gitdiagram.com/hayko588/audiostream
- Repository: https://github.com/hayko588/audiostream

## Overview

This small application streams live audio over UDP: the sender captures audio and transmits chunks; the receiver accepts datagrams and plays them. Shared configuration supplies network and audio parameters. The UDP path between the two processes is inferred from their socket behavior, not shown as a direct call.

Main entry points: [`app/audiostream/sender.py`](https://github.com/hayko588/audiostream/blob/main/app/audiostream/sender.py) (Audio sender), [`app/audiostream/receiver.py`](https://github.com/hayko588/audiostream/blob/main/app/audiostream/receiver.py) (Audio receiver), [`app/audiostream/config.py`](https://github.com/hayko588/audiostream/blob/main/app/audiostream/config.py) (Stream settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Audio streaming"]
  node_sender["Audio sender<br/>[sender.py]"]
  node_config["Stream settings<br/>[config.py]"]
  node_receiver["Audio receiver<br/>[receiver.py]"]
end

node_user(("Operator"))
node_network["UDP network"]
node_input["Audio input"]
node_output["Audio output"]

node_user -->|"runs"| node_sender
node_sender -->|"reads settings"| node_config
node_receiver -->|"reads settings"| node_config
node_sender -->|"captures audio"| node_input
node_sender -->|"sends datagrams"| node_network
node_network -.->|"delivers datagrams"| node_receiver
node_receiver -->|"plays audio"| node_output

click node_sender "https://github.com/hayko588/audiostream/blob/main/app/audiostream/sender.py"
click node_config "https://github.com/hayko588/audiostream/blob/main/app/audiostream/config.py"
click node_receiver "https://github.com/hayko588/audiostream/blob/main/app/audiostream/receiver.py"

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_sender,node_config,node_receiver toneBlue
class node_user,node_network,node_input,node_output toneIndigo
```

## Components

### Audio streaming

- [Audio sender](https://github.com/hayko588/audiostream/blob/main/app/audiostream/sender.py): `app/audiostream/sender.py`
- [Stream settings](https://github.com/hayko588/audiostream/blob/main/app/audiostream/config.py): `app/audiostream/config.py`
- [Audio receiver](https://github.com/hayko588/audiostream/blob/main/app/audiostream/receiver.py): `app/audiostream/receiver.py`

### Other components

- **Operator**
- **UDP network**
- **Audio input**
- **Audio output**

## Connections

- Operator → Audio sender: runs (evidence: `app/audiostream/sender.py`)
- Audio sender → Stream settings: reads settings (evidence: `app/audiostream/sender.py`)
- Audio receiver → Stream settings: reads settings (evidence: `app/audiostream/receiver.py`)
- Audio sender → Audio input: captures audio (evidence: `app/audiostream/sender.py`)
- Audio sender → UDP network: sends datagrams (evidence: `app/audiostream/sender.py`)
- UDP network → Audio receiver: delivers datagrams
- Audio receiver → Audio output: plays audio (evidence: `app/audiostream/receiver.py`)
