An off-line voice interactive control system and method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN DOCTORS OF INTELLIGENCE & TECH CO LTD
- Filing Date
- 2026-07-07
- Publication Date
- 2026-08-07
AI Technical Summary
[0005]本发明的目的就在于为了解决上述问题而提供一种离线语音的交互控制系统及方法,解决了现有离线语音控制中声学解码与物理控制状态割裂导致算力浪费、机械瞬态噪声引发滤波器发散以及静态打断机制鲁棒性差的问题
1、本发明通过微控制器模块提取外设物理状态生成失效指令子集并下发掩码控制帧,结合语音处理模块在隐马尔可夫模型解码网络中强制清零失效指令节点发射概率值的技术特征,实现物理控制域与数字处理域的状态对齐,该机制直接在底层解码网络中切断无效指令的特征匹配路径,缩减密集音素检索时的矩阵运算算力消耗,并从物理控制架构层面排除外部设备已处于目标工作状态时被重复错误触发的系统缺陷。
Smart Images

Figure CN122531393A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent voice interaction and embedded hardware control technology, and in particular to an offline voice interaction control system and method. Background Technology
[0002] With the development of smart IoT devices, offline voice control technology has been widely used due to its low latency, lack of network dependence, and privacy protection. Conventional offline voice control devices adopt a two-layer hardware architecture: an independent voice processing module is responsible for acoustic front-end processing and command decoding, while a microcontroller module is responsible for the physical driving of external electromechanical equipment. The two communicate via a serial bus. In this architecture, there is a problem of state information separation between the digital signal processing domain and the physical control domain. When the voice processing module performs Hidden Markov Model Network decoding, it cannot know the actual physical operating state of the external device. Even if the external relay or motor is already at the target physical position corresponding to the command, the voice decoding network will still perform intensive acoustic feature matching calculations in the entire command space. This wastes the limited underlying computing power and, under complex environmental noise, will identify approximate pronunciations as valid commands, causing the device to be repeatedly and erroneously triggered.
[0003] In voice interaction scenarios involving electromechanical linkages, nonlinear mechanical transient noise is generated when an external relay closes or a motor starts or stops. In existing offline voice front-end processing mechanisms, acoustic echo cancellation algorithms mainly track and update the weight matrix of the adaptive filter through error gradients. When the system encounters a sudden mechanical transient noise impact, the echo cancellation algorithm will misjudge this nonlinear noise as an unremoved linear echo residue. This misjudgment will directly cause the tap parameters of the adaptive filter to shift or even diverge and collapse, causing the audio acquisition link to be in a state of failure for a short period of time after the device performs physical actions, making it impossible to properly pick up the user's subsequent voice commands.
[0004] Furthermore, for offline voice control devices with audio playback feedback, user control commands are often masked by local acoustic noise emitted by the device's speakers during voice playback or prompt output. Existing wake-up and voice interruption mechanisms generally rely on similarity or probability judgment logic based on fixed thresholds, lacking dynamic perception of the device's current sound output state and echo loss. When the external playback volume is high, the acoustic energy around the device is high, and the fixed threshold can be broken down by nonlinear harmonics that are not completely eliminated, resulting in false voice wake-up. When the playback volume is low, the fixed threshold is relatively too high, making it difficult for the system to accept the voice interruption commands of real users. This static judgment mechanism cannot achieve a balance between the requirements for preventing accidental touches in strong noise and normal interaction sensitivity. At the same time, existing software-level interruption mechanisms will also cause speaker tail sound overflow problems when cutting off the audio stream due to the audio buffer not being cleared in time. Therefore, this application provides an offline voice interaction control system and method to meet the requirements. Summary of the Invention
[0005] The purpose of this invention is to provide an offline voice interactive control system and method to solve the above-mentioned problems, which solves the problems of wasted computing power caused by the separation of acoustic decoding and physical control state in existing offline voice control, filter divergence caused by mechanical transient noise, and poor robustness of static interruption mechanism.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides an offline voice interactive control system, the system comprising an audio acquisition module, a voice processing module, a serial communication bus, a microcontroller module, a peripheral driver module, and an audio broadcasting module; The audio acquisition module is communicatively connected to the voice processing module and is used to acquire acoustic signals in the physical environment, convert the acoustic signals into digital audio streams, and transmit them to the voice processing module. The voice processing module establishes a bidirectional data communication link with the microcontroller module through the serial communication bus. The voice processing module is used to perform acoustic signal processing, voiceprint feature extraction and instruction decoding and recognition, and interacts with the microcontroller module through the serial communication bus to exchange status frames and control codes. The microcontroller module is electrically connected to the peripheral driver module and is used to maintain the peripheral physical state machine, output control signals to the peripheral driver module, and receive the physical operating status fed back by the peripheral driver module. The audio broadcasting module is connected to the voice processing module and is used to receive the digital audio stream output by the voice processing module and perform digital-to-analog conversion and power amplification to realize local voice broadcasting and prompt tone synthesis output.
[0007] By adopting the above technical solution, a state feedback mechanism is established between the microcontroller module and the voice processing module through a serial communication bus. The physical state machine maintained by the microcontroller module directly intervenes in the digital signal processing flow, combining the physical control signal with the acoustic decoding network to achieve boundary alignment between the hardware control domain and the signal processing domain, thus avoiding device malfunctions or invalid feature matching operations caused by state update lag.
[0008] Preferably, during the system initialization phase, the microcontroller module and the voice processing module send a synchronous byte stream through a serial communication bus to adaptively calculate and lock a consistent communication baud rate between the two ends; the voice processing module reads the non-volatile memory and copies the fixed offline wake-up word acoustic model and the full offline instruction dictionary into the internal static random access memory to construct the retrieval space.
[0009] By adopting the above technical solution, the hardware timer is triggered by the level transition of the underlying hardware pins to achieve adaptive baud rate alignment, avoiding communication timing misalignment caused by voltage fluctuations during the initial power-on phase. At the same time, the acoustic model and lexicon are pre-loaded into the static random access memory to complete the local deployment of the feature retrieval space, providing a definite computational basis for subsequent acoustic feature state transitions and posterior probability derivation.
[0010] Preferably, after the voice processing module detects voice activity and locks the wake word in the input digital audio stream, it extracts the fundamental frequency contour information and Mel frequency cepstral coefficients of the corresponding audio sequence, performs frame-level splicing and statistics on the two in a linear concatenation manner, generates a reference voiceprint vector, and writes the reference voiceprint vector into a static random access memory within a designated secure area configured with hardware read-only protection.
[0011] By adopting the above technical solution, text-strong correlation features are extracted under the same wake word phoneme sequence constraint. A benchmark voiceprint vector is constructed by cascading fundamental frequency contours and Mel frequency cepstral coefficients. Each feature component of this vector specifically maps the spectral envelope energy distribution and vocal cord vibration characteristics of the current speaker. This vector is locked in a secure area with read-only hardware protection attributes to prevent memory overwriting by concurrent tasks, thereby establishing a unique acoustic identity comparison benchmark within the current interaction cycle.
[0012] Preferably, the microcontroller module periodically reads the hardware register values of the peripheral driver module and converts them into discrete physical state parameters to construct a set of peripheral physical states. The microcontroller module compares the current set of peripheral physical states with a pre-deployed state instruction mapping table, extracts all offline instructions that cannot take effect under the current peripheral physical state to form a subset of invalid instructions, encapsulates the subset of invalid instructions into a masked control frame with a synchronization frame header and a checksum, and sends it to the voice processing module through the serial communication bus.
[0013] By adopting the above technical solution, the microcontroller module extracts the failure instructions that are not currently meaningful for execution at the underlying level based on the real-time hardware physical parameters of external relays or motors, and feeds the physical peripheral status to the voice processing module through mask control frames, thus completing the pre-elimination of invalid search space before the decoding network runs.
[0014] Preferably, the speech processing module receives and parses the mask control frame. In the internal hidden Markov model decoding network, the transmission probability values of all acoustic feature matching path nodes corresponding to offline instructions belonging to the failed instruction subset are forcibly cleared to zero. The Viterbi search algorithm is only used to perform local optimal feature path matching in the active instruction subset that is retained after deducting the failed instruction subset.
[0015] By adopting the above technical solution, the speech processing module obtains the active instruction subset by subtracting the set of invalid instruction subsets from the full vocabulary. The underlying pruning mechanism is to clear the emission probability value of the feature node corresponding to the invalid instruction to zero, thereby blocking the Viterbi algorithm search path from dynamically expanding to the corresponding node. This mechanism eliminates invalid matching paths at the underlying register operation level, reduces the computational overhead of invalid phoneme matrix matching, and prevents external devices that are already in the target working state from being repeatedly triggered erroneously from the algorithm level.
[0016] Preferably, when the microcontroller module determines that it is about to drive the peripheral driver module to perform a physical action that generates nonlinear mechanical transient noise, the microcontroller module actively suspends the hardware driver task, prioritizes sending an interference warning frame containing the expected interference duration to the voice processing module through the serial communication bus, and resumes the execution of the hardware driver task after performing specific micro-delay compensation.
[0017] By adopting the above technical solution, a feedforward protection mechanism for mechanical transient noise is established by pre-issuing interference warning frames and suspending driving tasks. The micro-delay compensation provides a communication response time margin for hardware interruptions, ensuring that the timing of the digital signal processing domain receiving the warning signal strictly precedes the timing of the physical mechanical action.
[0018] Preferably, the speech processing module receives the interference warning frame via a hardware interrupt and sets the global software flag to true. The speech processing module checks the global software flag at the safety boundary of the buffer gap between the completion of the previous audio frame and the loading of the next audio frame into the computing core. If it is true, the update step constant of the normalized minimum mean square error adaptive filter of the internal acoustic echo cancellation algorithm is forcibly set to zero to fix the filter tap parameter matrix, and the voiceprint feature extraction operation for the latest input audio data is suspended within the time window of the expected interference duration.
[0019] By adopting the above technical solution, the global software flag is read during the buffer gap of the frame audio data flow, avoiding the damage to the data structure caused by the forced interruption of the matrix intensive operation. The noise resistance mechanism is that by forcibly setting the step size constant in the adaptive filter weight update formula to zero, the filter stops error gradient tracking and maintains the original convergence state during the mechanical noise impact, preventing the algorithm from misjudging nonlinear mechanical noise as echo residue and causing the adaptive filter parameters to diverge.
[0020] Preferably, when the audio broadcasting module is in an active broadcasting output state, the voice processing module calculates the linear ratio between the short-time average power of the microphone acquisition signal obtained by the audio acquisition module and the short-time average power of the residual error signal output after processing by the internal acoustic echo cancellation algorithm, and obtains the echo loss enhancement value; the voice processing module uses a logarithmic mapping rule that includes the system's basic confidence constant and the smoothing adjustment coefficient to adaptively convert the echo loss enhancement value into a voiceprint similarity admission threshold for identity verification.
[0021] By adopting the above technical solution, the return loss enhancement value is calculated based on the short-time average power ratio of the microphone acquisition signal and the residual error signal. This value is used as an objective quantitative indicator of the degree of noise interference in local broadcasting. The voiceprint similarity admission threshold is dynamically generated using a logarithmic mapping function. When the external broadcast volume increases, the authentication threshold is automatically increased to reduce the probability of false triggering. When the broadcast volume decreases, the threshold is appropriately decreased to ensure the response sensitivity to interruption of normal speech. This nonlinear calculation process is completed directly through mathematical logic mapping without consuming the computing power of deep neural networks.
[0022] Preferably, when a new wake-up word sequence is matched during complex acoustic self-noise interference, the speech processing module extracts and generates the current voiceprint vector, and calculates the cosine similarity between the current voiceprint vector and the reference voiceprint vector through the hardware accumulation unit; when the cosine similarity is greater than the dynamically generated voiceprint similarity admission threshold and the wake-up word normalized acoustic likelihood score is greater than the preset matching pass threshold, the speech processing module sends a forced stop command to the internal direct memory access controller, cuts off the data hardware output channel flowing to the audio broadcasting module, and sends a state switching communication frame to transition to the command listening state.
[0023] By adopting the above technical solution, the similarity between the current voiceprint and the reference voiceprint is measured based on the cosine of the included angle of the high-dimensional vector. Combined with the acoustic likelihood score output by the Hidden Markov Model, a dual authentication condition is formed. When the judgment is passed, the output channel of the pulse code modulation data is directly cut off at the hardware level of the direct memory access controller, and the circular buffer pointer is cleared simultaneously. This eliminates the problem of brief tail sound overflow in the physical device of the speaker under the conventional software interruption mechanism, and realizes the closed-loop switching from the broadcast state to the listening state.
[0024] Secondly, the present invention also provides an offline voice interactive control method, the method comprising the following steps: During the system power-on initialization phase, the microcontroller module and the voice processing module establish a handshake connection through the serial communication bus to align their communication states. The voice processing module loads the fixed wake-up word acoustic model and the full offline instruction dictionary into memory. During the initial wake-up recognition phase of the system, when a preset wake-up word feature is matched, the speech processing module extracts the multi-dimensional acoustic features of the corresponding valid audio sequence to construct a baseline voiceprint vector and locks it in a designated safe area. During the state synchronization and mask pruning phase, the microcontroller module calculates the subset of failure instructions based on the detected physical peripheral status and sends out mask control frames. After parsing, the speech processing module configures the corresponding feature matching node in the decoding network as inactive and performs pattern matching calculation only in the remaining subset of active instructions. During the feedforward noise protection phase, the microcontroller module sends an interference warning frame and suspends the driving task before driving the peripheral device that generates transient noise. After the voice processing module checks the receiving flag at the safety boundary, it freezes the current acoustic echo cancellation adaptive filter weights and suspends the new voiceprint feature extraction process. During the adaptive interruption authentication phase, the voice processing module synchronously calculates the echo loss enhancement value and dynamically establishes the interruption authentication threshold. When the similarity between the current voiceprint vector calculated by the second wake-up and the reference voiceprint vector meets the interruption authentication threshold, the data stream of the audio broadcast module is forcibly cut off and the instruction listening state is entered. In the instruction parsing and physical closed-loop stage, the voice processing module performs feature distance retrieval on the voice instruction in the active instruction subset. After a match is found, a control code is sent out. The microcontroller module drives the peripheral device to change its state and then reconstructs the mask control frame and sends it out, completing the full-process interactive closed loop.
[0025] By adopting the above technical solution, this method constructs a low-level control flow for the collaborative operation of a microcontroller state machine and an acoustic decoding network. It relies on a state feedforward mechanism to impose physical-level constraints on the decoding search space, and combines action delay and filter parameter freezing to achieve acoustic noise reduction protection. It uses return loss to dynamically adjust the interruption authentication threshold, and solves the problems of false triggering, transient noise interference, and voice interruption control under high-volume audio broadcasting conditions caused by external physical device linkage in low-computing-power offline environments from the perspective of system architecture design.
[0026] Compared with the prior art, the present invention has at least the following beneficial effects: 1. This invention extracts the physical state of peripheral devices through a microcontroller module to generate a subset of failure instructions and sends out masked control frames. Combined with the technical feature of the speech processing module in forcibly clearing the transmission probability value of failure instruction nodes in the Hidden Markov Model decoding network, the state alignment between the physical control domain and the digital processing domain is achieved. This mechanism directly cuts off the feature matching path of invalid instructions in the underlying decoding network, reduces the computational power consumption of matrix operations during dense phoneme retrieval, and eliminates the system defect of repeated error triggering when the external device is already in the target working state from the physical control architecture level.
[0027] 2. This invention utilizes the microcontroller module to send an interference warning frame and perform micro-delay compensation before driving the peripheral device that generates mechanical noise. Combined with the voice processing module, the adaptive filter update step size constant of the internal acoustic echo cancellation algorithm is forced to be zero. This constructs a cross-domain feedforward noise protection mechanism. This mechanism uses micro-delay to ensure that the interference warning communication timing strictly precedes the physical hardware action. This allows the adaptive filter to stop error gradient tracking by fixing the parameter matrix during the nonlinear mechanical transient noise impact, preventing the algorithm from misjudging the transient impact as echo residue and causing the filter to diverge.
[0028] 3. This invention obtains the return loss enhancement value by calculating the short-time average power ratio of the microphone acquisition signal and the echo cancellation residual error signal, logarithmically maps it to the voiceprint similarity admission threshold, and sends a forced abort command to the direct memory access controller after dual authentication is passed. This achieves highly robust adaptive interruption control. This mechanism dynamically adjusts the authentication threshold using objective return loss data. When the external broadcast volume is high, the threshold is automatically increased to reduce the false touch rate, and when the broadcast volume is low, the threshold is decreased to improve response sensitivity. At the same time, it forcibly cuts off the data outflow channel based on the underlying hardware path, completely eliminating the speaker audio tail sound problem caused by software-level interruption. Attached Figure Description
[0029] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments of the invention and, together with the specification, further serve to explain the principles of the invention and enable those skilled in the art to practice and use the invention.
[0030] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a flowchart of the method of the present invention; Figure 3 This is a schematic diagram illustrating the principle of state mask generation and dynamic network pruning in this invention. Figure 4 This is a schematic diagram of the feedforward noise protection and cross-clock domain control principle of the present invention; Figure 5 This is the timing flow diagram for the adaptive interruption authentication and decision control of this invention; Figure 6 This is a comparison chart of the state mask clipping effect of the present invention; Figure 7 This is a comparison chart of the effectiveness of the feedforward noise protection mechanism of the present invention; Figure 8 This is a performance data diagram of adaptive interruption authentication under the multi-gradient broadcast volume state of the present invention.
[0031] Figure label: 10. Audio acquisition module; 20. Voice processing module; 30. Serial communication bus; 40. Microcontroller module; 50. Peripheral driver module; 60. Audio broadcasting module.
[0032] As shown in the figure, specific structures and devices are marked in the figure to clearly illustrate the structure of the embodiments of the present invention. However, this is only for illustrative purposes and is not intended to limit the present invention to this specific structure, device and environment. Those skilled in the art can adjust or modify these devices and environments according to specific needs. Detailed Implementation
[0033] The following describes in detail an offline voice interactive control system and method provided by the present invention with reference to the accompanying drawings and specific embodiments. It should be noted that, to make the embodiments more detailed, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0034] It should be noted that the use of terms such as "an embodiment," "an embodiment," "an exemplary embodiment," and "some embodiments" in the specification indicates that the described embodiment may include a specific feature, structure, or characteristic, but not every embodiment necessarily includes that specific feature, structure, or characteristic. Furthermore, when a specific feature, structure, or characteristic is described in connection with an embodiment, implementing such a feature, structure, or characteristic in conjunction with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the art.
[0035] Terms can be understood, at least in part, from their use in context. For example, depending at least in part on the context, the term “one or more” as used herein can be used to describe any feature, structure, or characteristic in a singular sense, or a combination of features, structures, or characteristics in a plural sense. Additionally, the term “based on” can be understood not necessarily to convey an exclusive set of factors, but rather, alternatively, depending at least in part on the context, to allow for the presence of other factors that are not necessarily explicitly described.
[0036] See attached document Figure 1The present invention provides an offline voice interactive control system, the system comprising: an audio acquisition module 10, a voice processing module 20, a serial communication bus 30, a microcontroller module 40, a peripheral driver module 50, and an audio broadcasting module 60.
[0037] The audio acquisition module 10 is communicatively connected to the voice processing module 20. The audio acquisition module 10 acquires acoustic signals in the physical environment, converts the acoustic signals into digital audio streams, and transmits the digital audio streams to the voice processing module 20.
[0038] The voice processing module 20 establishes a bidirectional data communication link with the microcontroller module 40 through the serial communication bus 30. The voice processing module 20 performs local front-end acoustic signal processing, voiceprint feature extraction and instruction decoding and recognition, and interacts with the microcontroller module 40 through the serial communication bus 30 to exchange status frames and control codes.
[0039] The microcontroller module 40 is electrically connected to the peripheral driver module 50. The microcontroller module 40 maintains the system-level peripheral physical state machine, outputs control signals to the peripheral driver module 50, and receives the physical operating status feedback from the peripheral driver module 50.
[0040] The audio broadcasting module 60 is connected to the voice processing module 20. The audio broadcasting module 60 receives the digital audio stream output by the voice processing module 20 and performs digital-to-analog conversion and power amplification to realize local voice broadcasting and prompt tone synthesis output.
[0041] See attached document Figure 2 This invention provides an offline voice interactive control method, the method comprising the following steps: S10, during the system power-on initialization phase, the microcontroller module 40 and the voice processing module 20 establish a handshake connection through the serial communication bus 30, complete the communication baud rate configuration and initial state alignment, and the voice processing module 20 loads the locally solidified wake-up word acoustic model and the full offline instruction dictionary into the internal static random access memory. S20, during the initial wake-up recognition phase of the system, the audio acquisition module 10 continuously acquires ambient audio. When the speech processing module 20 matches the preset wake-up word feature, it extracts the audio time sequence corresponding to the wake-up word. The speech processing module 20 extracts the fundamental frequency profile and Mel frequency cepstral coefficients of the audio sequence, constructs the reference voiceprint vector of the current interactive session, and locks the reference voiceprint vector in a designated secure area of the static random access memory. S30, during the state synchronization and mask clipping stage, the microcontroller module 40 detects the current physical peripheral state of the peripheral driver module 50 in real time. The microcontroller module 40 calculates the subset of failed instructions that does not have physical execution meaning based on the physical peripheral state, and encapsulates the subset of failed instructions into a mask control frame. The microcontroller module 40 sends the mask control frame to the voice processing module 20 through the serial communication bus 30. The voice processing module 20 parses the mask control frame and configures the feature matching nodes belonging to the subset of failed instructions as inactive in the internal decoding network. The voice processing module 20 only performs pattern matching calculations in the remaining active instruction subset. S40, during the feedforward noise protection phase, when the microcontroller module 40 determines that the peripheral driver module 50 is about to perform a physical action that generates nonlinear mechanical transient noise, the microcontroller module 40 suspends the peripheral action and prioritizes sending an interference warning frame containing the expected interference duration to the voice processing module 20 via the serial communication bus 30. After sending, the microcontroller module 40 suspends the current driving task and performs micro-delay compensation for a specific duration. The voice processing module 20 receives the interference warning frame through a hardware interrupt and sets the global software flag to true. At the safe boundary of the buffer gap between the current audio frame processing and the loading of the next audio frame, the voice processing module 20 checks the global software flag. If the global software flag is true, the voice processing module 20 freezes the current acoustic echo cancellation adaptive filter weights and suspends the extraction process of new voiceprint features. S50, during the adaptive interruption authentication phase, when the audio broadcasting module 60 is in the audio data output state, the voice processing module 20 synchronously calculates the echo loss enhancement value of the acoustic echo cancellation algorithm. The voice processing module 20 dynamically establishes the interruption authentication threshold based on the echo loss enhancement value. When the downstream user issues a wake-up word again, the voice processing module 20 extracts the latest audio sequence of the current wake-up word segment, extracts the current voiceprint vector, and calculates the cosine similarity between the current voiceprint vector and the reference voiceprint vector latched in the static random access memory. When the cosine similarity is greater than the interruption authentication threshold and the acoustic feature of the wake-up word is matched, the voice processing module 20 forcibly cuts off the data stream of the audio broadcasting module 60 and sends a state switching frame to the microcontroller module 40 to enter the instruction listening state. S60, in the instruction parsing and physical closed-loop stage, the voice processing module 20 performs feature extraction on the acquired voice instructions and performs feature distance retrieval in the activated instruction subset after masking. After a match is found, the voice processing module 20 sends the mapped control code to the microcontroller module 40 through the serial communication bus 30. The microcontroller module 40 drives the peripheral driver module 50 to perform corresponding actions, change the physical peripheral state, and reconstruct the masked control frame based on the new state and send it to the voice processing module 20 to complete the full-process interactive control closed loop.
[0042] The specific implementation of step S10 can be carried out through the following sub-steps: S101, after the entire system is powered on, the microcontroller module 40 and the voice processing module 20 respectively execute the hardware pin configuration and clock tree initialization of the microcontroller module 40 and the voice processing module 20. The high and low level configuration of the underlying hardware pins and the register writing operation of the internal clock division coefficient can be written using conventional embedded underlying initialization configuration code. Through a comprehensive hardware-level reset, the microcontroller module 40 and the voice processing module 20 are ensured to be in a completely determined initial physical level state and the logic dead zone caused by unstable voltage fluctuations is eliminated.
[0043] S102, the microcontroller module 40 sends a handshake synchronization byte containing a specific alternating level sequence, such as hexadecimal value 0x55, to the asynchronous serial receiving pin of the voice processing module 20 via the serial communication bus 30. When the voice processing module 20 captures the level transition edge on the asynchronous serial receiving pin, it starts the internal hardware timer to measure the bit duration of the continuous pulse signal, thereby adaptively calculating and locking the communication baud rate consistent on both ends. The adaptive adjustment range of the communication baud rate is limited to between 9600bps and 115200bps, aligning the serial communication rate to the actual transmission rate calculated by this adaptive calculation. After the baud rate alignment is completed, the voice processing module 20 returns a response confirmation frame in reverse through the serial communication bus 30, thereby aligning the full-duplex communication state machine between the microcontroller module 40 and the voice processing module 20.
[0044] S103, the speech processing module 20 accesses the non-volatile memory connected to the speech processing module 20 communication and reads the offline wake-up word acoustic model and offline instruction lexicon file stored in the non-volatile memory. The offline wake-up word acoustic model adopts a DNN-HMM architecture that integrates deep neural networks and hidden Markov models, including one input layer, three hidden layers and one output layer. Each hidden layer is configured with 128 neuron nodes. The input layer receives 13-dimensional Mel-Cepstral Coefficient audio features. The output layer outputs the posterior probability value of the state for the hidden Markov model to perform state transition decoding. The speech processing module 20 calls the memory allocation function to divide two consecutive memory buffers in the high-speed static random access memory and copies the file into the memory buffer to complete the deployment of the retrieval space.
[0045] For the offline wake-up word acoustic model, which uses a fusion architecture of deep neural network and hidden Markov model, a supervised learning method based on cross-entropy loss function is adopted during the training phase. The training samples are derived from a private speech dataset pre-recorded by the system, which contains 10,000 standard Mandarin wake-up word audios and 50,000 ambient background noise audios. The labels are defined as the state space index of the three-state hidden Markov model. The backpropagation algorithm is used to iteratively train on the external server for 50 rounds until the cross-entropy loss function converges. Finally, the weight matrix and bias vector of the fully connected layer obtained by training are compressed by 8-bit quantization and solidified into non-volatile memory, thereby ensuring that the speech processing module 20 can completely reproduce the same acoustic state posterior probability derivation process during runtime.
[0046] During the construction of the initial data retrieval network, the speech processing module 20 structures the full set of offline instructions loaded into the high-speed static random access memory (SRAM) buffer, thereby establishing an efficient inverted index table and decision tree within the SRAM. This facilitates the offline speech interaction control system in subsequent state synchronization and mask pruning stages by dynamically pruning the search space and effectively pruning the recognition path through mask control frames. This completely avoids the speech processing module 20 performing unnecessary phoneme distance matching calculations for invalid instructions that have no physical execution meaning during idle listening mode. The full offline instruction dictionary is statically configured through a linear mapping from offline text symbols to independent hexadecimal recognition codes. The mathematical set relationship of the full offline instruction dictionary is shown in the following formula: ; In the formula, It is a complete offline command dictionary; This is the first offline control command included in the full offline command dictionary; This is the second offline control command included in the full offline command dictionary; The first one contained in the full offline instruction dictionary One offline control command; A continuous positive integer index variable representing the position of offline control commands in the set, with values ranging from 1 to... ; The first one contained in the full offline instruction dictionary One offline control command; The total number of offline control instructions is configured to be positive integers between 10 and 200. Each offline control instruction has a corresponding independent hexadecimal index identifier in a continuous memory buffer of static random access memory, so that the microcontroller module 40 can perform exclusive retrieval in the subsequent processing flow, thereby establishing a completely consistent dynamic mapping association system in the initialization phase.
[0047] S104, the microcontroller module 40 reads the level status register of the external physical device connected in the peripheral driver module 50 to obtain the current physical open / closed state of the external physical device, and writes the physical open / closed state data into the state temporary storage register inside the microcontroller module 40. The microcontroller module 40 sends the initial synchronization data packet containing the physical open / closed state data to the voice processing module 20 through the serial communication bus 30. The voice processing module 20 receives and parses the initial synchronization data packet, completely clears the historical matching residual cache of the audio decoding network inside the voice processing module 20, so that the offline voice interaction control system enters the idle listening working state that meets the requirement of complete alignment of the two-end states, fundamentally realizing the initial running boundary alignment between the microcontroller control domain and the digital acoustic signal processing domain and preventing the generation of state dead zones.
[0048] The specific implementation of step S20 can be carried out through the following sub-steps: S201, the audio acquisition module 10 continuously acquires acoustic signals from the physical environment at a sampling rate of 16kHz and converts the acoustic signals into a 16-bit pulse code modulation digital audio stream. The audio acquisition module 10 uses its internal direct memory access controller to transfer the pulse code modulation digital audio stream to the audio input ring buffer inside the voice processing module 20 in real time. The voice processing module 20 reads the audio data blocks in the audio input ring buffer at a fixed timing period of 32ms through a hardware interrupt mechanism, thereby ensuring the continuity and low latency of the digital audio stream transfer process and providing a stable and seamless data source for subsequent acoustic processing algorithms.
[0049] S202, the speech processing module 20 performs speech activity detection based on the dual-threshold method on the input pulse code modulation digital audio stream, calculates the short-time average energy and zero-crossing rate characteristics of the pulse code modulation digital audio stream. When the short-time average energy is greater than the preset low energy threshold and the zero-crossing rate is greater than the preset low zero-crossing rate threshold, the speech processing module 20 determines that it has entered the speech transition segment. When the short-time average energy continues to increase and exceeds the preset high energy threshold, the speech processing module 20 locks the current position as the starting point of the wake-up word. The value range of the high energy threshold is configured to be 30dB to 50dB, the value range of the preset low energy threshold is configured to be 10dB to 25dB, and the value range of the low zero-crossing rate threshold is configured to be 500 times to 3000 times per second. When the offline wake-up word acoustic model inside the speech processing module 20 matches the preset wake-up word sequence, the speech processing module 20 accurately extracts the effective audio sequence and limits the duration of the effective audio sequence to a limited range between 500ms and 1500ms.
[0050] S203, the speech processing module 20 extracts text-related strong feature vectors representing the speaker's biometric characteristics from the effective audio sequence. The speech processing module 20 calculates the 13-dimensional Mel-frequency cepstral coefficients and 1-dimensional fundamental frequency contour information of the effective audio sequence, and then performs frame-level feature concatenation of the 13-dimensional Mel-frequency cepstral coefficients and 1-dimensional fundamental frequency contour information in a linear concatenation manner. Subsequently, it performs statistical pooling operations on the global mean and standard deviation of all frame features of the effective audio sequence, or maps them through a pre-trained feature dimensionality reduction matrix, thereby forming a fixed-length, high-dimensional voiceprint feature space projection at the mathematical level. The frame length specification in the frame-by-frame windowing process is configured as 25ms and the frame shift specification is configured as 10ms. Conventional cepstral feature extraction algorithms can be used to achieve feature separation, thereby ensuring accurate extraction of feature parameters. The mathematical expression of the baseline voiceprint vector is shown in the following formula: ; In the formula, The baseline voiceprint vector is strongly correlated with the text; The first-dimensional feature component contained in the baseline voiceprint vector; The second-dimensional feature component contained in the baseline voiceprint vector; The first one contained in the reference voiceprint vector dimensional feature components, where variables From 1 to consecutive positive integers; The first one contained in the reference voiceprint vector Each feature component; the total dimension of the baseline voiceprint vector, the total dimension. The value range is configured as a positive integer between 128 and 512. The above feature components respectively map the spectral envelope energy distribution characteristics of the speech signal in different frequency bands and the uniqueness of vocal cord vibration. Together they form the underlying unique data credential for speaker identity authentication, so as to facilitate the calculation of the cosine similarity matrix in the subsequent interruption authentication stage.
[0051] S204, the voice processing module 20 writes the calculated reference voiceprint vector into a designated secure area of the static random access memory. The designated secure area is configured with a hardware read-only protected attribute through the control register of the memory management unit, thereby preventing other concurrent tasks in the offline voice interaction control system from overwriting or tampering with the reference voiceprint vector. During the current voice interaction session, the reference voiceprint vector serves as a biometric reference identifier for determining the legality of subsequent interruption commands. This technology, based on wake-word synchronous latching of the voiceprint reference, establishes a strict speaker identity binding relationship, thereby physically supporting the execution of authentication and interruption logic in subsequent steps under high-volume broadcasting environments, and avoiding logical dead zones caused by system crashes due to dynamic memory allocation conflicts.
[0052] The above system solves the engineering problem of low-computing-power offline chips being unable to perform high-precision voiceprint comparison in complex acoustic environments by precisely extracting digital audio streams and locking text-related features during the initial wake-up recognition stage. By limiting voiceprint feature extraction to the same wake-up word phoneme sequence, the false rejection rate caused by cross-text recognition is reduced.
[0053] See attached document Figure 3 The specific implementation of step S30 can be handled through the following sub-steps: S301, the microcontroller module 40 periodically reads the hardware register values of the external control relays and motor drivers connected to the peripheral driver module 50 via the external bus, thereby obtaining the real-time switching position or operating speed range of the external physical device. The microcontroller module 40 converts the aforementioned real-time switching position and operating speed range into corresponding discretized physical state parameters, and combines all the discretized physical state parameters to construct the current peripheral physical state set. The timer counter inside the microcontroller module 40 triggers a hardware interrupt once every 50ms to update the peripheral physical state set, thereby ensuring that the state machine in the microcontroller control domain can track the real physical changes of the peripheral driver module 50 in real time and avoid communication blind spots with state update lag.
[0054] S302, after obtaining the set of peripheral physical states, the microcontroller module 40 calls the internally embedded state instruction mapping table. The state instruction mapping table adopts a two-dimensional array or static hash table data structure and is pre-deployed in read-only memory. The state instruction mapping table pre-stores the exclusive correspondence logic between different peripheral physical states and offline instructions that cannot be executed. The microcontroller module 40 compares the current set of peripheral physical states with the entries in the state instruction mapping table, retrieves and extracts all offline instructions that cannot be effective in the current peripheral physical state, and combines them to form a subset of failed instructions. The number of failed instructions contained in the subset of failed instructions is set to a positive integer range between 0 and 50. Through the aforementioned exclusive retrieval mechanism, unreasonable control logic is filtered in advance at the microcontroller control end.
[0055] S303, the microcontroller module 40 encapsulates the offline instruction numbers in the failure instruction subset into a mask control frame according to a preset serial frame format. The mask control frame includes a 2-byte fixed synchronization frame header consisting of hexadecimal values 0xAA and 0x55, a 1-byte data length identifier, a failure instruction mask payload of 2 to 100 bytes, and a 2-byte cyclic redundancy check code. The microcontroller module 40 sends the mask control frame to the voice processing module 20 in asynchronous full-duplex mode through the serial communication bus 30. During the transmission process, the serial port transmission register of the microcontroller module 40 converts the parallel mask data into a serial bit stream output at the hardware level, thereby overcoming spatial barriers to feedforward the status information of the microcontroller control domain to the digital signal processing domain, thereby ensuring that the voice processing module 20 captures the latest hardware status and provides communication link data verification guarantee.
[0056] S304, the voice processing module 20 captures the serial bit stream through the serial port receive pin and performs cyclic redundancy check. After the check passes, the central processing unit of the voice processing module 20 parses the data length identifier of the mask control frame and the failure instruction mask payload to extract the failure instruction subset. The voice processing module 20 calls the dictionary pruning algorithm in the high-speed static random access memory, and uses the full offline instruction dictionary loaded during the system power-on initialization phase to subtract the failure instruction subset to calculate the current active instruction subset in real time. The active instruction subset constitutes the dynamic search space for the voice processing module 20 to perform speech recognition matching within the current interaction time window. Mathematically, the calculation path of the failure instructions in the speech decoding network is excluded. The formula for the set subtraction operation of the active instruction subset is shown in the following formula: ; In the formula, The activation instruction subset is calculated in real time by the voice processing module 20, which includes all control intentions that can be triggered under the current physical state; It is a complete offline command dictionary; This is a subset of failed instructions containing mutual exclusion instruction numbers, calculated by the microcontroller module 40 based on the current physical state of the peripherals.
[0057] After calculating the active instruction subset, the speech processing module 20 delves into the Viterbi retrieval algorithm of the hidden Markov model decoding network inside the speech processing module 20. It forcibly clears the emission probability values of all acoustic feature matching path nodes corresponding to offline instructions belonging to the failed instruction subset to zero, or configures the elements of the cumulative distance cost matrix of the dynamic time warping matching network belonging to the failed instruction subset to the preset maximum penalty cost value, such as the value 0x7FFFFFFF, so that the Viterbi search path cannot cross the aforementioned deactivated node pointers when dynamically expanding. At the same time, the speech processing module 20 forcibly retains a global silence rejection path in the decoding network as a backup evolution branch to prevent a full retrieval path truncation deadlock under the extreme physical state where all external device instructions are failed, which would lead to system crash. The aforementioned dynamic deactivation pruning operation of physical feature nodes of the decoding network directly cuts off the evolution chain of failed instructions.
[0058] Through a cross-module collaborative mechanism in the state synchronization and mask trimming stages, the microcontroller module 40 seamlessly feeds forward the real physical state of external devices to the algorithm mask of the underlying digital signal processing. This not only saves the matrix operation consumption of low-computing-power offline chips in the dense phoneme retrieval process at the computing core level, but also completely avoids the logical closed-loop dead loop defect caused by repeated triggering of invalid recognition instructions due to the external device already being in the target working state from the system architecture design. This provides a highly clean underlying acoustic search space background for high-precision physical action feedforward noise protection and real-time voiceprint dynamic authentication in complex dynamic interference environments. The following sections will provide a detailed explanation of the control dimensions such as action suspension and buffer gap boundary synchronization locking when the microcontroller module 40 drives physical peripherals in the feedforward noise protection mechanism.
[0059] See attached document Figure 4 The specific implementation of step S40 can be handled through the following sub-steps: S401, before the microcontroller module 40 pulls high the physical control pin to drive the external relay or motor device that generates nonlinear transient noise in the peripheral drive module 50, the main control program of the microcontroller module 40 actively suspends the current hardware drive task and prioritizes sending an interference warning frame containing the expected interference duration to the voice processing module 20 through the serial communication bus 30. The value range of the expected interference duration is a positive integer between 100ms and 1000ms, which is pre-configured according to the mechanical action attributes of different peripherals. After the transmission is completed, the microcontroller module 40 introduces specific micro-delay compensation using an internal hardware timer. The duration of the micro-delay compensation is configured between 10ms and 50ms. The micro-delay compensation can ensure the completion of cross-domain transmission of serial data frames and provide the voice processing module 20 with time margin for hardware interrupt response processing.
[0060] S402, the serial communication controller inside the voice processing module 20 receives the aforementioned interference warning frame via a hardware interrupt service routine. After the serial port reception is completed and the hardware interrupt is triggered, the underlying hardware interrupt handling logic of the voice processing module 20 immediately writes the global software flag into the high-speed cache register inside the voice processing module 20 and sets the global software flag to true. The global software flag is mapped to the highest priority memory address space in the static random access memory with single-cycle read and write characteristics. By utilizing the hardware-level cross-clock domain asynchronous communication response mechanism, the physical connection between the microcontroller control domain transmission timing and the digital signal processing domain operation cycle can be realized, thereby reducing the risk that the underlying interrupt reception instruction will be forcibly blocked by the underlying system during the intensive digital audio stream matrix operation.
[0061] S403, the acoustic front-end processing engine inside the voice processing module 20 continuously processes the pulse code modulation data in the audio input ring buffer. After completing the fast Fourier transform and feature extraction matrix operation of the current frame of audio data, and before loading the next frame of audio data from the direct memory access controller into the computing core, the voice processing module 20 performs a status polling check at the buffer gap safety boundary. The voice processing module 20 directly reads the global software flag status in the cache register. The method of performing the global software flag status check at the natural gap in the pulse code modulation data flow helps to avoid the logical operation abnormality caused by forcibly blocking the data flow in the middle of matrix intensive operation, which would lead to data structure damage and memory pointer leakage.
[0062] S404, when the speech processing module 20 checks and finds that the global software flag is in a true state, the speech processing module 20 intervenes in the internal filter parameter evolution at the underlying level of the acoustic echo cancellation algorithm. The speech processing module 20 temporarily forces the update step size constant of the normalized minimum mean square error adaptive filter to a value of zero, thereby fixing the current filter tap parameter matrix and stopping the parameter gradient tracking of the acoustic system residual. At the same time, within the time window of the expected interference duration specified by the interference warning frame, the speech processing module 20 suspends the benchmark voiceprint feature extraction and parameter update operations for the latest input audio data to reduce the probability of mechanical transient noise contaminating the voiceprint model. The mathematical logic of the adaptive filter weight matrix update is shown in the following formula: ; In the formula, This represents the adaptive filter weight vector for the next time step in the time series. This represents the adaptive filter weight vector at the current time step in the time series. Let be the index variable representing the discrete time step and take a non-negative integer value; The update step size constant for the normalized minimum mean square error adaptive filter is calculated under normal listening conditions. The value range is configured to be between 0.01 and 0.1. The step size constant is updated when the global software flag is true. Forced to be assigned the value 0; this is the residual echo error signal obtained from the processing and calculation of the current time step in the time series. The reference audio signal vector input at the current time step in the time series; The L2 norm square operation of the reference audio signal vector is used to characterize the reference energy of the input reference signal at the current time step; To prevent the use of tiny normal numbers with a denominator of zero, the adjustment factor is configured to have a value range between 0.001 and 0.01.
[0063] S405, to prevent the feedforward noise protection mechanism from falling into a permanently frozen system deadlock state, the voice processing module 20 starts its internal hardware countdown timer while configuring the global software flag to the true state. The initial count value of the internal hardware countdown timer is synchronously assigned according to the expected interference duration in the interference warning frame. When the internal hardware countdown timer decrements to zero, the voice processing module 20 triggers a timeout reset interrupt and forcibly resets the global software flag to the false state. After the reset, the voice processing module 20 restores the update step constant to the initial preset value range and removes the suspension restriction on the voiceprint feature extraction operation.
[0064] The basic mathematical derivation logic of error gradient descent and weight iterative optimization for normalized minimum mean square error adaptive filters can be implemented using conventional acoustic theory framework. By forcibly assigning the update step size constant to a value of 0, the adaptive filter maintains the converged steady-state parameters during physical noise impacts, which can reduce the probability that nonlinear mechanical transient noise is mistakenly identified as echo residue, thus causing the filter to diverge and collapse.
[0065] See attached document Figure 5 The specific implementation of step S50 can be handled through the following sub-steps: S501, when the audio broadcasting module 60 is in an active broadcasting output state, the voice processing module 20 simultaneously starts the echo cancellation performance monitoring process in the underlying hardware driver. The voice processing module 20 uses the audio acquisition module 10 to continuously acquire the superimposed microphone acquisition signal, which includes the physical echo of the local speaker and the user's actual interrupted speech. At the same time, the voice processing module 20 records the residual error signal output after the superimposed signal is processed by the internal acoustic echo cancellation algorithm matrix. The voice processing module 20 calculates the echo loss enhancement value within the current interaction time window by calculating the ratio of the short-time average power of the microphone acquisition signal to the short-time average power of the residual error signal. The echo loss enhancement value serves as an evaluation index for dynamically quantifying the degree of local broadcast self-noise interference. The calculation logic of the echo loss enhancement value is shown in the following formula: ; In the formula, The linear power ratio of the return loss enhancement value calculated within the time window; The short-time average power of the microphone signal acquired by the audio acquisition module 10; This represents the short-time average power of the residual error signal output after processing by the acoustic echo cancellation algorithm.
[0066] S502, the voice processing module 20 inputs the calculated return loss enhancement value into the dynamically interrupted threshold mapping function embedded within the voice processing module 20. The dynamically interrupted threshold mapping function is a nonlinear mathematical calculation logic constructed based on acoustic prior physical constraints and does not involve neural network iteration operations. The dynamically interrupted threshold mapping function uses logarithmic mapping mathematical rules that include the system's basic confidence constant and smoothing adjustment coefficient to adaptively transform the real-time changing return loss enhancement value into a smoothly gradually changing voiceprint similarity admission threshold for identity verification. When the external broadcast volume is high, causing the return loss enhancement value to decrease, the dynamically interrupted threshold mapping function synchronously increases the voiceprint similarity admission threshold to prevent erroneous interruption authentication. When the external broadcast volume decreases, causing the return loss enhancement value to increase, the dynamically interrupted threshold mapping function appropriately decreases the voiceprint similarity admission threshold to improve the sensitivity of the underlying interactive response when a real user issues a normal voice interruption command. The nonlinear mapping process of the dynamic threshold is shown in the following formula: ; In the formula, The threshold for voiceprint similarity is dynamically generated and its value range is configured to be between 0.6 and 0.9; The system's base confidence constant is configured with a value range between 0.75 and 0.85. The smoothing adjustment coefficient is configured with a value range between 0.05 and 0.15; The linear power ratio of the return loss enhancement value calculated within the time window; A smooth offset constant is added inside the logarithmic function to prevent non-positive values, and its value range is configured to be between 0.001 and 0.01.
[0067] S503, during the period of complex acoustic self-noise interference when the audio broadcasting module 60 continuously plays audio, if the downstream physical user issues a wake-up word again with the intention of directly interrupting the broadcasting process, the voice activity detection component at the front end of the voice processing module 20 determines and extracts the latest valid wake-up audio sequence containing the valid phonemes of the preset wake-up word. The voice processing module 20 performs frame processing on the valid wake-up audio sequence according to the parameters of a frame length of 25ms and a frame shift of 10ms. Under the same text constraint conditions as the system's first wake-up recognition stage, the voice processing module 20 performs acoustic low-level feature fusion extraction operation. The voice processing module 20 calculates the fixed-length fundamental frequency contour vector and the 13-dimensional Mel frequency cepstral coefficient matrix, and performs length alignment transformation on both in the time domain through a dynamic time warping algorithm. The voice processing module 20 linearly concatenates the fundamental frequency contour vector and the Mel frequency cepstral coefficient matrix along the feature channel dimension to generate a high-dimensional current voiceprint vector.
[0068] S504, after the speech processing module 20 extracts and generates the current voiceprint vector, it calls the internal high-speed bus to completely read the reference voiceprint vector, which was latched during the system's first wake-up phase, from a designated hardware security area of the static random access memory. The speech processing module 20 then calculates the cosine similarity between the current voiceprint vector and the reference voiceprint vector in the high-dimensional feature space using a dedicated hardware accumulation unit. The basic algorithm logic for similarity measurement in the high-dimensional vector space is well-known in the field. Simultaneously, the speech processing module 20 outputs the current... The acoustic input and wake word model are compared using a normalized percentage acoustic likelihood score, and it is determined whether this normalized acoustic likelihood score is greater than a preset acoustic matching threshold. The acoustic matching threshold is configured as a positive integer between 60 and 85, depending on the acoustic model size. When the cosine similarity is greater than the voiceprint similarity threshold and the normalized acoustic likelihood score is greater than the acoustic matching threshold, the speech processing module 20 determines that the dual identity confidence condition has been met. The dual identity confidence condition can reduce the probability of random accidental touches due to environmental noise. The vector cosine logic is shown in the following formula: ; In the formula, The cosine similarity of the angle between the current voiceprint vector and the reference voiceprint vector is configured to range from -1 to 1. Extract the current voiceprint vector containing the fundamental frequency profile and Mel frequency cepstral coefficients generated during broadcasting; A reference voiceprint vector latched in a specified hardware-secure region of static random access memory and bound to the current interactive session; This is the dot product operation between the current voiceprint vector and the reference voiceprint vector; The L2 norm calculated from the current voiceprint vector; The L2 norm is calculated based on the baseline voiceprint vector.
[0069] S505, at the instant the dual identity confidence judgment condition is verified, the main control processor of the voice processing module 20 sends a forced abort instruction with the highest priority to the internal direct memory access controller. After receiving the instruction, the direct memory access controller immediately cuts off the hardware output channel of pulse code modulation data flowing from the internal audio storage area to the audio broadcast module 60. The voice processing module 20 simultaneously executes the zeroing and reset operation of the memory pointer to clear the remaining data to be broadcast in the ring audio output buffer. The aforementioned control intervention logic reduces the impact of the temporary tail sound overflow of the speaker physical device under the conventional mechanism. Subsequently, the voice processing module 20 sends a state switching communication frame containing the confirmation response to the microcontroller module 40 through the serial communication bus 30, driving the system global state machine to jump out of the broadcast locking loop structure and transition to the intention listening stage to receive new instructions, thereby completing the adaptive interruption closed-loop authentication control.
[0070] The specific implementation of step S60 can be carried out through the following sub-steps: S601, after the system enters the command listening state, the voice processing module 20 acquires the valid voice commands issued by the user through the audio acquisition module 10 and extracts the acoustic feature sequence. The voice processing module 20 inputs the acoustic feature sequence into the internal decoding network. The voice processing module 20 performs a local optimal feature path retrieval operation within the mathematical constraint space formed by the active command subset retained after the masking and pruning operation in step S30. Since the feature node pointers belonging to the invalid command subset have been pre-configured as inactive and masked in the decoding network, the Viterbi algorithm search logic of the voice processing module 20 only performs state transition and probability accumulation calculations in the valid nodes corresponding to the active command subset. This operation mechanism directly reduces the computational power consumption of matrix retrieval at the underlying register level and reduces the probability of invalid commands being mistakenly triggered. The retrieval and extraction logic of the optimal matching path is shown in the following formula: ; In the formula, The optimal offline control command calculated by the voice processing module 20 is retrieved. To find the mathematical optimization function for the parameters of the independent variable that maximizes the objective probability function; This is the subset of active instructions that are retained after masking and clipping. The variable is calculated to activate the discrete traversal contained in the instruction subset and is used to represent a single offline control instruction to be matched; The acoustic feature sequence is extracted and calculated from the effective voice commands of the speech processing module 20. The likelihood probability of generating an effective speech feature sequence for a given single offline control command to be matched is configured as a real number between 0 and 1. The prior probability of a single offline control command to be matched is preset in the local language model and the value is uniformly configured as a real number 1.0.
[0071] The fundamental principles of state transition probability calculation and optimal path backtracking within the Viterbi algorithm can be implemented using the conventional Hidden Markov Model decoding theoretical framework. By limiting the search boundary of the Viterbi algorithm to strictly belong to the subset of activation instructions, the speech processing module 20 avoids the logical dead zone of the algorithm's out-of-bounds retrieval and ensures that the output recognition result is always within the currently executable physical security logic range of the external physical device.
[0072] S602, after the voice processing module 20 calculates the optimal offline control command that matches the target, the voice processing module 20 calls the pre-fixed command and control code mapping table in the internal static storage area. The voice processing module 20 extracts the hexadecimal control code corresponding to the optimal offline control command. The voice processing module 20 encapsulates the hexadecimal control code into a serial port control data frame according to the preset serial port communication protocol. The serial port control data frame contains a 2-byte start synchronization frame header configured with hexadecimal values 0xBB and 0x66, a 1-byte command identification code payload, and a 2-byte cyclic redundancy check code. At the same time, when sending the serial port control data frame, the voice processing module 20 simultaneously starts the internal hardware communication timeout timer and configures the timeout judgment threshold to a positive integer between 50ms and 200ms. The voice processing module 20 sends the serial port control data frame to the microcontroller module 40 through the serial port communication bus 30 in an asynchronous full-duplex communication mode.
[0073] S603, the hardware serial port receive interrupt service routine inside the microcontroller module 40 captures the serial port control data frame on the serial communication bus 30 and performs cyclic redundancy check calculation. If the cyclic redundancy check calculation fails, the microcontroller module 40 immediately sends a preset error status feedback frame to the voice processing module 20 to trigger the internal hardware communication timeout timer reset and data frame retransmission logic of the voice processing module 20. After the data verification is successful, the main control operation logic of the microcontroller module 40 parses and extracts the hexadecimal control code. The microcontroller module 40 calls the corresponding underlying hardware driver library function according to the hexadecimal control code. The microcontroller module 40 outputs a specific general-purpose input / output pin level change signal or pulse width modulation duty cycle adjustment signal to the peripheral driver module 50. The microcontroller module 40 drives the externally connected relay or motor driver to perform the corresponding physical on / off or speed adjustment action, thereby completing the conversion and execution of the control intention to the actual mechanical state.
[0074] S604, the microcontroller module 40 determines whether the physical action of the peripheral device has been completed by detecting the level transition signal of the general input / output physical pin fed back by the peripheral driver module 50. When the microcontroller module 40 determines that the physical action of the peripheral driver module 50 has been completed and after a mechanical state anti-jitter stabilization period of 10ms to 50ms, the microcontroller module 40 rereads the hardware register or physical pin level state connected to the peripheral driver module 50. The microcontroller module 40 synchronously updates the current set of peripheral physical states maintained internally based on the latest hardware read result. Then, the microcontroller module 40 uses the updated set of peripheral physical states to trigger the exclusive logic retrieval program in step S30 in reverse loop. The microcontroller module 40 recalculates and generates a new subset of failure instructions in the new round of interaction time window and sends a new mask control frame to the voice processing module 20. This reverse feedback mechanism enables the voice processing module 20 to reconstruct the search mask constraint boundary of the decoding network in real time according to the external state changes, thereby realizing the full-link closed-loop iterative evolution.
[0075] To aid in understanding the technical solution of this invention, an application example based on a smart range hood voice control system is provided below.
[0076] During the system power-on initialization phase, the physical user connects the kitchen power supply, the smart range hood starts, the internal microcontroller module 40 and the voice processing module 20 complete handshake communication and align the communication baud rate, and the voice processing module 20 loads the offline wake-up word and 50 offline instructions, including turning on the stir-fry mode, turning off the fan and turning on the lights, into the internal static random access memory.
[0077] During the state synchronization and mask clipping stage, the microcontroller module 40 detects that the motor and relay of the smart range hood are both in a power-off and off state. The microcontroller module 40 marks the commands to turn off the fan and reduce the fan speed as invalid commands. The microcontroller module 40 packages the aforementioned invalid commands into a masked control frame and sends it to the voice processing module 20. The voice processing module 20 configures the feature matching node corresponding to the aforementioned invalid commands to an inactive state in the underlying recognition network.
[0078] During the initial wake-up and voiceprint latching phase, the physical user inputs a wake-up word audio. The speech processing module 20 detects the valid wake-up word audio and extracts the time sequence of the wake-up word audio. The speech processing module 20 extracts the fundamental frequency features and Mel-Cepstral features of the wake-up word audio time sequence. The speech processing module 20 generates and latches the reference voiceprint vector of the current interactive session.
[0079] During the instruction closed-loop and feedforward noise protection phase, the physical user inputs a voice signal containing the intention to activate the stir-fry mode. The voice processing module 20 performs feature distance retrieval and matching on the activated instruction subset after masking and sends a control code to the microcontroller module 40. The microcontroller module 40 receives the control code and sends an interference warning frame with a duration of 800 milliseconds to the voice processing module 20 before driving the motor and pushing open the mechanical baffle. After sending, the microcontroller module 40 delays for 50 milliseconds to turn on the motor relay. The voice processing module 20 receives the interference warning frame and freezes the weight parameters of the internal acoustic echo cancellation filter. The voice processing module 20 suspends the extraction process of new voiceprint features within the 800 millisecond time window specified in the interference warning frame.
[0080] During the adaptive interruption authentication phase, the range hood speaker outputs an audio data stream. The physical user inputs an interruption voice signal containing the intention to turn on the lighting while the audio data stream is output. The voice processing module 20 calculates the echo loss enhancement value of the acoustic echo cancellation algorithm. The voice processing module 20 inputs the echo loss enhancement value into the dynamic interruption threshold mapping function to generate a voiceprint similarity admission threshold. The voice processing module 20 extracts the current voiceprint vector of the interrupted voice signal and calculates the cosine similarity between the current voiceprint vector and the latched reference voiceprint vector. When the cosine similarity is greater than the voiceprint similarity admission threshold, the voice processing module 20 cuts off the broadcast audio data stream and controls the system to enter the command listening state. The voice processing module 20 matches the command to turn on the lighting and sends the corresponding hexadecimal control code to the microcontroller module 40. The microcontroller module 40 turns on the lighting physical device according to the corresponding hexadecimal control code.
[0081] The experimental verification and effect comparison of the above application embodiments were performed in the hardware test platform of the intelligent range hood semi-anechoic chamber. The comparison reference system adopted the conventional offline speech recognition system architecture with stateless feedforward and fixed interruption threshold.
[0082] The first experimental verification step was a state mask clipping effect test. The testers configured the physical state of the range hood to have the motor running at high speed and the lights on. The testers played test audio samples containing ambient background audio and non-target instruction audio around the range hood for 24 consecutive hours. After the 24-hour test period, the testers statistically analyzed the resource utilization of the dual-end central processing unit of the system, as well as the effective instruction response delay data and the number of invalid instruction false triggers.
[0083] The second experimental verification step was the test of the feedforward noise protection mechanism. The testers used an automated control script to send 300 commands to the microcontroller module 40 to open and close the mechanical baffle of the range hood and start and stop the motor within a 1-hour time period. During the execution of the mechanical peripheral actions, the testers played a standardized set of test voices simultaneously. The testers recorded the frequency of filter parameter divergence of the underlying acoustic echo cancellation algorithm under nonlinear mechanical transient noise impact conditions and the speech recognition word error rate data within the overlapping time window of the mechanical actions.
[0084] The third experimental verification step was the adaptive voiceprint interruption performance test. The testers controlled the range hood speaker to continuously output environmental prompts at fixed sound pressure levels of 75 dB, 80 dB, and 85 dB. The first tester who had completed the baseline voiceprint recording and the second tester who had not recorded voiceprint information respectively input the wake-up interruption command at a fixed physical coordinate of 1.5 meters away from the range hood microphone. The testers extracted the underlying interaction log and calculated the proportion of legal interruption success rate and the proportion of illegal noise false interruption rate.
[0085] Table 1: Test Data Record Table of the Impact of State Mask Clipping on System Resources and Recognition Performance Traditional conventional architecture 64.271 91.132 19 346.128 Embodiments of the present invention 41.821 56.417 1 211.583 Table 2: Test Data Recording Table for Comparison of Feedforward Noise Protection Mechanism Effectiveness During Transient Mechanical Action Traditional conventional architecture 13 27 38.742 1481.391 Embodiments of the present invention 0 0 6.125 84.726 Table 3: Test Data Record of Adaptive Interruption Authentication Performance under Multi-Gradient Broadcast Volume Status 75 decibel environment Success rate of interrupting legitimate target users 81.365 94.621 75 decibel environment Illegal environmental noise false interruption rate 14.814 2.537 80 decibel environment Success rate of interrupting legitimate target users 62.083 88.194 80 decibel environment Illegal environmental noise false interruption rate 21.059 1.882 85 decibel environment Success rate of interrupting legitimate target users 34.557 82.316 85 decibel environment Illegal environmental noise false interruption rate 37.193 3.141 Refer to Tables 1, 2, and 3, and the appendix. Figure 6 Appendix Figure 7 and attached Figure 8Therefore, in the state mask clipping effect test, the frequency of invalid command mis-touch under 24-hour background noise conditions was recorded as 1 time, and the average command response delay in the active state was recorded as 211.583 milliseconds. In the feedforward noise protection mechanism test, the number of adaptive echo cancellation filter parameter update divergence times was controlled to 0 times, and the system recovery time after the transient interference ended was recorded as 84.726 milliseconds. In the adaptive voiceprint interruption performance test, under an 85 dB noise output state, the present invention extracted 82.316% of the legal target interruption success rate data and 3.141% of the illegal environmental sound mis-interruption rate data.
[0086] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0087] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An offline voice-interactive control system, characterized in that, The system includes an audio acquisition module, a voice processing module, a serial communication bus, a microcontroller module, a peripheral driver module, and an audio playback module; The audio acquisition module is communicatively connected to the voice processing module and is used to acquire acoustic signals in the physical environment, convert the acoustic signals into digital audio streams, and transmit them to the voice processing module. The voice processing module establishes a bidirectional data communication link with the microcontroller module through the serial communication bus. The voice processing module is used to perform acoustic signal processing, voiceprint feature extraction and instruction decoding and recognition, and interacts with the microcontroller module through the serial communication bus to exchange status frames and control codes. The microcontroller module is electrically connected to the peripheral driver module and is used to maintain the peripheral physical state machine, output control signals to the peripheral driver module, and receive the physical operating status fed back by the peripheral driver module. The audio broadcasting module is connected to the voice processing module and is used to receive the digital audio stream output by the voice processing module and perform digital-to-analog conversion and power amplification to realize local voice broadcasting and prompt tone synthesis output; The microcontroller module periodically reads the hardware register values of the peripheral driver module and converts them into discrete physical state parameters to construct a peripheral physical state set. The microcontroller module compares the current peripheral physical state set with a pre-deployed state instruction mapping table, extracts all offline instructions that cannot take effect under the current peripheral physical state to form a failure instruction subset, encapsulates the failure instruction subset into a masked control frame with a synchronization frame header and a checksum, and sends it to the voice processing module through the serial communication bus. The speech processing module receives and parses the mask control frame. In the internal hidden Markov model decoding network, it forcibly clears the emission probability values of all acoustic feature matching path nodes corresponding to offline instructions belonging to the failed instruction subset to zero. It only performs local optimal feature path matching of the Viterbi search algorithm in the active instruction subset retained after deducting the failed instruction subset.
2. The offline voice interactive control system according to claim 1, characterized in that, During the system initialization phase, the microcontroller module and the voice processing module send a synchronous byte stream through the serial communication bus to adaptively calculate and lock a consistent communication baud rate between the two ends; the voice processing module reads the non-volatile memory and copies the fixed offline wake-up word acoustic model and the full offline instruction dictionary into the internal static random access memory to construct the retrieval space.
3. The offline voice interaction control system according to claim 1, characterized in that, After detecting voice activity and locking the wake word in the input digital audio stream, the voice processing module extracts the fundamental frequency contour information and Mel frequency cepstral coefficients of the corresponding audio sequence, performs frame-level concatenation and statistical analysis on the two in a linear concatenation manner, generates a reference voiceprint vector representing the speaker's biometric characteristics, and writes the reference voiceprint vector into a static random access memory within a designated secure area configured with hardware read-only protection.
4. The offline voice interaction control system according to claim 1, characterized in that, When the microcontroller module determines that it is about to drive the peripheral driver module to perform a physical action that generates nonlinear mechanical transient noise, the microcontroller module actively suspends the hardware driver task, prioritizes sending an interference warning frame containing the expected interference duration to the voice processing module through the serial communication bus, and resumes the execution of the hardware driver task after performing specific micro-delay compensation.
5. The offline voice interaction control system according to claim 4, characterized in that, The speech processing module receives the interference warning frame via a hardware interrupt and sets the global software flag to true. At the safe boundary of the buffer gap between the completion of the previous audio frame and the loading of the next audio frame into the computing core, the speech processing module checks the global software flag. If it is true, it forces the update step constant of the normalized minimum mean square error adaptive filter of the internal acoustic echo cancellation algorithm to zero to fix the filter tap parameter matrix, and suspends the voiceprint feature extraction operation for the latest input audio data throughout the expected interference duration time window.
6. The offline voice interaction control system according to claim 1, characterized in that, When the audio broadcasting module is in an active broadcasting output state, the voice processing module calculates the linear ratio between the short-time average power of the microphone acquisition signal obtained by the audio acquisition module and the short-time average power of the residual error signal output after processing by the internal acoustic echo cancellation algorithm, and obtains the echo loss enhancement value; the voice processing module uses a logarithmic mapping rule that includes the system's basic confidence constant and the smoothing adjustment coefficient to adaptively convert the echo loss enhancement value into a voiceprint similarity admission threshold for identity verification.
7. The offline voice interaction control system according to claim 6, characterized in that, When a new wake-up word sequence is matched during complex acoustic self-noise interference, the speech processing module extracts and generates the current voiceprint vector, and calculates the cosine similarity between the current voiceprint vector and the reference voiceprint vector through a hardware accumulation unit. When the cosine similarity is greater than the dynamically generated voiceprint similarity admission threshold and the wake-up word normalized acoustic likelihood score is greater than the preset matching pass threshold, the speech processing module sends a forced stop command to the internal direct memory access controller, cuts off the data hardware output channel flowing to the audio broadcast module, and sends a state switching communication frame to transition to the command listening state.
8. An offline voice interaction control method, using the offline voice interaction control system according to any one of claims 1 to 7, characterized in that, The method includes the following steps: During the system power-on initialization phase, the microcontroller module and the voice processing module establish a handshake connection through the serial communication bus to align their communication states. The voice processing module loads the fixed wake-up word acoustic model and the full offline instruction dictionary into memory. During the initial wake-up recognition phase of the system, when a preset wake-up word feature is matched, the speech processing module extracts the multi-dimensional acoustic features of the corresponding valid audio sequence to construct a baseline voiceprint vector and locks it in a designated safe area. During the state synchronization and mask pruning phase, the microcontroller module calculates the subset of failure instructions based on the detected physical peripheral status and sends out mask control frames. After parsing, the speech processing module configures the corresponding feature matching node in the decoding network as inactive and performs pattern matching calculation only in the remaining subset of active instructions. During the feedforward noise protection phase, the microcontroller module sends an interference warning frame and suspends the driving task before driving the peripheral device that generates transient noise. After the voice processing module checks the receiving flag at the safety boundary, it freezes the current acoustic echo cancellation adaptive filter weights and suspends the new voiceprint feature extraction process. During the adaptive interruption authentication phase, the voice processing module synchronously calculates the echo loss enhancement value and dynamically establishes the interruption authentication threshold. When the similarity between the current voiceprint vector calculated by the second wake-up and the reference voiceprint vector meets the interruption authentication threshold, the data stream of the audio broadcast module is forcibly cut off and the instruction listening state is entered. In the instruction parsing and physical closed-loop stage, the voice processing module performs feature distance retrieval on the voice instruction in the active instruction subset. After a match is found, a control code is sent out. The microcontroller module drives the peripheral device to change its state and then reconstructs the mask control frame and sends it out, completing the full-process interactive closed loop.