Many of the reliable speech recognition systems today such as Amazon Alexa or Google assistant connect to the internet and remote servers to process the speech data. However, with Voice2JSON, you can have your speech recognition data processed right on your Raspberry Pi This is called edge detection.

Voice2JSON works on top of other existing speech recognition dictionaries. This guide will be using a profile based on PocketSphinx because of its large vocabulary. PocketSphinx is maintained by Carnegie Mellon University.

Voice2JSON is a speech recognition tool for listening to speech and translating that to an intent. This allows your program to easily respond to the intent instead of worrying about the specific syntax of what was spoken. For instance, if somebody says "set light to green" instead of "change light to green" then it will still work.

While Voice2JSON was not designed to be run in Python, this guide does it anyways by launching the executable with subprocess commands and monitoring the JSON output. By leveraging Blinka, the CircuitPython compatibility layer, some powerful things can be done with the Adafruit BrainCraft HAT.


Video of a white hand hovering a coffe mug over a Adafruit BrainCraft HAT thats connected to a Raspberry Pi 4. Display detects that its a coffee mug.
The idea behind the BrainCraft HAT is that you’d be able to “craft brains” for Machine Learning on the EDGE, with Microcontrollers & Microcomputers. On ASK...
In Stock
Angled shot of Raspberry Pi 4
The Raspberry Pi 4 Model B is the newest Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing
In Stock

You will need 2 of these speakers:

Enclosed Speaker with JST cable
Listen up! This 2.8" x 1.2" speaker is a great addition to any audio project where you need 4 ohm impedance and 3W or less of power. We particularly like...
Out of Stock
Angled shot of Official Raspberry Pi Power Supply 5.1V 3A with USB C with Power plug facing down.
The official Raspberry Pi USB-C power supply is here! And of course, we have 'em in classic Adafruit black! Superfast with just the right amount of cable length to get your Pi 4...
In Stock

This guide was first published on Jun 09, 2021. It was last updated on Jul 23, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.