Vosk + Python: offline speech setup on Jetson Orin Nano

Set up Vosk speech recognition on Jetson Orin Nano with JetPack 7.2, a USB microphone and Python, then adapt recognized text into voice commands.

Player not loading? Watch on YouTube

This tutorial builds an offline speech recognition pipeline with Vosk and Python on the NVIDIA Jetson Orin Nano, using JetPack 7.2. The speaker chooses Vosk after describing a difficult Whisper installation on his own system. His comparison reflects that experience rather than a general benchmark of either tool.

Setup covers a USB microphone, system audio settings, PortAudio dependencies and a downloaded recognition model. The speaker recommends USB after struggling to access a Bluetooth microphone from Python. He creates a virtual environment, installs Vosk and PyAudio, and points Thonny at that environment's Python executable.

The code finds the PipeWire audio device and its native sample rate, opens a mono 16-bit input stream, and resamples audio to 16,000 Hz for recognition. It reads 4096-frame chunks, a size the speaker says worked well in his setup. The first run fails because the resampling state is undefined; he initializes it to None before demonstrating transcription. He describes the recognizer as completing an utterance after roughly half a second of silence.

A final example uses spoken commands to change an imagined gate's state and exit the program. The proposed headless voice assistant, with a language model and spoken replies, is a future direction rather than a completed system in this lesson.