Labs / Electronic modules

GraftSense - Offline Voice Module Based on ASRPRO-CORE (Open Version)

Author: Li Zisheng · Source: FreakStudio open documentation, v1.2 · License: CC BY 4.0

Contents
GraftSense - Offline Voice Module Based on ASRPRO-CORE (Open Version)
LED1 LED2 LED3 C1 C2 C3 C4 C5 V1.1

I. Module Introduction

The offline voice module based on ASRPRO-CORE is an offline voice module built on the ASRPRO-CORE chip. It integrates a microphone, speaker interface, and UART communication interface (the module can act as a coprocessor for speech recognition, communicating with the main controller via the serial port), and comes with an onboard automatic download circuit. Adopting industrial-grade components, it supports multi-language offline speech recognition including Chinese and English, voiceprint recognition and ambient noise suppression, with a speech recognition rate exceeding 98% and a response latency of less than 0.1 seconds. Operating at a voltage of 3.6V-5V, it is applicable to scenarios such as home appliances, industrial equipment and wearable devices, and can be paired with graphical programming software to quickly implement intelligent voice interaction solutions.

II. Introduction to Major Chips

This module is designed based on ASRPRO-CORE core board.

2.1 Chip Overview

GraftSense - Offline Voice Module Based on ASRPRO-CORE (Open Version)
2M 4M 200 300

2.2 Pin Definition

3V3 5V PA6 PA0 PB5 PB0 PC4 22.86mm 17.6mm 2.2
18 1 3V3 10 11 12 13 PA4 14 PC4

2.3 Functional Block Diagram

None.

2.4 Performance Parameters

32 240MHz 32-bit 640KB 512bit 2MB/4MB
8kHz/16kHz/24kHz/32kHz/44.1kHz/48kHz 3 12bit 10
2M 4M 18 23 2.9 0.2 40C 85C 2.5
40 100 5 3.6V 5V 500mA I2C 10 9600bps 2MB
GraftSense - Offline Voice Module Based on ASRPRO-CORE (Open Version)

2.5 Reference Circuit

GraftSense - Offline Voice Module Based on ASRPRO-CORE (Open Version)

2.6 Chip Configuration

None.

None.

2.8 PCB Routing Precautions

1 3V3 18 16 5V 17 4.7uF 10 3.6 500mA

III. Instructions for Circuit Engineering and Module Usage

3.1 Circuit Source Engineering

To obtain the source project of the circuit, please follow the official account [Freak Embedded]

3.2 Module Usage Instructions

The schematic diagram of this module is shown below:

SCH_ASRPRO-CORE-Based Offline Voice Module_v1.1_2025-11-23.pdf 2.4 MB

R3 R4 U1 U2 LED3 MIC1 V1.1

This module provides a serial port UART interface MRX and MTX: here M stands for master, which means the MCU 's RX corresponds to the module' s TX.

This module can function as a speech recognition coprocessor, which performs data interaction with the main control device via a serial port, and provides intelligent speech capability support for the system in the form of serial port commands by integrating functions such as offline speech recognition and voiceprint recognition.

V1.1.0

For the onboard automatic download circuit, pay attention to the operation sequence during programming: supply power to the UART interface first, then connect the MiniUSB data cable to the USB download port, so as to ensure the normal progress of program programming.

For the speaker interface, it is recommended to use a speaker with a specification of 8 ohms and 2W to ensure that the sound quality and power of the voice output are matched, so as to achieve a clear and stable voice playback effect.

3.3 Application Experiment

Here, we use the GraftPort-RP2040 development board for testing, and the ASRPRO-CORE-based offline voice module uses the UART interface to communicate with the main controller.

Here, we first use the HY2.0-4P connection cable to connect the module to the GraftPort-RP2040 development board's UART0 interface:

The module connections are shown in the following table:

Development Board Pins

Module Pins

Description

Pin 16

MTX

UART data transmission line, corresponding to the transmit pin of the development board

Pin 17

MRX

UART data transmission line, corresponding to the receiving pin of the development board

-

SPK

Speaker interface, connect to a speaker

Import the offline voice module based on ASRPRO-CORE - MicroPython driver code, then open the pico_code folder and copy the following main.py code into our project:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/09/08 10:00
# @Author  : 侯钧瀚
# @File    : mian.py
# @Description : Voice module serial port on/off onboard LED example for MicroPython

# ======================================== Import Modules =========================================

import machine
import time

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# Blink function (blink 2 times, 0.5 s on/off each time)
def led_blink():
    """
    LED blink.
    ===========================
    LED blink.
    """
    # Blink 2 times (the count can be changed)
    for _ in range(2):
        led.value(1)
        time.sleep(0.5)
        led.value(0)
        time.sleep(0.5)


# ======================================== Custom Classes ============================================

# ======================================== Initialization ==========================================

# Power-on delay of 3 s
time.sleep(3)
# Print debug message
print("FreakStudio: Use ASRPRO UART to control onboard LED.")

# Initialize the onboard LED (GPIO25, output mode)
led = machine.Pin(25, machine.Pin.OUT)

# Initialize the serial port: baud rate 115200, TX=GPIO16, RX=GPIO17 (Pico default hardware UART0)
uart = machine.UART(0, baudrate=115200, tx=machine.Pin(16), rx=machine.Pin(17))

# ========================================  Main Program  ============================================

# Main loop: continuously listen for serial data
while True:
    # Check whether serial data has been received
    if uart.any():
        # Read 1 byte of data (key point: read only 1 byte to match 0x01/0x02/0x03)
        data = uart.read(1)
        # Make sure the data was read successfully
        if data is not None:
            # Convert the byte data to decimal (0x01→1, 0x02→2, 0x03→3)
            cmd = ord(data)
            # Perform the corresponding action according to the command
            # Received 0x01 → blink
            if cmd == 0x01:
                print("Received command 0x01, LED blinking")
                led_blink()
            # Received 0x02 → turn off
            elif cmd == 0x02:
                print("Received command 0x02, LED off")
                led.value(0)
            # Received 0x03 → turn on
            elif cmd == 0x03:
                print("Received command 0x03, LED turned on")
                led.value(1)
            # Other commands: report invalid
            else:
                print(f"Received invalid command: 0x{cmd:02X}, ignoring")

Voice Serial Port Programming for Light Switch Control: http://www.twen51.com/new/twen51/art_show.php? id= 230 (Software Download Link)

After downloading, open Tianwen 51, click "Project" in the upper left corner, select "Open Project", and choose the asrpro_code folder, then select the switch light voice serial port program inside to perform programming.

51
2025/12/28 12 33

Program the following:

51

Burn the code, open a terminal, and use the mpremote tool to connect to the main controller; the output is as follows:

NE555 v1.26.1 2025-09-11 RP2040

It can be seen that it can emit light sequentially in accordance with the instructions in the code.

IV. Drivers

asrpro_core_test.zip 3 KB

None.

VI. Revision History

Document Version

Date of Revision

Modifier

Modified Content

v1.0

2025-11-23

Li Zisheng

Initialize the document

The BOM sheet has not been finally checked, the driver has not been re-verified, and the 3.3 application experiment

Not yet specified.

v1.1

2025-12-29

Li Zisheng

Added application experiments and production files

v1.2

2025-12-31

Xin Ruili

Create an open version of the document based on the internal document version v1.1.

VII. Relevant Materials

7.1 Chip Datasheet

Relevant resource links are available at: https://www.twen51.com/new/twen51/learnSource.php? id= 68

51 51API

About the software IDE, you can refer to the following link for usage instructions: https://www.twen51.com/new/twen51/learning_show.php? id= 559

2020 03 08 15 48 29 3.1 3.2 3.2.1

Datasheet available at the link: https://www.twen51.com/new/twen51/learning_show.php? id= 565

1 2

7.2 Unique Icons for PCB Silkscreen

7.2