This is a Christmas gift I made for my mom, who is hard of hearing. It is a real-time closed captioning application that captures speech from your Mac's microphone and displays live captions. The app uses Google's speech recognition API and can optionally enhance transcriptions with Anthropic's Claude API for improved accuracy.
- Real-time captioning: Live transcription from microphone input
- Clean interface: Easy-to-read captions with timestamps
- Claude enhancement: Optional AI-powered transcription correction
- Simple controls: Start/stop captioning and clear display
- Mac optimized: Designed specifically for macOS microphone access
-
Clone or download this repository
-
Install dependencies:
pip install -r requirements.txt
-
(Optional) Set up Claude API for enhanced transcription:
export ANTHROPIC_API_KEY="your_api_key_here"
-
Run the application:
python caption_app.py
-
Click "Start Captioning" to begin listening
-
Speak clearly into your Mac's microphone
-
Watch captions appear in real-time
-
Click "Stop Captioning" when finished
- Python 3.7+
- macOS with built-in microphone
- Internet connection (for speech recognition APIs)
SpeechRecognition: Audio capture and speech recognitionPyAudio: Microphone accessanthropic: Claude API integration (optional)tkinter: GUI framework (included with Python)
The app works without Claude API using Google's free speech recognition. For enhanced accuracy:
- Get an API key from Anthropic Console
- Set the
ANTHROPIC_API_KEYenvironment variable - Restart the application
- Microphone not working: Ensure microphone permissions are granted in System Preferences
- Poor transcription quality: Speak clearly and reduce background noise
- Claude not working: Verify API key is correctly set in environment variables
- Audio is processed in real-time and not stored
- Claude API calls are only made for transcription enhancement
- No audio data is saved to disk