Skip to content

DeepEcho is a live transcription tool that work with LLM assistant tool

License

Notifications You must be signed in to change notification settings

zemochen/deep-echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎧 DeepEcho - Real-time Voice AI Assistant

DeepEcho is a comprehensive real-time voice transcription and AI assistant system that supports multiple AI providers. It captures both microphone and speaker audio, provides live transcription, and generates intelligent response suggestions using various AI models including DeepSeek, OpenAI GPT, Claude, Grok, and more.

✨ Key Features

  • 🎀 Real-time Audio Capture: Simultaneous microphone and speaker audio recording
  • πŸ“ Live Transcription: Real-time speech-to-text with local and API modes
  • πŸ€– Multi-AI Provider Support: DeepSeek, OpenAI, Claude, Grok, Volcano Engine, and GLM
  • 🎨 Modern UI: New integrated interface with AI provider selection
  • βš™οΈ Flexible Configuration: JSON-based configuration with multiple presets
  • πŸ”§ Cross-platform: Windows and macOS support
  • πŸ“Š System Monitoring: Built-in diagnostics and resource optimization
  • πŸ›‘οΈ Error Recovery: Comprehensive error handling and retry mechanisms

πŸš€ Quick Start

πŸ“‹ Prerequisites

  • Python >=3.8.0
  • FFmpeg (for audio processing)
  • At least one AI provider API key (see API Setup Guide)
  • Windows OS / macOS

πŸ”§ Installation

  1. Clone the repository:

    git clone https://github.com/zemochen/deep_echo.git
    cd deep_echo
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up security (Recommended):

    # Linux/macOS
    chmod +x setup_security.sh
    ./setup_security.sh
    
    # Windows
    setup_security.bat

    This will configure git hooks to prevent accidental API key commits.

  4. Set up API keys (choose one method):

    Method 1: Configuration File (Recommended)

    cp resources/config.example.json config.json
    # Edit config.json and add your API key

    Method 2: Environment Variable

    export DEEPSEEK_API_KEY="sk-your-key-here"
    # or
    export OPENAI_API_KEY="sk-your-key-here"

    Method 3: Legacy keys.py (Secure)

    # Copy the template file
    cp keys.example.py keys.py
    # Edit keys.py and add your actual API keys
    # Note: keys.py is in .gitignore and will NOT be committed to git

    ⚠️ Security Note: Never commit your actual API keys to version control. The keys.py file is automatically excluded from git commits. See SECURITY.md for detailed security guidelines.

  5. Run DeepEcho:

    python main.py

🎯 Usage Modes

Default Mode (Integrated Application)

python main.py
  • Uses new integrated architecture
  • Automatic AI provider detection
  • Modern UI with provider selection
  • Comprehensive error handling

API Transcription Mode

python main.py --api
  • Uses OpenAI Whisper API for transcription
  • Higher accuracy and multi-language support
  • Requires internet connection

Legacy Mode

python main.py --legacy
  • Uses original application architecture
  • Backward compatibility mode
  • Legacy UI interface

Verbose Logging

python main.py --verbose
  • Detailed logging for troubleshooting
  • System diagnostics information

πŸ€– Supported AI Providers

Provider Models Setup Guide
DeepSeek deepseek-chat, deepseek-coder DeepSeek Setup
OpenAI gpt-3.5-turbo, gpt-4, gpt-4o OpenAI Setup
Claude claude-3-haiku, claude-3-sonnet, claude-3-opus Claude Setup
Grok grok-beta, grok-2 Grok Setup
Volcano Engine doubao-pro, doubao-lite Volcano Setup
GLM qwen-turbo, qwen-plus, qwen-max GLM Setup

βš™οΈ Configuration

Configuration Files

DeepEcho supports multiple configuration presets:

  • resources/config.example.json - Template configuration
  • resources/config.deepseek.json - DeepSeek optimized settings
  • resources/config.openai.json - OpenAI optimized settings

Configuration Options

{
  "audio": {
    "use_api_mode": true,          // Use API vs local transcription
    "record_timeout": 3,           // Recording timeout (seconds)
    "energy_threshold": 1000       // Audio sensitivity
  },
  "ai_provider": {
    "provider_type": "deepseek",   // AI provider to use
    "api_key": "your-key-here",    // API key
    "model": "deepseek-chat",      // Model name
    "response_interval": 5         // Response update interval
  },
  "ui": {
    "use_new_ui": true,           // Use new integrated UI
    "theme": "dark",              // UI theme
    "window_width": 1200          // Window dimensions
  }
}

πŸ–₯️ System Requirements

Windows

  • Windows 10/11
  • Python 3.8+
  • PyAudioWPatch (auto-installed)
  • FFmpeg

macOS

  • macOS 10.14+
  • Python 3.8+
  • BlackHole virtual audio device
  • FFmpeg, PortAudio

macOS Setup:

brew install ffmpeg portaudio python-tk blackhole-2ch

πŸ”§ Advanced Features

System Monitoring

  • Real-time resource usage tracking
  • Thread health monitoring
  • Queue size optimization
  • Memory usage alerts

Error Recovery

  • Automatic retry with exponential backoff
  • Graceful degradation on failures
  • Component health checks
  • Network failure handling

Performance Optimization

  • Multi-threaded architecture
  • Resource usage optimization
  • Queue management
  • Memory leak prevention

πŸ› Troubleshooting

Common Issues

"FFmpeg not found"

# Windows (with Chocolatey)
choco install ffmpeg

# macOS
brew install ffmpeg

"No AI provider configured"

  • Check your API key in configuration
  • Verify the key format and permissions
  • See API Setup Guide

Audio device issues

  • Ensure default audio devices are properly set
  • On macOS, configure BlackHole for speaker capture
  • Check system audio permissions

High memory usage

  • Enable resource optimization in config
  • Reduce queue size limits
  • Use local transcription mode

Getting Help

  1. Run with verbose logging: python main.py --verbose
  2. Check the system diagnostics output
  3. Review configuration file syntax
  4. Consult the API Setup Guide

πŸ“Š Performance Tips

  • For best accuracy: Use --api mode with internet connection
  • For lowest latency: Use local mode with tiny Whisper model
  • For cost efficiency: Use DeepSeek or Claude Haiku
  • For best quality: Use OpenAI GPT-4 or Claude Opus

πŸ”„ Migration from Legacy Version

If upgrading from an older version:

  1. Backup your keys.py file
  2. Create new configuration file:
    cp resources/config.example.json config.json
  3. Update your API keys in the new format
  4. Test with: python main.py --legacy (fallback mode)

πŸ“– License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Code Style: Follow PEP 8 guidelines
  2. Testing: Add tests for new features
  3. Documentation: Update documentation for changes
  4. Commits: Use clear, descriptive commit messages

Development Setup

pip install -r requirements-dev.txt
pytest tests/

πŸ™ Acknowledgments

  • OpenAI for Whisper and GPT models
  • Anthropic for Claude models
  • DeepSeek for accessible AI APIs
  • All contributors and users of DeepEcho

About

DeepEcho is a live transcription tool that work with LLM assistant tool

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages