How avinandan-mukherjee/nova-ai works
Project Type & Purpose
– Nova AI is a desktop “full-stack” assistant combining a PyQt-based GUI (Frontend), a set of Python modules that implement AI/voice/search/automation features (Backend), and local file-based persistence (Data).
– It orchestrates voice I/O, text chat, image generation, web search, system control, and logging by invoking external AI/NLP APIs and OS-level libraries.
High-Level Architectural Components
a. Frontend Layer
• GUI.py (PyQt5 UI)
• SystemMonitor.py (live CPU/memory graphs via pyqtgraph)
• Files folder (Database.data, Query.data, etc.) – simple local persistence for user/session state.
b. Core Engine / Backend Layer
• Main.py – application entrypoint, asyncio event loop, initializes GUI & modules
• Backend/*.py modules:
– SpeechToText.py (record/recognize mic input)
– Chatbot.py (orchestrates prompts & text responses)
– ImageGeneration.py (text→image via AI services)
– RealtimeSearchEngine.py (web scraping with requests/selenium)
– TextToSpeech.py (edge-tts for TTS)
– Automation.py (pyautogui, pywin32 for system tasks)
– Model.py (shared interfaces, environment & API-key management)
c. Data Layer
• Data/Chatlog.json (saved conversations)
• Data/Voice.html, Data/cat.txt – example data, demos
• Frontend/Files/*.data – user inputs, statuses, usernames, etc.
d. External Services & Libraries
• AI/NLP: Cohere, Groq, Hugging Face, mtranslate
• Voice I/O: edge-tts, pygame, pywhatkit
• Web: requests, BeautifulSoup4, selenium, webdriver-manager
• System Control: psutil, keyboard, pyautogui, pywin32, AppOpener
Data Flows & Interactions
– User ↔ GUI: click buttons, view responses, trigger voice commands
– GUI → SpeechToText → (PCM audio) → text transcripts
– Transcripts → Chatbot (possibly RealtimeSearchEngine) → calls external LLM/NLP APIs → receives response
– Response → TextToSpeech → audio played back
– Response & metadata → written to Data/Chatlog.json and Frontend/Files/Responses.data
– Image requests flow: GUI → ImageGeneration → external image-generation API → saved & rendered in GUI
– Automation tasks: GUI events or Chatbot instructions → Automation module → OS actions
Architectural Patterns & Principles
– Modularization: each backend feature lives in its own module for maintainability
– Event-driven & async: asyncio coordinates non-blocking API calls, speech I/O, GUI updates
– Separation of concerns: GUI strictly handles presentation; backend modules handle business logic
– File-based persistence for simple state; no heavy database dependency