ai-dialog/
ai_dialog/
__init__.py
__main__.py
config.py
core.py
interpreter.py
docs/
reports/
_quarto.yml
api.qmd
architecture.qmd
cli.qmd
commands.qmd
contributing.qmd
custom.scss
frontend.qmd
index.qmd
intent-recognition.qmd
konzeption.md
phases.qmd
dokumente/
sprachgesteuerte-textueberarbeitung/
frontend/
app.js
index.html
styles.css
demo_dialog.py
demo_interpret.py
PROJECT.yaml
pyproject.toml
README.md
server.py
[DRAFT — edit this] Real-time AI voice dialog using Google Gemini Live API Inferred stage: development. Define the specific deliverable, success state, and timeline.
Success criteria:| Code | /Users/friedrichstr/ai-mac-studio/agents/communication/ai-dialog |
| Docs | /Users/friedrichstr/ai-mac-studio/agents/communication/ai-dialog/docs |
| Check | Path | Status | Detail |
|---|---|---|---|
| code | /Users/friedrichstr/ai-mac-studio/agents/communication/ai-di | ✓ ok | 13 items, last_modified=2026-08-24 |
| docs | /Users/friedrichstr/ai-mac-studio/agents/communication/ai-di | ✓ ok | 20 items, last_modified=2026-08-14 |
Real-time AI voice dialog using the Google Gemini Live API. Talk to Gemini with your microphone; optionally share your camera or screen.
pip install -e .
# or install dependencies manually:
pip install google-genai opencv-python pyaudio pillow mss
| Requirement | Notes |
|---|---|
| Python ≥ 3.10 | asyncio.TaskGroup required |
GEMINI_API_KEY env var |
Get a key at aistudio.google.com |
| Microphone + speakers | For bidirectional audio |
| Webcam | Optional, for --mode camera |
# Audio + camera (default)
GEMINI_API_KEY=<key> ai-dialog
# Audio only
GEMINI_API_KEY=<key> ai-dialog --mode none
# Audio + full screen share
GEMINI_API_KEY=<key> ai-dialog --mode screen
Type a message and press Enter to send text alongside voice. Type q to quit.
import asyncio
from ai_dialog import AudioLoop
asyncio.run(AudioLoop(video_mode="none").run())
Edit ai_dialog/config.py to change:
MODEL — Gemini model nameCONFIG — voice, compression, modalitiesSEND_SAMPLE_RATE / RECEIVE_SAMPLE_RATE — audio qualityai_dialog/
├── config.py # Constants + LiveConnectConfig
├── core.py # AudioLoop class (all async tasks)
├── interpreter.py # Intent classification
├── __init__.py # Public API
└── __main__.py # CLI entry point
Full documentation is in docs/ — build with quarto render docs/.