🔧 Controls & Testing
API Endpoint
POST /llm
Content-Type: application/json
Body: {"prompt": "your message here"}
TTS Endpoint
POST /tts
Content-Type: application/json
Body: {"text": "message to speak", "voice_id": "voice_id"}
Test Reminder
POST /test-reminder
Body: {"text": "Your test message"}
Pi Reminder Check
GET /check-reminders
Pi clients check for pending reminders
Get Reminder Audio
GET /get-reminder-audio/{reminder_id}
Pi clients fetch reminder audio
End Session
POST /end-session
Manually end current conversation
Client Disconnect
POST /client-disconnect
Pi clients notify when disconnecting
📹 Webcam Endpoints:
Webcam Stream
POST /webcam/stream
Pi clients send webcam frames
Webcam Status
POST /webcam/status
Pi clients send status updates
Get Webcam Feed
GET /webcam/feed?client_id=raspberry_pi
iOS app gets latest frame
Get Webcam Status
GET /webcam/status?client_id=raspberry_pi
iOS app checks camera status
Webcam Placeholder
GET /webcam/placeholder
Placeholder image when no camera
🎮 Joystick Endpoints:
Receive Joystick Coordinates
POST /direction
iOS app sends joystick x,y coordinates
Get Current Joystick
GET /direction/current
Get current joystick coordinates and duration
Get Joystick Queue
GET /direction/queue
Pi clients get joystick coordinate history
Clear Joystick Queue
POST /direction/clear
Pi clients clear processed coordinate commands
AWS Architecture:
- Raspberry Pi: Speech recognition, audio playback & webcam capture
- AWS Server: AI processing, TTS generation & webcam streaming
- Communication: HTTP API with JSON & base64 image data
- Benefits: Reduced latency, scalability, remote monitoring
ElevenLabs Features:
- High-quality AI voice synthesis
- Natural-sounding speech
- Customizable voice settings
- Professional audio output
Test the API:
curl -X POST http://localhost:80/llm -H "Content-Type: application/json" -d '{"prompt": "Hello, how are you?"}'