Skip to content

Offline Speech Solution - Communicate with Electronic Control through UART

New users are recommended to check the ☞Beginner’s guide to understand the basic knowledge of development, and then view this document.


1 General

Offline voice technology is increasingly being used across various products, adding “ears” and “mouths” that can hear and speak to originally non-intelligent products, thereby enhancing user experience. The most common method to integrate offline speech recognition in applications is through UART communication, connecting the voice chip’s UART port with the MCU’s UART port on the user’s electronic control board. The advantages of this approach include:

  • Rapid development and verification: This method only requires adding a microphone port and voice module to the existing product, with no need to redesign the software and hardware, allowing for quick development and verification.
  • Flexible application: This approach can be flexibly applied to multiple products. Only few modifications to UART and voice command words are needed for different products.

2 Solution Advantages

Our company has iterated multiple generations of chips. New series are featured by strong recognition performance and high reliability. Some features of our solution are as follows:

  • Fast Speech Recognition response: generally respond within 0.2~0.8s;
  • High recognition rate: recognition rate>95%;
  • High reliability: Our chips and standard modules have passed 85°C/85% RH (Relative Humidity) tests and EMC tests, which can meet the high quality requirements of Gree, Midea and other appliance giants;
  • Comprehensive development documentation: comprehensive software, hardware and structure design solution documentation can shorten development cycle and lower development difficulty for users;
  • Easy customization: Our AI Platform allows for straightforward development, enabling quick and flexible customization of wake-up and command words without needing users to supply a voice corpus;
  • Far distance recognition: it can still be recognized when it is 10 meters away.

At present, our voice solutions have been widely used in mass production in various fields, such as fans, electronic clothes hangers, heating tables, tea bar machines, lighting, etc.

串口模块方案-1

For more information about our chip solutions, please contact us through the following ways.

Tel.: +86-028-61375925 Email: support@Chipintelli.com


3 Application Solution Introduction

If you are first exposed to voice solutions, it is recommended that you first look at the complete product design process ☞product solution development process.

This part focuses on the application block diagram, modules and structure considerations in the product design.

3.1 Application Block Diagram

The application block diagram of the solution is as follows (taking the clothes hanger as an example). The voice module and the electronic control module need a four-wire serial connection. The voice module plays audio based on the state of the product’s electronic control, while the product’s inherent control remains managed by the electronic control module.

串口模块方案-2-

The voice module and the electronic control module exchange information through UART. There are two main ways. One is to play the voice module actively and generate the information to the control module at the same time; The other is voice module passive play, which is described as follows:

3.2 UART Communication Mode

Voice Module Active Play

串口模块方案-3

The active play mode mainly performs the following actions:

  1. Recognize voice commands;
  2. Actively play the voice prompt;
  3. Inform the electronic control module of this message through UART;
  4. The electronic control module executes actions.

Advantages: simple control mode, one-way output information from voice module to electronic control module.

Disadvantages: It is impossible to give voice prompts according to the current situation of the product and the button controls on the electric control panel.

Voice Module Passive Play

串口模块方案-4

The passive play mode mainly performs the following actions:

  1. Speech module recognizes voice commands;
  2. Inform the electronic control module of the voice command information through UART;
  3. The electronic control module executes relevant actions;
  4. Inform the voice module of the content to be played through UART;
  5. The voice module plays voice prompt according to instructions of the electronic control module.

Advantages: The voice module provides feedback based on the electronic control module’s status, ensuring the most suitable response and enhancing user experience. Additionally, the voice module plays corresponding voice prompt when the electronic control module is operated via buttons or remote control.

Disadvantages: The electronic control MCU chip requires a small amount of code development work, and the development cycle is slightly longer than the active play mode.

3.3 Hardware Selection

For this solution, our company has a number of standard modules that can be supported. Users can click the ☞Hardware Selection Guide to view and select the appropriate modules. Here are some modules that can use UART, as follows:

3.3.1 CI130X Module

Such modules include CI-D02GS02S, CI-D02GS01J, etc., as shown in the figure below:

串口模块方案-8

Attention:

  • If the voice module board is powered by the electric control panel, note that the power supply capacity of the electric control panel to the voice module needs to be greater than 500mA;
  • The level of CI-D02GS02S serial port supports 3.3V and 5V, which can be configured through software. Note that when 5V is used, the backplane needs to add a pull-up resistor, and the software needs to enable macro definition: UART_PAD_OPENDRAIN_MODE_EN;
  • When using CI-D02GS02S, be sure to reserve UART0 and PGEN contacts or sockets on the backplane for subsequent online upgrades;
  • CI-B02GS06J has pull-up resistance on the PCB, and only supports 5V level by default.

3.4 SDK and UART Description

Our company has provided users with a complete SDK for this solution. Users can go to ☞Chipintelli AI Speech Development Platform.

It is recommended to use our standard UART for communication between the module and the MCU. For the specific format, please refer to ☞Serial Protocol.

Note:

  1. It is recommended to use different acoustic models in different fields. The details can be seen in the list when developing models, as follows: (Note the code configuration suggestions for related models);

串口模块方案-9

  1. The default parameters of serial communication are: * Baud rate: 9600 * Stop bit: 1 * Data bits: 8 * Parity: None
  2. The code determines the specific command and function by evaluating the “Command + Voice ID”.
  3. It is advisable to verify the completeness of the transmitted serial port data.

4 Product Structure

In the offline voice solution, the product structure design is very important, and the location of the microphone and speaker will directly affect the user experience. This part focuses on the structural design of the microphone and speaker to ensure the speech recognition effect of the finished product.

4.1 Precautions for Microphone Structure Design

  • It is recommended to select an omnidirectional analog microphone with a sensitivity of -32dB ± 3dB and a signal-to-noise ratio exceeding 70dB, offering good cost-effectiveness;
  • If the product experiences significant vibration, opt for a thicker microphone rubber sleeve to mitigate vibration and minimize its impact on recognition performance;
  • In environments prone to water or dust accumulation, select a waterproof and dust-proof microphone (coordinate with the microphone manufacturer for options);
  • The microphone head is sensitive and should not be directly exposed to hot melt adhesive;
  • Ensure the microphone is fully inserted into the mounting hole to prevent misalignment, with the center of the pickup hole aligned with the microphone’s center;
  • Choose RTV silicone that meets RoHS environmental standards; commonly recommended silicones include 703, 704, 737, or other organic materials and single-component room temperature curing silicones;
  • For most silicone rubber applications with a thickness under 3mm, complete curing at room temperature takes 8 to 12 hours. For thicknesses over 3mm, curing takes longer, so consider layering the application to ensure complete and stable sealing;
  • In the production process, prioritize securing the microphone early. Pay special attention to the microphone wiring, as gravitational pull can cause misalignment before full curing. Ensure the microphone cable is securely fastened.

串口模块方案-10

4.2 Precautions for Speaker Structure Design

  • To ensure good sound quality, the speaker power should not be too low. It is recommended to use speakers with a power rating above 1W. Speakers with a sound chamber tend to perform better;Additionally, ensure the power amplifier on the hardware board is compatible with the speaker model;
  • The speaker should be placed with consideration for aesthetics and convenient structural layout, but it should ideally not be positioned in the same location as the microphone;
  • For speakers without a built-in sound chamber, creating a sealed sound chamber in the structure can enhance volume output.

The following figure shows a speaker specification and opening suggestions.

串口模块方案-11

4.3 Other Precautions

Taking the structural design of the electronic clothes hanger as an example, the following factors should be considered for the microphone:

*Position the microphone away from noise sources such as the clothes hanger and motor. Place the microphone at the front or bottom of the clothes hanger to avoid obstructions and maximize pickup range. Ensure the steady noise level at the microphone is below 60dB when measured with a decibel meter during operation. If the microphone cable is long, consider using a shielded cable. Bundle the microphone cable away from the motor or electronic control cables.

The following illustration uses a retractable clothes hanger as an example to demonstrate recommended practices for microphone placement and opening. It is important to consider the microphone wire routing for easy lead-out and to minimize interference with the structural components securing the microphone.

串口模块方案-12


5 List of Relevant Reference Materials

No. Reference description Access method
1 Standard offline SDK
CI130X_SDK_Offline_1.2.7
Please go to ☞start Chipintelli AI Speech Development Platform
2 Selection guide of our chips and modules Please click the ☞Hardware Selection Guide to view
3 Reference of Huawei’s chip hardware design method Please click ☞hardware design reference to view
4 Model selection of microphone and speaker devices Please click ☞Compatibility list of peripheral devices to view
5 Product structure design Please click on ☞Product structure design to view
6 Software development method and standard SDK description Please click ☞Software development to view the contents of each part
7 Product speech recognition performance test method Please click ☞speech recognition effect test to view
8 Method of production test Please click ☞production test to view

If users encounter problems in use, please submit support tickets on Chipintelli AI Speech Development Platform, or directly contact our technicians for assistance.