(Arduino + AI Voice Therapy Bot)
A compact, voice-activated AI companion built using the Arduino UNO R4, custom analog audio front-end, and a single Python backend (bridge.py).
AURA listens through an analog microphone, streams audio into a Python backend for STT β AI β TTS, and plays natural speech through a Class-D amplifier.
This repository includes hardware, firmware, Python backend, and 3D-printable shell CAD for a complete end-to-end build.
AURA/
β
βββ AURA_ARDUINO/ # PlatformIO firmware project
β βββ src/main.cpp
β βββ include/
β βββ lib/
β βββ test/
β βββ .vscode/
β βββ platformio.ini
β
βββ bridge.py # Single backend Python file (STT β LLM β TTS)
β
βββ docs/
β βββ schematic.pdf # Full electronics schematic
β βββ architecture.png # System architecture diagram
β βββ CAD/
β βββ AURA Shell UPPER.stl
β βββ AURA Shell LOWER.stl
β
βββ resampled_resampy.wav # Debug sample output
βββ README.md
βββ .gitignore
AURA uses:
- Arduino UNO R4 Minima
- SEN0487 Analog Electret Microphone
- PAM8302A Class-D Audio Amplifier
- Single-ended mic input (AC-coupled)
- High-frequency PWM speaker output
- Custom 3D-printed enclosure
Mic β Arduino ADC β Serial β bridge.py β
Google STT β Azure GPT-4o Mini β TTS β
Arduino PWM β PAM8302 β Speaker
| SEN0487 Pin | Arduino Pin | Notes |
|---|---|---|
| OUT | A0 (MIC_IN) | Through 10 Β΅F capacitor (AC coupling) |
| VCC | 3.3V | Mic power |
| GND | GND | Common ground |
| Arduino Pin | PAM8302 Pin | Purpose |
|---|---|---|
| D9 (SPK_OUT) | A+ | PWM audio signal |
| GND | A- | Ground |
| 5V | VIN | Amplifier power |
| GND | GND | Power ground |
Additional components used:
- C1 = 10 Β΅F (audio smoothing)
- R1 = 10k (pull-down resistor for stable PWM idle)
docs/schematic.pdf
Located in docs/CAD/:
AURA Shell UPPER.stlAURA Shell LOWER.stl
The Arduino code lives inside AURA_ARDUINO/ and is built using PlatformIO (not Arduino IDE).
AURA_ARDUINO/
β
βββ src/main.cpp # Main firmware logic
βββ include/
βββ lib/
βββ test/
βββ .vscode/
βββ platformio.ini
main.cpp handles:
- ADC sampling of microphone at ~6.5 kHz
- Serial streaming of raw audio frames to Python
- Receiving PCM audio from Python
- Reconstructing audio via high-frequency PWM on D9
- Synchronizing with Python's
bridge.py
From inside AURA_ARDUINO/:
pio run
pio run --target uploadOr use VSCode PlatformIO:
- β Build
- β Upload
- β Serial Monitor
[env:uno_r4_minima]
platform = renesas-ra
board = uno_r4_minima
framework = arduino
monitor_speed = 921600The entire AI pipeline runs through one Python script.
Audio β STT β GPT-4o Mini β TTS β Audio Playback
- Serial connection to Arduino
- Audio buffer and noise preprocessing
- Google STT
- Azure GPT-4o Mini
- gTTS
- WAV β PCM conversion
- Sending PCM packets to Arduino
git clone https://github.com/l-krrish/AURA
cd AURApython -m venv .venv
.\.venv\Scripts\activatepip install -r requirements.txtAZURE_ENDPOINT = "https://therapy-bot.openai.azure.com/"
AZURE_API_KEY = "<your key>"
AZURE_DEPLOYMENT = "gpt-4o-mini"
GOOGLE_CREDENTIALS = "credentials.json"Inside AURA_ARDUINO/:
pio run --target uploadpython bridge.pyYou should see:
Connected to Arduino on COM7
AI Therapy Bot Ready.
Recording...
Speak β AURA replies β audio plays.
- Real-time conversational feedback
- GPT-4o Mini reasoning
- Hardware-accurate PWM audio
- Full schematic + CAD for reproducibility
- Single-file backend for simplicity
- Custom enclosure design
- Wake-word activation
- Noise reduction filters
- ESP32-S3 upgrade
- Local quantized LLM support
- LED expressions + servo motion