Arduino+Asr_pro voice module: intelligent voice interaction

Asrpro is an advanced speech recognition tool with high accuracy and real-time recognition capabilities. Compared with the previously commonly used LD3320, the ASR-PRO module has an absolute advantage in terms of real price and recognition accuracy

ASR_PRO can achieve the following functions:

1. Voice control: Through voice recognition through Asrpro, Arduino can perform corresponding operations according to the user's voice instructions. For example, turn on the lights, adjust the temperature, etc. through voice commands.

2. Voice feedback: Arduino can use Asrpro to convert certain status or information into voice output, so that the device can interact with the user through voice. For example, voice prompts for the current temperature, broadcast notifications, etc.

3. Voice monitoring: Arduino combined with Asrpro can realize real-time monitoring and analysis of voice. For example, a voice monitoring system can be built to detect noise, sound patterns, or voice emotions, etc.

Application examples of Arduino+Asrpro

Here is a simple example that shows how to use Arduino and Asrpro to implement voice control of an LED light switch:

First, we set the serial port output signal corresponding to the command on the official software of ASR-PRO: Tianwen BLOCk

ASP_PRO terminal program:

Insert image description here
After downloading the above program to the ASP_PRO board:
First, use the voice command: Tianwen Wuyao wake up.
When the voice is recognized: turn on the onboard light, the serial port outputs the character 'O', and then we read the serial port data on the Arduino side
as voice Recognized: Turn on the onboard light, the serial port outputs the character 'F', and then we read the data of the serial port on the Arduino side

Arduino program

// 定义引脚
const int ledPin = 13;

void setup() {
    
    
  // 初始化串口通信
  Serial.begin(9600);
  // 设置ledPin为输出模式
  pinMode(ledPin, OUTPUT);
}

void loop() {
    
    
  if (Serial.available() > 0) {
    
    
    // 读取串口接收到的字符
    char receivedChar = Serial.read();

    // 根据接收到的字符来控制灯光开关
    if (receivedChar == 'O'){
    
    
      digitalWrite(ledPin, HIGH); // 打开灯光
      Serial.println("LED已打开");
    } else if (receivedChar == 'F') {
    
    
      digitalWrite(ledPin, LOW); // 关闭灯光
      Serial.println("LED已关闭");
    }
  }
}

In the above program, when the serial port reads the character 'O', the onboard LED on the Arduino board turns on.
Insert image description here

When the serial port reads the character 'F', the onboard LED on the Arduino board turns off
Insert image description here

The following is the wiring diagram between Arduino and ASR_PRO:

Insert image description here

Guess you like

Origin blog.csdn.net/m0_63715549/article/details/131297307