Skip to content
HN On Hacker News ↗

GitHub - morganwilliscloud/billai-bass: Turn a Big Mouth Billy Bass into a real-time voice assistant powered by Strands BidiAgent + Amazon Nova 2 Sonic on a Raspberry Pi 5

▲ 72 points • 28 comments • by mtw14 • 4mo ago • HN discussion ↗

Pangram verdict · v3.3

We believe that this document is mainly AI-generated, with some AI-assisted content.

94 %

AI likelihood · overall

AI
0% human-written 96% AI-generated
SEGMENTS · HUMAN 0 of 6
SEGMENTS · AI 6 of 6
WORD COUNT 1,977
PEAK AI % 99% · §6
Analyzed
Jul 13
backend: pangram/v3.3
Segments scanned
6 windows
avg 330 words each
Distribution
0 / 96%
human / AI fraction
Verdict
AI
Pangram v3.3

Article text · 1,977 words · 6 segments analyzed

Human AI-generated
§1 AI · 98%

🐟 BillAI Bass Builder Guide Powered by Strands Agents Bidirectional Streaming + Amazon Nova 2 Sonic billai-bass-demo-strands.mp4 Turn a Big Mouth Billy Bass into a real-time voice assistant: you talk, the fish talks back — head swiveling, mouth lip-syncing to its own voice, tail flapping for emphasis. The fish runs a Strands Agents bidirectional streaming agent (BidiAgent) on a Raspberry Pi 5, streaming live audio to and from Amazon Nova 2 Sonic on Amazon Bedrock. No robotics experience needed. No prior soldering experience needed. The person this guide is based on had never plugged in a Raspberry Pi before and got a talking fish in a weekend. Inspired by the excellent billy-b-assistant project, rebuilt on Strands. What's in this repo File What it is README.md This guide — start here, work top to bottom billy.py The final working Python — the talking fish motors.py Standalone motor test rig — run this before billy.py to verify wiring asoundrc.example The ALSA config that pins the USB mic + speaker as defaults requirements-frozen.txt Exact dependency versions from a known-good Pi build — pip install -r for guaranteed-working setup iot-identity/ Optional production-grade credentials: CloudFormation template + walkthrough for X.509-cert auth instead of access keys How to use this with an AI assistant Paste this README into Claude (or another AI assistant) and say: "I'm building this. Walk me through it one step at a time — wait for me to confirm each step before giving the next." That's the way it was built; that's the way it builds best. See the Build this WITH an AI Assistant section below for what to send when stuck. 🤝 Build this WITH an AI Assistant This project was created with help from Claude Code and you can use any AI assistant to help you get through. Paste this entire guide into your AI and say: "I'm building this. Walk me through it one step at a time — wait for me to confirm each step before giving the next." Your AI will pace the build to you, debug your exact error messages, and adapt when your hardware differs slightly from this guide. Things AI is great at during this build: Paste your exact error message — the scary 50-line Python traceback usually has one meaningful line, and AI will find it.

§2 AI · 99%

Send photos — stuck identifying a motor? Can't tell which pin is which? Photograph it and ask. (In Claude Code on a Mac: drop the image file into the terminal, or say "look at ~/Downloads/IMG_1234.jpg".) Say "I know nothing about X" — AI will back up and explain. There are no dumb questions. Ask before cutting/soldering anything you're unsure about. If you hit something this guide doesn't cover, that's not a failure of you. It's probably a gap in the guide. AI + your error message will get you through. 🛒 Shopping list If you got a kit: you have everything in this table already. Building from scratch: this is the original Amazon order (~$240 total, January 2026 prices). Item What it's for ~Price Big Mouth Billy Bass (current "Gemmy" version) The fish. The modern version has 2 motors, which this guide assumes $30 Raspberry Pi 5, 8GB The brain. 4GB would also work $80 27W USB-C PD power supply (official Pi or RasTech GaN) Don't substitute a phone charger — the Pi limits power to USB ports without a proper supply $15 Official Raspberry Pi 5 Active Cooler Heatsink + fan. The Pi runs hot without it $10 MicroSD card, 64GB (e.g. Transcend USD340, any name brand) The Pi's hard drive $12 USB mini speaker (e.g. HONKYOB) Billy's voice $15 USB gooseneck mini microphone (e.g. CGS-M1) Billy's ears $13 MX1508 dual H-bridge motor driver, 5-pack (e.g. Aideepen, sold as "L298N replacement") Lets the Pi safely drive the motors. You need 1; the spares forgive mistakes $9 DuPont jumper wire kit, 120pc male/female mix (e.g. ELEGOO) Connects driver board to Pi. You'll use ~6 female-to-female $7 Soldering iron kit, 60W adjustable with tips + solder 10 solder joints total.

§3 AI · 90%

Cheapest kit is fine $20 Flush cutters (e.g. KATA 2-pack) Snipping and stripping wires $9 JST XH connector kit Optional — handy for tidy splices, but the build works without it $9 Also needed, not in the kit: A personal computer (Mac/Windows/Linux) to flash the SD card — ⚠ corporate laptops often block USB storage; use a home machine A way to plug a microSD into that computer (most cards include an SD adapter) An AWS account (personal, not your employer's) with a payment method — you'll create a locked-down, fish-only IAM user in the prerequisites below Tape (electrical ideally, Scotch works), a small Phillips screwdriver Home WiFi that both your computer and the Pi can join ✅ Prerequisites (do these before build day) 1. AWS / Amazon Bedrock setup (least privilege — do it right) 💸 No AWS account yet? The free tier covers this project. New AWS accounts get $100 in credits (up to $200 with activities), and Amazon Bedrock is usable on the free plan with credits applied to Nova usage. Voice chat is cheap — roughly a penny per few minutes of conversation — so credits buy on the order of 100+ hours of fish banter. Two free-plan caveats: Brand-new accounts sometimes start with Bedrock invocation quotas set to zero (no payment history yet). If model access is granted but every call fails with ValidationException: Operation not allowed, that's the quota — file a (free) AWS support case asking for Nova Sonic on-demand quota, or upgrade to the paid plan (your remaining credits carry over). Free-plan accounts auto-close after 6 months (or when credits run out). Fine for a demo fish; if Billy's becoming a permanent housemate, upgrade to paid before the deadline — unused credits survive the upgrade. Your AWS keys will live in a plaintext file on a Pi inside a fish. Fish get demoed, lent out, and left on desks; SD cards pop out. So the keys must be able to do exactly one thing: talk to Nova Sonic. If they leak, the worst case is someone chats with a fish on your dime — not someone mining crypto in your account.

§4 AI · 98%

Step 1 — Enable model access: In the AWS console, switch region to us-east-1 (N. Virginia) — Nova Sonic lives there. Go to Amazon Bedrock → Model access and request access to Nova 2 Sonic (amazon.nova-2-sonic-v1:0). Usually instant. (Not v1 — original Nova Sonic hits end-of-life September 2026.) Step 2 — Create a dedicated IAM user: Console → IAM → Users → Create user. Name it something honest like billy-bass. Do NOT check "Provide user access to the AWS Management Console" — this user is a robot fish; it never logs into anything. On the permissions screen, choose "Attach policies directly" but don't select any of the AWS-managed policies (no AmazonBedrockFullAccess — that grants far more than the fish needs). Just click through and create the user with zero permissions. Step 3 — Attach a policy that allows only Nova Sonic: Open the new user → Permissions → Add permissions → Create inline policy → JSON tab. Paste: { "Version": "2012-10-17", "Statement": [ { "Sid": "BillyTalksToNovaSonicOnly", "Effect": "Allow", "Action": "bedrock:InvokeModelWithBidirectionalStream", "Resource": "arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-2-sonic-v1:0" } ] } Name it billy-nova-sonic-only, save. That's one action on one model in one region. No S3, no EC2, no other Bedrock models, no ability to see or change anything else in your account. (If you later give Billy tools that touch AWS — say, reading a DynamoDB table — add that specific permission to this policy then, not broad access now.) Step 4 — Create the access key: User → Security credentials → Create access key → choose "Application running outside AWS". Copy the access key ID + secret somewhere safe — the secret is shown exactly once. These go on the Pi later (§1.6). Step 5 — Optional but smart: set a billing alarm. Console → Billing → Budgets → create a $10/month budget with an email alert.

§5 AI · 99%

Casual Nova Sonic chat costs cents; the alarm is there so a stuck always-listening fish (or leaked key) can't surprise you. If the keys ever leak or a kit fish goes missing: IAM → user billy-bass → Security credentials → deactivate the access key. One click, fish bricked, account safe. 2. Know the two paste gotchas (you WILL hit these) When you paste code into a terminal/nano over SSH, two things love to go wrong: Extra indentation: every pasted line gains leading spaces. ALSA config shrugs; Python explodes (IndentationError: unexpected indent on line 1 is the signature). Fix: sed -i 's/^ //' yourfile.py, or re-paste into nano carefully. Dropped/mangled characters: a missing comma, or quotes turned into “smart quotes.” The habit that saves you: after creating any Python file, run python -m py_compile yourfile.py && echo OK before running it for real. If it doesn't say OK, paste the error to Claude. Part 1 — The Brain (Raspberry Pi, no fish yet) Strategy note: we get the entire voice assistant working on the bare Pi first, and only then open the fish. Software problems and hardware problems are much easier to debug when they can't be each other. 1.1 Flash the SD card On your personal computer: Download Raspberry Pi Imager from raspberrypi.com/software, insert the microSD. Choose: Device = Raspberry Pi 5 · OS = Raspberry Pi OS Lite (64-bit) · Storage = your card. ⚠ OS version matters: you need an image with Python 3.12+ (Nova Sonic requirement). The current "Trixie"-based Raspberry Pi OS ships 3.13 ✅. Old "Bookworm" images ship 3.11 ❌. "Lite" = no desktop. Correct — you'll never plug in a monitor. ⚠ Pick "Lite" carefully. In the OS list, expand "Raspberry Pi OS (other)" and choose Raspberry Pi OS Lite (64-bit) — not the regular "Raspberry Pi OS (64-bit)" at the top of the list, which is the Desktop edition.

§6 AI · 99%

The Desktop edition ships a Wayfire panel that aggressively rewrites ~/.asoundrc on every login, breaking your audio config repeatedly with no obvious cause. Lite has no GUI and no panel. Already installed Desktop by mistake? It's fixable without re-flashing — sudo systemctl set-default multi-user.target && sudo systemctl disable lightdm.service && sudo reboot makes Desktop boot like Lite. But Lite from the start is cleaner. When asked about OS customisation, say yes — this is the magic step: Hostname: billy Username + password: pick and remember them WiFi: your network name + password, exactly right (a typo here = mystery no-show later) Services tab: enable SSH (password authentication) Write, wait, eject. ("Raspberry Pi Connect" prompt: skip it — you can add remote access later with one command if you ever demo this somewhere.) 1.2 First boot MicroSD into the slot on the Pi's underside. Plug in the USB-C power supply — there is no power button; plugging in = on. Wait 2–3 minutes (first boot resizes things and joins WiFi). From your computer's terminal: ssh yourusername@billy.local Type yes (lowercase) at the fingerprint prompt, then your password (the cursor won't move while typing a password — normal). Gotchas: Connection reset right after the fingerprint prompt → the Pi is still finishing first-boot setup. Wait 1–2 minutes, try again. (If it then complains REMOTE HOST IDENTIFICATION HAS CHANGED: run ssh-keygen -R billy.local and retry — the Pi regenerated its key mid-setup, this is expected.) billy.local not found → wait longer; then check your router's device list for "billy" and SSH to its IP. Persistent no-show usually = WiFi password typo → re-flash. When done for the day: run sudo shutdown now, wait ~20s, then unplug. Don't just yank power. 1.3 System packages sudo apt update && sudo apt full-upgrade -y sudo apt install -y python3-dev portaudio19-dev swig git (portaudio19-dev → microphone/speaker access for Python. swig → needed to build the GPIO library later; installing it now avoids a confusing error.)