How angelcodesbomb/baymaxv1 works
BaymaxBot is an ESP32 push-to-talk voice companion. The user holds a button to record speech; the firmware sends the WAV audio to Groq Whisper, then routes the returned text to local keyword behaviors or the documented sad-command joke response. Behaviors combine spoken audio with OLED messages and, for disco, RGB effects; weather also reads the DHT sensor. The sampled code confirms capture, transcription, local routing, displays and audio playback. The main sketch and LLM request implementation were not sampled, so their internal wiring is shown only where documented.
Main entry points: baymax_actions.cpp Command routing · BaymaxBot.ino Sketch controller · mp3_player.cpp MP3 playback · tts_player.cpp Google TTS playback
Components 19
Voice input
- Sketch controller
BaymaxBot.ino - Microphone capture
mic_capture.cpp - WAV recording
mic_capture.cpp
Command handling
- Command routing
baymax_actions.cpp - Weather behavior
baymax_actions.cpp - Disco behavior
baymax_actions.cpp - Fist-bump behavior
baymax_actions.cpp - Sad-command joke
baymax_actions.cpp
Response output
- OLED display
display_helper.cpp - MP3 playback
mp3_player.cpp - Google TTS playback
tts_player.cpp - RGB LED
rgb_led.cpp - Speaker output
External services
- Speech transcription
groq_client.cpp - Groq Whisper
- DHT sensor
- Google TTS
- Groq LLM
Other components
- User
Connections 24
- User → Sketch controller: presses button
- Sketch controller → Microphone capture: starts recording
- Microphone capture → WAV recording: builds WAV
- Sketch controller → Speech transcription: submits recording
- Speech transcription → Groq Whisper: transcribes via
- Speech transcription → Sketch controller: returns text
- Sketch controller → Command routing: routes text
- Command routing → Weather behavior: dispatches
- Command routing → Disco behavior: dispatches
- Command routing → Fist-bump behavior: dispatches
- Command routing → Sad-command joke: dispatches
- Weather behavior → DHT sensor: reads temperature
- Weather behavior → OLED display: shows readings
- Weather behavior → MP3 playback: plays response
- Disco behavior → OLED display: shows message
- Disco behavior → MP3 playback: plays track
- Disco behavior → RGB LED: flashes colors
- Fist-bump behavior → OLED display: shows message
- Fist-bump behavior → MP3 playback: plays track
- Sad-command joke → Groq LLM: requests joke
- Sad-command joke → Google TTS playback: speaks response
- Google TTS playback → Google TTS: fetches audio
- MP3 playback → Speaker output: outputs audio
- Google TTS playback → Speaker output: outputs audio