DEV Community

CAVEDU Educaion
CAVEDU Educaion

Posted on Originally published at blog.cavedu.com AI-assisted

Build a Local Voice Assistant on Jetson Orin Nano with Gemma4

Author: 子賢, CAVEDU. Tested with JetPack 6.2.

The original article takes inspiration from NVIDIA's GTC Taipei 2026 demonstration of a voice assistant on Jetson Orin Nano. Speech recognition, text-to-speech, visual analysis, and model inference can run locally after the software and models have been downloaded.

This walkthrough combines Gemma4 E2B for language and image reasoning, NVIDIA parakeet-tdt-0.6b-v3 for speech recognition, and Kokoro for speech output. The ASR model described by the source supports English and multiple European languages; do not assume Chinese transcription support from this configuration.

Jetson voice assistant demonstration

Hardware

Use a Jetson Orin Nano Super developer kit, preferably with an SSD, plus a keyboard, mouse, display, camera, microphone, and speaker. The webcam microphone and display speakers can be used where supported.

Local assistant architecture

1. Install system packages

sudo apt update
sudo apt install -y git build-essential cmake curl wget pkg-config python3-pip python3-venv python3-dev alsa-utils pulseaudio-utils v4l-utils psmisc ffmpeg libsndfile1
Enter fullscreen mode Exit fullscreen mode

2. Prepare memory

The application uses much of the available RAM. The source creates an 8 GB swap file. Check for an existing swap file and fstab entry before repeating these commands:

sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Enter fullscreen mode Exit fullscreen mode

To reclaim memory, the source temporarily stops the following services and applications. Only stop them if they are not needed for another workload:

sudo systemctl stop docker 2>/dev/null || true
sudo systemctl stop containerd 2>/dev/null || true
pkill -f tracker-miner-fs-3 || true
pkill -f gnome-software || true
free -h
Enter fullscreen mode Exit fullscreen mode

Available system memory

3. Build llama.cpp with CUDA

The source estimates 40–60 minutes for compilation. The clone URL below corrects the original article's .gi suffix typo to .git.

cd ~
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="87" -DGGML_NATIVE=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j4
Enter fullscreen mode Exit fullscreen mode

llama.cpp configuration
llama.cpp compilation

4. Download the language model and vision projector

The language-model GGUF handles language inference; the multimodal projector processes visual inputs for the model.

mkdir -p ~/models && cd ~/models
wget -O gemma-4-E2B-it-Q4_K_M.gguf https://huggingface.co/unsloth/gemma-4-E2B-it-GGUF/resolve/90f9618340396838ee7ff5b0ba2da27da62953d3/gemma-4-E2B-it-Q4_K_M.gguf
wget -O mmproj-gemma4-e2b-f16.gguf https://huggingface.co/ggml-org/gemma-4-E2B-it-GGUF/resolve/4b90c7b785141802608550fc3cd3c715201532e2/mmproj-gemma-4-e2b-it-f16.gguf
ls -lh
Enter fullscreen mode Exit fullscreen mode

Downloading the language model
Downloading the vision projector

5. Start the model server

Keep this terminal running; the Python assistant will send requests to it from another terminal.

~/llama.cpp/build/bin/llama-server -m ~/models/gemma-4-E2B-it-Q4_K_M.gguf --mmproj ~/models/mmproj-gemma4-e2b-f16.gguf -c 2048 --image-min-tokens 70 --image-max-tokens 70 --ubatch-size 512 --batch-size 512 --host 0.0.0.0 --port 8080 -ngl 99 --flash-attn on --no-mmproj-offload --jinja -np 1
Enter fullscreen mode Exit fullscreen mode

This reproduces the source's network binding. Keep the unauthenticated development server on a trusted network, or bind to localhost when only the local assistant needs it. CLI compatibility can change with llama.cpp revisions.

Starting llama-server
Model server ready

6. Install the assistant example

Open another terminal:

cd ~
git clone https://github.com/asierarranz/Cool_Demos.git
cd ~/Cool_Demos/Gemma4
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install opencv-python-headless onnx_asr kokoro-onnx soundfile huggingface-hub numpy
Enter fullscreen mode Exit fullscreen mode

Downloading the demo
Python virtual environment setup

7. Select audio and camera devices

List recording devices:

arecord -l
export MIC_DEVICE="plughw:0,0"
Enter fullscreen mode Exit fullscreen mode

Replace 0,0 with your microphone's card and device numbers.

Microphone card and device numbers

List playback sinks and select the speaker:

pactl list short sinks
export SPK_DEVICE="alsa_output.platform-3510000.hda.hdmi-stereo"
Enter fullscreen mode Exit fullscreen mode

The sink above is the source's HDMI example. Use the name actually returned on your system. The executable command uses SPK_DEVICE.

Audio output sink selection

List cameras and select the appropriate video index:

v4l2-ctl --list-devices
export WEBCAM=0
export VOICE="af_jessica"
Enter fullscreen mode Exit fullscreen mode

Other Kokoro voices named in the source include af_nova, am_puck, bf_emma, and am_onyx. Check the installed voice configuration.

Camera device selection

Record three seconds and play it back:

arecord -D "$MIC_DEVICE" -f S16_LE -r 16000 -c 1 -d 3 /tmp/test.wav
paplay --device="$SPK_DEVICE" /tmp/test.wav
Enter fullscreen mode Exit fullscreen mode

Microphone and speaker test

8. Run the assistant

cd ~/Cool_Demos/Gemma4
python3 Gemma4_vla.py
Enter fullscreen mode Exit fullscreen mode

The first run downloads the speech-recognition and speech-synthesis models and may take several minutes. Once loaded, press Space to record, speak, then press Space again to stop. The program transcribes the recording, sends the text to llama-server, and speaks the model's response.

Assistant startup
Recording speech
Spoken response workflow

When the assistant determines that visual information is needed, it can capture a camera image and use it in the response. The source asks, “Do you see anyone in front of you?”, triggering the Gemma decided to LOOK! path and a classroom-scene description.

Camera-assisted response

Reference: Cool_Demos by asierarranz, Gemma4 E2B, and Parakeet model.

English adaptation of CAVEDU's original tutorial. Original author: 子賢. Commands reflect the source setup, with the clone-URL typo corrected and the speaker variable clarified. Screenshots retain their original labels. This translation does not constitute a new hardware test.

Top comments (0)