Electric toy car control method and system based on voice auxiliary operation
By collecting and preprocessing voice commands in the toy car control system, using the ASR model of MFCC and CNN for feature extraction and semantic recognition, the problems of inaccurate speech processing and noise interference in the prior art are solved, and accurate recognition of voice commands and efficient control of toy car are realized.
Patent Information
- Application Number
- CN202411788559.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot realize the rapid processing of voice, which is susceptible to environmental noise interference, cannot accurately recognize voice commands, and cannot perform feature extraction, resulting in the inability to recognize voice commands and convert them into commands to control toy cars.
Voice commands are collected through the microphone head, pre-processed to filter out environmental noise, realize analog-to-digital conversion processing, and perform voice feature extraction through MFCC. Then, the CNN's ASR model is used for semantic recognition analysis, and the voice commands are converted into text commands in combination with the vocabulary, and then the toy car is controlled and adjusted through a binary algorithm.
It improves the accuracy of voice commands, reduces the interference of environmental noise, realizes accurate recognition and conversion of voice commands, reduces operation difficulty, and improves the efficiency of toy car control.
Smart Images

Figure CN119673158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of voice-assisted operation, and in particular to a method and system for controlling an electric toy car based on voice-assisted operation. Background Art
[0002] Most electric cars come with remote controls. Because of the enclosed seats, it is generally not easy to fall off the car. Children over 1 year old can ride independently, but children who do not know how to control can be controlled by their parents using the remote control. When the child is about 2 years old and can control it by himself, the child can use the accelerator pedal of the children's electric car to control it by himself, but parents still need to watch over it to ensure safety. Electric cars are the most popular type of children's electric cars on the market.
[0003] The structural layout of electric vehicles is varied and flexible. In general, they are divided into two types: pure electric vehicle electric motor central drive and electric wheel drive. The electric motor central drive borrows the drive scheme of internal combustion engine vehicles, replaces the internal combustion engine with an electric motor and its related components, and uses an electric motor to drive the wheels on the left and right sides. The size and mass of the mechanical transmission device in the electric wheel drive form are greatly reduced compared to the electric motor central drive form, and the efficiency is significantly improved, but the cost is the increased complexity and cost of the control system.
[0004] However, it is troublesome and inconvenient to control electric toy cars by remote control or manual operation by parents, and it is not easy to operate and control. Voice is the most natural way of interaction for humans. After the invention of computers, it has become a goal for people to enable machines to "understand" human language, understand the inner meaning of language, and make correct answers. We all hope that when we communicate with people by voice, we can make it understand what you are saying, just like those intelligent and advanced robot assistants in science fiction movies. Speech recognition technology has turned this dream of mankind into reality. Speech recognition is like the "hearing system of the machine". This technology allows the machine to convert voice signals into corresponding text or commands through recognition and understanding. If electric toy cars can be controlled by voice, it can greatly reduce the difficulty of operation.
[0005] In a Chinese invention patent with application publication number CN219462492U, a new voice-controlled electric toy car for children is disclosed, which includes a car body, a battery pack is fixedly connected to the upper end of one side of the car body, and a remote control alarm device is installed on the upper end of the battery pack; the remote control alarm device includes a driving motor electrically connected to the battery pack, a receiving sensor is fixedly connected to one side of the driving motor, a receiving antenna is fixedly connected to one side of the receiving sensor, and a start sensor is fixedly connected to one side of the receiving antenna.
[0006] In the technical solution recorded in the above application, a remote control alarm device is used. When the toy car exceeds the remote voice remote control range and cannot receive the remote control signal, the device switches the motor by interrupting the signal to drive the toy car to stop, so as to prevent the toy car from continuing to move forward and making it impossible for the operator to control the driving situation. After the toy car stops, the internal alarm horn is started to warn, so that the operator can quickly find the vehicle. However, in combination with the prior art and the above application, there are still some problems in the prior art, such as the inability to quickly process voice, the voice is easily disturbed by the environmental noise, the voice commands cannot be accurately recognized, and it is not easy to extract features for the voice information, that is, it is impossible to recognize the voice commands, form text commands or binary commands, and control the toy car.
[0007] To this end, the present invention provides an electric toy car control method and system based on voice-assisted operation. Summary of the invention
[0008] 1. Technical issues to be resolved
[0009] In view of the deficiencies in the prior art, the present invention provides an electric toy car control method and system based on voice-assisted operation, which acquires voice commands through a microphone and converts the voice commands into voice waveforms, then filters out environmental noise in voice information through preprocessing, improves the accuracy of voice commands, reduces the interference of environmental noise, and realizes analog-to-digital conversion processing, then extracts features of the voice through MFCC, and before feature extraction, performs vector processing, pre-emphasis and framing on the voice information, so that the voice information is convenient for feature extraction and improves the efficiency of calculation, performs semantic recognition analysis on the feature-extracted voice through the ASR model of CNN, and converts the voice commands into text commands in combination with the vocabulary, so as to facilitate the control and adjustment of the toy car, that is, performs frame-by-frame analysis and processing on the voice data information through the convolution kernel of CNN, and performs analysis and processing on the voice semantics, performs vocabulary comparison in combination with the forget gate, and determines the conversion processing of the text commands, thereby solving the technical problems recorded in the background technology.
[0010] (II) Technical solution
[0011] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0012] The electric toy car control method based on voice-assisted operation includes the following steps:
[0013] S1. The electric toy car collects voice through a microphone: the electric toy car is controlled by voice, that is, the electric toy car collects the user's voice through the microphone to complete the voice-assisted operation control of the electric toy car;
[0014] S2, the control module of the electric toy car pre-processes the voice information: amplifies the voice information, then performs filtering, and then converts the voice information;
[0015] S3, extracting features from the voice information: before extracting features from the voice information, first perform vector processing, pre-emphasis, and frame division on the voice information, and then extract features from the voice information, and extract features from the voice information through MFCC;
[0016] MFCC is a signal feature extracted from the signal frame by frame. After extracting the characteristic Mel frequency cepstrum parameters, continuous difference is performed, and the comprehensive characteristic parameters are extracted in combination with the fundamental frequency. The nonlinear relationship between the Mel frequency and the partial discharge signal frequency is expressed as follows:
[0017] , where: B is the Mel frequency, h is the frequency;
[0018] S4. Semantic recognition for electric toy car control: The CNN ASR model is used to perform semantic recognition analysis on the speech after feature extraction to achieve direct end-to-end speech recognition, and the voice commands are converted into text commands in combination with the vocabulary, and then the electric toy car is controlled and adjusted through the binary algorithm;
[0019] The convolution kernel of CNN is used to analyze and process the speech data frame by frame, and the speech semantics is analyzed and processed, and the vocabulary is compared with the forget gate;
[0020] Convolution kernel Assume that the input matrix size is w, the convolution kernel size is k, the stride is s, and the number of zero-filling layers is p. The calculation formula for the size of the speech segment generated after convolution is:
[0021] ,pass Determine the size of the cut speech,
[0022] The input formula is:
[0023] , where conv2() is the convolution function of the convolution operation, valid indicates the type of convolution operation, W is the convolution kernel weight matrix, X is the input matrix, and b is the bias.
[0024] The output formula is:
[0025] ,in, is the activation function
[0026] Each convolution kernel has a different weight matrix W, then is the output.
[0027] Furthermore, the forget gate is used for semantic comparison. The calculation formula of the forget gate is as follows:
[0028] ,in, is the sigmoid function, is the weight, is the hidden value output by the convolution kernel, is the input value at time t, is the bias, It is the output value of the hidden gate. If the output is 1, it is determined that the word in the vocabulary is the same as the data of the semantic analysis, and the data information output by the convolution kernel is saved. If the output is 0, it means that there is no data information with the same semantic analysis in the vocabulary, and the data information output by the convolution kernel is deleted. Through the judgment of the forget gate, each fragment of the semantic analysis is compared and compared with the vocabulary to determine the semantics of the speech expression and generate text control instructions.
[0029] Furthermore, the filtering process uses the EEMD algorithm for noise reduction. The EEMD algorithm overcomes the modal aliasing and endpoint effect phenomena based on EMD, introduces noise auxiliary analysis into EMD decomposition, and makes the signal that cannot be decomposed by EMD become decomposed by EMD.
[0030] A set of random Gaussian white noise is added to the speech signal x(t) collected by the microphone, and the resulting sequence signal to be processed is:
[0031] ;
[0032] In the formula, is the original signal, The signal to be processed is obtained by adding Gaussian random white noise for the i-th time; is the random Gaussian white noise added for the ith time.
[0033] Furthermore, the noisy sequence signal to be processed is subjected to EMD decomposition to obtain the m-order modal component and residual component as follows:
[0034] ,
[0035] In the formula, for The j-th modal component obtained by EMD decomposition; is the residual component or trend term of the signal after removing m modal components;
[0036] For N The j-th order modal component obtained by EMD decomposition is averaged to obtain the original signal The j-th modal component of Similarly, the original signal can be obtained by taking the average value of N signal residual components The residual component ,Right now:
[0037] .
[0038] Furthermore, the original signal is decomposed by EEMD to obtain modal components and residual components of each order. The modal components of each order obtained by decomposition are subjected to frequency analysis and energy analysis to determine the modal components of noise and signal, the noise modal components are removed, and the remaining signal modal components are reconstructed to obtain the denoised signal.
[0039] Frequency analysis is a method to remove the modal components whose frequencies are obviously higher than the mechanical response frequency in the modal components decomposed by EEMD; assuming that the highest frequency of speech is , assuming that the first to the Frequency of IMF All meet , then the first to the The IMF of the first modal component is considered as noise and removed;
[0040] The energy analysis noise reduction method is based on the frequency analysis method. The th to mth order IMFs are used for further noise reduction. The specific method is as follows:
[0041] Calculate the energy density of the j-th order IMF for:
[0042] ,
[0043] In the formula, represents the amplitude of the j-th order quantity IMF at time t;
[0044] By energy density , find the energy of the j-th order IMF The average value of IMF energy is:
[0045] ,
[0046] By Energy of the first-order IMF and before The average energy of each order IMF is the energy ratio for:
[0047] ,
[0048] If the energy ratio , it indicates that the j-th order IMF component is a signal; if the energy ratio , it indicates that the j-th order component is noise, and then the noise is deleted.
[0049] Furthermore, vector processing vectorizes the voiceprint data information through automated vectorization algorithms or point cloud processing methods; that is, the voice information after filtering is analyzed and processed, and converted into vector elements, such as points, lines, and surfaces; ensuring that the vectorization results are accurate and complete, and retaining key attribute information.
[0050] Furthermore, pre-emphasis means that the amplitude of the high-frequency part will be smaller than that of the low-frequency part. Pre-emphasis is used to balance the spectrum and increase the amplitude of the high-frequency part. It is achieved using the following first-order filter:
[0051] ,in, is the balance amplitude after output, Expressed as the input amplitude at time t, is the amplitude of the input at time t-1;
[0052] The first-order filter enhances the rapid changes in the audio signal, especially in the high-frequency part, which helps to highlight the high-frequency components of the audio signal and reduce the influence of the low-frequency components.
[0053] Furthermore, when dividing the frames, the sampling rate and frame length are determined, and the sampling rate is set to 6 kHz, the frame length is usually set to 27 ms, the frame shift is set to 8 milliseconds, and the frames overlap by 65%. A window function is applied to each frame to reduce the oscillation at the frame boundary. The Hanning window is used for processing. Each frame is represented in the time domain as a one-dimensional array, and the Mel-frequency cepstral coefficients are used to describe the spectral characteristics of each frame.
[0054] Furthermore, when MFCC is used to obtain feature vectors, it is necessary to obtain a feature vector for each frame signal after preprocessing to form a feature vector group. The process of obtaining the feature vectors includes four processes: FFT transformation, Mel filtering, logarithmic transformation, and discrete cosine transformation. Among them, Mel filtering is implemented by a filter group composed of several triangular bandpass filters. Assuming the number of filters is p, the signal is filtered to obtain p parameters m i (i=1, 2,…,p), the calculation formula is:
[0055] ,
[0056] Where: N is the number of FFT points; X(k) is the FFT of the framed signal after preprocessing; H i (k) is the filter parameter, expressed as:
[0057] ,
[0058] ,
[0059] Where, f(i) is the center frequency of the triangular filter;
[0060] According to the calculation, m i After that, take its logarithm and perform discrete cosine transform. The transformation formula is as follows:
[0061] ,
[0062] C(i) calculated according to the above formula is the MFCC feature vector of the frame signal;
[0063] In order to improve the computational efficiency, the principal component analysis algorithm is introduced here to reduce the dimension of the calculated high-dimensional MFCC feature vector and ensure the accurate acquisition of noise characteristics; first, a linear combination J1 with the largest variance is found among all linear combinations, which is called the first principal component; then, a linear combination J2 with the largest variance is found among the linear combinations unrelated to J1, which is called the second principal component, and so on to obtain the principal components of each order that are independent of each other and whose variances decrease in sequence.
[0064] The electric toy car control system based on voice-assisted operation includes:
[0065] A microphone, which is used to collect voice for voice-assisted operation, convert the voice information into a voice waveform, and transmit the voice waveform to the processing unit;
[0066] The processing unit is used to receive the speech waveform collected by the microphone, and amplify the received speech waveform to improve the strength of the speech waveform, and filter the speech waveform to reduce noise interference in the speech waveform and improve the accuracy of the speech waveform, so as to facilitate subsequent calculation and analysis;
[0067] MFCC feature extraction unit, the MFCC feature extraction unit is used to extract features from speech waveforms. By performing vector processing, pre-emphasis, and framing on the speech waveform, it is convenient to extract features from the speech waveform. Through vector processing, efficient detection and efficient analysis are achieved. Pre-emphasis is used to highlight important high-frequency information and reduce the influence of low-frequency noise, thereby improving the characteristics of the audio signal and improving the signal-to-noise ratio, so as to better perform subsequent signal processing and feature extraction. Framing is used for segmented processing of the speech waveform, which is convenient for improving the efficiency of feature extraction. The MFCC feature extraction unit realizes the signal features in advance in the signal frame by frame through MFCC.
[0068] Semantic analysis unit: The semantic analysis unit performs semantic analysis on the extracted features through the CNN ASR model, and realizes end-to-end analysis, and determines the text instructions of the voice instructions in combination with the vocabulary, so as to facilitate the control and adjustment of the electric toy car. The voice data information is analyzed and processed frame by frame through the convolution kernel of CNN, and the voice semantics is analyzed and processed, and the vocabulary is compared with the forget gate to accurately determine the text instructions and realize the control and adjustment of the electric toy car.
[0069] (III) Beneficial effects
[0070] The present invention provides a method and system for controlling an electric toy car based on voice-assisted operation, which has the following beneficial effects:
[0071] The present invention acquires voice commands through a microphone, converts the voice commands into voice waveforms, and then filters out environmental noise in voice information through preprocessing, thereby improving the accuracy of voice commands, reducing the interference of environmental noise, and realizing analog-to-digital conversion processing. The EEMD algorithm is used for noise reduction processing. The EEMD algorithm overcomes the modal aliasing and endpoint effect phenomena on the basis of EMD, introduces noise auxiliary analysis into EMD decomposition, and makes the signal that cannot be decomposed by EMD become decomposed by EMD.
[0072] Then, the speech is feature extracted through MFCC, and before feature extraction, the speech information is vector processed, pre-emphasized and framed, so that the speech information is easy to extract features and the efficiency of calculation is improved. Through vector processing, efficient detection and efficient analysis are achieved, and pre-emphasis is used to highlight important high-frequency information and reduce the influence of low-frequency noise, thereby improving the characteristics of the audio signal and the signal-to-noise ratio, so as to better perform subsequent signal processing and feature extraction. Framing is used for segmented processing of speech waveforms, which is convenient for improving the efficiency of feature extraction, and the MFCC feature extraction unit realizes the signal features in advance in the signal frame by frame through MFCC;
[0073] The CNN ASR model is used to perform semantic recognition and analysis on the speech after feature extraction, and the voice commands are converted into text commands in combination with the vocabulary, which is convenient for controlling and adjusting the toy car. That is, the voice data information is analyzed and processed frame by frame through the convolution kernel of CNN, and the speech semantics is analyzed and processed, and the vocabulary is compared with the forget gate to determine the conversion processing of the text command. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 A schematic flow chart of the steps of the electric toy car control method based on voice-assisted operation of the present invention;
[0075] Figure 2The present invention is a schematic structural diagram of an electric toy car control system based on voice-assisted operation. DETAILED DESCRIPTION
[0076] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0077] See also Figure 1 The present invention provides a method for controlling an electric toy car based on voice-assisted operation, comprising the following steps:
[0078] S1. The electric toy car collects voice through a microphone: the electric toy car is controlled by voice, that is, the electric toy car collects the user's voice through the microphone to complete the voice-assisted operation control of the electric toy car;
[0079] S2, the control module of the electric toy car pre-processes the voice information: amplifies the voice information, then performs filtering, and then converts the voice information;
[0080] S3, extracting features from the voice information: before extracting features from the voice information, first perform vector processing, pre-emphasis, and frame division on the voice information, and then extract features from the voice information, and extract features from the voice information through MFCC;
[0081] MFCC is a signal feature extracted from the signal frame by frame. After extracting the characteristic Mel frequency cepstrum parameters, continuous difference is performed, and the comprehensive characteristic parameters are extracted in combination with the fundamental frequency. The nonlinear relationship between the Mel frequency and the partial discharge signal frequency is expressed as follows:
[0082] , where: B is the Mel frequency, h is the frequency;
[0083] S4. Semantic recognition for electric toy car control: The CNN ASR model is used to perform semantic recognition analysis on the speech after feature extraction to achieve direct end-to-end speech recognition, and the voice commands are converted into text commands in combination with the vocabulary, and then the electric toy car is controlled and adjusted through the binary algorithm;
[0084] The convolution kernel of CNN is used to analyze and process the speech data frame by frame, and the speech semantics is analyzed and processed, and the vocabulary is compared with the forget gate;
[0085] Convolution kernel Assume that the input matrix size is w, the convolution kernel size is k, the stride is s, and the number of zero-filling layers is p. The calculation formula for the size of the speech segment generated after convolution is:
[0086] ,pass Determine the size of the cut speech,
[0087] The input formula is:
[0088] , where conv2() is the convolution function of the convolution operation, valid indicates the type of convolution operation, W is the convolution kernel weight matrix, X is the input matrix, and b is the bias.
[0089] The output formula is:
[0090] ,in, is the activation function
[0091] Each convolution kernel has a different weight matrix W, then is the output.
[0092] In this embodiment, the forget gate is used for semantic comparison, and the calculation formula of the forget gate is as follows:
[0093] ,in, is the sigmoid function, is the weight, is the hidden value output by the convolution kernel, is the input value at time t, is the bias, It is the output value of the hidden gate. If the output is 1, it is determined that the word in the vocabulary is the same as the data of the semantic analysis, and the data information output by the convolution kernel is saved. If the output is 0, it means that there is no data information with the same semantic analysis in the vocabulary, and the data information output by the convolution kernel is deleted. Through the judgment of the forget gate, each fragment of the semantic analysis is compared and compared with the vocabulary to determine the semantics of the speech expression and generate text control instructions. The text after the speech analysis is compared through the forget gate, and the determination of the forget gate can be combined into text instructions to facilitate the control operation of the toy car.
[0094] Specifically, the filtering process uses the EEMD algorithm for noise reduction. The EEMD algorithm overcomes the modal aliasing and endpoint effect phenomena based on EMD, introduces noise auxiliary analysis into EMD decomposition, and makes the signal that cannot be decomposed by EMD become decomposed by EMD.
[0095] A set of random Gaussian white noise is added to the speech signal x(t) collected by the microphone, and the resulting sequence signal to be processed is:
[0096] ;
[0097] In the formula, is the original signal, The signal to be processed is obtained by adding Gaussian random white noise for the i-th time; is the random Gaussian white noise added for the ith time;
[0098] The noisy sequence signal to be processed is subjected to EMD decomposition to obtain the m-order modal component and residual component as follows:
[0099] ,
[0100] In the formula, for The j-th modal component obtained by EMD decomposition; is the residual component or trend term of the signal after removing m modal components;
[0101] For N The j-th order modal component obtained by EMD decomposition is averaged to obtain the original signal The j-th modal component of Similarly, the original signal can be obtained by taking the average value of N signal residual components The residual component ,Right now:
[0102] .
[0103] The original signal is decomposed by EEMD to obtain modal components and residual components of each order. The modal components of each order obtained by decomposition are judged by frequency analysis and energy analysis. The noise modal components are removed and the remaining signal modal components are reconstructed to obtain the signal after noise reduction.
[0104] Frequency analysis is a method to remove the modal components whose frequencies are obviously higher than the mechanical response frequency in the modal components decomposed by EEMD; assuming that the highest frequency of speech is , assuming that the first to the Frequency of IMF All meet , then the first to the The IMF of the first modal component is considered as noise and removed;
[0105] The energy analysis noise reduction method is based on the frequency analysis method. The th to mth order IMFs are used for further noise reduction. The specific method is as follows:
[0106] Calculate the energy density of the j-th order IMF for:
[0107] ,
[0108] In the formula, represents the amplitude of the j-th order quantity IMF at time t;
[0109] By energy density , find the energy of the j-th order IMF The average value of IMF energy is:
[0110] ,
[0111] By Energy of the first-order IMF and before The average energy of each order IMF is the energy ratio for:
[0112] ,
[0113] If the energy ratio , it indicates that the j-th order IMF component is a signal; if the energy ratio , it indicates that the j-th order component is noise, and then the noise is deleted;
[0114] By using the EEMD algorithm for noise reduction processing, the noise in the environment can be effectively eliminated, and the m-order modal component and residual component can be obtained through EMD decomposition, and the m-order modal component and residual component are decomposed by EMD again. The modal components of each order obtained by decomposition are then subjected to frequency analysis and energy analysis to determine the modal components of noise and signal, the noise modal component is removed, and the remaining signal modal components are reconstructed to obtain the denoised signal, so that the noise processing is cleaner, the loss of speech signals is reduced, and the accuracy of speech signals is improved.
[0115] In this embodiment, preferably, vector processing performs vector processing on voiceprint data information through an automated vectorization algorithm or point cloud processing means; that is, the voice information after filtering is analyzed and processed, and converted into vector elements, such as points, lines, and surfaces; ensuring that the vectorization results are accurate and complete, and retaining key attribute information; efficient detection and efficient analysis of voice information are achieved through vector processing, and the way of querying data after vector processing is also transitioned from precise search to approximate search, thereby improving the efficiency of query, and the voice information after vector processing has the characteristics of low latency and high concurrency, which is convenient for large-scale sharing and analysis.
[0116] Specifically, pre-emphasis means that the amplitude of the high-frequency part will be smaller than that of the low-frequency part. Pre-emphasis is used to balance the spectrum and increase the amplitude of the high-frequency part. It is achieved using the following first-order filter:
[0117] ,in, is the balance amplitude after output, Expressed as the input amplitude at time t, is the amplitude of the input at time t-1;
[0118] The first-order filter enhances the rapid changes in the audio signal, especially in the high-frequency part, which helps to highlight the high-frequency components of the audio signal and reduce the influence of the low-frequency components;
[0119] Pre-emphasis is used to highlight important high-frequency information and reduce the impact of low-frequency noise, thereby improving the characteristics of audio signals and increasing the signal-to-noise ratio for better subsequent signal processing and feature extraction. The frequency of the signal is mainly determined by the speed of change of the signal level. When the signal is first-order differentiated, the high-frequency part (where the change is fast) has a large differential value, and the low-frequency part (where the change is slow) has a small differential value, achieving the effect of balancing the spectrum. It helps to reduce the continuity of the signal and improve the recognition of speech features;
[0120] The first-order filter enhances the rapid changes in the audio signal, especially in the high-frequency part. It helps to highlight the high-frequency components of the audio signal and reduce the influence of the low-frequency components.
[0121] In this embodiment, further, when dividing the frames, the sampling rate and frame length are determined, and the sampling rate is set to 6 kHz, the frame length is usually set to 27 ms, the frame shift is set to 8 milliseconds, and the frames overlap by 65%. A window function is applied to each frame to reduce oscillations at the frame boundaries. A Hanning window is used for processing, and each frame is represented as a one-dimensional array in the time domain, and the Mel-frequency cepstral coefficients are used to describe the spectral characteristics of each frame. The speech waveform is segmented by framing to facilitate improving the efficiency of feature extraction.
[0122] In this embodiment, preferably, when MFCC obtains the feature vector, it is necessary to obtain a feature vector for each frame signal after preprocessing to form a feature vector group, and the obtaining process includes four processes: FFT transformation, Mel filtering, logarithmic transformation and discrete cosine transformation; wherein, Mel filtering is implemented by a filter group composed of several triangular bandpass filters; assuming that the number of filters is p, the signal is filtered to obtain p parameters m i (i=1, 2,…,p), the calculation formula is:
[0123] ,
[0124] Where: N is the number of FFT points; X(k) is the FFT of the framed signal after preprocessing; H i (k) is the filter parameter, expressed as:
[0125] ,
[0126] ,
[0127] Where, f(i) is the center frequency of the triangular filter;
[0128] According to the calculation, m i After that, take its logarithm and perform discrete cosine transform. The transformation formula is as follows:
[0129] ,
[0130] C(i) calculated according to the above formula is the MFCC feature vector of the frame signal;
[0131] In order to improve the computational efficiency, the principal component analysis algorithm is introduced here to reduce the dimension of the calculated high-dimensional MFCC feature vector and ensure the accurate acquisition of noise characteristics; first, find a linear combination J1 with the largest variance among all linear combinations, which is called the first principal component; then find the linear combination J2 with the largest variance among the linear combinations unrelated to J1, which is called the second principal component, and so on to find the principal components of each order that are unrelated to each other and whose variances decrease in sequence;
[0132] Mel frequency cepstrum parameters (MFCC) are signal features extracted from frames of signals in advance, lacking many dynamic features. Therefore, after extracting the characteristic Mel frequency cepstrum parameters (MFCC), it is then continuously differentiated, and the comprehensive characteristic parameters are extracted in combination with the pitch period. The pitch period is a feature extracted based on the sound excitation mechanism to obtain a more accurate recognition rate. In order to improve the computational efficiency, the principal component analysis (PCA) algorithm is introduced here to reduce the dimension of the calculated high-dimensional MFCC feature vector and ensure accurate acquisition of noise features. The basic idea of PCA is to linearly combine the dimensional components of the original feature vector to generate a new feature vector, so that the dimensional components of the new feature vector are independent of each other and the variance is as large as possible.
[0133] refer to Figure 2 , an electric toy car control system based on voice-assisted operation, including:
[0134] A microphone, which is used to collect voice for voice-assisted operation, convert the voice information into a voice waveform, and transmit the voice waveform to the processing unit;
[0135] The processing unit is used to receive the speech waveform collected by the microphone, amplify the received speech waveform, improve the strength of the speech waveform, and filter the speech waveform to reduce noise interference in the speech waveform and improve the accuracy of the speech waveform, so as to facilitate subsequent calculation and analysis;
[0136] MFCC feature extraction unit, the MFCC feature extraction unit is used to extract features from speech waveforms. By performing vector processing, pre-emphasis, and framing on the speech waveform, it is convenient to extract features from the speech waveform. Through vector processing, efficient detection and efficient analysis are achieved. Pre-emphasis is used to highlight important high-frequency information and reduce the influence of low-frequency noise, thereby improving the characteristics of the audio signal and improving the signal-to-noise ratio, so as to better perform subsequent signal processing and feature extraction. Framing is used for segmented processing of the speech waveform, which is convenient for improving the efficiency of feature extraction. The MFCC feature extraction unit realizes the signal features in advance in the signal frame by frame through MFCC.
[0137] Semantic analysis unit: The semantic analysis unit performs semantic analysis on the extracted features through the CNN ASR model, and realizes end-to-end analysis, and determines the text instructions of the voice instructions in combination with the vocabulary, so as to facilitate the control and adjustment of the electric toy car. The voice data information is analyzed and processed frame by frame through the convolution kernel of CNN, and the voice semantics is analyzed and processed, and the vocabulary is compared with the forget gate to accurately determine the text instructions and realize the control and adjustment of the electric toy car.
[0138] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0139] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0140] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0141] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only some logical function divisions. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0144] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0145] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0146] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for controlling an electric toy car based on voice-assisted operation, characterized in that: The following steps are included: S1. The electric toy car collects voice through a microphone: the electric toy car is controlled by voice, that is, the electric toy car collects the user's voice through the microphone to complete the voice-assisted operation control of the electric toy car; S2, the control module of the electric toy car pre-processes the voice information: amplifies the voice information, then performs filtering, and then converts the voice information; S3, extracting features from the voice information: before extracting features from the voice information, first perform vector processing, pre-emphasis, and frame division on the voice information, and then extract features from the voice information, and extract features from the voice information through MFCC; MFCC is a signal feature extracted from the signal frame by frame. After extracting the characteristic Mel frequency cepstrum parameters, continuous difference is performed, and the comprehensive characteristic parameters are extracted in combination with the fundamental frequency. The nonlinear relationship between the Mel frequency and the partial discharge signal frequency is expressed as follows: , where: B is the Mel frequency, h is the frequency; S4. Semantic recognition for electric toy car control: The CNN ASR model is used to perform semantic recognition analysis on the speech after feature extraction to achieve direct end-to-end speech recognition, and the voice commands are converted into text commands in combination with the vocabulary, and then the electric toy car is controlled and adjusted through the binary algorithm; The convolution kernel of CNN is used to analyze and process the speech data frame by frame, and the speech semantics is analyzed and processed, and the vocabulary is compared with the forget gate; Convolution kernel Assume that the input matrix size is w, the convolution kernel size is k, the stride is s, and the number of zero-filling layers is p. The calculation formula for the size of the speech segment generated after convolution is: ,pass Determine the size of the cut speech, The input formula is: , where conv2() is the convolution function of the convolution operation, valid indicates the type of convolution operation, W is the convolution kernel weight matrix, X is the input matrix, and b is the bias. The output formula is: ,in, is the activation function Each convolution kernel has a different weight matrix W, then is the output.
2. The method for controlling an electric toy car based on voice-assisted operation according to claim 1, characterized in that: The forget gate is used for semantic comparison. The calculation formula of the forget gate is as follows: ,in, is the sigmoid function, is the weight, is the hidden value output by the convolution kernel, is the input value at time t, is the bias, It is the output value of the hidden gate. If the output is 1, it is determined that the word in the vocabulary is the same as the data of the semantic analysis, and the data information output by the convolution kernel is saved. If the output is 0, it means that there is no data information with the same semantic analysis in the vocabulary, and the data information output by the convolution kernel is deleted. Through the judgment of the forget gate, each fragment of the semantic analysis is compared and compared with the vocabulary to determine the semantics of the speech expression and generate text control instructions.
3. The method for controlling an electric toy car based on voice-assisted operation according to claim 1, characterized in that: The filtering process uses the EEMD algorithm for noise reduction. The EEMD algorithm overcomes the modal aliasing and endpoint effect phenomena based on EMD, introduces noise auxiliary analysis into EMD decomposition, and makes the signal that cannot be decomposed by EMD become decomposed by EMD. A set of random Gaussian white noise is added to the speech signal x(t) collected by the microphone, and the resulting sequence signal to be processed is: ; In the formula, is the original signal, The signal to be processed is obtained by adding Gaussian random white noise for the i-th time; is the random Gaussian white noise added for the ith time.
4. The method for controlling an electric toy car based on voice-assisted operation according to claim 3, characterized in that: The noisy sequence signal to be processed is subjected to EMD decomposition to obtain the m-order modal component and residual component as follows: , In the formula, for The j-th modal component obtained by EMD decomposition; is the residual component or trend term of the signal after removing m modal components; For N The j-th order modal component obtained by EMD decomposition is averaged to obtain the original signal The j-th modal component of Similarly, the original signal can be obtained by taking the average value of N signal residual components The residual component ,Right now: 。 5. The method for controlling an electric toy car based on voice-assisted operation according to claim 4, characterized in that: The original signal is decomposed by EEMD to obtain modal components and residual components of each order. The modal components of each order obtained by decomposition are judged by frequency analysis and energy analysis. The noise modal components are removed and the remaining signal modal components are reconstructed to obtain the signal after noise reduction. Frequency analysis is a method to remove the modal components whose frequencies are obviously higher than the mechanical response frequency in the modal components decomposed by EEMD; assuming that the highest frequency of speech is , assuming that the first to the Frequency of order IMF All meet , then the first to the The IMF of the first modal component is considered as noise and removed; The energy analysis noise reduction method is based on the frequency analysis method. The th to mth order IMFs are used for further noise reduction. The specific method is as follows: Calculate the energy density of the j-th order IMF for: , In the formula, represents the amplitude of the j-th order quantity IMF at time t; By energy density , find the energy of the j-th order IMF The average value of IMF energy is: , By Energy of the first-order IMF and before The average energy of each order IMF is the energy ratio for: , If the energy ratio , it indicates that the j-th order IMF component is a signal; if the energy ratio , it indicates that the j-th order component is noise, and then the noise is deleted.
6. The method for controlling an electric toy car based on voice-assisted operation according to claim 1, characterized in that: Vector processing uses automated vectorization algorithms or point cloud processing to vectorize voiceprint data information; that is, it analyzes and processes the filtered voice information and converts it into vector elements, such as points, lines, and surfaces; ensuring that the vectorization results are accurate and complete, and retaining key attribute information.
7. The method for controlling an electric toy car based on voice-assisted operation according to claim 1, characterized in that: Pre-emphasis means that the amplitude of the high-frequency part will be smaller than that of the low-frequency part. Pre-emphasis is used to balance the spectrum and increase the amplitude of the high-frequency part. It is achieved using the following first-order filter: ,in, is the balance amplitude after output, Expressed as the input amplitude at time t, is the amplitude of the input at time t-1; The first-order filter enhances the rapid changes in the audio signal, especially in the high-frequency part, which helps to highlight the high-frequency components of the audio signal and reduce the influence of the low-frequency components.
8. The method for controlling an electric toy car based on voice-assisted operation according to claim 1, characterized in that: When dividing the frames, the sampling rate and frame length are determined, and the sampling rate is set to 6 kHz, the frame length is usually set to 27 ms, the frame shift is set to 8 milliseconds, and the frames overlap by 65%. A window function is applied to each frame to reduce the oscillation at the frame boundary. The Hanning window is used for processing. Each frame is represented in the time domain as a one-dimensional array, and the Mel-frequency cepstral coefficients are used to describe the spectral characteristics of each frame.
9. The method for controlling an electric toy car based on voice-assisted operation according to claim 8, characterized in that: When MFCC obtains feature vectors, it is necessary to obtain a feature vector for each frame signal after preprocessing to form a feature vector group. The obtaining process includes four processes: FFT transformation, Mel filtering, logarithmic transformation and discrete cosine transformation. Among them, Mel filtering is implemented by a filter group composed of several triangular bandpass filters. Assuming the number of filters is p, the signal is filtered to obtain p parameters mi (i=1, 2, ..., p), and the calculation formula is: , Where: N is the number of FFT points; X(k) is the FFT of the framed signal after preprocessing; H i (k) is the filter parameter, expressed as: , , Where, f(i) is the center frequency of the triangular filter; According to the calculation, m i After that, take its logarithm and perform discrete cosine transform. The transformation formula is as follows: , C(i) calculated according to the above formula is the MFCC feature vector of the frame signal; In order to improve the computational efficiency, the principal component analysis algorithm is introduced here to reduce the dimension of the calculated high-dimensional MFCC feature vector and ensure the accurate acquisition of noise characteristics; first, a linear combination J1 with the largest variance is found among all linear combinations, which is called the first principal component; then, a linear combination J2 with the largest variance is found among the linear combinations unrelated to J1, which is called the second principal component, and so on to obtain the principal components of each order that are independent of each other and whose variances decrease in sequence.
10. An electric toy car control system based on voice-assisted operation, characterized in that: Including, A microphone, which is used to collect voice for voice-assisted operation, convert the voice information into a voice waveform, and transmit the voice waveform to the processing unit; The processing unit is used to receive the speech waveform collected by the microphone, and amplify the received speech waveform to improve the strength of the speech waveform, and filter the speech waveform to reduce noise interference in the speech waveform and improve the accuracy of the speech waveform, so as to facilitate subsequent calculation and analysis; MFCC feature extraction unit, the MFCC feature extraction unit is used to extract features from speech waveforms. By performing vector processing, pre-emphasis, and framing on the speech waveform, it is convenient to extract features from the speech waveform. Through vector processing, efficient detection and efficient analysis are achieved. Pre-emphasis is used to highlight important high-frequency information and reduce the influence of low-frequency noise, thereby improving the characteristics of the audio signal and improving the signal-to-noise ratio, so as to better perform subsequent signal processing and feature extraction. Framing is used for segmented processing of the speech waveform, which is convenient for improving the efficiency of feature extraction. The MFCC feature extraction unit realizes the signal features in advance in the signal frame by frame through MFCC. Semantic analysis unit: The semantic analysis unit performs semantic analysis on the extracted features through the CNN ASR model, and realizes end-to-end analysis, and determines the text instructions of the voice instructions in combination with the vocabulary, so as to facilitate the control and adjustment of the electric toy car. The voice data information is analyzed and processed frame by frame through the convolution kernel of CNN, and the voice semantics is analyzed and processed, and the vocabulary is compared with the forget gate to accurately determine the text instructions and realize the control and adjustment of the electric toy car.
Citation Information
Patent Citations
Novel child electric toy car capable of being controlled by voice
CN219462492U
Method and system for voiceprint recognition based on vector quantization based
CN102509547A
Speech recognition method based on model pre-training and bidirectional LSTM
CN108682418A
Voice recognizing sensor in intelligent toy system and voice control system
CN110675877A
Voice control intelligent toy car system based on TMS320VC5509A
CN111001167A