How ezellm/echosee works
Project Type and Purpose
• EchoSee is an open‑source, modular voice‑assistant pipeline (not a full‑stack web app or compiler). Its goal is to provide a conversational assistant by integrating speech‑to‑text, language‑model agents, event scheduling, and text‑to‑speech.
File Structure
• Top‑level directories/modules:
• agent_management – manages conversational agents and tools (e.g., LeetCode helper)
• event_manager – schedules and dispatches timed callbacks
• app_manager – orchestration of the main capture→process→respond loop
• stt – speech‑to‑text interface
• tts – text‑to‑speech interface
• logger – centralized logging
• utils – configuration loading, LLM initialization, environment setup
• Configuration files: config.yml (runtime settings), CONSTANTS.py, requirements.txt, setup scripts
• Assets: alarm sound file
README for Architectural Insights
• The “Application Manager” drives the main loop: STT → Agent → TTS
• Agent Management interacts with Event Manager and external APIs (OpenAI, LeetCode)
• Event Manager uses a heap‑based scheduler for alarms and recurring tasks
• Utilities handle environment setup and graceful shutdown
1. Input Layer
• Microphone / Keyboard (User Interface)
• STT Module (stt/stt.py)
2. Core Processing
• Application Manager (app_manager/manager.py)
• Agent Management
• Agent Manager (agent_management/agent_manager.py)
• Agents & Tools
– LeetCode API helper (agent_management/helpers/LeetCode)
• Event Manager (event_manager/event_manager.py & callbacks.py)
3. Output Layer
• TTS Module (tts/tts.py)
• Audio Output (Speaker)
4. Support Services
• Logger (logger/logger.py)
• Utils & Config Loader (utils/utils.py, config.yml)
• Persistent Storage: logs/ directory
5. External Services
• OpenAI APIs (STT, LLM, TTS)
• LeetCode API
b. Relationships and Data Flow
• Logger attaches to every major handoff (STT → Agent → Event → TTS)
• Utils/config loaded at startup by Application Manager
c. Key Architectural Patterns & Principles
• Modular separation of concerns (STT, Agent logic, Event scheduling, TTS)
• Plugin‑style agents and helpers for extensibility (e.g., add new tools under agent_management/helpers)
• Publisher‑subscriber or callback pattern in Event Manager for alarms
• Single orchestration layer (app_manager) to avoid circular dependencies
• Centralized configuration and environment setup
d. Relevant Technologies & Frameworks
• Python 3 modules
• OpenAI APIs (LLM, STT, GPT‑4o‑mini‑tts)
• Kokoro TTS option for edge devices
• Python’s heapq for scheduling in Event Manager
• YAML for config (config.yml)
• Logging module writing to logs/