# shivammathtech/smart-glasses-vision architecture

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

- Interactive diagram: https://gitdiagram.com/shivammathtech/smart-glasses-vision
- Repository: https://github.com/shivammathtech/smart-glasses-vision

## Overview

This ESP32-S3 smart-glasses firmware aims to turn spoken input into translated text, show it on an OLED, and provide audio output. The README also describes camera-based OCR translation and Wi-Fi connectivity. The sampled code confirms translation requests to MyMemory and display, Wi-Fi, speech, audio, and camera modules, but speech, audio, and camera behavior is partly placeholder code. The main sketch and wiring guide are listed but were not sampled, so their runtime wiring is not asserted here.

Main entry points: [`firmware/translator.cpp`](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/translator.cpp) (Text translation), [`firmware/smart_glasses.ino`](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/smart_glasses.ino) (Firmware entry), [`firmware/speech.cpp`](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/speech.cpp) (Speech recognition), [`firmware/display_manager.cpp`](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/display_manager.cpp) (OLED display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_app["Firmware entry<br/>[smart_glasses.ino]"]
  node_display["OLED display"]
  node_audio["Audio output<br/>[audio_output.cpp]"]
end

subgraph group_language["Language processing"]
  node_speech["Speech recognition<br/>[speech.cpp]"]
  node_translator["Text translation<br/>[translator.cpp]"]
end

subgraph group_device["Device services"]
  node_camera["Camera support<br/>[camera_manager.cpp]"]
  node_wifi["Wi-Fi connection<br/>[wifi_manager.cpp]"]
  node_battery["Battery interface<br/>[battery_manager.h]"]
end

node_user(("Glasses user"))
node_mymemory["MyMemory API"]

node_user -->|"speaks to"| node_app
node_app -->|"captures speech"| node_speech
node_speech -->|"recognized text"| node_translator
node_translator -->|"requests translation"| node_mymemory
node_mymemory -->|"returns translation"| node_translator
node_translator -->|"translated text"| node_display
node_translator -->|"translated text"| node_audio

click node_app "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/smart_glasses.ino"
click node_speech "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/speech.cpp"
click node_translator "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/translator.cpp"
click node_display "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/display_manager.cpp"
click node_audio "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/audio_output.cpp"
click node_camera "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/camera_manager.cpp"
click node_wifi "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/wifi_manager.cpp"
click node_battery "https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/battery_manager.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_app,node_display,node_audio,node_user toneBlue
class node_speech,node_translator toneAmber
class node_camera,node_wifi,node_battery,node_mymemory toneMint
```

## Components

### User interaction

- [Firmware entry](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/smart_glasses.ino): `firmware/smart_glasses.ino`
- [OLED display](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/display_manager.cpp): `firmware/display_manager.cpp`
- [Audio output](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/audio_output.cpp): `firmware/audio_output.cpp`

### Language processing

- [Speech recognition](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/speech.cpp): `firmware/speech.cpp`
- [Text translation](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/translator.cpp): `firmware/translator.cpp`

### Device services

- [Camera support](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/camera_manager.cpp): `firmware/camera_manager.cpp`
- [Wi-Fi connection](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/wifi_manager.cpp): `firmware/wifi_manager.cpp`
- [Battery interface](https://github.com/shivammathtech/smart-glasses-vision/blob/main/firmware/battery_manager.h): `firmware/battery_manager.h`

### Other components

- **Glasses user**
- **MyMemory API**

## Connections

- Glasses user → Firmware entry: speaks to
- Firmware entry → Speech recognition: captures speech
- Speech recognition → Text translation: recognized text
- Text translation → MyMemory API: requests translation
- MyMemory API → Text translation: returns translation
- Text translation → OLED display: translated text
- Text translation → Audio output: translated text
