How mannahalpara/axon works
Project type and purpose
• This is a Python-based personal voice assistant for Windows (Axon).
• It supports voice/text input, uses AI (Gemini & Llama) to interpret commands or answer questions, and can perform local actions (open apps, summarize Wikipedia, describe the screen).
File structure
• No sub-directories; all modules live at the top level.
• Key scripts:
• app.py – orchestrator (input mode selection, main loop)
• command.py – sends user commands to Gemini AI; handles screen analysis
• ask_ai.py – handles general question/answer via Llama Meta
• open_app.py – launches UWP/traditional Windows apps
• wikipedia.py – fetches & summarizes Wikipedia articles
• requirements.txt defines dependencies (pyttsx3, gTTS, openai/other API libs, image-processing).
Extract additional architecture clues from README
• Input modes → voice (speech-to-text) or keyboard.
• AI backends:
• Gemini AI (command intent parsing)
• Llama by Meta (general Q&A)
• Output modes: text (console), voice (pyttsx3/gTTS).
• Logging: all interactions written to log.txt.
Main components and their interactions
a. Input Layer
• Voice Input Module (microphone → STT)
• Text Input Module (console prompt)
b. Core Orchestrator (app.py)
• Dispatches input to Command Handler or AI QA
• Collects responses for output & logging
c. Command Handler (command.py)
• Sends natural language to Gemini AI for intent extraction
• Routes intents to local executors:
• App Launcher (open_app.py)
• Wikipedia Summarizer (wikipedia.py)
• Screen Analyzer (image capture + description)
d. AI QA Module (ask_ai.py)
• For “Ask AI:” commands → sends prompt to Llama endpoint → formats response
e. Output Layer
• Text-to-Speech Engine (pyttsx3 primary, gTTS fallback)
• Console/Text display
f. Logging (built into orchestrator)
• Appends timestamped interactions and results to log.txt
g. External Services
• Gemini AI API (requires GEMINI_API_KEY)
• Llama Meta endpoint/token
• Wikipedia API
• (Optionally Google/YouTube for search commands)
Architectural patterns and design principles
• Modular separation: Input, Processing, Execution, Output, Logging
• Single orchestrator “director” pattern (app.py)
• Clear plugin-style executors for actions (open_app, wikipedia, screen analysis)
• External AI services decoupled behind thin wrapper modules
• Clear labels on each component (e.g., “Gemini AI API”, “Screen Analyzer”)
• Configuration points (GEMINI_API_KEY, Llama token, requirements)