Smart home control method based on voice recognition
By performing feature analysis and binary classification of voice signals, adaptively determine the frame length and overlap rate for frame denoising, the problem of unreasonable frame length and overlap rate in the existing technology is solved, and the accuracy of smart home control is improved and Timeliness.
Patent Information
- Application Number
- CN202411212524.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-06-01
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-30
AI Technical Summary
In the process of voice signal denoising, the frame length and overlap rate during frame division are unreasonable, which affects the accuracy and timeliness of smart home control.
By performing characteristic analysis of speech signals, the normal signal possibility of each frequency in the spectrum is determined, and binary classification is performed to obtain speech frequency groups and noise frequency groups, estimate the noise signal ratio, and adaptively determine the frame length and overlap rate for frame denoising. .
While ensuring the noise removal effect, it reduces the amount of data calculation and improves the accuracy and timeliness of smart home control.
Smart Images

Figure CN118942478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of voice signal processing, and more particularly, to a smart home control method based on voice recognition. Background Art
[0002] Smart home control methods based on voice recognition allow users to control home devices and systems through voice commands, providing a more convenient, efficient, personalized, and innovative home experience. This represents a key area of future smart home development. During smart home control, if the collected voice signal is noisy, voice recognition accuracy may decrease, leading to false triggering, system response delays, and other issues. Therefore, denoising the collected voice signal to optimize the performance of smart home control systems based on voice recognition is of great practical significance.
[0003] Among speech denoising technologies, the most common method is spectral subtraction, which suppresses noise by framing the speech signal, estimating the spectral characteristics of the framed signal and the noise, and then performing a subtraction operation on the spectrum of the framed signal, ultimately achieving speech signal denoising. However, when using spectral subtraction to denoise speech signals, the frame length and overlap ratio are usually determined based on experience. If the determined frame length is too large and the overlap ratio is too low, the noise will not be obvious, affecting the denoising effect and the accuracy of home control. If the determined frame length is too small and the overlap ratio is too high, the overlap ratio will be too high, which will greatly increase the amount of calculation and fail to meet the timeliness requirements of home control, ultimately affecting the effectiveness of smart home control. Summary of the Invention
[0004] The object of the present invention is to provide a smart home control method based on speech recognition. The method performs feature analysis on the speech signal to adaptively determine the frame length and overlap rate when framing the speech signal, thereby solving the problem that in the existing process of speech signal denoising, the frame length and overlap rate used when framing the speech signal are unreasonable, which ultimately affects the smart home control effect.
[0005] To solve the above technical problems, in a first aspect, the present invention provides a smart home control method based on voice recognition, comprising the following steps:
[0006] Acquire a frequency spectrum of a speech signal to be processed, and determine a formant frequency in the frequency spectrum;
[0007] Determining the likelihood that each frequency in the spectrum is a normal signal based on the distribution of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the smoothness of the spectrum surrounding each frequency;
[0008] According to the possibility of the signal belonging to a normal signal, each frequency in the spectrum is classified into two categories to obtain a speech frequency group and a noise frequency group;
[0009] determining an approximate signal-to-noise ratio of the speech signal based on the likelihood that the frequencies in the speech frequency group and the noise frequency group belong to normal signals;
[0010] Determining a frame length and an overlap ratio when framing the speech signal according to the approximate signal-to-noise ratio, and performing frame denoising on the speech signal according to the frame length and the overlap ratio to obtain a denoised speech signal;
[0011] Home control is performed based on the denoised voice signal.
[0012] In the above scheme, feature analysis is performed on speech and noise signals. Since phonemes are all present in the low-frequency range, speech signals are typically concentrated in the lower frequency range, while noise signals cover a wider range. Furthermore, normal speech signals typically have relatively concentrated spectral energy, centered near the vocal tract formants. In contrast, the spectral energy distribution of noise signals is more widespread and complex. The spectrum of normal speech signals is typically smooth, while the spectrum of noise signals is more jagged and irregular due to the complex and diverse noise components they contain. Based on the above characteristics of speech and noise signals, the likelihood of each frequency in the speech signal's spectrum belonging to a normal speech signal can be determined by determining whether the frequency is distributed in the low-frequency range near the formants and whether the variation trend around the frequency is smooth. Based on the likelihood of each frequency in the spectrum belonging to a normal signal, the spectrum is binary-classified, with frequencies with a lower likelihood of belonging to a normal signal being grouped into one category and frequencies with a higher likelihood of belonging to a normal signal being grouped into another category, resulting in speech frequency groups and noise frequency groups. Furthermore, the approximate signal-to-noise ratio of the speech signal can be determined based on the likelihood of frequencies in the speech and noise frequency groups belonging to a normal signal. Since speech signals are typically non-stationary, meaning their characteristics vary over time, denoising such signals requires breaking them into smaller time segments. In situations with high levels of noise, the speech signal needs to be framed using shorter frame lengths and higher overlap ratios to better capture the signal's time-varying characteristics. Therefore, the frame length and overlap ratio for framing the speech signal are determined based on the approximate noise-to-signal ratio (NR / SNR) of the speech signal determined above. A higher NR / SNR indicates more noise, so the frame length should be shorter and the overlap ratio higher. Conversely, a lower NR indicates less noise, so the frame length should be longer and the overlap ratio lower, thereby reducing the amount of data computation required. Based on the determined frame length and overlap ratio, the speech signal is framed and denoised to obtain a denoised speech signal, which is then used for home control. By adaptively determining the frame length and overlap ratio used when framing the speech signal, the present invention effectively reduces the amount of data computation required while ensuring effective denoising of the speech signal, ultimately ensuring effective smart home control.
[0013] In conjunction with the first aspect above, in some possible implementations, determining the likelihood that each frequency in the spectrum belongs to a normal signal includes:
[0014] determining a spectrum smoothness corresponding to each frequency in the spectrum according to a signal strength difference between each frequency in the spectrum and each adjacent frequency in its neighborhood;
[0015] The possibility that each frequency in the spectrum belongs to a normal signal is determined based on the magnitude of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the spectrum smoothness corresponding to each frequency.
[0016] In the above scheme, the spectral smoothness corresponding to each frequency in the spectrum can be determined by comparing the signal strength difference between each frequency in the spectrum and each adjacent frequency in its neighborhood. Then, combined with the size of each frequency and the difference between each frequency and the resonance peak frequency, the possibility that the frequency belongs to a normal signal can be accurately determined.
[0017] In conjunction with the first aspect above, in some possible implementations, determining the spectrum smoothness corresponding to each frequency in the spectrum includes:
[0018] Determining, based on the signal strength between each frequency in the spectrum and each adjacent frequency in its neighborhood, a signal strength change slope between each frequency in the spectrum and each adjacent frequency in its neighborhood, and performing mapping processing on the signal strength change slope to obtain a signal strength change inclination angle;
[0019] Determine the average value of all signal strength change inclination angles corresponding to each frequency in the spectrum to obtain a signal strength change inclination angle mean;
[0020] The spectrum smoothness corresponding to each frequency in the spectrum is determined according to a comprehensive difference between a signal strength variation inclination angle between each frequency in the spectrum and each adjacent frequency in its neighborhood and an average of the signal strength variation inclination angles.
[0021] In the above scheme, by calculating the signal strength change inclination angle between each frequency in the spectrum and each adjacent frequency in its neighborhood, and determining the spectrum smoothness corresponding to each frequency based on the consistency of the signal strength change inclination angle, the accuracy of the determined spectrum smoothness can be effectively guaranteed.
[0022] In conjunction with the first aspect above, in some possible implementations, determining an approximate signal-to-noise ratio of the speech signal includes:
[0023] determining, based on the likelihood that each frequency in the noise frequency group belongs to a normal signal, the likelihood that each frequency in the noise frequency group belongs to a noise signal;
[0024] Determining the cumulative sum of the likelihood that each frequency in the noise frequency group belongs to a noise signal to obtain a noise signal index;
[0025] Determining the cumulative sum of the likelihood of each frequency in the voice frequency group being a normal signal to obtain a voice signal index;
[0026] The sum of the noise signal index and the speech signal index is determined to obtain an overall signal index, and the ratio of the noise signal index to the overall signal index is determined as an approximate signal-to-noise ratio of the speech signal.
[0027] In the above scheme, the noise signal strength is characterized by using the cumulative sum of the possibilities of each frequency in the noise frequency group belonging to the noise signal, and the normal voice signal strength is characterized by using the cumulative sum of the possibilities of each frequency in the voice frequency group belonging to the normal signal, thereby obtaining a rough signal-to-noise ratio of the voice signal, effectively realizing the estimation of the degree of noise contained in the voice signal.
[0028] In conjunction with the first aspect above, in some possible implementations, determining a frame length when framing a speech signal includes:
[0029] Obtaining a maximum frame length and a minimum frame length when framing the speech signal, determining a difference between the maximum frame length and the minimum frame length, and obtaining a frame length span;
[0030] Performing negative correlation processing on the approximate signal-to-noise ratio of the speech signal to obtain an approximate signal-to-noise ratio processing value of the speech signal;
[0031] The product of the frame length span and the approximate signal-to-noise ratio processing value of the speech signal is determined as the adjusted frame length, and the sum of the adjusted frame length and the minimum frame length is determined as the frame length when framing the speech signal.
[0032] In the above scheme, by utilizing the approximate signal-to-noise ratio of the speech signal, the appropriate frame length is adaptively determined between the maximum frame length and the minimum frame length when framing the speech signal, thereby ensuring the rationality of the framing of the speech signal.
[0033] In conjunction with the first aspect above, in some possible implementations, determining the overlap rate when framing the speech signal includes:
[0034] Obtaining a maximum overlap rate and a minimum overlap rate when framing the speech signal, determining a difference between the maximum overlap rate and the minimum overlap rate, and obtaining an overlap rate span;
[0035] The product of the overlap ratio span and the approximate signal-to-noise ratio of the speech signal is determined as the adjusted overlap ratio, and the sum of the adjusted overlap ratio and the minimum overlap ratio is determined as the overlap ratio when framing the speech signal.
[0036] In the above scheme, by utilizing the approximate signal-to-noise ratio of the speech signal, a suitable overlap ratio is adaptively determined between the maximum overlap ratio and the minimum overlap ratio when framing the speech signal, thereby ensuring the rationality of the framing of the speech signal.
[0037] In conjunction with the first aspect above, in some possible implementations, determining the resonance peak frequency in the spectrum includes:
[0038] determining a spectrum symmetry index of each frequency in the spectrum according to a difference in signal strength between adjacent frequencies at left-right symmetrical positions of each frequency in the spectrum;
[0039] Determining the possibility of each frequency in the spectrum being a formant frequency based on a symmetry index between each frequency in the spectrum and its spectrum;
[0040] The frequency corresponding to the maximum value of the probability of belonging to the formant frequency in the spectrum is determined as the formant frequency in the spectrum.
[0041] In the above scheme, based on the characteristics that the formant in the spectrum of the speech signal appears as a high-intensity peak and the formant is symmetrical on the left and right, the possibility of each frequency in the spectrum belonging to the formant frequency is analyzed, which effectively ensures the accuracy and speed of the determined formant frequency.
[0042] In combination with the first aspect above, in some possible implementations, spectral subtraction is used to perform frame denoising on the speech signal according to the frame length and the overlap rate to obtain a denoised speech signal.
[0043] In the above scheme, the speech signal is subjected to frame denoising processing by using the adaptively determined frame length and overlap rate to obtain a frame signal, which effectively reduces the amount of calculation while ensuring the denoising effect.
[0044] In combination with the first aspect above, in some possible implementations, the method further includes:
[0045] In the process of performing frame denoising on the speech signal using spectral subtraction, an approximate signal-to-noise ratio of the frame signal of the speech signal is obtained;
[0046] performing amplitude correction on an estimated noise signal when denoising the framed signal using spectral subtraction according to an approximate signal-to-noise ratio of the framed signal;
[0047] The framed signal is denoised according to the estimated noise signal after amplitude correction.
[0048] In the above scheme, by using the approximate signal-to-noise ratio of the framed signal to correct the amplitude of the estimated noise signal, the phenomenon of negative numbers appearing in the denoising process can be effectively avoided, and the denoising accuracy can be effectively improved.
[0049] In combination with the first aspect above, in some possible implementations, a k-means algorithm is used to perform binary classification on each frequency in the spectrum.
[0050] In the above scheme, the k-means algorithm is used to perform binary classification on each frequency in the spectrum, which effectively ensures the accuracy of classification.
[0051] To solve the above technical problems, in a second aspect, the present invention further provides a smart home control device based on voice recognition, the device comprising:
[0052] A formant frequency acquisition module, configured to acquire a frequency spectrum of a speech signal to be processed and determine the formant frequency in the frequency spectrum;
[0053] a normal signal probability acquisition module, configured to determine the probability of each frequency in the spectrum being a normal signal based on the distribution of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the smoothness of the surrounding spectrum of each frequency;
[0054] A classification module, configured to perform binary classification on each frequency in the spectrum according to the likelihood of the frequency belonging to a normal signal, to obtain a speech frequency group and a noise frequency group;
[0055] an approximate signal-to-noise ratio obtaining module, configured to determine an approximate signal-to-noise ratio of a speech signal based on the likelihood that frequencies in the speech frequency group and the noise frequency group belong to normal signals;
[0056] a frame denoising module, configured to determine a frame length and an overlap ratio when framing the speech signal according to the approximate signal-to-noise ratio, and perform frame denoising on the speech signal according to the frame length and overlap ratio to obtain a denoised speech signal;
[0057] The control module is used to control the home based on the de-noised voice signal.
[0058] To address the above technical issues, in a third aspect, the present invention further provides a voice recognition-based smart home control system, comprising a memory and a processor. The memory is configured to store executable program code, and the processor is configured to retrieve and execute the executable program code from the memory, causing the device to perform the method of the above-described first aspect or any possible implementation of the first aspect.
[0059] In order to solve the above technical problems, in a fourth aspect, the present invention also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, enables the computer to execute the method in the above first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0061] Figure 1 This is a flow chart of a smart home control method based on voice recognition according to an embodiment of the present invention;
[0062] Figure 2 A flowchart of determining a formant frequency in a spectrum of a speech signal according to an embodiment of the present invention;
[0063] Figure 3 A flowchart of an embodiment of the present invention for determining the likelihood that each frequency in a spectrum is a normal signal;
[0064] Figure 4 This is a flowchart of determining the spectrum smoothness corresponding to each frequency in a spectrum according to an embodiment of the present invention;
[0065] Figure 5 A flowchart of determining an approximate signal-to-noise ratio of a speech signal according to an embodiment of the present invention;
[0066] Figure 6 A flowchart of determining a frame length when framing a speech signal according to an embodiment of the present invention;
[0067] Figure 7 A flowchart of determining an overlap rate when framing a speech signal according to an embodiment of the present invention;
[0068] Figure 8 This is a schematic structural diagram of a smart home control device based on voice recognition according to an embodiment of the present invention;
[0069] Figure 9 The figure is a structural diagram of a smart home control system based on voice recognition according to an embodiment of the present invention. DETAILED DESCRIPTION
[0070] To further illustrate the technical means and effects employed by the present invention to achieve its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementations, structures, features, and effects of the technical solutions proposed by the present invention. In the following description, references to different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention pertains. In addition, all parameters or indices in the formulas herein are normalized values to eliminate dimension effects.
[0072] In order to solve the problem that in the existing process of voice signal denoising, the frame length and overlap rate used when framing the voice signal are unreasonable, thereby affecting the smart home control effect, an embodiment of the present invention provides a smart home control method based on voice recognition. The method identifies the resonance peak frequency in the spectrum of the voice signal and evaluates the possibility of each frequency in the spectrum belonging to a normal signal based on the distribution of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the smoothness of the surrounding spectrum of each frequency, thereby realizing binary classification of all frequencies in the spectrum and obtaining the approximate signal-to-noise ratio of the voice signal; and based on the approximate signal-to-noise ratio, adaptively determines the frame length and overlap rate when framing the voice signal, thereby realizing voice signal denoising, effectively improving the denoising efficiency while ensuring the denoising effect, and ensuring the voice-based smart home control effect.
[0073] A smart home control method based on voice recognition provided by an embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
[0074] Figure 1 A basic flow chart of a smart home control method based on voice recognition provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method specifically includes the following steps:
[0075] Step S1: Acquire the frequency spectrum of the speech signal to be processed, and determine the formant frequency in the frequency spectrum.
[0076] In voice recognition-based smart home control, a voice sensor is installed to collect voice signals. In one embodiment of the present invention, the voice sensor is a microphone. Because the collected voice signals need to be applied to voice recognition to achieve smart home control, a short sampling period is required when collecting voice signals. In one embodiment of the present invention, a sampling period of once every second is set to capture subtle changes in the voice signal.
[0077] When denoising the collected speech signal, considering that in the case of more noise, a shorter frame length and a higher overlap rate should be used for framing the speech signal, it is necessary to first perform feature analysis on all frequencies in the speech signal's spectrum diagram to determine the approximate signal-to-noise ratio of the speech signal, so as to ultimately determine the appropriate frame length and repetition rate for framing.
[0078] When analyzing the characteristics of speech and noise signals, it is found that speech signals are typically concentrated in the lower frequency range because phonemes are found in the low-frequency range, while noise signals cover a wider range. Furthermore, normal speech signals typically have relatively concentrated spectral energy, centered near the vocal tract formants. In contrast, the spectral energy distribution of noise signals is more widespread and complex. Formants are regions in the speech spectrum where energy is relatively concentrated. Formants are not only a determinant of sound quality but also reflect the physical characteristics of the vocal tract resonant cavity. Finally, the spectrum of normal speech signals is typically relatively smooth. This is because the sound of human speech constantly changes during pronunciation, and the resonance effect of the speech signal passing through the vocal tract results in a relatively smooth spectrum. In contrast, noise signals, due to the complex and diverse noise components, have a more jagged and irregular spectrum.
[0079] Based on the characteristics of the above-mentioned speech signals and noise signals, the possibility that each frequency in the spectrum belongs to a normal speech signal can be determined by judging whether the frequencies in the spectrum of the speech signal are distributed near low frequencies and resonance peaks, and whether the surrounding change trend is smooth. Then, the approximate signal-to-noise ratio is determined, and the frame length and overlap rate of the frame can be determined based on the approximate signal-to-noise ratio.
[0080] To determine whether the frequencies in the speech signal's spectrum are distributed near formants, we first need to determine the frequencies corresponding to the formants in the speech signal's spectrum, referred to as the formant frequencies. Formants in the speech signal's spectrum appear as high-intensity peaks, so the higher the intensity, the more likely they are formants. Furthermore, formants are symmetrical, so by comparing the signal intensities of frequencies at the same position on either side, the closer the signal intensities are, the more likely they are formants.
[0081] Based on the above analysis, if Figure 2 As shown, in an embodiment of the present invention, determining the formant frequency in the spectrum of the speech signal includes the following steps:
[0082] Step S101: determining a spectrum symmetry index of each frequency in the spectrum according to a difference in signal strength between adjacent frequencies at left-right symmetrical positions of each frequency in the spectrum;
[0083] Step S102: determining the possibility of each frequency in the spectrum being a formant frequency based on each frequency in the spectrum and its spectrum symmetry index;
[0084] Step S103: determining the frequency corresponding to the maximum value of the probability of belonging to the formant frequency in the spectrum as the formant frequency in the spectrum.
[0085] In the above steps, by analyzing the difference in signal strength between adjacent frequencies at left and right symmetrical positions of each frequency in the spectrum, the degree of left and right symmetry of the frequencies is determined, thereby obtaining the possibility that each frequency in the spectrum is a resonance peak frequency.
[0086] In a specific embodiment of the present invention, the probability of each frequency in the spectrum being a formant frequency is determined, and the corresponding calculation formula is:
[0087]
[0088] Among them, Q O Indicates the possibility that frequency O in the spectrum belongs to the resonance peak frequency; E O Indicates the signal strength of frequency O in the spectrum; E′ i Indicates the signal strength of the ith adjacent frequency to the left of frequency O in the spectrum; E″ i represents the signal strength of the i-th adjacent frequency to the right of frequency O in the spectrum; n represents the total number of adjacent frequencies on the left and right sides of frequency O in the spectrum. In a specific embodiment of the present invention, n=10, that is, 10 frequencies on the left and right sides of frequency O in the spectrum are used as adjacent frequencies of frequency O; exp represents an exponential function with a constant e as the base.
[0089] In the above formula, The spectral symmetry index represents the frequency O in the spectrum. When the difference in signal strength between adjacent frequencies at symmetrical positions on the left and right sides of frequency O in the spectrum is smaller, the degree to which frequency O presents a symmetrical shape on both sides is higher. Therefore, the difference is logically converted using an exponential function to obtain the spectral symmetry index. At this time, the larger the value of the spectral symmetry index, the greater the possibility that the peak at frequency O in the spectrum belongs to the resonance peak. At the same time, the resonance peaks all appear as high-intensity peaks. When the signal strength of frequency O in the spectrum is greater and the value of the spectral symmetry index is larger, it means that frequency O in the spectrum is more likely to be the frequency point corresponding to the resonance peak, and the value of the probability of belonging to the resonance peak frequency is greater.
[0090] Based on the structural characteristics of the possibility of each frequency in the above spectrum belonging to the resonance peak frequency, the frequency corresponding to the maximum value of the possibility of belonging to the resonance peak frequency in the spectrum is determined, and this frequency is determined as the resonance peak frequency in the spectrum, that is, the frequency corresponding to the peak with the highest resonance peak in the spectrum.
[0091] By analyzing the characteristics of the formants in the spectrum of the speech signal, the probability of each frequency in the spectrum being a formant frequency is determined, and the formant frequencies in the spectrum can be accurately determined. It should be understood that in other embodiments, the formant frequencies in the spectrum can also be determined using methods such as the cepstrum method and the LPC (Linear Predictive Coding) spectrum estimation method in the prior art, which are not limited here.
[0092] Step S2: Determine the possibility that each frequency in the spectrum is a normal signal based on the distribution of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the smoothness of the surrounding spectrum of each frequency.
[0093] Based on the analysis of step S1 above, since the possibility that each frequency in the spectrum belongs to a normal speech signal can be determined by judging whether the frequency is distributed in the low frequency and near the resonance peak in the spectrum of the speech signal, and whether the surrounding change trend is smooth, the distribution of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the smoothness of the surrounding spectrum of each frequency are analyzed to determine the possibility that each frequency in the spectrum belongs to a normal signal.
[0094] like Figure 3 As shown, in an embodiment of the present invention, determining the possibility that each frequency in the spectrum belongs to a normal signal includes the following steps:
[0095] Step S201: determining the spectrum smoothness corresponding to each frequency in the spectrum according to the signal strength difference between each frequency in the spectrum and each adjacent frequency in its neighborhood;
[0096] Step S202: determining the likelihood that each frequency in the spectrum is a normal signal based on the magnitude of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the spectrum smoothness corresponding to each frequency.
[0097] In the above steps, in order to determine whether the variation trend around each frequency in the spectrum is smooth, the signal strength difference between each frequency in the spectrum and each adjacent frequency in its neighborhood is analyzed. When the signal strength variation of a certain frequency relative to its adjacent frequencies is relatively consistent, it means that the variation trend around the frequency is relatively smooth, thereby determining the smoothness of the spectrum corresponding to the frequency.
[0098] Based on the above analysis, if Figure 4 As shown, in an embodiment of the present invention, the spectrum smoothness corresponding to each frequency in the spectrum is determined, and the implementation steps include:
[0099] Step S2011: determining a signal strength change slope between each frequency in the spectrum and each adjacent frequency in its neighborhood based on the signal strength between each frequency in the spectrum and each adjacent frequency in its neighborhood, and performing mapping processing on the signal strength change slope to obtain a signal strength change tilt angle;
[0100] Step S2012: determining an average value of all signal strength change inclination angles corresponding to each frequency in the spectrum to obtain a mean signal strength change inclination angle value;
[0101] Step S2013: determining the spectrum smoothness corresponding to each frequency in the spectrum according to the comprehensive difference between the signal strength variation inclination angle between each frequency in the spectrum and each adjacent frequency in its neighborhood and the mean value of the signal strength variation inclination angle.
[0102] In the above steps, the signal strength change slope between each frequency in the spectrum and each adjacent frequency in its neighborhood is determined. The neighborhood of each frequency in the spectrum refers to a frequency region composed of a set number m of frequencies that are symmetrically adjacent to the frequency on the left and right sides, and each frequency in the frequency neighborhood is an adjacent frequency. In a specific embodiment of the present invention, the frequency region composed of m=10 frequencies that are symmetrically adjacent to each frequency in the spectrum is used as the neighborhood corresponding to each frequency. In this case, these 10 frequencies are the adjacent frequencies corresponding to each frequency. For each frequency in the spectrum, the signal strength of the frequency is subtracted from the signal strength of each of its adjacent frequencies to obtain a first difference. At the same time, the frequency is subtracted from each of its adjacent frequencies to obtain a second difference. The ratio of the first difference to the second difference is determined. The ratio is the signal strength change slope between the frequency and each of its adjacent frequencies. Since the signal strength change slope is essentially a slope, in a specific embodiment of the present invention, the signal strength change slope is mapped using the inverse trigonometric tangent function, that is, the signal strength change slope is used as the input of the inverse trigonometric tangent function, and the angle value output by the inverse trigonometric tangent function is the mapping processing result, which is referred to here as the signal strength change inclination angle.
[0103] When the change trend around a certain frequency in the spectrum is relatively smooth, the signal strength change inclination angle between the frequency and each adjacent frequency in its neighborhood should be relatively close. Therefore, in a specific embodiment of the present invention, the average value of all signal strength change inclination angles corresponding to each frequency in the spectrum is calculated to obtain the mean value of the signal strength change inclination angle, and the cumulative sum of the absolute values of the differences between all signal strength change inclination angles corresponding to each frequency and the mean value of the signal strength change inclination angle is calculated, and the cumulative sum is used as the spectrum smoothness corresponding to each frequency in the spectrum.
[0104] It should be understood that in other embodiments, when determining the spectral smoothness corresponding to each frequency in the spectrum, the median of all signal strength variation tilt angles corresponding to each frequency in the spectrum may also be determined, and the sum of the absolute values of the differences between all signal strength variation tilt angles corresponding to each frequency and the median may be used as the spectral smoothness corresponding to each frequency in the spectrum. Furthermore, the variance of all signal strength variation tilt angles corresponding to each frequency in the spectrum may also be determined. Since this variance can also characterize the proximity of the signal strength variation tilt angles between each frequency in the spectrum and each adjacent frequency in its neighborhood, this variance may be used as the spectral smoothness corresponding to each frequency in the spectrum.
[0105] Since the frequency distribution in the spectrum is at low frequencies and near the resonance peak, and the smoother the change trend around it is, the greater the possibility that each frequency belongs to a normal speech signal. Therefore, the possibility of each frequency in the spectrum belonging to a normal signal can be determined based on the size of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the spectrum smoothness corresponding to each frequency.
[0106] In a specific embodiment of the present invention, the probability of each frequency in the spectrum being a normal signal is determined using the following calculation formula:
[0107]
[0108] Among them, P A Indicates the possibility that frequency A in the spectrum belongs to a normal signal; represents the resonance peak frequency in the spectrum; Q represents the spectrum smoothness of frequency A in the spectrum; exp represents the exponential function with the constant e as the base.
[0109] In the above formula, the lower the value of frequency A in the spectrum, the lower its distribution in the low-frequency range, and the greater the possibility that it belongs to a normal speech signal; the smaller the absolute value of the difference between frequency A and the formant frequency, the closer the frequency A is to the frequency corresponding to the formant, and the closer it is to the frequency corresponding to the formant, and the greater the possibility that it belongs to a normal speech signal; the smaller the value of the spectrum smoothness Q of frequency A, the more consistent the inclination angle of all signal intensity changes corresponding to frequency A, and the smoother the change trend around frequency A, the greater the possibility that it belongs to a normal speech signal. Therefore, an exponential function is used to negatively correlate the sum of the three to change the logic, thereby obtaining the possibility of belonging to a normal signal. It should be understood that in other embodiments, the three can also be multiplied, weighted addition, or other logical relationships; and other means can also be used to change the logic to obtain the possibility of belonging to a normal signal, which is not limited here.
[0110] Step S3: Based on the possibility of the normal signal, each frequency in the spectrum is classified into two categories to obtain a speech frequency group and a noise frequency group.
[0111] Based on the possibility of each frequency in the spectrum belonging to a normal signal, each frequency in the spectrum is classified into two categories. The frequencies with a lower possibility of belonging to a normal signal are divided into one category, and the frequencies with a higher possibility of belonging to a normal signal are divided into another category. The category composed of frequencies with a lower possibility of belonging to a normal signal is the noise frequency group, corresponding to the noise signal, and the category composed of frequencies with a higher possibility of belonging to a normal signal is the voice frequency group, corresponding to the normal voice signal.
[0112] In a specific embodiment of the present invention, a k-means clustering algorithm (k-means clustering algorithm) is used to perform binary classification on each frequency in the spectrum to obtain two frequency groups. The frequency group with a greater probability of belonging to a normal signal in the two frequency groups is used as the speech frequency group, and the frequency group with a lower probability of belonging to a normal signal is used as the noise frequency group. It should be understood that in other embodiments, an adaptive threshold segmentation method can also be used to divide the probability of each frequency in the spectrum belonging to a normal signal into two categories, thereby binary classifying each frequency in the spectrum into a speech frequency group and a noise frequency group, which is not limited here.
[0113] Step S4: determining an approximate signal-to-noise ratio of the speech signal based on the likelihood that the frequencies in the speech frequency group and the noise frequency group belong to normal signals.
[0114] For the two frequencies obtained by binary classification, namely the speech frequency group and the noise frequency group, the possibility that the frequencies in the speech frequency group belong to normal signals can be used to characterize the strength of the normal signal. At the same time, based on the possibility that the frequencies in the noise frequency group belong to normal signals, the possibility that the frequencies in the noise frequency group belong to noise signals can be determined, and the possibility of belonging to noise signals can be used to characterize the intensity of the noise. By comparing the intensity of the noise with the intensity of the normal signal, the signal-to-noise ratio of the speech signal can be determined.
[0115] Based on the above analysis, if Figure 5 As shown, in a specific embodiment of the present invention, the approximate signal-to-noise ratio of the speech signal is determined based on the probability that the frequencies in the speech frequency group and the noise frequency group belong to normal signals, and the implementation steps include:
[0116] Step S401: determining the possibility that each frequency in the noise frequency group belongs to a noise signal based on the possibility that each frequency in the noise frequency group belongs to a normal signal;
[0117] Step S402: Determine the cumulative sum of the probability of each frequency in the noise frequency group belonging to a noise signal to obtain a noise signal index;
[0118] Step S403: Determine the cumulative sum of the likelihood of each frequency in the voice frequency group belonging to a normal signal to obtain a voice signal index;
[0119] Step S404: Determine the sum of the noise signal index and the speech signal index to obtain an overall signal index, and determine the ratio of the noise signal index to the overall signal index as the approximate signal-to-noise ratio of the speech signal.
[0120] Specifically, for the above steps, the approximate signal-to-noise ratio of the speech signal is determined, and the corresponding calculation formula is:
[0121]
[0122] Where W represents the approximate signal-to-noise ratio of the speech signal; 1-P i Indicates the possibility that the i-th frequency in the noise frequency group belongs to the noise signal; P i represents the possibility that the i-th frequency in the noise frequency group belongs to a normal signal; g represents the number of frequencies in the noise frequency group; P j represents the possibility that the jth frequency in the speech frequency group belongs to a normal signal; f represents the number of frequencies in the speech frequency group.
[0123] In the above formula, for the speech frequency group, the probability of a frequency belonging to a normal signal is used to represent the strength of the normal signal. For the noise frequency group, the probability of a frequency belonging to a noise signal is calculated by subtracting the probability of a frequency belonging to a normal signal from 1. This probability is then used to represent the noise intensity. The greater the probability, the greater the intensity value assigned. The noise signal index is recorded as the cumulative sum of the probability of all frequencies in the noise frequency group belonging to a noise signal, and the speech signal index is recorded as the cumulative sum of the probability of all frequencies in the speech frequency group belonging to a normal signal. The noise signal index is divided by the sum of the noise signal index and the speech signal index (that is, divided by the overall signal index) to obtain the approximate signal-to-noise ratio of the speech signal.
[0124] Step S5: determining the frame length and overlap ratio when framing the speech signal according to the approximate signal-to-noise ratio, and performing frame denoising on the speech signal according to the frame length and overlap ratio to obtain a denoised speech signal.
[0125] Since speech signals are typically non-stationary, meaning their characteristics vary over time, denoising them requires breaking them down into smaller time segments, assuming the signal is stationary within each segment. Decomposing speech signals into smaller time segments requires determining the frame length and overlap ratio (frame shift).
[0126] In the presence of high noise levels, a shorter frame length and a higher overlap ratio are required to frame the speech signal to better capture the signal's time-varying characteristics. Therefore, the frame length and overlap ratio are determined based on the approximate signal-to-noise ratio (SNR) of the speech signal determined above. A higher SNR indicates more noise, so the frame length should be shorter and the overlap ratio should be higher. Conversely, a lower SNR indicates less noise, so the frame length should be longer and the overlap ratio should be lower.
[0127] Based on this, Figure 6 As shown, in a specific embodiment of the present invention, the frame length when framing the speech signal is determined according to the approximate signal-to-noise ratio of the speech signal, and the implementation steps include:
[0128] Step S501: obtaining a maximum frame length and a minimum frame length when framing a speech signal, determining a difference between the maximum frame length and the minimum frame length, and obtaining a frame length span;
[0129] Step S502: performing negative correlation processing on the approximate signal-to-noise ratio of the speech signal to obtain a processed value of the approximate signal-to-noise ratio of the speech signal;
[0130] Step S503: The product of the frame length span and the approximate signal-to-noise ratio processing value of the speech signal is determined as the adjusted frame length, and the sum of the adjusted frame length and the minimum frame length is determined as the frame length when framing the speech signal.
[0131] In the prior art, the frame length of the speech signal when framing it needs to be within a certain range, that is, the frame length needs to be greater than or equal to the minimum frame length and less than or equal to the maximum frame length. The minimum frame length is usually 10ms, and the maximum frame length is usually 30ms. To ensure that the determined frame length is within the above range, the frame length of the speech signal when framing it is determined based on the maximum and minimum frame lengths when framing the speech signal, as well as the approximate signal-to-noise ratio of the speech signal. The corresponding calculation formula is:
[0132] L=L min +(1-W)×(L max -L min );
[0133] Wherein, L represents the frame length when the speech signal is framed; L max Indicates the maximum frame length when framing the speech signal; L min It represents the minimum frame length when framing the speech signal; W represents the approximate signal-to-noise ratio of the speech signal.
[0134] In the above formula, the maximum frame length L when framing the speech signal is calculated max and minimum frame length L min The difference between the two gets the frame length span L max -Lmin , and negatively correlate the approximate noise-to-signal ratio of the speech signal to change the logic to obtain the approximate noise-to-signal ratio processing value 1-W, and compare the approximate noise-to-signal ratio processing value 1-W with the frame length span L max -L min The product of is used as the adjusted frame length, and the frame length is increased based on the minimum frame length to obtain the frame length when the speech signal is framed. When the noise signal ratio is larger, the frame length will be closer to the minimum frame length L min , otherwise the frame length will be closer to the maximum frame length L max , thus obtaining the appropriate frame length.
[0135] At the same time, if Figure 7 As shown, in a specific embodiment of the present invention, the overlapping rate when framing the speech signal is determined based on the approximate signal-to-noise ratio of the speech signal, and the implementation steps include:
[0136] Step S511: obtaining a maximum overlap rate and a minimum overlap rate when the speech signal is framed, determining a difference between the maximum overlap rate and the minimum overlap rate, and obtaining an overlap rate span;
[0137] Step S512: determining the product of the overlap rate span and the approximate signal-to-noise ratio of the speech signal as the adjusted overlap rate, and determining the sum of the adjusted overlap rate and the minimum overlap rate as the overlap rate when framing the speech signal.
[0138] In the prior art, the overlap ratio of the speech signal when framing it is also required to be within a certain range, that is, the overlap ratio must be greater than or equal to the minimum overlap ratio and less than or equal to the maximum overlap ratio. The minimum overlap ratio is usually 50%, and the maximum overlap ratio is usually 75%. In order to ensure that the determined overlap ratio is within the above range, the overlap ratio of the speech signal when framing it is determined based on the maximum overlap ratio and the minimum overlap ratio when framing the speech signal, as well as the approximate signal-to-noise ratio of the speech signal. The corresponding calculation formula is:
[0139] lap=lap min +W×(lap max -lap min );
[0140] Among them, lap represents the overlap rate when the speech signal is framed; lap max Indicates the maximum overlap rate when framing the speech signal; lap min represents the minimum overlap rate when framing the speech signal; W represents the approximate signal-to-noise ratio of the speech signal.
[0141] In the above formula, the maximum overlap rate lap when the speech signal is framed is calculated max and minimum overlap ratio lapmin The difference between the two gets the overlap rate span lap max -lap min , roughly the noise-to-signal ratio W and the overlap span lap max -lap min The product of is used as the adjustment overlap rate, and the overlap rate is increased on the basis of the minimum overlap rate, that is, the overlap rate when the speech signal is framed is obtained. When the noise signal ratio is larger, the overlap rate will be closer to the maximum overlap rate lap max , on the contrary, the closer the overlap rate is to the minimum overlap rate lap min , so as to obtain the appropriate overlap rate.
[0142] Based on the frame length and overlap ratio determined above when framing the speech signal, the speech signal is subjected to frame denoising to obtain a denoised speech signal. When framing the speech signal, the existing method can be used, namely: based on the frame length and overlap ratio, the speech signal is framed using spectral subtraction to obtain a framed signal; the framed signal is denoised to obtain a denoised framed signal; and signal restoration is performed on the denoised framed signal to obtain a denoised speech signal.
[0143] Because the spectral subtraction method used to denoise the framed signal above subtracts the noise amplitude from the original signal amplitude to obtain the denoised framed signal, negative numbers may appear. These numbers indicate that the noise signal's energy at certain frequencies exceeds that of the original signal. Negative numbers can lead to undesirable effects, such as introducing audio artifacts or creating unnatural effects when reconstructing the signal. These negative numbers are typically caused by signal phase differences. During spectral subtraction, if the phase difference between the original signal and the noise signal is large, the signal strength at certain frequencies may become negative after the subtraction operation. In this case, the negative number may not be an actual representation of the noise signal, but rather an operational error caused by the phase difference, which may cause the noise amplitude to exceed the original amplitude. Here, the noise amplitude is corrected based on the signal-to-noise ratio to more accurately determine the amplitude of the normal speech signal.
[0144] As a further improvement scheme, before using spectral subtraction to denoise the framed signal, it also includes a step of correcting the estimated noise amplitude based on the noise-to-signal ratio, that is: in the process of using spectral subtraction to denoise the speech signal by framing, obtaining the approximate noise-to-signal ratio of the framed signal of the speech signal; based on the approximate noise-to-signal ratio of the framed signal, performing amplitude correction on the estimated noise signal when using spectral subtraction to denoise the framed signal; and denoising the framed signal based on the estimated noise signal after the amplitude correction.
[0145] In the above steps, an estimated noise signal is obtained when denoising the framed signal using spectral subtraction. The estimated noise signal is usually obtained from the silent part of the signal. The acquisition process belongs to the prior art and will not be described in detail here. At the same time, for each framed signal obtained by framing the speech signal, the approximate noise-to-signal ratio of the framed signal is determined in the same manner as the above-mentioned method of obtaining the approximate noise-to-signal ratio of the speech signal. The estimated noise signal is amplitude-corrected using the approximate noise-to-signal ratio of the framed signal, that is, the amplitude of the estimated noise signal at each time point is multiplied by the approximate noise-to-signal ratio of the framed signal to obtain the estimated noise signal after amplitude correction. Based on the amplitude-corrected estimated noise signal, the framed signal is denoised using spectral subtraction.
[0146] By utilizing the approximate signal-to-noise ratio of the framed signal, the amplitude of the estimated noise signal is corrected. When there are more real signals in the framed signal, that is, fewer noise signals, a small amplitude correction is made to the estimated noise signal. When there are fewer signals in the framed signal, that is, more noise signals, a large amplitude correction is made to the estimated noise signal. This can avoid the occurrence of negative numbers as much as possible without affecting the denoising, ensuring that the denoised framed signal is closer to the real one.
[0147] After all the denoised frame signals are obtained through the above steps, signal restoration is performed based on all the denoised frame signals to obtain the denoised speech signal. At this point, the frame denoising process of the speech signal is completed.
[0148] Step S6: Perform home control based on the denoised voice signal.
[0149] Based on the denoised voice signal and combined with natural language processing (NLP), smart home control is realized, so that the smart home control can make accurate responses after receiving the correct voice signal, ensuring the smart home control effect.
[0150] The embodiment of the present invention also provides a smart home control device based on voice recognition, the structural diagram of which is shown in FIG. Figure 8 As shown, the device includes:
[0151] A formant frequency acquisition module, configured to acquire a frequency spectrum of a speech signal to be processed and determine the formant frequency in the frequency spectrum;
[0152] a normal signal probability acquisition module, configured to determine the probability of each frequency in the spectrum being a normal signal based on the distribution of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the smoothness of the surrounding spectrum of each frequency;
[0153] A classification module, configured to perform binary classification on each frequency in the spectrum according to the likelihood of the frequency belonging to a normal signal, to obtain a speech frequency group and a noise frequency group;
[0154] an approximate signal-to-noise ratio obtaining module, configured to determine an approximate signal-to-noise ratio of a speech signal based on the likelihood that frequencies in the speech frequency group and the noise frequency group belong to normal signals;
[0155] a frame denoising module, configured to determine a frame length and an overlap ratio when framing the speech signal according to the approximate signal-to-noise ratio, and perform frame denoising on the speech signal according to the frame length and overlap ratio to obtain a denoised speech signal;
[0156] The control module is used to control the home based on the de-noised voice signal.
[0157] It should be noted that the devices provided in the above embodiments are merely illustrative of the division of the functional modules described above. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the smart home control device and the smart home control method provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiments and will not be repeated here.
[0158] The embodiment of the present invention also provides a smart home control system based on voice recognition, for example, Figure 9 As shown, the control system includes: a memory 101, a processor 102, and a computer program 103 stored in the memory 101 and running on the processor 102, wherein when the processor 102 executes the computer program 103, the control system can execute any one of the smart home control methods based on voice recognition introduced above.
[0159] In this embodiment, the system can be divided into functional modules based on the above-described method examples. For example, each functional module can be mapped to a specific functional module, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division. In actual implementation, other division methods may be used.
[0160] This embodiment also provides a computer program product. When the computer program product is run on a computer, it causes the computer to execute the above-mentioned steps to implement a smart home control method based on voice recognition provided in the above embodiment. The device, system, and computer program product provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, and will not be repeated here. Through the above description, those skilled in the art can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual application, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not performed. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.
[0161] It should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A smart home control method based on voice recognition, characterized in that: The following steps are involved: Acquire the frequency spectrum of the speech signal to be processed, and determine the formant frequency in the frequency spectrum; Determining the possibility that each frequency in the spectrum is a normal signal according to the distribution of each frequency in the spectrum, the difference between each frequency and the resonance peak frequency, and the smoothness of the surrounding spectrum of each frequency; According to the possibility of belonging to a normal signal, each frequency in the spectrum is classified into two categories to obtain a speech frequency group and a noise frequency group; Determining an approximate signal-to-noise ratio of the speech signal based on the likelihood that the frequencies in the speech frequency group and the noise frequency group belong to normal signals; Determine the frame length and overlap rate when framing the speech signal according to the approximate noise-to-signal ratio, and perform frame denoising on the speech signal according to the frame length and overlap rate to obtain a denoised speech signal; Home control is performed based on the denoised voice signal.
2. The smart home control method based on voice recognition according to claim 1, characterized in that: Determining the possibility that each frequency in the spectrum belongs to a normal signal includes: Determining the spectrum smoothness corresponding to each frequency in the spectrum according to the signal strength difference between each frequency in the spectrum and each adjacent frequency in its neighborhood; The possibility that each frequency in the spectrum belongs to a normal signal is determined according to the magnitude of each frequency in the spectrum, the magnitude of the difference between each frequency and the resonance peak frequency, and the spectrum smoothness corresponding to each frequency.
3. The smart home control method based on voice recognition according to claim 2, characterized in that: Determining the spectrum smoothness corresponding to each frequency in the spectrum includes: Determine the signal strength change slope between each frequency in the spectrum and each adjacent frequency in its neighborhood according to the signal strength between each frequency in the spectrum and each adjacent frequency in its neighborhood, and perform mapping processing on the signal strength change slope to obtain a signal strength change inclination angle; Determine the average value of all signal strength change inclination angles corresponding to each frequency in the spectrum to obtain a signal strength change inclination angle mean; The spectrum smoothness corresponding to each frequency in the spectrum is determined according to the comprehensive difference between the signal strength change inclination angle between each frequency in the spectrum and each adjacent frequency in its neighborhood and the mean value of the signal strength change inclination angle.
4. The smart home control method based on voice recognition according to claim 1, characterized in that: Determine the approximate signal-to-noise ratio of the speech signal, including: Determining the possibility that each frequency in the noise frequency group belongs to a noise signal according to the possibility that each frequency in the noise frequency group belongs to a normal signal; Determine the cumulative sum of the possibility that each frequency in the noise frequency group belongs to a noise signal to obtain a noise signal index; Determine the cumulative sum of the probability of each frequency in the speech frequency group belonging to a normal signal to obtain a speech signal index; The sum of the noise signal index and the speech signal index is determined to obtain an overall signal index, and the ratio of the noise signal index to the overall signal index is determined as an approximate noise-to-signal ratio of the speech signal.
5. The smart home control method based on voice recognition according to claim 1, characterized in that: Determine the frame length when dividing the speech signal into frames, including: Obtaining a maximum frame length and a minimum frame length when framing the speech signal, determining a difference between the maximum frame length and the minimum frame length, and obtaining a frame length span; Performing negative correlation processing on the approximate noise-to-signal ratio of the speech signal to obtain an approximate noise-to-signal ratio processing value of the speech signal; The product of the frame length span and the approximate noise-to-signal ratio processing value of the speech signal is determined as the adjusted frame length, and the sum of the adjusted frame length and the minimum frame length is determined as the frame length when framing the speech signal.
6. The smart home control method based on voice recognition according to claim 1, characterized in that: Determine the overlap ratio when framing the speech signal, including: Acquire a maximum overlap rate and a minimum overlap rate when the speech signal is framed, determine a difference between the maximum overlap rate and the minimum overlap rate, and obtain an overlap rate span; The product of the overlap rate span and the approximate signal-to-noise ratio of the speech signal is determined as the adjusted overlap rate, and the sum of the adjusted overlap rate and the minimum overlap rate is determined as the overlap rate when the speech signal is framed.
7. The smart home control method based on voice recognition according to claim 1, characterized in that: Determining a formant frequency in the spectrum includes: Determining a spectrum symmetry index of each frequency in the spectrum according to a difference in signal strength between adjacent frequencies at left-right symmetrical positions of each frequency in the spectrum; Determining the possibility of each frequency in the spectrum being a resonance peak frequency according to each frequency in the spectrum and its spectrum symmetry index; The frequency corresponding to the maximum value of the probability of belonging to the formant frequency in the spectrum is determined as the formant frequency in the spectrum.
8. The smart home control method based on voice recognition according to claim 1, characterized in that: According to the frame length and the overlap rate, the speech signal is subjected to frame denoising by using spectral subtraction to obtain a denoised speech signal.
9. The smart home control method based on voice recognition according to claim 8, characterized in that: The method further includes: In the process of performing frame denoising on the speech signal by using spectral subtraction, an approximate noise-to-signal ratio of the frame signal of the speech signal is obtained; According to the approximate signal-to-noise ratio of the framed signal, performing amplitude correction on the estimated noise signal when denoising the framed signal using spectral subtraction; The framed signal is denoised according to the estimated noise signal after amplitude correction.
10. The smart home control method based on voice recognition according to claim 1, characterized in that: The k-means algorithm is used to perform binary classification on each frequency in the spectrum.
Citation Information
Patent Citations
Voice enhancing process
CN101477800A
Speech enhancement method on basis of enhancement of formants of window function
CN102779527A
Single-channel real-time noise reduction method and system
CN111128215A
Improved speech intelligilibility
CN113823319A
Intelligent office voice control method and system based on voice recognition
CN117995178A
