How coderconnoisseur/echoline works
Project Type and Purpose
• EchoLine is a single-process desktop application (Python) providing real-time speech-to-text captions as an always-on-top overlay.
• Key goals: capture system audio, transcribe it via Vosk, render captions in a movable, transparent UI.
File Structure
• Top-level scripts:
• Syscapture.py → Handles audio capture from Windows Stereo Mix
• Transcription.py → Wraps Vosk model inference
• overlay.py → Builds and manages the overlay window (probably using Tkinter or PyQt)
• main.py → Orchestrates capture → transcription → UI
• requirements.txt → Lists external Python libraries (e.g., vosk, PyAudio, GUI toolkit)
• venv/ → Isolated Python environment (dependency context)
Extract Insights from README
• External dependencies: Windows Stereo Mix, Vosk speech model in user’s cache directory, Python ≥3.7.
• Runtime characteristics: continuous streaming pipeline, no persistent database.
• User interactions: drag-and-drop overlay, adjustable transparency, auto-scroll.
Main Components
a. Operating System Layer
• Windows Audio Subsystem (Stereo Mix driver)
b. Python Runtime
• Virtual Environment (venv)
c. Application Modules
1. Audio Capture Module (Syscapture.py)
2. Speech-to-Text Module (Transcription.py + Vosk Engine)
3. Overlay UI Module (overlay.py)
4. Orchestrator (main.py)
d. External Resources
• Vosk Model Files on disk (C:\Users\<User>\.cache\vosk\vosk-model-small-en-us-0.15)
• Python Libraries (PyAudio, vosk, GUI toolkit)
e. User Interface
• Always-on-top transparent window
• Drag & drop handlers, scrollable text area
Relationships and Interactions
• Windows Audio Subsystem → Audio Capture Module: streams PCM data
• Audio Capture Module → Speech-to-Text Module: pushes audio frames/buffers
• Speech-to-Text Module → Overlay UI Module: emits text events
• Overlay UI Module ←→ Orchestrator: receives events, updates display, handles user input (move/resize)
• Orchestrator coordinates lifecycle (start/stop capture, load model, spawn threads)
Architectural Patterns & Design Principles
• Pipeline pattern: audio → transcription → display
• Modular separation: capture, processing, UI in distinct scripts
• Single-threaded or multi-threaded design (likely threads or async loops)
• Dependency injection: Vosk model path configurable via environment or CLI