# mo7yw4ng/gemini-teacher architecture

> Architecture diagram of the GitHub repository mo7yw4ng/gemini-teacher, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mo7yw4ng/gemini-teacher
- Repository: https://github.com/mo7yw4ng/gemini-teacher

## Overview

##### Client-Side Components
- A microphone input component
- An audio processing module for real-time speech capture

##### Core Processing Components
- Speech Recognition Service
- Gemini AI Integration Module
- ElevenLabs Text-to-Speech Service (optional component)

##### External Services
- Google Gemini API
- ElevenLabs API (as an optional component)

##### Component Relationships
- User Speech → Microphone Input → Speech Recognition
- Speech Recognition → Gemini AI Processing
- Gemini AI → Response Generation
- Response → Text/Voice Output (if ElevenLabs is enabled)

##### Specific Elements

**[User Input] → [Microphone Component]**
- ↓
**[Speech Recognition Module]**
- ↓
**[Core Processing Engine]**
- ↙          ↘
**[Gemini API]  [ElevenLabs API]***
- ↘          ↙
**[Response Handler]**
- ↓
**[User Interface Output]**

##### Additional Details
- An environment configuration block showing .env integration
- Real-time processing paths

##### Technical Specifications to Note
- Python 3.11+ runtime environment
- API key management system
- Audio processing dependencies
- Network connectivity requirements

##### System Boundaries
- Local system components
- Distinguish external API services
- Security boundaries where API keys are required

Remember to:
- Use consistent symbols throughout
- Version dependencies
- Error handling paths
- Configuration points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph User
        UI[User Interface]
        MIC[Microphone Input]
    end

    subgraph Local_Processing
        SR[Speech Recognition Module]
        CPE[Core Processing Engine]:::core
        RH[Response Handler]
        CFG[Configuration Manager]:::config
    end

    subgraph External_Services
        GEM[Gemini API]:::external
        EL[ElevenLabs API]:::external_optional
    end

    UI --> MIC
    MIC --> SR
    SR --> CPE
    CPE --> |AI Query| GEM
    CPE --> |Optional TTS| EL
    GEM --> RH
    EL --> RH
    RH --> UI
    CFG --> CPE

    click CPE "https://github.com/MO7YW4NG/gemini-teacher/blob/master/starter.py"
    click CFG "https://github.com/MO7YW4NG/gemini-teacher/blob/master/.env.example"

    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef core fill:#90EE90,stroke:#333,stroke-width:2px
    classDef config fill:#ADD8E6,stroke:#333,stroke-width:2px
    classDef external fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef external_optional fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Core Component]:::core
        L2[Configuration]:::config
        L3[External Service]:::external
        L4[Optional Service]:::external_optional
    end
```
