Voice keyword recognition method, device, medium and equipment
By estimating framed noise and calculating signal-to-noise ratio for speech signals and combining with decoding graph strategy, the problem of high misrecognition rate of speech keywords in noisy environments is solved, and the recognition accuracy is improved.
Patent Information
- Application Number
- CN202210411887.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-04-19
AI Technical Summary
In noisy environments, the misrecognition rate of speech keyword recognition is high, especially the noise segment is easily misrecognized as speech, resulting in decoding failure.
By performing frame-based processing of the voice signal, the noise power spectrum and signal-to-noise ratio of each frame signal are estimated, the probability of the target voice exists is calculated, and combined with the decoding strategy of the decoding diagram, it is avoided to recognize the pure noise segment as speech.
It improves the recognition rate of voice keywords in noisy environments, reduces the misrecognition of noise segments, and improves the recognition accuracy.
Smart Images

Figure CN114822535B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a method, device, medium and equipment for voice keyword recognition. Background Art
[0002] With the rapid development of artificial intelligence technology and the rapid advancement of computing hardware performance, intelligent voice human-computer interaction has gradually entered thousands of households and is showing a rapid development trend. Human-computer interaction can be divided into two operating modes: continuous speech recognition and keyword recognition. Keyword recognition methods are generally implemented by constructing a decoding network that contains multiple sets of phoneme sequences corresponding to preset keywords. The current method to solve the problem of identifying noise as command words is to calculate the confidence level of the recognition result. When the confidence level is greater than a preset threshold, it indicates that the recognition is correct; when the confidence level is less than the threshold, it indicates that the command word was not recognized. However, in noisy environments, the extracted sentence beginning and end often deviate, resulting in the recognition of pure noise segments as speech, ultimately failing to decode and recognize keywords, resulting in a high rate of speech keyword misrecognition in noisy environments.
[0003] Therefore, a new speech recognition solution is urgently needed to improve the above problems. Summary of the Invention
[0004] The present invention aims to provide a method, apparatus, medium and device for speech keyword recognition, so as to improve the problem of high misrecognition rate of speech keywords in noisy environments.
[0005] In a first aspect, an embodiment of the present invention provides a method for speech keyword recognition, the method comprising: obtaining a frequency domain amplitude spectrum of a current frame signal from a received speech signal; performing noise estimation on the frequency domain amplitude spectrum of the current frame signal to obtain a noise power spectrum of the current frame signal; estimating an initial posterior signal-to-noise ratio of the current frame signal based on the noise power spectrum of the current frame signal and the noise power spectrum of the previous frame signal; estimating an initial a priori signal-to-noise ratio of the current frame signal based on the initial a posteriori signal-to-noise ratio of the current frame signal and the posterior signal-to-noise ratio of the previous frame signal; calculating a probability of existence of a target speech in the current frame signal based on the initial a posteriori signal-to-noise ratio of the current frame signal and the initial a priori signal-to-noise ratio; determining whether there is speech in the current frame signal based on the target speech existence probability, and obtaining a determination result; when the determination result is that there is speech in the current frame signal, inputting the current frame signal into a preset decoding graph for recognition, and obtaining a recognition result.
[0006] The beneficial effect of the speech keyword recognition method provided by the embodiment of the present invention is: by dividing the speech signal into frames, estimating the noise in each frame signal, and then calculating the probability of the target speech in the current frame signal, combining the probability of the target speech and the decoding strategy of the decoding graph, it avoids recognizing pure noise segments as speech, and improves the speech keyword recognition rate in noisy environments.
[0007] In a possible implementation, calculating the speech presence probability of the current frame signal according to the initial a posteriori signal-to-noise ratio and the initial a priori signal-to-noise ratio of the current frame signal includes:
[0008] The initial speech presence probability of the current frame signal is calculated based on the initial posterior signal-to-noise ratio and the initial prior signal-to-noise ratio of the current frame signal; the initial speech presence probability of the current frame signal and the speech presence probability of the previous frame signal are smoothed to obtain the intermediate speech presence probability of the current frame signal; the full band is divided into multiple subbands, and the intermediate speech presence probability of the current frame signal is averaged in each subband to obtain the logarithmic natural probability of each subband; the mean of the logarithmic natural probabilities in each subband is calculated to obtain the target speech presence probability of the frame signal. This embodiment can improve the accuracy of the target speech presence probability.
[0009] In one possible implementation, a determination is made as to whether speech is present in the current frame signal based on the target speech presence probability, and a determination result is obtained, including: determining that speech is present in the current frame signal when the target speech presence probability is greater than a set threshold; and determining that speech is absent in the current frame signal when the target speech presence probability is less than or equal to the set threshold. This solution can be used to improve keyword recognition rates in low signal-to-noise ratio environments.
[0010] In one possible implementation, performing noise estimation on the frequency-domain amplitude spectrum of the current frame signal to obtain a noise power spectrum of the current frame signal includes calculating the noise power spectrum of the current frame signal based on the noise power spectrum of the previous frame signal and the frequency-domain amplitude spectrum of the current frame signal. This method can avoid recognizing silence segments as speech, or recognizing speech segments as silence.
[0011] In a possible implementation, the preset decoding graph is an HCLG decoding graph.
[0012] In a second aspect, an embodiment of the present invention further provides a speech keyword recognition device, which includes modules / units that execute any one of the possible design methods of the first aspect. These modules / units can be implemented by hardware, or by hardware executing corresponding software implementations.
[0013] In a third aspect, an embodiment of the present invention provides a terminal device comprising a processor and a memory. The memory is configured to store one or more computer programs; when the processor executes the one or more computer programs stored in the memory, the terminal device is capable of implementing any possible design method of the second aspect.
[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which includes a computer program. When the computer program runs on an electronic device, the electronic device executes any possible design method of any of the above aspects.
[0015] In a fifth aspect, an embodiment of the present invention further provides a method comprising a computer program product, which, when the computer program product is run on a terminal, enables the electronic device to execute any possible design of any of the above aspects.
[0016] For the beneficial effects of the second to fifth aspects, please refer to the description of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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.
[0018] Figure 1 A schematic diagram of a communication scenario architecture provided by an embodiment of the present invention;
[0019] Figure 2 A flowchart of a method for recognizing speech keywords provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of the structure of a speech keyword recognition device provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of a device structure provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In practical applications, the frequency bands of sounds vary across different scenarios. For example, background noise while driving is typically low-frequency; white noise is essentially full-band noise; and the noise of a car horn is high-frequency. Therefore, the present invention frames the speech signal, estimates the noise in each frame, and then calculates the probability of the target speech being present in the current frame. Combining this probability with the decoding strategy of the decoding graph avoids recognizing pure noise segments as speech, thereby improving the recognition rate of speech keywords in noisy environments.
[0023] The technical solutions in the embodiments of the present invention are described below in conjunction with the drawings in the embodiments of the present invention. Among them, in the description of the embodiments of the present invention, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and claims of this application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.
[0024] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0025] In the embodiments of the present invention, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0026] The speech keyword recognition method provided in this application can be applied to a computer device, which can be a terminal or a server. It is understandable that the speech keyword recognition method provided in this application can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server.
[0027] Taking the voice keyword recognition method provided by this application as an example, which can also be applied to a system including a terminal and a server, the voice keyword recognition method provided by this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 and the server 104 communicate through the network. The terminal 102 uploads the collected voice signal to the server 104. The server 104 obtains the voice signal, extracts the acoustic feature information of the voice signal, and analyzes the probability of the target voice. When the judgment result is that there is voice in the current frame signal, the acoustic feature information is input into the decoding graph, and the acoustic feature information is decoded by the decoding graph to obtain the recognition result. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0028] In one embodiment, Figure 2 As shown, a method for speech keyword recognition is provided, which is described by taking the application of the method to the server 104 as an example. The method includes the following steps:
[0029] S201: Obtain a frequency domain amplitude spectrum of a current frame signal from a received speech signal.
[0030] S202: Perform noise estimation on the frequency domain amplitude spectrum of the current frame signal to obtain a noise power spectrum of the current frame signal.
[0031] In this step, optionally, the server 104 may calculate the noise power spectrum of the current frame signal according to the noise power spectrum of the previous frame signal and the frequency domain amplitude spectrum of the current frame signal.
[0032] S203 : Estimate an initial a posteriori signal-to-noise ratio of the current frame signal according to the noise power spectrum of the current frame signal and the noise power spectrum of the previous frame signal.
[0033] S204 : Estimate the initial a priori signal-to-noise ratio of the current frame signal according to the initial a posteriori signal-to-noise ratio of the current frame signal and the a posteriori signal-to-noise ratio of the previous frame signal.
[0034] S205 , calculating the probability of the target speech existing in the current frame signal according to the initial a posteriori signal-to-noise ratio and the initial a priori signal-to-noise ratio of the current frame signal.
[0035] In this step, optionally, the server 104 can calculate the initial speech existence probability of the current frame signal based on the initial posterior signal-to-noise ratio and the initial prior signal-to-noise ratio of the current frame signal; smooth the initial speech existence probability of the current frame signal and the speech existence probability of the previous frame signal to obtain the intermediate speech existence probability of the current frame signal; divide the full band into multiple sub-bands, and perform mean processing on the intermediate speech existence probability of the current frame signal on the sub-band to obtain the logarithmic natural probability on each sub-band; calculate the mean of the logarithmic natural probability on each sub-band to obtain the target speech existence probability of the frame signal.
[0036] S206: Determine whether there is speech in the current frame signal according to the probability of the target speech, and obtain a determination result.
[0037] Specifically, when the probability of the target speech existing is greater than the set threshold, the server 104 obtains the judgment result that there is speech in the current frame signal; when the probability of the target speech existing is less than or equal to the set threshold, the server 104 obtains the judgment result that there is no speech in the current frame signal.
[0038] S207: When the determination result is that speech exists in the current frame signal, the current frame signal is input into a preset decoding graph for recognition to obtain a recognition result.
[0039] In this step, the purpose of decoding the current frame signal is to obtain the vocabulary entry corresponding to the current frame signal, that is, to convert the speech signal into text information. In actual implementation, the speech signal can be decoded according to a preset decoding graph. The preset decoding graph can be any decoding graph that contains the conversion relationship between speech and text, such as the HCLG decoding graph and the HCTLG decoding graph. In one possible scenario, the HCLG decoding graph consists of four parts: H represents the acoustic model, whose input is the hidden Markov state number and whose output is the triphone state; C represents the context-related information of the phoneme, whose input is the triphone state and whose output is the monophone state; L represents the pronunciation dictionary information, whose input is the monophone and whose output is the word; G is the language model, whose input and output are both words. These four parts are combined to form a weighted finite-state transducer (WFST) network, whose input is the hidden Markov state and whose output is the word. WFST can map one sequence to another.
[0040] In another possible case, the HCTLG decoding graph consists of five parts: H represents the acoustic model, whose input is the hidden Markov state number and output is the triphone state; C represents the context-related information of the phoneme, whose input is the triphone state and output is the monophone state; T represents the fuzzy sound conversion and pitch conversion of the phoneme, whose input is a monophone and output is also a monophone; L represents the pronunciation dictionary information, whose input is a monophone and output is a word; G is the language model, whose input and output are both words. These five parts together constitute a WFST network whose input is a phoneme and output is a word.
[0041] In this embodiment, the phrase "How's the weather today?" is used as an example. It can be seen that the word "weather" in the speech signal "How's the weather today?" has a very low probability of error, while the words "today" and "how" have a higher probability of error. Therefore, through the above speech recognition, the words "today" and "how" are determined as speech in the current frame based on the target speech probability in each frame. This is then smoothed with the speech probability of the previous frame to obtain a final smoothed speech probability. Finally, the target speech probability of the current frame is averaged across the subbands, and the logarithmic natural probabilities of each subband are calculated. The final speech probability of the current frame is the mean of the subband logarithmic natural probabilities. A threshold method is used to determine whether speech is present in the current frame. The HCLG decoding graph then uses this conclusion to directly segment continuous speech segments into sentences, improving the final keyword recognition rate.
[0042] In summary, the present invention divides the speech signal into frames, estimates the noise in each frame signal, and then calculates the probability of the target speech in the current frame signal. Combining the probability of the target speech and the decoding strategy of the decoding graph, it avoids recognizing pure noise segments as speech and improves the recognition rate of speech keywords in noisy environments.
[0043] In some embodiments of the present application, the present invention also discloses a speech keyword recognition device, such as Figure 3 As shown, the device is used to implement the methods described in the above various method embodiments, and includes: an acquisition unit 301, configured to obtain a frequency domain amplitude spectrum of a current frame signal from a received speech signal; a noise estimation unit 302, configured to perform noise estimation on the frequency domain amplitude spectrum of the current frame signal to obtain a noise power spectrum of the current frame signal. A calculation unit 303, configured to estimate an initial a posteriori signal-to-noise ratio (SNR) of the current frame signal based on the noise power spectrum of the current frame signal and the noise power spectrum of the previous frame signal; estimate an initial a priori SNR of the current frame signal based on the initial a posteriori SNR of the current frame signal and the posterior SNR of the previous frame signal; calculate a probability of the target speech in the current frame signal based on the initial a posteriori SNR of the current frame signal and the initial a priori SNR; and determine whether speech is present in the current frame signal based on the target speech probability to obtain a determination result. A speech recognition unit 304, configured to, when the determination result is that speech is present in the current frame signal, input the current frame signal into a preset decoding graph for recognition to obtain a recognition result.
[0044] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0045] In other embodiments of the present application, the present invention discloses a server, such as Figure 4 As shown, the server may include: one or more processors 401; a memory 402; a display 403; one or more applications (not shown); and one or more computer programs 404. The above components may be connected via one or more communication buses 405. The one or more computer programs 404 are stored in the memory 402 and configured to be executed by the one or more processors 401. The one or more computer programs 404 include instructions, which may be used to execute the following instructions: Figure 2 and each step in the corresponding embodiment.
[0046] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0047] Each functional unit in each embodiment of the present invention may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.
[0048] If the integrated unit 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 embodiment of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
[0049] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be covered by the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for recognizing speech keywords, characterized in that: The method comprises: Obtaining the frequency domain amplitude spectrum of the current frame signal from the received speech signal; Performing noise estimation on the frequency domain amplitude spectrum of the current frame signal to obtain a noise power spectrum of the current frame signal; estimating an initial a posteriori signal-to-noise ratio of the current frame signal according to a noise power spectrum of the current frame signal and a noise power spectrum of a previous frame signal; estimating an initial a priori signal-to-noise ratio of the current frame signal according to the initial a posteriori signal-to-noise ratio of the current frame signal and the a posteriori signal-to-noise ratio of the previous frame signal; Calculating the probability of the target speech in the current frame signal according to the initial a posteriori signal-to-noise ratio and the initial a priori signal-to-noise ratio of the current frame signal includes: Calculating the initial speech existence probability of the current frame signal according to the initial posterior signal-to-noise ratio and the initial priori signal-to-noise ratio of the current frame signal; Smoothing the initial speech presence probability of the current frame signal and the speech presence probability of the previous frame signal to obtain an intermediate speech presence probability of the current frame signal; Dividing the full band into a plurality of sub-bands, and performing mean processing on the probability of the existence of the intermediate speech of the current frame signal in the sub-bands to obtain the logarithmic natural probability in each sub-band; Calculating the mean of the logarithmic natural probability on each sub-band to obtain the probability of the target speech existing in the frame signal; Determining whether the current frame signal has speech according to the probability of the target speech, and obtaining a determination result; When the determination result is that speech exists in the current frame signal, the current frame signal is input into a preset decoding graph for recognition to obtain a recognition result; wherein the preset decoding graph is an HCLG decoding graph.
2. The method according to claim 1, characterized in that Determining whether the current frame signal contains speech according to the probability of the target speech, and obtaining a determination result, including: When the probability of the target speech being present is greater than a set threshold, obtaining a determination result that speech is present in the current frame signal; When the probability of the target speech existing is less than or equal to the set threshold, a determination result is obtained that there is no speech in the current frame signal.
3. The method according to claim 1, characterized in that Performing noise estimation on the frequency domain amplitude spectrum of the current frame signal to obtain a noise power spectrum of the current frame signal includes: The noise power spectrum of the current frame signal is calculated based on the noise power spectrum of the previous frame signal and the frequency domain amplitude spectrum of the current frame signal.
4. A speech keyword recognition device, characterized in that: The device comprises: An acquisition unit, configured to acquire a frequency domain amplitude spectrum of a current frame signal from a received speech signal; a noise estimation unit, configured to perform noise estimation on the frequency domain amplitude spectrum of the current frame signal to obtain a noise power spectrum of the current frame signal; a calculation unit, configured to estimate an initial a posteriori signal-to-noise ratio of the current frame signal based on a noise power spectrum of the current frame signal and a noise power spectrum of a previous frame signal; estimate an initial a priori signal-to-noise ratio of the current frame signal based on the initial a posteriori signal-to-noise ratio of the current frame signal and the a posteriori signal-to-noise ratio of the previous frame signal; calculate a probability of the presence of a target speech in the current frame signal based on the initial a posteriori signal-to-noise ratio of the current frame signal and the initial a priori signal-to-noise ratio; and determine whether speech is present in the current frame signal based on the target speech presence probability to obtain a determination result; a speech recognition unit configured to input the current frame signal into a preset decoding graph for recognition to obtain a recognition result when the determination result indicates that speech exists in the current frame signal; the preset decoding graph is an HCLG decoding graph; The calculation unit calculates the speech presence probability of the current frame signal based on the initial posterior signal-to-noise ratio and the initial priori signal-to-noise ratio of the current frame signal, specifically for: Calculating the initial speech existence probability of the current frame signal according to the initial posterior signal-to-noise ratio and the initial priori signal-to-noise ratio of the current frame signal; Smoothing the initial speech presence probability of the current frame signal and the speech presence probability of the previous frame signal to obtain an intermediate speech presence probability of the current frame signal; Dividing the full band into a plurality of sub-bands, and performing mean processing on the probability of the existence of the intermediate speech of the current frame signal in the sub-bands to obtain the logarithmic natural probability in each sub-band; The mean of the logarithmic natural probability on each sub-band is calculated to obtain the probability of the target speech existing in the frame signal.
5. The device according to claim 4, characterized in that The speech recognition unit determines whether the current frame signal contains speech according to the probability of the target speech, and obtains a determination result, including: When the probability of the target speech being present is greater than a set threshold, obtaining a determination result that speech is present in the current frame signal; When the probability of the target speech existing is less than or equal to the set threshold, a determination result is obtained that there is no speech in the current frame signal.
6. The device according to claim 4, characterized in that The noise estimation unit performs noise estimation on the frequency domain amplitude spectrum of the current frame signal to obtain the noise power spectrum of the current frame signal, including: The noise power spectrum of the current frame signal is calculated based on the noise power spectrum of the previous frame signal and the frequency domain amplitude spectrum of the current frame signal.
7. A terminal device, characterized in that: include: A processor and a memory, wherein the memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory, so as to enable the terminal to perform the method according to any one of claims 1 to 3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Single-channel voice enhancement method and device, storage medium and terminal
CN111554315A
Voice activity detection method based on data selectivity and Gaussian mixture model
CN111739562A
Speech recognition method and device, computer equipment and storage medium
CN113539242A