How franklyc/eidolon-assist works
Main Components
• User Interface (UI): This is represented by the web files (index.html, main.js, particles.js, styles.css) that provide a modern, gradient-rich, and blur-effect enhanced front-end.
• Application Entry Point & Core Logic: The eidolon_assist.py file is your main Python script that ties together the overall functionality.
• Configuration & Settings Module: Managed via dialogs from the application to set API keys, voice selections, hotkeys, and more. The pyproject.toml file also plays a role in project configuration.
• Multimodal Input Processors:
• Voice Input Module: Captures audio based on hotkeys (Ctrl+[ to start; Ctrl+] to stop) and channels it to the transcription service.
• Text Input Module: Processes typed queries from the UI.
• Image Input Module: Handles screenshot capture (triggered by Ctrl+P) for visual processing.
• External API Integrations:
• Transcription Service: Uses Groq API (Whisper model) to convert voice to text.
• AI Language Model Module: Interfaces with an OpenAI-compatible API for processing queries and generating responses.
• Text-to-Speech (TTS) Module: Utilizes Edge TTS (with adjustable speed and volume) to convert text responses into spoken audio.
• Conversation Management: Maintains conversation history and the assistant’s state (new conversation functionality).
Relationships and Interactions
• User Interaction Flow:
• The user interacts with the modern UI (web front-end integrated into the Python application via PyQt6 or related webview components).
• Input events (voice, text, screenshot) are captured and forwarded to the core logic in eidolon_assist.py.
• Data Flow:
• Voice Input: Audio is recorded → sent to the Transcription Service → converted to text → forwarded for processing.
• Text & Image Inputs are sent directly to the NLP Module.
• The NLP Module (AI language model) processes the sent text (or combined multimodal data) → generates a response.
• The response is then fed into the TTS Module to produce audio output.
• The UI displays the conversation history and current responses.
• Configuration Component:
• A settings module (invoked the first time or later from a dialog) manages API keys and other preferences, affecting how data flows to external services.
Architectural Patterns and Design Principles
• Modularity: The project is broken down into clear modules (UI, voice processing, NLP, TTS, configuration).
• Separation of Concerns: Frontend UI is separated from business logic and external integrations.
• Event-Driven Interaction: Utilizes hotkeys and other events to drive input capturing and processing.
• External Service Integration: Clearly delineated boundaries where external APIs are consumed, showcasing loose coupling between core logic and external dependencies.
• Labels: Clearly indicate components like “UI Layer”, “Voice Input Module”, “Text Input Module”, “Image Input Module”, “Transcription Service (Groq API)”, “NLP Engine (OpenAI API)”, “TTS Module (Edge TTS)”, and “Settings/Configuration”.
• Additional Information: Optionally include notes about hotkeys triggering specific modules or mention the integration of PyQt6 if it is used to combine web elements with Python’s backend.