Offline voice recognition module supports Arduino programming, custom voice commands

We’ve already covered inexpensive offline voice recognition modules based on US516P6 or TW-ASR ONE microcontrollers that allow people to add smarts to their projects without a network connection for improved privacy and lower latency.

Those are great in theory, but at the time (April 2022) documentation was lacking or only in Chinese, and they were fairly hard to use based on some of the comments in my earlier posts. But today, I’ve noticed DFRobot is now selling the “Gravity: Offline Voice Recognition Sensor – I2C & UART” module with support for Arduino programming, and it looks fairly easy to customize as we’ll see further below.

Voice Recognition DF2301QG

Gravity Voice Recognition DF2301QG module specifications:

  • Voice recognition module – WS-2520-TR module with
    • MCU – TBD
    • 121 commonly used fixed voice commands, one-fixed wake word
    • Support for 1 learned wake-word, 17 user-defined commands
  • Audio
    • Output – Built-in speaker and external speaker interface
    • Input – Dual microphones with -28dB sensitivity
  • Host interface – I2C (0x64 address) and UART via 4-pin “Gravity” connector;  3.3V and 5V compatible
  • Misc – Power LED (red), recognition status LED (blue)
  • Supply Voltage – 3.3 to 5V
  • Max current –  ≤370 mA (5V)
  • Dimensions – 49 x 32 mm

WS-2520-TR voice recognition sensor

The important part is that it is much easier to work with than the earlier offline voice modules. The default wake word is “Hello robot”, but you can change it to another one with the voice command “learning wake word” and you’ll be asked to repeat your new wake word such as “hello, there” three times.

The same is true for voice commands. The module comes with over 100 preset commands such as “Turn left ninety degrees”, “Tag recognition”. “Forget”, “Turn off the light”, etc.. and so on, but the user can also have the module learn up to 17 new custom commands using the voice command “Learning command word” for a specific ID. You’ll also be asked to repeat the voice command three times to register it. Everything is explained in detail in the wiki.

Offline Voice Recognition Arduino

The DF2301QG offline voice recognition module is shown connected to an Arduino clone over I2C board, but it could support any other hardware with UART or I2C including other Arduino boards, Raspberry Pi boards or SBCs, ESP32 modules, and boards, etc…

So far we have not done any programming, and only used our voice to customize the module. Each wake word and voice command has its own ID, and that’s what we’d use in an Arduino Sketch as shown below after having installed the DF2301Q Arduino library:

DFRobot DF2301QG module is selling for $16.90 which is about double the price of the other modules I covered before, but it may be worth it as it looks much easier to use than the other ones.


Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
1 year ago

can Fixed Command Words and Learning-related commands themselves be deleted by “I want to delete” ? If so it can be sabotaged and potentially put in non-functioning state.

1 year ago

Under $20 that’s not bad. I’d like more than 17 custom commands but its price isn’t unreasonable all things considered.

1 year ago

It’s not a complete solution yet (with microphone, etc), but did you see the announcement for the Renesas ASSP EASY MCU for Voice HMI Based on RISC-V? I haven’t investigated it in detail (no need), but it’s a Renesas RISC-V MCU with 3rd part off line voice recognition software.

Khadas VIM4 SBC