A native macOS application that connects to Google's Gemini AI. The app automatically accesses your camera and microphone to provide a seamless AI assistant experience.
- Audio input through your microphone
- Visual context through your camera
- Text responses displayed in the app
- Audio responses played through your speakers
- Python 3.8+
- A Google Gemini API key
-
Install the required dependencies:
pip install google-generativeai opencv-python pyaudio pillow mss PyQt5 pynput python-dotenv pyinstaller
-
Set your Gemini API key as an environment variable (optional):
export GEMINI_API_KEY="your-api-key-here"
If not set as an environment variable, the app will ask for it on startup.
There are two ways to build the app:
PyInstaller creates a more reliable standalone application that better handles dependencies:
-
Make sure PyInstaller is installed:
pip install pyinstaller
-
Run the build process:
# First clean any previous builds rm -rf build dist # Create the app bundle using the spec file pyinstaller gemini.spec
-
The app will be created as
Gemini Assistant.app
in thedist
folder
This method may have issues with certain dependencies:
-
Make sure py2app is installed:
pip install py2app
-
Run the build process:
# First clean any previous builds rm -rf build dist # Create the app bundle python setup.py py2app --alias
-
The app will be created in the
dist
folder. Using the--alias
flag creates a development version that's easier to build.
To run directly without building:
python app.py
- Launch the app
- Grant camera and microphone permissions when prompted
- The app will automatically start listening and capturing video
- Click the button to toggle listening on/off
- Missing Modules: If you encounter "No module named 'xyz'" errors, install the missing dependency with
pip install xyz
- Permission Issues: If camera or microphone access doesn't work, check your macOS privacy settings
- Build Errors: If PyInstaller fails with recursion errors, try using the '--debug' flag to identify problematic dependencies
- The PyInstaller spec file (
gemini.spec
) is configured to include all necessary dependencies - For development, the alias mode (
--alias
) creates a simpler app bundle that points to your source files - For distribution, use the default (non-alias) mode to create a completely standalone application