Skip to content

ivegotanheadache/BMO

Repository files navigation

BMO (A Local AI companion on Raspberry Pi 5)

I literally want to build BMO.

What is BMO?
--> He’s BMO.

bmo

I found an old project for an RPi 3 and thought it would be cool to rebuild it from scratch on an RPi 5. And here we are. It can recognize simple objects and talk to you.

I am also working on facial and voice recognition, as well as letting him play games with you.

RPI Voice assistant with OpenAI/Mistral

The strength of Rpi-voice-assistant is that it can use both OpenAI and Mistral (and other APIs in the future), with automatic fallback and easy switching between them.

  • Outside your home: You can use OpenAI.
  • Don’t want to pay for OpenAI? You can run a local Mistral API server on your PC.
  • With BaseHandler: It’s easy to extend to other APIs and use it as a generic LLM class. Beyond just a chatbot, it’s simple to build multi-purpose agents.

I know, the name might not be original, but, I mean, I'm building BMO so what other name should I use?

Hardware

  1. Raspberry Pi 5
  2. Active Cooler (Please make sure to buy the official 'ACTIVE' one)
  3. Speakers
  4. IMX219 Camera with Pi 5 Flat cable
  5. Lavalier Microphone (I used one I already had with a USB adapter)
  6. 7'' Display compatible with Raspberry Pi
  7. BMO Switch Case

How to talk with BMO right now:

0. (Required) Install the models

1. (Optional) Mistral – on your PC

  1. Copy only the .mistralserver directory
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. Modify config.py with the absolute path of your Mistral model and settings
  6. python3 api_server2.py

2. On the Raspberry Pi 5

  1. python -m venv venv
  2. source venv/bin/activate
  3. pip install -r requirements.txt

  4. Configuration:
  5. Modify config.json with the paths for your Vosk model, Piper model, and (if set) the URL of your local Mistral API server
  6. Change the extension of BMO/handlers/.env.example to BMO/handlers/.env and insert your OPENAI API-KEY

  7. python3 main.py

For other languages:

For now, I've just added english, italian and spanish select "en" or "it"" or "sp" in the config.json file

If you want to help by adding yourlanguage, you can find the prompts in /memories/whoami.yaml

I'm working on adding all languages to whoami.yaml

The vosk model is english so you will hear BMO with british accent, that I found has voice very pretty similar the the BMO's one so i find it pretty cute, but obviusly you can install whatever voice you want

Project's structure

Diagramma di Flusso

Releases

No releases published

Packages

No packages published

Languages