A simplified USB-connected AI rubber duck that listens to developers and provides helpful responses through voice interaction.
- Voice Listening Toggle - Start/stop listening with a simple button
- Conversation History - Track all interactions in a dropdown
- Basic Sentiment Analysis - Understand developer mood from text
- Web API - RESTful endpoints for frontend communication
- Electron Frontend - Clean, minimal desktop interface
pip install -r requirements.txt
python scripts/start_api.py
The API will be available at: http://localhost:8001
cd frontend
npm install
npm start
ngrok http 8001
Don't forget to update VAPI variables in renderer.js
!
GET /
- Root; lists available endpointsPOST /listening/toggle
- Toggle listening stateGET /history
- Get conversation historyPOST /history/clear
- Clear conversation historyGET /status
- Get current system statusGET /health
- Health checkPOST /webhook/vapi
- VAPI webhook endpointPOST /duck/talk/start
- Start duck talking animationPOST /duck/talk/stop
- Stop duck talking animationPOST /duck/gesture/{name}
- Trigger a gesture (nod
,shake
,left
,right
,greet
,goodluck
)POST /get_code_snippet
- Read and return file contentsPOST /store_context
- Store a snippet/context payloadPOST /retrieve_context
- Retrieve a stored context by snippet id
DevDuck/
├── arduino/ # Arduino servo controller
│ └── devduck_controller/
│ └── devduck_controller.ino
├── devduck/ # Python backend
│ ├── __init__.py
│ ├── main.py
│ ├── ai/
│ │ └── __init__.py # VAPI integration hooks
│ ├── analysis/
│ │ └── __init__.py # Sentiment analysis
│ ├── api/
│ │ ├── __init__.py
│ │ ├── assistant_config.py
│ │ └── vapi_webhook.py # FastAPI app & endpoints
│ ├── hardware/
│ │ ├── __init__.py
│ │ └── usb_communication.py
│ └── utils/
│ ├── __init__.py
│ └── security.py
├── frontend/ # Electron desktop app
│ ├── main.js # Electron main process
│ ├── package.json # Frontend dependencies
│ ├── package-lock.json
│ └── renderer/ # Frontend UI files
│ ├── index.html
│ ├── renderer.js
│ └── styles.css
├── scripts/
│ └── start_api.py # Starts FastAPI on port 8001
The Arduino controller manages servo movements for the physical duck. See arduino/devduck_controller/
for the servo control code.
MIT License - see LICENSE for details.
- DJ Leamen
- Nahl Farhan