Skip to main content

Real-time audio visualization and voice-to-text chat interface with Gemini AI

Project description

Silent Speech 🎙️

Real-time audio visualization and voice-to-text chat interface powered by Google's Gemini AI.

Python License Status

Features ✨

  • 🎯 Real-time Audio Capture - Live microphone input with visual waveform
  • 🤖 Gemini AI Integration - Accurate speech-to-text transcription
  • 📋 Auto Copy to Clipboard - Toggleable automatic clipboard copying
  • 🎨 Rich Terminal UI - Beautiful, responsive interface with color coding
  • ⌨️ Keyboard Controls - Intuitive hotkeys for all functions
  • 🔇 Noise Filtering - Intelligent filtering of breathing sounds and filler words
  • 🚀 Non-blocking Processing - Responsive UI during transcription

Installation 📦

Via pip (Recommended)

pip install silent-speech

From Source

git clone https://github.com/laspencer91/silent-speech.git
cd silent-speech
pip install -r requirements.txt
python -m silent_speech.main

Quick Start 🚀

  1. Set up Gemini API Key:

    export GEMINI_API_KEY="your-api-key-here"
    
  2. Run the application:

    silent-speech
    
  3. Start using:

    • Press SPACE to start recording
    • Press SPACE again to stop and transcribe
    • Press Q to quit
    • Press A to toggle auto-copy
    • Press C to copy the last response

System Requirements 🖥️

  • Python 3.8+
  • Microphone access
  • Internet connection (for Gemini API)
  • Audio system: PortAudio (usually pre-installed)

Platform Support

  • Linux (Full support)
  • macOS (Full support)
  • ⚠️ Windows (Limited - requires WSL or compatible terminal)

Configuration ⚙️

Environment Variables

  • GEMINI_API_KEY - Your Google Gemini API key (required)

Audio Settings

The app automatically detects your default microphone. For advanced audio configuration, modify the AudioConfig class in silent_speech/main.py.

Controls 🎮

Key Function
SPACE Start/Stop recording
Q Quit application
C Copy last response
A Toggle auto-copy
ESC Quit application

API Key Setup 🔑

  1. Visit Google AI Studio
  2. Create a new API key
  3. Set the environment variable:
    # Linux/macOS
    echo 'export GEMINI_API_KEY="your-key-here"' >> ~/.bashrc
    source ~/.bashrc
    
    # Or for current session only
    export GEMINI_API_KEY="your-key-here"
    

Troubleshooting 🔧

Common Issues

"No audio input detected"

  • Check microphone permissions
  • Verify microphone is connected and working
  • Try running: python -c "import sounddevice; print(sounddevice.query_devices())"

"Gemini API key not found"

  • Ensure GEMINI_API_KEY environment variable is set
  • Verify the API key is valid and active

"Module 'tty' has no attribute 'cbreak'"

  • This typically occurs on Windows. Use WSL or a Unix-compatible terminal

Audio dependency issues

  • Install system audio libraries:
    # Ubuntu/Debian
    sudo apt-get install portaudio19-dev python3-pyaudio
    
    # macOS
    brew install portaudio
    

Development 🛠️

Local Development

git clone https://github.com/laspencer91/silent-speech.git
cd silent-speech
pip install -e .
silent-speech

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License 📄

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

Acknowledgments 🙏

  • Google Gemini AI for speech transcription
  • Rich Library for beautiful terminal UI
  • SoundDevice for audio capture
  • All contributors and users!

Support 💬


Made with ❤️ by the Silent Speech Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

silent_speech-0.1.3.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

silent_speech-0.1.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file silent_speech-0.1.3.tar.gz.

File metadata

  • Download URL: silent_speech-0.1.3.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for silent_speech-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8fdae436d6db2cd50a0301daf0edcc8f083bdbf33b5a8b12af42847e8475225e
MD5 b1bf2774bae98d61225e68a2a8727d5f
BLAKE2b-256 272781eb6d3754e8cd14fd5553d6f8f2cb8b9373b12e1a0b94f246571d8e0965

See more details on using hashes here.

File details

Details for the file silent_speech-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: silent_speech-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for silent_speech-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c942edd533d33603f2d390a4b31b213f8446d1b1d09b31a8f734ab0f9f665972
MD5 a828e7a3eec95616104ec7a400ed3c79
BLAKE2b-256 f7fa4d761fd5537bb630f102e0dcabf19b2eb78b9e028281832f152706c962c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page