MicroLLM is the world’s first real-time voice assistant that runs entirely on a Raspberry Pi Pico W! By leveraging Groq’s blazing-fast LLaMA API and ElevenLabs for natural-sounding text-to-speech, it delivers contextual AI responses through a DAC via I2S audio output—all on a $6 microcontroller.
| Pico Pin | MAX98357A Pin |
|---|---|
| GP1 | BCLK |
| GP0 | LRCK |
| GP9 | DIN |
| GND | GND |
| 3V3 | VDD |
.uf2 firmwarecode.py and lib/ folder to Picosettings.toml:CIRCUITPY_WIFI_SSID = "YourWiFiNetwork"
CIRCUITPY_WIFI_PASSWORD = "YourPassword"
ELEVENLABS_API_KEY = "your-elevenlabs-api-key"
GROQ_API_KEY = "your-groq-api-key"
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Pico W │───▶│ Groq API │───▶│ LLaMA 3 LLM │
│ (WiFi) │ │ (Cloud) │ │ │
└─────────────┘ └─────────────┘ └──────┬──────┘
│
Text Response │
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Speaker │◀───│ I2S DAC │◀───│ ElevenLabs │
│ │ │ (MAX98357A) │ │ TTS Stream │
└─────────────┘ └─────────────┘ └─────────────┘
import adafruit_requests
response = requests.post(
"https://api.groq.com/openai/v1/chat/completions",
json={"model": "llama3-8b-8192", "messages": messages},
headers={"Authorization": f"Bearer {groq_api_key}"}
)
answer = response.json()["choices"][0]["message"]["content"]
print("Response:", answer)