Veklo is a camera-based head tracking system that automatically adjusts your Mac's audio balance based on your head position. As you move left or right, the audio balance follows you, creating a "sweet spot" that moves with you.
- Dynamic audio balance adjustment: Audio balance changes based on your head position
- Cartoon filter mode: Optional stylized video display
- Calibration options: Set your preferred "sweet spot" position
- Sensitivity control: Adjust how quickly balance changes with movement
- Simple terminal control: Easy-to-use keyboard commands
- eqMac compatibility: Works with system audio or eqMac
- macOS (tested on macOS Sequoia/15)
- Python 3.x
- A webcam (built-in or external)
- Clone this repository:
git clone https://github.com/halapenyoharry/veklo.git
cd veklo
- Install the required packages:
pip3 install opencv-python numpy pyobjc
-
Make sure your camera permissions are enabled in System Preferences > Security & Privacy > Camera
-
For full functionality, enable Accessibility permissions in System Preferences > Security & Privacy > Accessibility for Terminal/iTerm
Run the application from the terminal:
python3 head_track_audio.py
When the application is running, use these terminal commands:
- Type
c
and press Enter to calibrate (set the current position as your sweet spot) - Type
s
and press Enter to adjust sensitivity - Type
m
and press Enter to toggle between eqMac and system audio - Type
f
and press Enter to toggle cartoon filter - Type
q
and press Enter to quit
If the video window is visible, you can also press the corresponding keys in that window.
Veklo uses:
- OpenCV for face detection through your camera
- PyObjC for macOS integration
- AppleScript to adjust system audio balance
- A threading approach to handle both video and audio processing
The system continuously tracks your face position and converts it to an audio balance value. The balance is inverted so that audio is stronger on the side you're sitting on, creating a more natural listening experience.
- Calibration: Type 'c' while sitting in your preferred position to set your "sweet spot"
- Adjust Sensitivity: If balance changes too quickly or slowly as you move, use 's' to adjust
- Lighting: Ensure your face is well-lit for best tracking performance
- Camera Position: Position your camera so your face is clearly visible when seated normally
- Audio Setup: Works best with stereo speakers positioned on either side of your display
- No Video Preview: If the video window doesn't appear, the app still works - just use terminal commands
- Camera Access: If camera doesn't activate, check your privacy settings
- Audio Balance Issues: Ensure Terminal has Accessibility permissions in System Preferences
- Menubar app integration
- Additional video filters
- Support for external audio interfaces
- Dark mode/light mode themes
- Save and load user preferences
MIT License
- OpenCV for computer vision capabilities
- PyObjC for macOS integration
- The eqMac team for their great audio software