The Python Bridge provides real-time, low-latency (<50ms) sensory processing for live streaming operations.
While n8n handles asynchronous workflows, the Python Bridge handles:
- Real-time chat velocity monitoring
- Audio level detection
- OBS scene control
- Flash clipping triggers
- Transparent overlay rendering
┌─────────────────────────────────────────────────┐
│ Python Bridge (EOE) │
├─────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ State │───▶│ OBS Control │ │
│ │ Evaluator │ │ (WebSocket) │ │
│ └──────────────┘ └──────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Chat Monitor │ │ Audio Monitor│ │
│ │ (Twitch IRC) │ │ (PyAudio) │ │
│ └──────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────┘
-
Install Dependencies
cd python-bridge python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Configure OBS
- Enable WebSocket Server (Tools → WebSocket Server Settings)
- Port: 4455
- Password: (set in .env)
-
Run
python eoe_engine.py
| State | Trigger | Action |
|---|---|---|
| HYPE PEAK | Chat Velocity > 20 AND Audio > -15dB | SaveReplayBuffer + Flash Clip |
| DEAD AIR | Chat Velocity < 5 AND Audio < -40dB | AI Conversation Starter |
| GETTING COOKED | Chat Velocity > 25 AND Audio < -35dB | Sarcastic Overlay |
eoe_engine.py- Main orchestration enginestate_evaluator.py- Entropy calculationobs_controller.py- OBS WebSocket clientchat_monitor.py- Twitch IRC listeneraudio_monitor.py- Audio level detectionflash_clipper.py- Automated clip generation