Skip to content

Monster0506/echo

Repository files navigation

Echo

A desktop meeting copilot that captures, transcribes, and analyzes meetings in real-time. Built with Tauri, React, and Rust for a fast, native experience, with backend integration in Python with Flask

Implementation

Local Transcription

Echo processes all audio transcription locally using faster-whisper, ensuring your meeting audio never leaves your machine. The Rust backend captures audio via cpal and communicates with a Flask-based Python service that runs faster-whisper models entirely on-device. This approach provides:

  • Zero cloud dependency for transcription - all processing happens locally
  • Configurable models - choose from any faster-whisper compatible model (turbo, base, small, etc.)
  • GPU acceleration - optional CUDA support for faster processing
  • Real-time streaming - audio chunks are transcribed at configurable intervals (default 5 seconds)
  • Model persistence - models stay loaded in memory for faster subsequent transcriptions

The transcription pipeline captures audio samples, writes them to temporary WAV files, and sends HTTP requests to the Flask transcription service. The service maintains loaded models in memory, providing faster response times than subprocess-based approaches. Results are returned as JSON with timestamped segments and streamed back to the frontend through Tauri's event system.

Local AI Models with Ollama

Echo uses Ollama to run language models locally on your machine, ensuring your meeting data never leaves your device.

The AI integration handles note generation, meeting summaries, decision extraction, and chat interactions. The Rust backend constructs prompts with meeting context and streams responses back to the React frontend, where they're rendered with markdown support including code blocks, math equations, and rich formatting.

Multi-Language Architecture

  • Rust - Core application logic, audio capture, database operations, and API clients. Provides memory safety, performance, and cross-platform compatibility through Tauri.
  • Python - Transcription pipeline. Leverages the faster-whisper ecosystem and allows easy model swapping without recompiling Rust code.
  • TypeScript/TSX - React frontend with type safety. Uses modern React patterns with hooks for state management and real-time event handling.

Communication between layers uses Tauri's IPC system for Rust-to-frontend calls and HTTP requests for Rust-to-Python service communication. The Flask service runs on localhost and provides RESTful endpoints for transcription operations. The frontend listens to Tauri events for real-time updates without polling.

Real-Time Event-Driven Updates

The application uses Tauri's event system for real-time communication between backend and frontend. When transcription completes, the Rust backend emits transcript_chunk events that the React frontend listens to via a custom useTauriEvents hook. Similarly, AI-generated notes trigger notes_updated events, and meeting state changes emit meeting_ended events.

This event-driven architecture ensures the UI updates immediately when backend processing completes, without requiring polling or manual refresh actions. The floating popup window maintains its own event listeners, allowing it to stay synchronized with the main window even when minimized or hidden.

Database Architecture

Echo uses PostgreSQL for data persistence, configured through a simple connection URL. The current implementation uses a local Supabase instance, but any PostgreSQL database (local or cloud) works by changing the SUPABASE_DB_URL environment variable. This flexibility allows:

  • Local development - Run PostgreSQL locally or use Supabase's local development setup
  • Cloud deployment - Point to any cloud PostgreSQL instance (Supabase, AWS RDS, DigitalOcean, etc.)
  • Self-hosted - Use your own PostgreSQL server with full control

The schema is designed for efficient querying with tables for meetings, transcript chunks, notes, decisions, action items, and chat messages. The Rust backend uses sqlx for type-safe database queries, with migrations managed through SQL files. Indexes are optimized for common queries like filtering by archive status and date ranges.

Tech Stack

Frontend: React 19, TypeScript, Vite, Tailwind CSS, loveui (custom built component library)
Backend: Rust, Tauri 2.0, cpal, sqlx
Transcription Service: Python, Flask, faster-whisper
Database: PostgreSQL (configurable via connection URL)
AI: Ollama (local LLM inference)
Audio: cpal for cross-platform capture

Configuration

Settings are managed through the application's Settings page and persisted to settings.json in Tauri's app data directory (platform-specific location). The settings system uses a three-tier fallback: file settings -> environment variables -> defaults. Key configuration options:

  • Transcription: Model path, device (CPU/CUDA), language, compute type, interval
  • AI: Ollama model name and URL (defaults to gpt-oss:120b-cloud and http://localhost:11434)
  • Audio: Device selection and capture settings
  • Database: PostgreSQL connection URL (via SUPABASE_DB_URL environment variable)

Environment variables in src-tauri/.env provide defaults and can be overridden through the UI. The database connection is configured via the SUPABASE_DB_URL environment variable, accepting any standard PostgreSQL connection string for local or cloud databases.

Services

The services/ directory contains a Flask-based HTTP service for transcription and ML operations. This service runs independently on localhost and communicates with the Rust backend via HTTP REST API. The service architecture provides:

  • Model persistence - Models stay loaded in memory between requests, eliminating startup overhead
  • Hot reloading - Models can be reloaded or swapped without restarting the service
  • RESTful API - Standard HTTP endpoints for health checks, model management, and transcription
  • Error handling - Structured error responses with appropriate HTTP status codes

The service is designed to be started automatically by the Rust backend in production, or manually in development mode.

Rust Integration

The Rust backend includes an HTTP client (src-tauri/src/api/python_service.rs) that communicates with the Flask service. The client provides:

  • Automatic model management - Ensures the correct model is loaded before transcription
  • Health checks - Verifies service availability before making requests
  • Error handling - Converts HTTP errors to application errors with clear messages
  • Configuration - Service URL configurable via settings or environment variable

Transcription commands (meeting_audio.rs, audio.rs) have been updated to use HTTP requests instead of subprocess calls, providing better performance and error handling.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •