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.1.tar.gz (13.1 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.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: silent_speech-0.1.1.tar.gz
  • Upload date:
  • Size: 13.1 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.1.tar.gz
Algorithm Hash digest
SHA256 0cec1e6980be24bf427b2fa1b840c460f569de7136613a4ea92caedfef07b04a
MD5 f9dedf21fd5f1d223297b50b61f13f1e
BLAKE2b-256 9d4523637153651ecebbfabcf1097bd4659aa180bb0911baed144c4bd089c640

See more details on using hashes here.

File details

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

File metadata

  • Download URL: silent_speech-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e25be279bee869a648bcfb9ab375601583c2b749e76d849a0fc0c12ae1f0ebf1
MD5 2caf565976eb310c06cd0f00f6515661
BLAKE2b-256 7bfbb62253fc3f274e363270a1962d99ae51c4f37733879b156dd88261134f43

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