How daniel-c-silva/clanka works
Clanka combines a browser-based voice chat interface with a Flask conversational backend and a separate motor-control path for the physical robot. The primary interaction is user speech → browser transcription → /chat → Mistral answer and emotion plus session memory → browser speech playback. The backend retains the last five exchanges per session. Motor commands travel through Python serial helpers to Arduino stepper drivers, but the shown backend does not connect that path to chat. README-documented hardware and interface capabilities are represented; unsampled implementation details are not inferred.
Main entry points: main.py Response generation · App.jsx Voice chat UI · movement.py Serial movement helpers · main.cpp Motor command firmware
Components 14
Voice interface
- Voice chat UI
frontend/src/App.jsx - Browser speech APIs
- Session ID storage
Chat backend
- Chat endpoint
backend/main.py - Response generation
backend/main.py - Conversation context
backend/main.py - Session memory
backend/main.py
Robot motion
- Serial movement helpers
backend/movement.py - USB serial link
- Motor command firmware
arduino/main.cpp
Other components
- User
- Mistral AI
- Raspberry Pi
- Stepper motors
Connections 15
- User → Voice chat UI: speaks to
frontend/src/App.jsx - Voice chat UI → Browser speech APIs: transcribes and speaks
frontend/src/App.jsx - Voice chat UI → Session ID storage: reads and writes
frontend/src/App.jsx - Voice chat UI → Chat endpoint: POSTs chat
frontend/src/App.jsx - Chat endpoint → Response generation: invokes
backend/main.py - Response generation → Conversation context: loads
backend/main.py - Conversation context → Session memory: reads recent turns
backend/main.py - Response generation → Mistral AI: requests answer and emotion
backend/main.py - Response generation → Session memory: stores exchange
backend/main.py - Response generation → Chat endpoint: returns answer and emotion
backend/main.py - Chat endpoint → Voice chat UI: returns JSON
frontend/src/App.jsx - Raspberry Pi → Serial movement helpers: runs
- Serial movement helpers → USB serial link: writes commands
backend/movement.py - USB serial link → Motor command firmware: transmits commands
arduino/main.cpp - Motor command firmware → Stepper motors: steps drivers
arduino/main.cpp