Thinkman Portable, Raspberry Pi Based Offline AI Assistant 6 June 2025 4 minute read By Kevin McAleer Share this article on Table of Contents InspirationHardwareSetupSoftware ArchitecturePython setupinstall.shInstall DockerAssembly Tags: Raspberry Pi ai Difficulty: beginner Category: raspberrypi Code: https://www.github.com/kevinmcaleer/thinkman Home Projects Thinkman Thinkman Portable, Raspberry Pi Based Offline AI Assistant 6 June 2025 | 4 minute read | By Kevin McAleer | Share this article on Page last updated 6 June 2025 Video For every project I create, I often make a corresponding YouTube video. Sometimes, there might be more than one video for a single project. You can find these videos in this section. Explore more through this this dedicated video. Inspiration This was an idea I had ever since running Ollama on a Raspberry Pi 5 for the first time, however it was the PiSugar team (https://www.pisugar.com) who kindly provided me with a PiSugar 3 Plus battery pack at Makers Central this year that made this project possible. The physical design is an homage to Sony Walkman; I had one of these as a kid, and I took it everywhere with me, so I wanted to create a modern version of this, but with a Raspberry Pi and AI. Hardware This project uses the following hardware: Raspberry Pi 5 - the latest Raspberry Pi, with 4Gb of RAM or higher - I used a 16Gb Pi 5 for this project. PiSugar 3 Plus - a battery pack that allows you to power the Raspberry Pi on the go. 3D Printed Case - a custom case that holds the Raspberry Pi and the battery pack together, designed to look like a Sony Walkman. USB Headset - for audio input/output, to allow you to speak to the AI assistant, and hear responses. M.2 HAT+ and NVMe SSD - for additional storage, allowing you to run larger AI models and store more data. Active cooling - a small fan to keep the Raspberry Pi cool during operation, especially when running AI models. Setup On your Raspberry Pi, open up a terminal. First we need to clone the Thinkman project. Clone the thinkman project: git clone https://github.com/kevinmcaleer/thinkman then cd thinkman Software Architecture Software Architecture Thinkman software stack Thinkman is made up of a few different components: ollama - this is a local AI model server that allows you to run large language models on your Raspberry Pi. vosk - this is a speech recognition library that allows you to convert speech to text. espeak-ng - this is a text-to-speech engine that allows you to convert text to speech. docker - this is used to run the ollama server and the open webui. Python setup On Raspberry Pi we need to install the following packages: libportaudio2 - this is the PortAudio library, which is used for audio input and output. portaudio19-dev - this is the development files for PortAudio, which are needed to build the Python bindings. espeak-ng - this is a text-to-speech engine that will be used to speak the responses from the AI models. We also need to download the vosk model. Luckily both of these tasks are taken care of by running the install.sh script. install.sh The install.sh script will install the required packages and download the Vosk model for you. It will also install uv, the Ultimate Virtual environment and package manager for Python, set up the Python virtual environment and install the required Python dependencies. Downloads and installs the vosk language model for accurate speech recognition installs portaudio & espeak-ng installs uv - the Ultra Fast Virtualenv and Package Manager sets up the virtual python environment installs the python dependencies brings up the ollama docker container downloads 2 large language models; deepseek-r1:1.5b and tinyllama Next we need to setup a virtual environment, lets install UV as its much faster than the traditional method: curl -LsSf https://astral.sh/uv/install.sh | sh Next setup the virtual environment with: uv venv venv Now lets install the python dependencies: uv pip install -r requirements.txt ollama and open webui install via docker Install Docker If you’ve not got docker installed, follow these instructions: https://www.kevsrobots.com/learn/docker/02_installing-docker.html Run the docker command to bring up ollama and the open webui: docker compose up -d This will install docker and bring up open webui as well. Finally we need to download the deepseek-r1:1.5b model into ollama. docker exec -it ollama ollama run deepseek-r1:1.5b and to install the TinyLlama model, use: docker exec -it ollama ollama run tinyllama Type /bye to exit the ollama prompt Now run the code with python main.py Assembly The 3D printed case is designed to hold the Raspberry Pi, the PiSugar battery pack, and the M.2 HAT+ with NVMe SSD. The case is printed in three parts: body, top, and flap. Assembling the parts is simple and doesn’t require glue. 2x M2.5 screws are used to attach the PiSugar battery pack to the body. The flap is held in place with a friction fit. Code View Code Repository on GitHub - https://www.github.com/kevinmcaleer/thinkman 3D Models Here are the 3D printable STL files: STL List Body Top Flap Body Download thinkman_body_v1.stl Top Download thinkman_top_v1.stl Flap Download thinkman_flap_v1.stl Liked this article? You might like these too. Pi Tray - Mini-rack - Part II In this part of the mini-rack project, we will finish the design with the Pi Tray, Top Panel and Front Cluster Panel Pi 10 Inch Mini-rack A mini-rack is a great way to keep your equipment organized and easily accessible. Installing and Using DeepSeek-R1:1.5 on a Raspberry Pi with Docker We explore its features, pros, cons, and why it's a disruptive innovation challenging ChatGPT and Gemini. Gamepad & BurgerBot Build a Raspberry Pi Pico powered bluetooth remote control for your robot 10 Projects for your Raspberry Pi Pico If you've just got a new Raspberry Pi Pico and you're looking for some inspiration, then you've come to the right place. Here is a collection of projects that you can build with your Raspberry Pi Pico. Raspberry Pi Telegraf Setup with Docker "Learn how to set up Telegraf on your Raspberry Pi with Docker to monitor system metrics and integrate with popular time-series databases like InfluxDB or Prometheus."
Thinkman Portable, Raspberry Pi Based Offline AI Assistant 6 June 2025 4 minute read By Kevin McAleer Share this article on Table of Contents InspirationHardwareSetupSoftware ArchitecturePython setupinstall.shInstall DockerAssembly Tags: Raspberry Pi ai Difficulty: beginner Category: raspberrypi Code: https://www.github.com/kevinmcaleer/thinkman
Inspiration This was an idea I had ever since running Ollama on a Raspberry Pi 5 for the first time, however it was the PiSugar team (https://www.pisugar.com) who kindly provided me with a PiSugar 3 Plus battery pack at Makers Central this year that made this project possible. The physical design is an homage to Sony Walkman; I had one of these as a kid, and I took it everywhere with me, so I wanted to create a modern version of this, but with a Raspberry Pi and AI. Hardware This project uses the following hardware: Raspberry Pi 5 - the latest Raspberry Pi, with 4Gb of RAM or higher - I used a 16Gb Pi 5 for this project. PiSugar 3 Plus - a battery pack that allows you to power the Raspberry Pi on the go. 3D Printed Case - a custom case that holds the Raspberry Pi and the battery pack together, designed to look like a Sony Walkman. USB Headset - for audio input/output, to allow you to speak to the AI assistant, and hear responses. M.2 HAT+ and NVMe SSD - for additional storage, allowing you to run larger AI models and store more data. Active cooling - a small fan to keep the Raspberry Pi cool during operation, especially when running AI models. Setup On your Raspberry Pi, open up a terminal. First we need to clone the Thinkman project. Clone the thinkman project: git clone https://github.com/kevinmcaleer/thinkman then cd thinkman Software Architecture Software Architecture Thinkman software stack Thinkman is made up of a few different components: ollama - this is a local AI model server that allows you to run large language models on your Raspberry Pi. vosk - this is a speech recognition library that allows you to convert speech to text. espeak-ng - this is a text-to-speech engine that allows you to convert text to speech. docker - this is used to run the ollama server and the open webui. Python setup On Raspberry Pi we need to install the following packages: libportaudio2 - this is the PortAudio library, which is used for audio input and output. portaudio19-dev - this is the development files for PortAudio, which are needed to build the Python bindings. espeak-ng - this is a text-to-speech engine that will be used to speak the responses from the AI models. We also need to download the vosk model. Luckily both of these tasks are taken care of by running the install.sh script. install.sh The install.sh script will install the required packages and download the Vosk model for you. It will also install uv, the Ultimate Virtual environment and package manager for Python, set up the Python virtual environment and install the required Python dependencies. Downloads and installs the vosk language model for accurate speech recognition installs portaudio & espeak-ng installs uv - the Ultra Fast Virtualenv and Package Manager sets up the virtual python environment installs the python dependencies brings up the ollama docker container downloads 2 large language models; deepseek-r1:1.5b and tinyllama Next we need to setup a virtual environment, lets install UV as its much faster than the traditional method: curl -LsSf https://astral.sh/uv/install.sh | sh Next setup the virtual environment with: uv venv venv Now lets install the python dependencies: uv pip install -r requirements.txt ollama and open webui install via docker Install Docker If you’ve not got docker installed, follow these instructions: https://www.kevsrobots.com/learn/docker/02_installing-docker.html Run the docker command to bring up ollama and the open webui: docker compose up -d This will install docker and bring up open webui as well. Finally we need to download the deepseek-r1:1.5b model into ollama. docker exec -it ollama ollama run deepseek-r1:1.5b and to install the TinyLlama model, use: docker exec -it ollama ollama run tinyllama Type /bye to exit the ollama prompt Now run the code with python main.py Assembly The 3D printed case is designed to hold the Raspberry Pi, the PiSugar battery pack, and the M.2 HAT+ with NVMe SSD. The case is printed in three parts: body, top, and flap. Assembling the parts is simple and doesn’t require glue. 2x M2.5 screws are used to attach the PiSugar battery pack to the body. The flap is held in place with a friction fit.