🏆 Join the TuyaOpen AI Hardware Contest! 100 days to build the future of AI devicesLearn More →
Skip to main content

T5+2M-ASR-PRO Custom Wake Words

Project Introduction

The T5 platform supports a limited set of default wake words, for example:

  • TuyaOS supports three default wake words: "Nihao Tuya" (Hello Tuya), "Xiao Zhi Tongxue" (Classmate Zhi), and "Hey, Tuya" (English).
  • TuyaOpen supports four default wake words: "Nihao Tuya", "Xiao Zhi Tongxue", "Xiao Zhi Guanjia" (Butler Zhi), and "Nihao Xiao Zhi".

If you want to customize the wake word, there are three solutions:

This tutorial introduces the first solution: adding a voice recognition module. This approach has the following advantages:

  • Low technical barrier, no need to understand audio algorithms.
  • Supports multiple wake words with Tuya AI Agent multi-role feature. Different wake words can correspond to different roles, avoiding awkward mismatches between roles and wake words.
  • Supports offline speech recognition. The ASR PRO module supports offline neural network computation, enabling speech recognition without relying on a network. This ensures normal operation even in environments with no or unstable network connectivity.
  • High recognition rate. The ASR PRO module features strong echo cancellation and environmental noise suppression, maintaining high speech recognition accuracy even in noisy environments. The recognition rate can reach over 98%, with a response time of less than 0.15 seconds.

Required Materials

HardwareFunction/Parameters
T5 Development BoardProvides core AI conversation functionality
ASR PRO ModuleSupports custom wake words and offline speech recognition
Serial Board or ASR-LINK DownloaderA standard CH340 serial board is sufficient for downloading programs to ASR PRO. If available, you can purchase the ASR-LINK automatic downloader.
MicrophoneUsed for audio pickup by the ASR PRO module

2M ASR PRO Speech Recognition Module (Core Board)

Chip datasheet: View here

Appearance:

Chip Datasheet

Hardware Wiring Instructions

First, you need to program and flash firmware to the ASR PRO, then connect the ASR PRO module to the T5 development board. Therefore, wiring is divided into two parts:

ASR PRO Flashing Wiring

ASR PRO ModuleSerial Board
GNDGND
5V5V
PB5 (UART0 TX)RX
PB6 (UART0 RX)TX
MIC +Mic +
MIC -Mic -

T5 Development Board to ASR PRO Module Connection

T5 Development BoardASR PRO Module
GNDGND
5V5V
P10 (UART0 TX)PB5 (RX)
P11 (UART0 RX)PB6 (TX)
P12 (Wake Pin)PA4 (Demo use, customizable). Note: If using serial wakeup, you can skip connecting the P12 wake pin.

Demo Video

ASR PRO Program Development

Tuya AI Agent supports multiple roles, and the ASR PRO module supports up to 5 wake words, each with a unique recognition ID. You can design a program where each role has a dedicated wake word. When developing the ASR PRO program, you can use the recognition ID to distinguish wake words, for example, controlling different IO pins or sending data via serial to the main controller T5.

It is recommended to use Tianwen Block for developing the ASR PRO module. Its graphical programming interface is very beginner-friendly. You can download it from the Tianwen 51 official website.

Example Program

The system is configured with three wake words: "Hello Nezha", "Hello Zhu Bajie", and "Hello Conan". When the ASR PRO module recognizes any of these wake words, it should trigger the wake function via IO and output data via serial:

  • After recognizing the wake word, ASR PRO will set PA4 to low for 100 ms, then pull it high.
  • Outputs hexadecimal data via serial (PB5 PB6 pins).
Wake WordSerial Output
Hello NezhaA0 01 00
Hello Zhu BajieA0 01 01
Hello ConanA0 01 02

Downloads

Firmware Flashing

For instructions on firmware flashing, please refer to the video tutorial.

Reference image:

Firmware Flashing

T5 Program Development

IO Wakeup

IO wakeup is relatively simple. Just connect the ASR PRO's wake pin to the T5's wake pin (default P12).

Serial Wakeup

For serial wakeup, simply check for the recognized wake command in the serial receive program and call the audio_recorder_start(); interface. Below is a serial example: