Offline voice module VC series factory firmware tutorial: Is the SDK open source?

Offline voice module VC series factory firmware tutorial: Is the SDK open source?

The VC series offline voice module released by Ai-Thinker?adopts the solution of?Unisound, and continuously optimizes and innovates the voice recognition technology. The offline recognition algorithm is deeply integrated with the chip architecture, providing customers with ultra-low-cost offline voice recognition solutions, which can be widely and quickly applied to smart home, all kinds of smart small household appliances, 86 boxes, toys, lamps and other products requiring voice control.

Performance as?below:

-Support self-learning of wake-up words (meaning that wake-up words can be added without programming,?only?the?Chinese version support now)

-Supports Chinese and English (different firmware)

-90% recognition rate of 1~5m far field

-Support for RTOS lightweight systems

-Supports GPIO control and communication protocols such as UART, IIC, and SPI.

-Support serial port upgrade

There are two modules in the?VC series and their development boards. The ex-factory firmware of the Development Board and the ex-factory firmware of the module are different.

1. Preparation before use

1.1. Communication interface connection

If the module is used for serial port connection, we recommend that you use the following interfaces for communication: RX1 and TX1.


If the development board is used, please debug directly with USB port. The connection indication between the module and SCM or TTL module is as follows:


The default serial port configuration of UART1:

· Baud rate: 115200

· Data bit: 8

· Stop bit: 1

· Check bit: None

· Flow Control: None

UART0(TX0:IOB8)Log output configuration

· Baud rate: 57600

· Data bit: 8

· Stop bit: 1

· Check bit: None

· Flow Control: None

1.2. Hardware description of the Development Board

VC-01 and VC-02 share the same development board: warm light


1.3. Burning instructions

There are two programming methods for the?VC series:

JTAG Debugger

The JTAG Debugger uses a dedicated JTAG debugger to burn complete firmware. The software used is UniOneDownloadTool.exe. Generally, the firmware file name is: uni_app_release.bin

UART port

Serial port programming serial port programming uses TTL module for firmware upgrade without any requirements on the module. The software used is UniOneUpdateTool.exe. Generally, the firmware file name is: uni_app_release_update.bin

The two programming methods are described in detail below.

(1)JTAG programming wiring and programming introduction

You can only use a dedicated JTAG debugger for JTAG programming. Do not suppport J-link or other debuggers for programming.


The connection between the JTAG debugger and the VC series is as follows:


After the connection, insert the debugger into the computer (the debugger needs to install the driver, see the installation tutorial: Hummingbird-M-Production-Tool/M_Download_Tool_User_Guide.pdf), open?UniOneDownloadTool.exe:


Burning process:


(2) Introduction of UART serial port upgrade wiring and programming

The wiring of serial port burning is the same as that of communication mode, and there is no special attention. The most important thing is that the burned firmware has some requirements:

· For the first time, you must first install uni_app_release.bin?or uni_app_debug.bin?funware under “uni_hb_m_solution\image_demo\Hummingbird-M-Update-Tool”. (Factory firmware burned)

· The firmware must be used build.sh update?generated by instruction uni_app_release_update.bin

· The burning tool can only use: UniOneUpdateTool.exe

The following is the process of delay burning:


Note: If all ports are opened successfully, the background color will be yellow.

2. Use the firmware of the module

2.1. Instruction words and scripts

By default, some general commands and their corresponding scripts are written into the firmware of the module.


For?ore?Instruction words and scripts please?access:https://docs.ai-thinker.com/en/voice_module

2.2. Script Description

Each script represents the instruction currently recognized by VC. The meaning of the instruction is: take "0x5a 0x00 0x00 0x00 0x00 0x5a" as an example.

-Start bit: 0x5a

-Instruction sequence number: indicates a unique instruction. 0x00 indicates the sequence number of the wake-up word.

-Reserved bit 1: fixed value: 0x00

-Reserved bit 2: fixed value: 0x00

-Checkbit: the XOR value of the first four digits, 0x5a XOR0x00 XOR0x00 XOR0x00 =0x5a

2.3. Use of factory firmware of Development Board

The instruction words of the firmware of the development board are the same as those of the module, except that the LED control function and the button wake-up function are added:


3. Voice control process


4. Summary

The ex-factory firmware already has very good instructions, and the SCM can do corresponding processing according to the corresponding scripts. The most important byte of the script is the checkbit, which can be done in C language:

// Assume that the system wakes up: 0x5a 0x00 0x00 0x00 0x5a. char??start_bit=0x5a; char??cmd_num_bit=0x00; char??temp_num1_bit=0x00; char??temp_num2_bit=0x00; // Calculate the check bit. char??check_bit=?start_bit ^ cmd_mun_bit ^ temp_num1_bit ^ temp_num2_bit;

The most important thing is, does it support secondary development? In fact, this article has already made it very clear.

*The firmware to be burned must be uni_app_release_updata.bin?generated using the build.sh update?command

Well, this is the end of the article. If you want to know more information, please follow us! Don’t forget to give us a like~

Text reference:https://blog.csdn.net/Boantong_/article/details/123846788 ? spm=1001.2014.3001.5501


Sample purchase:https://ai-thinker.en.alibaba.com/

Business cooperation: [email protected]

LinkedIn: https://www.dhirubhai.net/company/ai-thinker

Official website: https://en.ai-thinker.com

DOCS: https://docs.ai-thinker.com

Official Forum: https://bbs.ai-thinker.com


Does the module support UART data string, like the detected command will send through UART?? Can I use this module as Speech to text and Text to speech module?

回复

要查看或添加评论,请登录

Ai-Thinker的更多文章

社区洞察

其他会员也浏览了