# rumman999/deskbee-lab-project architecture

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

- Interactive diagram: https://gitdiagram.com/rumman999/deskbee-lab-project
- Repository: https://github.com/rumman999/deskbee-lab-project

## Overview

DeskBEE is a two-device desk companion: ESP32-S3 firmware handles interaction, the Pomodoro timer, sensors, display and audio, while a local PC process recognizes voice commands offline. The voice workflow sends gated microphone audio to the PC, transcribes and matches keywords, then returns a command that triggers a room reading and spoken response. The README documents the timer, wake behavior and expressive display as additional firmware capabilities. Firmware internals were not sampled, so those relationships rely on README evidence.

Main entry points: [`sketch_sep26a.ino`](https://github.com/rumman999/deskbee-lab-project/blob/main/sketch_sep26a.ino) (UI and Timer), [`voice_pipeline.py`](https://github.com/rumman999/deskbee-lab-project/blob/main/voice_pipeline.py) (Voice Pipeline), [`room_details_audio.h`](https://github.com/rumman999/deskbee-lab-project/blob/main/room_details_audio.h) (Spoken Reply Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["ESP32 Firmware"]
  node_firmware_ui["UI and Timer<br/>[sketch_sep26a.ino]"]
  node_firmware_audio["Audio Capture<br/>[sketch_sep26a.ino]"]
  node_serial["Serial Protocol<br/>[sketch_sep26a.ino]"]
end

subgraph group_voice["Offline Voice"]
  node_pc_pipeline["Voice Pipeline<br/>[voice_pipeline.py]"]
  node_whisper["Faster-Whisper"]
  node_keyword_match["Keyword Match<br/>[voice_pipeline.py]"]
end

subgraph group_room["Room Response"]
  node_dht["DHT11 Sensor"]
  node_oled["OLED Display"]
  node_reply_audio["Spoken Reply Data"]
end

node_user(("User"))
node_encoder["Rotary Encoder"]
node_vibration["Vibration Sensor"]
node_microphone["I2S Microphone"]
node_speaker["Speaker Output"]
node_buzzer["Buzzer"]

node_user -->|"turns or presses"| node_encoder
node_user -->|"taps desk"| node_vibration
node_encoder -->|"sets timer"| node_firmware_ui
node_vibration -->|"wakes"| node_firmware_ui
node_user -->|"speaks"| node_microphone
node_microphone -->|"captures audio"| node_firmware_audio
node_firmware_audio -->|"sends gated audio"| node_serial
node_serial -->|"streams audio"| node_pc_pipeline
node_pc_pipeline -->|"transcribes audio"| node_whisper
node_whisper -->|"returns transcript"| node_keyword_match
node_keyword_match -->|"sends command"| node_serial
node_serial -->|"dispatches command"| node_firmware_ui
node_firmware_ui -->|"reads room data"| node_dht
node_firmware_ui -->|"shows room details"| node_oled
node_firmware_ui -->|"plays reply data"| node_reply_audio
node_reply_audio -->|"provides spoken audio"| node_speaker
node_firmware_ui -->|"sounds timer alerts"| node_buzzer
node_firmware_ui -->|"renders timer and face"| node_oled

click node_firmware_ui "https://github.com/rumman999/deskbee-lab-project/blob/main/sketch_sep26a.ino"
click node_firmware_audio "https://github.com/rumman999/deskbee-lab-project/blob/main/sketch_sep26a.ino"
click node_serial "https://github.com/rumman999/deskbee-lab-project/blob/main/sketch_sep26a.ino"
click node_pc_pipeline "https://github.com/rumman999/deskbee-lab-project/blob/main/voice_pipeline.py"
click node_keyword_match "https://github.com/rumman999/deskbee-lab-project/blob/main/voice_pipeline.py"
click node_reply_audio "https://github.com/rumman999/deskbee-lab-project/blob/main/room_details_audio.h"

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_firmware_ui,node_firmware_audio,node_serial,node_user toneBlue
class node_pc_pipeline,node_whisper,node_keyword_match toneAmber
class node_dht,node_oled,node_reply_audio toneMint
class node_encoder,node_vibration,node_microphone,node_speaker,node_buzzer toneIndigo
```

## Components

### ESP32 Firmware

- [UI and Timer](https://github.com/rumman999/deskbee-lab-project/blob/main/sketch_sep26a.ino): `sketch_sep26a.ino`
- [Audio Capture](https://github.com/rumman999/deskbee-lab-project/blob/main/sketch_sep26a.ino): `sketch_sep26a.ino`
- [Serial Protocol](https://github.com/rumman999/deskbee-lab-project/blob/main/sketch_sep26a.ino): `sketch_sep26a.ino`

### Offline Voice

- [Voice Pipeline](https://github.com/rumman999/deskbee-lab-project/blob/main/voice_pipeline.py): `voice_pipeline.py`
- **Faster-Whisper**
- [Keyword Match](https://github.com/rumman999/deskbee-lab-project/blob/main/voice_pipeline.py): `voice_pipeline.py`

### Room Response

- **DHT11 Sensor**
- **OLED Display**
- [Spoken Reply Data](https://github.com/rumman999/deskbee-lab-project/blob/main/room_details_audio.h): `room_details_audio.h`

### Other components

- **User**
- **Rotary Encoder**
- **Vibration Sensor**
- **I2S Microphone**
- **Speaker Output**
- **Buzzer**

## Connections

- User → Rotary Encoder: turns or presses (evidence: `README.md`)
- User → Vibration Sensor: taps desk (evidence: `README.md`)
- Rotary Encoder → UI and Timer: sets timer (evidence: `README.md`)
- Vibration Sensor → UI and Timer: wakes (evidence: `README.md`)
- User → I2S Microphone: speaks (evidence: `README.md`)
- I2S Microphone → Audio Capture: captures audio (evidence: `README.md`)
- Audio Capture → Serial Protocol: sends gated audio (evidence: `README.md`)
- Serial Protocol → Voice Pipeline: streams audio (evidence: `README.md`)
- Voice Pipeline → Faster-Whisper: transcribes audio (evidence: `voice_pipeline.py`)
- Faster-Whisper → Keyword Match: returns transcript (evidence: `voice_pipeline.py`)
- Keyword Match → Serial Protocol: sends command (evidence: `README.md`)
- Serial Protocol → UI and Timer: dispatches command (evidence: `README.md`)
- UI and Timer → DHT11 Sensor: reads room data (evidence: `README.md`)
- UI and Timer → OLED Display: shows room details (evidence: `README.md`)
- UI and Timer → Spoken Reply Data: plays reply data (evidence: `README.md`)
- Spoken Reply Data → Speaker Output: provides spoken audio (evidence: `README.md`)
- UI and Timer → Buzzer: sounds timer alerts (evidence: `README.md`)
- UI and Timer → OLED Display: renders timer and face (evidence: `README.md`)
