ASRPRO chip is a general-purpose, portable, low-power, high-performance speech recognition chip developed for low-cost offline speech applications. It adopts the third-generation BNPU technology, supports neural networks such as DNN\TDNN\RNN and convolutional operations, and supports speech recognition, voiceprint recognition, speech enhancement, speech detection, etc. It also possesses strong echo cancellation and ambient noise suppression capabilities. This tutorial will briefly introduce how to use Tianwenblock for embedded development of this chip based on the official programming manual.
I. Tianwenblock Software Download and Configuration
First of all, search for Tianwenblock in the search engine or enter the official website of Tianwenblock through the following URL, and click the “Software” link above to enter the download address.
Web site:SkyQuest Block
Then use the installation package to install it, after the installation is complete the initial run will let you select the motherboard used, select ASRPRO.
After selecting, enter the programming interface
Introduction to the programming interface:
Click on the Professional mode of the four programming modes above to program.
II. Basic program statements
1. Variables:
Click on Create Variable and enter the name of the desired new variable in the window that appears, then click OK. (Remember to declare the new variable in the initialization area after it is created)
Used to define the type and initial value of a new variable, the front option is used to select the declared variable, the back is used to select the type of the variable, and the initial value of the variable is defined at the back by connecting the value block, usually placed in the initialization area.
Assigns a new value to a variable by concatenating a numeric or arithmetic block behind it.
Getting the value of a variable to apply in a program.
2. Control:
Delay statement for delaying a custom amount of time in a program. (Units are milliseconds and microseconds, respectively)
The initialization area is used to initialize the definition of variables, pins, recognizable speech, and other tools within the program, and the internal code is automatically run once after the microcontroller is powered up. The hardware peripheral initialization is applied to the initialization definition of the contents of the peripheral expansion library contained within the program.
The if statement determines whether or not to proceed to run a subsequent program by determining whether or not the succeeding equation is valid or whether or not a Boolean variable is true or false.
The number of repeated judgments (else if) and the inclusion of else statements in this module can be customized by using the cogwheel above.
The switch statement selects which part of the program to run later in the program, based on the value of the variable connected to it. You can customize the number of values (cases) you can select and decide whether to use the other value (dwfault) option by using the gears at the top.
base loop statement, the program loops through the interior of the region.
Conditional loop statement, the program loops only when the conditions defined by the option and the successor arithmetic are satisfied (repeat when or repeat straightway to satisfy the arithmetic requirements), and the loop can be forcibly interrupted or selected to go on to the next loop by a program inside the diagram.
The for loop statement, which defines a variable, controls the number of loops by adding a predetermined value to each loop until the variable exits the loop when its value exceeds the predetermined range.
3. Functions
Arguments in a function are defined via the upper gear and return values via the lower option selector, the upper question mark can be used for function comments, the statement used internally allows the function to return the return value early, and the single statement below is used to call a defined function from within the main function.
4. Mathematics and logic
This option contains a variety of statements that can be used to assign the results of logical or mathematical operations to variables or as conditions for circular judgment statements by connecting variable assignment statements or circular judgment statements on the left.
numerical value
basic arithmetic
With or Without and Left-Right Shift Operations
Comparative judgment between two values
The operation with (and) or between two conditions
The opposite result of the backward conditional statement
Random integers generated within a certain interval.
Numerical rounding or remainder operations
Other complex mathematical operations
This statement is used to change the type of the trailing value or the result of an operation in order to facilitate the assignment of the preceding variable.
The above is my overview combing of the SkyQuest block compilation environment and basic statements, and I will follow up with updated instruction on how to use the ASRPRO voice chip to realize various functions.