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:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

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

4 Replies to “Offline voice recognition module supports Arduino programming, custom voice commands”

  1. 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. The way I understand it, the fixed commands/wake word can’t be deleted, only the custom ones. So for example, the “delete all” command only deletes the user-defined commands.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC