An open-source multimodal AI engine that extends text-based AI chatbots with voice, vision, and speech capabilities.
OpenEngine bridges the gap between text-only AI models and real-world interaction by providing a comprehensive framework for:
- Speech Recognition: Convert spoken language to text using Google Speech API
- Text-to-Speech: Natural voice synthesis using system-native TTS engines
- Computer Vision: Advanced object detection and scene recognition using YOLO and OpenCV
- Multimodal Integration: Seamlessly combine vision and conversation in a unified interface
The engine consists of three main components:
Core voice interaction system with:
- Real-time speech-to-text conversion
- Configurable silence detection
- Speech interruption handling
- System integration for opening applications and URLs
- Emotional AI Voice - Ultra-realistic Microsoft Edge TTS with natural enthusiasm and expression
- Human-like personality engine with casual speech patterns, filler words, and natural pauses
Advanced computer vision pipeline featuring:
- YOLO-based object detection (80+ object classes)
- Face detection and demographic estimation
- Scene classification (indoor/outdoor, nature, urban)
- Text region detection
- Color and lighting analysis
- Real-time bounding box visualization
Integrated multimodal assistant combining:
- Voice interaction from base assistant
- Real-time camera feed processing
- Object detection with visual feedback
- Context-aware responses using vision data
- 80+ COCO dataset object classes
- Person detection with age/gender estimation
- Configurable confidence thresholds
- Non-maximum suppression for accuracy
- Natural environment detection (ocean, forest, sky)
- Indoor/outdoor classification
- Lighting condition analysis
- Color distribution analysis
- Configurable silence timeout (default 1.5 seconds)
- Real-time speech interruption
- System command execution
- Natural conversation flow
- Live camera preview at 30 FPS
- Color-coded bounding boxes (green: faces, cyan: people, red: objects)
- Confidence scores and object labels
- Detection count display
Python 3.11 is required for the advanced voice engine (Edge TTS).
brew install portaudioSee windows/WINDOWS_INSTALL.md for detailed Windows setup instructions.
Quick setup:
cd windows
setup.batsudo apt-get install portaudio19-devpython3.11 -m pip install -r requirements.txtFor vision capabilities:
cd vision
python3.11 -m pip install -r requirements.txtDownload YOLOv3-tiny weights and configuration:
cd vision
python3.11 download_yolo.pyOr manually download:
yolov3-tiny.weights(33MB)yolov3-tiny.cfg
Place both files in the vision/ directory.
python3 voice_assistant.pycd vision
python3 vision_assistant.py- "exit", "quit", "stop" - End session
- "open [application]" - Launch macOS application
- "show me [website]" - Open URL in Safari
- "what do you see?" - Trigger vision analysis
Edit voice_assistant.py or vision/vision_assistant.py:
API_KEY = 'your_api_key'
API_URL = 'your_api_endpoint'
MODEL = 'your_model_name'Adjust timeout in voice_assistant.py:
max_silent_chunks = int(self.RATE / self.CHUNK * 1.5)Modify confidence threshold in custom_vision.py:
if confidence > 0.25:- Operating System: macOS (tested), Linux (compatible), Windows (requires modifications)
- Python: 3.8 or higher
- Camera: Required for vision features
- Microphone: Required for voice interaction
- Memory: 2GB minimum, 4GB recommended for YOLO
- Image capture from camera or base64 input
- Preprocessing and normalization
- YOLO forward pass for object detection
- Non-maximum suppression
- Face detection using Haar Cascades
- Scene analysis using HSV color space
- Text region detection via edge analysis
- Natural language description generation
- Audio stream capture via PyAudio
- Silence detection using amplitude threshold
- WAV encoding
- Google Speech API HTTP request
- Text parsing and response generation
- Text-to-speech synthesis
- Interrupt monitoring during playback
- Object Detection: ~30 FPS on modern CPUs
- Speech Recognition: <500ms latency
- Speech Interruption: ~100ms detection time
- Silence Detection: 1.5 second default timeout
- YOLO detection limited to 80 COCO classes
- Gender/age estimation uses heuristics
- Speech recognition requires internet connection
- macOS-specific TTS implementation
- Camera permissions required for vision features
Contributions are welcome. Please ensure:
- Code follows existing architecture patterns
- Changes maintain cross-platform compatibility where possible
- Performance impact is documented
- New features include appropriate error handling
MIT License - See LICENSE file for details
- YOLO object detection framework
- OpenCV computer vision library
- Google Speech Recognition API
- COCO dataset for object classes
Current Version: 1.0.0
For issues, questions, or contributions, please open an issue on the GitHub repository.