Method, device, electronic device and storage medium for recognizing voice sensitive words
By identifying sensitive fragments and sensitive MFCC features in the speech sample set and inputting them into the speech sensitive word decision tree, the problem of poor recognition accuracy of sensitive words in speech recognition technology is solved and the accuracy and stability of the recognition are improved.
Patent Information
- Application Number
- CN202211216018.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing speech recognition technology has poor recognition accuracy of speech-sensitive words, low recognition rate, and unstable results. There is no effective solution.
By obtaining the speech sample set, identifying sensitive segments and determining their target frequency, extracting sensitive MFCC features, inputting them into the pre-built speech-sensitive word decision tree for parameter configuration, and obtaining the sensitive word recognition results of the target speech.
It improves the accuracy and stability of speech-sensitive word recognition and improves the recognition accuracy.
Smart Images

Figure CN115512697B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of speech recognition technology, and in particular to a method, device, electronic device and storage medium for recognizing speech-sensitive words. Background Art
[0002] As self-service equipment in the financial, telecommunications, and medical industries gradually become intelligent, voice recognition technology has become the main human-computer interaction method in AI systems. For example, smart phone customer service is used by more and more people because it can fully collect customer opinions and suggestions and save human resources. However, due to the particularity of voice information, sensitive words in voice information, such as words with sensitive tendencies or uncivilized language, affect the readability of voice recognition information to a certain extent.
[0003] The current filtering method for sensitive words used in speech recognition technology mainly relies on the GSV-SVM (Global Security Verification-Support Vector Machine) recognition method. The above method is a recognition method based on subspace mapping and score regularization. To a certain extent, it can screen and delete sensitive words in speech and obtain speech recognition results after sensitive words are filtered.
[0004] In the process of realizing the present invention, the inventors found that the method has the following defects: the prior art has the problems of poor accuracy of language processing technology, low recognition rate of speech sensitive words, unstable sensitive word screening results, and is not conducive to the normal output of speech recognition results after sensitive words are filtered, and no effective solutions have been proposed for the above problems. Summary of the invention
[0005] The present invention provides a method, device, electronic device and storage medium for recognizing speech sensitive words, so as to solve the problem of poor recognition accuracy of speech sensitive words in the prior art.
[0006] In a first aspect, an embodiment of the present invention provides a method for recognizing a speech sensitive word, the method comprising:
[0007] Acquire a speech sample set, identify multiple sensitive segments in each speech sample in the speech sample set, and determine a target frequency corresponding to each sensitive segment;
[0008] Determine the sensitive MFCC (Mel Frequency Cepstrum Coefficient) features corresponding to each sensitive segment;
[0009] According to the target frequency, the sensitive MFCC features corresponding to each sensitive segment are input into the pre-built speech sensitive word decision tree, and various parameters in the speech sensitive word decision tree are configured;
[0010] The target MFCC features corresponding to the target speech are obtained, and the target MFCC features are input into the configured speech sensitive word decision tree to obtain the sensitive word recognition result for the target speech.
[0011] In a second aspect, an embodiment of the present invention provides a device for recognizing speech-sensitive words, the device comprising:
[0012] A sensitive segment identification module is used to obtain a speech sample set, identify multiple sensitive segments in each speech sample in the speech sample set, and determine a target frequency corresponding to each sensitive segment;
[0013] A sensitive MFCC feature determination module, used to determine the sensitive MFCC features corresponding to each sensitive segment;
[0014] A speech sensitive word decision tree configuration module is used to input the sensitive MFCC features corresponding to each sensitive segment into a pre-built speech sensitive word decision tree according to the target frequency, and configure various parameters in the speech sensitive word decision tree;
[0015] The sensitive word recognition module is used to obtain the target MFCC features corresponding to the target speech, and input the target MFCC features into the configured speech sensitive word decision tree to obtain the sensitive word recognition results for the target speech.
[0016] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for recognizing speech-sensitive words described in any embodiment of the present invention.
[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for recognizing speech-sensitive words described in any embodiment of the present invention when executed.
[0021] The technical solution of the embodiment of the present invention solves the problem of poor accuracy in speech sensitive word recognition in the prior art and improves the accuracy of speech sensitive word recognition.
[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] 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 creative work.
[0024] Figure 1a is a flow chart of a method for recognizing voice sensitive words provided according to Embodiment 1 of the present invention;
[0025] Figure 1b This is a flowchart of a sensitive MFCC feature acquisition method provided according to Embodiment 1 of the present invention;
[0026] Figure 1c is a schematic diagram of a speech-sensitive decision tree constructed according to the method provided in Embodiment 1 of the present invention;
[0027] Figure 2a is a flow chart of a method for recognizing voice sensitive words applicable to Embodiment 2 of the present invention;
[0028] Figure 2b is a schematic diagram of a morpheme endpoint segmentation result obtained according to the method provided in the second embodiment of the present invention;
[0029] Figure 2c is a schematic diagram of sensitive word recognition results of a method for identifying speech sensitive words obtained according to the method provided in Embodiment 2 of the present invention;
[0030] Figure 2d 2 is a schematic diagram of the results of sensitive word recognition using the method provided by the second embodiment of the present invention and the GSV-SVM recognition method;
[0031] Figure 2eis a schematic diagram of the results of sensitive word recognition using the method provided by the second embodiment of the present invention and the i-vector+PLDA recognition method;
[0032] Figure 3 is a structural diagram of a speech sensitive word recognition device provided according to Embodiment 3 of the present invention;
[0033] Figure 4 It is a structural diagram of an electronic device that can be used to implement the embodiment of the present invention according to the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Embodiment 1
[0037] Figure 1a A flowchart of a method for identifying speech sensitive words is provided for the first embodiment of the present invention. This embodiment is applicable to the case where sensitive words contained in speech are filtered through speech recognition technology. The method can be executed by a speech sensitive word recognition device. The speech sensitive word recognition device can be implemented in the form of hardware and / or software. The speech sensitive word recognition device can be configured in a terminal or server equipped with a language sensitive word recognition function. Figure 1a As shown, the method includes:
[0038] S110: Acquire a speech sample set, identify multiple sensitive segments in each speech sample in the speech sample set, and determine a target frequency corresponding to each sensitive segment.
[0039] The speech sample set is a collection of speech audios containing sensitive words. The sensitive segment in the speech sample may be a speech segment containing sensitive words. The sensitive segment may be a speech segment in the speech sample, or may be a speech segment obtained by processing speech segments in one or more speech samples, or may be a sensitive speech library containing sensitive words in the speech sample, etc. This embodiment does not limit this.
[0040] Furthermore, the sensitive words may include: words with sensitive tendencies, uncivilized language, or special sensitive words that can be set according to the needs of the user end, etc.
[0041] The target frequency of the sensitive segment is the number of occurrences of the sensitive segment containing the same sensitive word in the voice sample set.
[0042] In a specific application scenario of this embodiment, in order to add a sensitive word filtering function to the power grid knowledge question and answer system, we can first collect a set of user voices processed by the power grid knowledge question and answer system within a period of time (for example, 2 months or 3 months, etc.), and through manual labeling, screen out the user voices that include sensitive words in the user voice set, and use the above-mentioned user voices to construct a voice sample set.
[0043] Furthermore, the sensitive segments identified in the voice sample set and the number of occurrences of each sensitive segment can express the sensitive word environment in the power grid knowledge question and answer system. Based on the target frequency corresponding to each sensitive segment, a sensitive word recognition model suitable for the power grid knowledge question and answer system can be adaptively trained.
[0044] Optionally, identifying multiple sensitive segments in each speech sample of the language sample set and determining a target frequency corresponding to each sensitive segment may include:
[0045] Matching each speech sample in the speech sample set with each sensitive speech in a pre-built sensitive speech library;
[0046] The sensitive segments included in the speech sample set are obtained according to the matching results, and the target frequency corresponding to each sensitive segment is determined.
[0047] The sensitive speech library may be a collection of speech clips containing sensitive tendencies, uncivilized language, unhealthy connotations, and special sensitive words set according to user needs;
[0048] In this embodiment, a speech matching method can be used to match each speech sample in a speech sample set with each sensitive speech in a pre-constructed sensitive speech library; specifically, target speech information to be recognized is extracted from the target speech sample, wherein the speech sample to be recognized includes a speech waveform sequence within a set time period; the speech sample is matched with each sensitive speech in the pre-constructed sensitive speech library for speech waveform sequence, and the matching degree between the speech sample and each sensitive speech in the pre-constructed sensitive speech library is obtained.
[0049] Furthermore, by counting the number of successful matches with the same sensitive voice in the sensitive voice library, the frequency of occurrence of the sensitive segment can be determined. In a specific example, if the voice sample segments a, b, and c in the voice sample set all correspond to the same sensitive voice X in the sensitive voice library, a sensitive segment Y can be uniformly determined based on the voice sample segments a, b, and c, and the frequency of occurrence of the sensitive segment Y is determined to be 3.
[0050] Specifically, a voice sample segment may be randomly obtained from the voice sample segment a, the voice sample segment b, and the voice sample segment c as the sensitive segment Y. Alternatively, the voice sample segment a, the voice sample segment b, and the voice sample segment c may be subjected to weighted processing of voice signals to jointly generate the sensitive segment Y. Alternatively, a voice sample segment with the highest matching degree with the sensitive voice X may be obtained from the voice sample segment a, the voice sample segment b, and the voice sample segment c as the sensitive segment Y. Alternatively, the sensitive voice X may be directly used as the sensitive segment Y, etc. This embodiment does not limit this.
[0051] Furthermore, in the present example, this step may also specifically include: matching each speech sample in the language sample set with each sensitive speech in a pre-constructed sensitive speech library; obtaining each sensitive segment included in the speech sample set according to the matching results, and obtaining the frequency of occurrence of each sensitive segment in the target speech sample; calculating the duration weight corresponding to each sensitive segment according to the duration of each sensitive segment, and determining the target frequency corresponding to each sensitive segment according to the duration weight and occurrence frequency of each sensitive segment.
[0052] S120: Determine sensitive MFCC features corresponding to each sensitive segment.
[0053] Wherein, determining the sensitive MFCC features corresponding to each sensitive segment may include:
[0054] Performing pre-emphasis processing on the target sensitive segment currently being processed to obtain an emphasized sensitive signal;
[0055] Performing cross-framing processing on the emphasized sensitive signal to obtain multiple audio frames, and performing windowing processing on each audio frame to obtain multiple audio windowing frames;
[0056] Extract MFCC features from multiple audio windowing frames to obtain sensitive MFCC features corresponding to the target sensitive segment;
[0057] Taking into account that as the voice signal rate increases, the voice signal is greatly damaged during the transmission process, in order to obtain a better signal waveform at the receiving terminal and reduce the influence of noise to obtain an accurate signal, it is necessary to perform pre-emphasis processing on the damaged signal; wherein, the pre-emphasis processing includes analyzing the lip radiation effect so that the acquired voice signal has a smaller high-frequency part; further, the lip radiation effect is more significant at the high-frequency end and can act as a high-pass filter, and its energy increases by approximately 6dB per frequency doubling; further, the pre-emphasis processing can reduce the influence of noise to obtain an accurate signal, and its calculation method is: y(m)=x(m)-0.97*x(m-1), wherein y(m) represents the processed signal and x(m) represents the original signal.
[0058] Among them, cross-framing processing of the emphasis sensitive signal can reduce the non-steady state and time-varying influence of the overall emphasis sensitive signal; further, this embodiment fixes the time range of the frame length to 10ms to 30ms, and it can be considered that the audio frame within this range is stable;
[0059] It is easy to understand that after the cross-framing process is performed in the above manner, there will be discontinuities at the beginning and end of each frame, so the more frames are divided, the greater the error between the audio frame and the original signal. This embodiment performs windowing processing on each audio frame, so that the framed signal becomes continuous, and each frame will show the characteristics of a periodic function; further, this embodiment uses the form of adding a Hamming window to perform windowing processing on each audio frame.
[0060] Among them, the sensitive MFCC features are the coefficients of the Mel-frequency cepstrum corresponding to the sensitive segments, which are derived from the cepstrum of the audio segment. Furthermore, the difference between the cepstrum and the Mel-frequency cepstrum is that the frequency band division of the Mel-frequency cepstrum is equidistant on the Mel scale, which is more approximate to the human auditory system than the linearly spaced frequency bands used in the normal logarithmic cepstrum. Such nonlinear representation can make sound signals have better representation in many fields.
[0061] Further, the steps of sensitive MFCC feature extraction are as follows Figure 1b As shown:
[0062] Among them, each audio windowed frame s(i) is treated as an independent random signal and subjected to FFT Fourier transform, and then DCT discrete cosine transform is performed through the filter to obtain the final sensitive MFCC features corresponding to the target sensitive segment:
[0063]
[0064] Among them, C n It represents the sensitive MFCC features corresponding to the target sensitive segment, M represents the number of filters, n represents a single frame of speech signal, N is the number of complex frequency bands contained in the DCT Fourier transform, and i represents the output result.
[0065] S130: According to the target frequency, the sensitive MFCC features corresponding to each sensitive segment are input into a pre-constructed speech sensitive word decision tree, and various parameters in the speech sensitive word decision tree are configured.
[0066] Among them, the speech sensitive word decision tree constructed in this embodiment takes the first letter of the sensitive word in a group of sensitive words as the root node, and takes the next letter as the node of the previous letter in the order of the letters contained in each sensitive word in the group of sensitive words, so as to obtain the speech sensitive word decision tree of the group of sensitive words; further, the tree structure refers to a data structure with a hierarchical relationship between each element, and an inverted tree is often used to represent the logical relationship. Among them, the root node refers to the topmost node of the tree, the child node refers to the node subdivided from the root node, and the leaf node refers to a node without a child node in a tree, referred to as a "leaf". In this embodiment, through the pre-constructed speech sensitive word decision tree, the words with the same first letter in the sensitive words can be combined into a tree structure, and different words with the same first character belong to different tree branches.
[0067] For example, Figure 1c As shown in the figure, n represents the number of sensitive words, a represents a single sensitive word, i and j represent sensitive words and sensitive characters, and m represents the length of the sensitive word. In the calculation process, k is used to represent the node number. After the sensitive word a is input, the sensitive word feature set F is arbitrarily distributed into K subsets, and the attribute features between each subset are not overlapped. Each feature subset has H = n / K attribute features. (Usually, the value of this item will be less than 6), get the length m of the Chinese character, and obtain its first letter, based on which enter the corresponding subtree query and output.
[0068] like Figure 1cAs shown, for the group of sensitive words "sleeping pills", the Chinese length m=3 is identified, the first letter "a" is used as the root node, the letters iz are used as n child nodes of the root node, and then "n" and "i" are used as child nodes of i, and the above steps are repeated to obtain a voice sensitive word decision tree; it can be understood that after constructing multiple voice sensitive word decision trees for several sensitive words in a sensitive word library, these multiple voice sensitive word decision trees are saved to obtain a new sensitive word library composed of voice sensitive word decision trees, which can be conveniently used to detect sensitive words using a voice sensitive word recognition method provided in an embodiment of the present application, thereby improving the efficiency of sensitive word detection. Further, the advantage of representing the sensitive word group with a tree structure is that the number of retrieval or scanning of the target speech can be reduced, and all sensitive words in the target speech can be determined by traversing the target speech once, so the efficiency of sensitive word detection can be improved.
[0069] Furthermore, in this embodiment, this step may also specifically include: generating multiple repeated sensitive segments corresponding to each sensitive segment according to the target frequency; inputting each repeated sensitive segment into a pre-constructed speech sensitive word decision tree, and configuring various parameters in the speech sensitive word decision tree.
[0070] S140: Obtain target MFCC features corresponding to the target speech, and input the target MFCC features into the configured speech sensitive word decision tree to obtain sensitive word recognition results for the target speech.
[0071] After obtaining the sensitive word recognition result of the target speech, the following steps are also included:
[0072] According to the duration of the target sensitive speech segment recognized in the target speech, obtaining a replacement speech matching the target sensitive speech segment in the replacement speech library;
[0073] The target sensitive speech segment in the target speech is replaced by the replacement speech.
[0074] Among them, the sensitive word recognition result of the target speech can be determined according to a preset sensitivity calculation result threshold; further, when the sensitivity of a word in the speech is greater than the sensitivity threshold, the word is recognized as a sensitive word of the target speech; when the word sensitivity is less than the threshold, the word is not a sensitive word of the target speech.
[0075] After obtaining the sensitive word recognition result of the target speech, special characters are used to replace the sensitive words according to the sensitivity recognition result and the sensitivity calculation result. The converted special characters are different for different sensitivity calculation results. The specific sensitive word matching characters of this embodiment are shown in Table 1.
[0076] Table 1
[0077]
[0078]
[0079] The technical solution of the embodiment of the present invention solves the problem of poor accuracy in speech sensitive word recognition in the prior art and improves the accuracy of speech sensitive word recognition.
[0080] In addition, it should be emphasized that the technical solution of the embodiment of the present invention is based on the applicable scenario of the voice sensitive word recognition method, collects the actual user voice set as the voice sample set, and based on the voice sample set, counts the sensitive segments that are easy to appear in the scenario, and counts the frequency of occurrence of each sensitive segment. Based on the above information, the voice sensitive word decision tree is selectively configured, which can effectively improve the accuracy and adaptability of voice sensitive word recognition.
[0081] Embodiment 2
[0082] Figure 2a A flowchart of a method for recognizing speech sensitive words provided in Embodiment 2 of the present invention, this embodiment and the above embodiment are supplementary to the steps of the above embodiment. Specifically, in this embodiment, the target MFCC features corresponding to the target speech are obtained, and the target MFCC features are input into the speech sensitive word decision tree that has been configured to obtain the sensitive word recognition result of the target speech to be supplemented, specifically including, before the target MFCC features are input into the speech sensitive word decision tree that has been configured, it also includes: obtaining the signal duration that matches the target speech signal, and calculating the product of the signal duration and the preset error coefficient as the target weight value; obtaining the cumulative sum of the node weights of each tree node in the speech sensitive word decision tree, and calculating the quotient of the cumulative sum divided by the target weight value as the dynamic weight coefficient.
[0083] Correspondingly, such as Figure 2a As shown, the method includes:
[0084] S210: Acquire a speech sample set, and match each speech sample in the speech sample set with each sensitive speech in a pre-built sensitive speech library.
[0085] S220. Determine a sensitive segment corresponding to the sensitive speech based on all speech sample segments that match the same sensitive speech, and use the number of successful matches with the sensitive speech as the frequency of occurrence of the sensitive segment that matches the sensitive speech in the target speech sample.
[0086] S230. Calculate the duration weight corresponding to each sensitive segment according to the duration of each sensitive segment, and determine the target frequency corresponding to each sensitive segment according to the duration weight and occurrence frequency of each sensitive segment.
[0087] It is easy to understand that due to the particularity of spoken natural language, different sensitive words have different sensitive word lengths, that is, they have different durations when expressed in spoken language. Sensitive words with shorter lengths appear more frequently in spoken expressions. Therefore, in this embodiment, the duration weight of sensitive words with shorter lengths is set to be smaller, and the duration weight of sensitive words with longer lengths is set to be larger to balance the impact of speech length on the target frequency of sensitive segments.
[0088] S240: Determine sensitive MFCC features corresponding to each sensitive segment.
[0089] S250. Generate multiple repeated sensitive segments corresponding to each sensitive segment according to the target frequency, input each repeated sensitive segment into a pre-constructed speech sensitive word decision tree, and configure various parameters in the speech sensitive word decision tree.
[0090] Specifically, if the target frequency of a sensitive segment A is 20, the sensitive segment A is duplicated to obtain 20 repeated sensitive segments A', and the 20 repeated sensitive segments A' are respectively input into the pre-constructed speech sensitive word decision tree.
[0091] Configuring various parameters in the speech-sensitive word decision tree may refer to configuring the node weight of each tree node in the speech-sensitive word decision tree. The node weight may be understood as the bifurcation probability of each tree node.
[0092] For example, Figure 1c As shown, each repeated sensitive segment containing the sensitive word "sleeping pills" is input into the pre-built speech sensitive word decision tree as the root node of the decision tree for sensitive word recognition. If the recognition result is "sleeping pills", it means that the sensitive word recognition result is correct, and the parameters of each node in the speech sensitive word decision tree branch corresponding to the sensitive word are configured positively; if the recognition result is other results other than "sleeping pills", it means that the sensitive word recognition result is wrong, and the parameters of each node in the speech sensitive word decision tree branch of the recognition result are configured reversely. In the above manner, the speech sensitive word decision tree can be trained in a personalized manner, and the beneficial effect of improving the accuracy of speech sensitive word recognition is achieved.
[0093] S260: Obtain a signal duration that matches the target speech signal, and calculate the product of the signal duration and a preset error coefficient as a target weight value.
[0094] The target voice signal specifically refers to the voice signal for which sensitive word recognition is currently to be performed. It can be understood that the target voice signal is a signal obtained in an actual application scenario of obtaining the voice sample set.
[0095] Among them, the target weight value is the product of the signal duration and the preset error coefficient, which can be used to balance the impact of the signal duration on the intelligent recognition of sensitive words; further, let the signal duration be len and the error coefficient be s, then the calculation formula for the target weight value k is: k=len×s.
[0096] S270: Obtain the cumulative sum of the node weights of each tree node in the speech-sensitive word decision tree, and calculate a quotient of the cumulative sum divided by the target weight value as a dynamic weight coefficient.
[0097] The dynamic weight coefficient is the quotient of the cumulative sum divided by the target weight value, and the cumulative value is the cumulative sum of the node weights of each tree node in the speech sensitive word decision tree; further, when the decision tree has n nodes, the calculation formula of the dynamic weight coefficient W is:
[0098]
[0099] Among them, weight i is the node weight of the i-th tree node in the speech sensitive word decision tree.
[0100] S280: Use the dynamic weight coefficient to dynamically update the node weight of each tree node in the configured speech-sensitive word decision tree.
[0101] It is understandable that the longer the duration of the target speech signal, the larger the k value, and the smaller the W finally calculated; the shorter the duration of the target speech signal, the smaller the k value, and the larger the W finally calculated. Accordingly, the node weights of each tree node in the configured speech sensitive word decision tree can be multiplied by the dynamic weight coefficient, so that the speech sensitive word decision tree can be based on the duration of the target speech signal. The node weights of each tree node in the speech sensitive word decision tree are coarse-grained, thereby avoiding missed recognition of sensitive words, and improving the recognition accuracy of sensitive words to a certain extent. Through the above steps, the speech sensitive word decision tree can be trained in a personalized manner, achieving the beneficial effect of improving the accuracy of speech sensitive word recognition.
[0102] S290, obtaining a target MFCC feature corresponding to the target speech, and inputting the target MFCC feature into the configured speech sensitive word decision tree to obtain a sensitive word recognition result for the target speech.
[0103] The technical solution of the embodiment of the present invention is based on the training of the speech sensitive word decision tree based on the occurrence frequency of each sensitive segment. Before each sensitive word recognition of the speech signal, the node weights of each tree node in the speech sensitive word decision tree are dynamically updated based on the duration of the input speech signal, so that the speech sensitive word decision tree can further adapt to the length of the input speech signal, thereby further improving the recognition accuracy of speech sensitive words.
[0104] Specific application scenarios
[0105] In order to more clearly describe the technical solution provided by the embodiment of the present invention, sufficient experimental verification was carried out using the calculation solution of the embodiment of the present invention, and the performance was compared and verified with other speech sensitive word recognition methods.
[0106] In order to ensure that the recognition method designed in this paper can play a good role in practical applications, experiments are carried out. The hardware configuration required for the experiment is shown in Table 2.
[0107] Table 2
[0108]
[0109]
[0110] During the experiment, three data sets were selected for intelligent recognition of voice sensitive words. Each data set contained 200 voice messages. The first data set was news-related voice messages, with a single voice message length of about 5 minutes. The second data set was conversation-related voice messages, with a single voice message length of about 1 minute. The third data set was evaluation phone-related voice messages, with a single voice message length of about 30 seconds. Based on the characteristics of the voices in the above data sets, the voice segmentation algorithm was optimized to obtain the following: Figure 2b The morpheme endpoint segmentation results are shown.
[0111] The intelligent processing system software is used, combined with natural language processing technology, to centrally extract the speech features of the segmented speech samples. The sensitive word library required in the experiment was downloaded and sorted through the Internet, containing a total of 2,000 sensitive words with a large number of occurrences. In order to ensure the scientific nature of the experimental results, under the same experimental conditions, the recognition effects of the GSV-SVM recognition method and the i-vector+PLDA (i-vector+Probabilistic Linear Discriminant Analysis, human voice vector and channel compensation algorithm) recognition method were tested, and the test results were compared with the test results of the design method in this article to analyze the performance of the sensitive word recognition method.
[0112] The experimental results are analyzed based on the recognition rate of speech sensitive words. The three methods are used to identify sensitive words for different sample sets. The test results of the method in this embodiment are as follows: Figure 2c As shown, the test results of the GSV-SVM recognition method are as follows Figure 2d As shown in the figure, the test results of i-vector+PLDA recognition method are as follows Figure 2e shown.
[0113] Figure 2c , 2d and 2e respectively represent the number of sensitive words recognized by the speech sensitive word recognition method provided in this embodiment in the three speech sample sets, among which the number of recognitions in the evaluation phone sample set is the highest, and the total number of sensitive words recognized in the three sample sets reaches 81. For the GSV-SVM recognition method and the i-vector+PLDA recognition method, facing the same speech sample set, the number of sensitive words recognized by the GSV-SVM recognition method is 61, and the number of sensitive words recognized by the i-vector+PLDA recognition method is 40, which is significantly lower than the method in this embodiment.
[0114] By calculating the above recognition results, the recognition rates of different recognition methods can be obtained, as shown in Table 3.
[0115] Table 3
[0116]
[0117] According to Table 3, the average recognition rate of the recognition method designed in this paper is as high as 94.37%, which is 4.84% higher than that of the GSV-SVM recognition method and 15.24% higher than that of the i-vector+PLDA recognition method. Therefore, the recognition method of speech sensitive words provided in this embodiment can play a better performance in practical applications.
[0118] Embodiment 3
[0119] Figure 3 This is a schematic diagram of the structure of a speech sensitive word recognition device provided by Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0120] The sensitive segment identification module 310 is used to obtain a speech sample set, identify multiple sensitive segments in each speech sample in the speech sample set, and determine a target frequency corresponding to each sensitive segment;
[0121] A sensitive MFCC feature determination module 320 is used to determine the sensitive MFCC features corresponding to each sensitive segment;
[0122] The speech sensitive word decision tree configuration module 330 is used to input the sensitive MFCC features corresponding to each sensitive segment into a pre-built speech sensitive word decision tree according to the target frequency, and configure various parameters in the speech sensitive word decision tree;
[0123] The sensitive word recognition module 340 is used to obtain the target MFCC features corresponding to the target speech, and input the target MFCC features into the configured speech sensitive word decision tree to obtain the sensitive word recognition result of the target speech.
[0124] The technical solution of the embodiment of the present invention solves the problem of poor accuracy in speech sensitive word recognition in the prior art and improves the accuracy of speech sensitive word recognition.
[0125] Based on the above embodiments, the sensitive segment identification module 310 includes:
[0126] The segment recognition unit is used to match each speech sample in the language sample set with each sensitive speech in the pre-built sensitive speech library.
[0127] The target frequency determination unit is used to obtain each sensitive segment included in the voice sample set according to the matching result, and determine the target frequency corresponding to each sensitive segment.
[0128] Based on the above embodiments, the target frequency determination unit may be specifically used to:
[0129] According to the number of successful matches with the sensitive speech, the frequency of occurrence of the sensitive segment matching the sensitive speech in the target speech sample;
[0130] According to the duration of each sensitive segment, the duration weight corresponding to each sensitive segment is calculated, and according to the duration weight and occurrence frequency of each sensitive segment, the target frequency corresponding to each sensitive segment is determined.
[0131] Based on the above embodiments, the sensitive MFCC feature determination module 320 includes:
[0132] The pre-emphasis unit is used to perform pre-emphasis processing on the target sensitive segment currently being processed to obtain an emphasized sensitive signal.
[0133] The windowing unit is used to perform cross-framing processing on the emphasis sensitive signal to obtain multiple audio frames, and perform windowing processing on each audio frame to obtain multiple audio windowing frames.
[0134] The feature extraction unit is used to extract MFCC features from multiple audio windowing frames to obtain sensitive MFCC features corresponding to the target sensitive segment.
[0135] Based on the above embodiments, the speech sensitive word decision tree configuration module 330 can also be used to:
[0136] According to the target frequency, multiple repeated sensitive segments corresponding to each sensitive segment are generated; each repeated sensitive segment is input into a pre-constructed speech sensitive word decision tree, and various parameters in the speech sensitive word decision tree are configured.
[0137] Based on the above embodiments, the sensitive word identification module 340 includes:
[0138] The weight coefficient calculation unit is used to obtain the signal duration that matches the target speech signal, and calculate the product of the signal duration and a preset error coefficient as a target weight value; obtain the cumulative sum of the node weights of each tree node in the speech sensitive word decision tree, and calculate the quotient of the cumulative sum divided by the target weight value as a dynamic weight coefficient.
[0139] The dynamic updating unit uses the dynamic weight coefficient to dynamically update the node weight of each tree node in the configured speech sensitive word decision tree.
[0140] On the basis of the above embodiments, the following may also be included:
[0141] The speech replacement unit is used to obtain a replacement speech matching the target sensitive speech segment in a replacement speech library according to the duration of the target sensitive speech segment identified in the target speech; and replace the target sensitive speech segment in the target speech with the replacement speech.
[0142] The speech-sensitive word recognition device provided in the embodiment of the present invention can execute the speech-sensitive word recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0143] Embodiment 4
[0144] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0145] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0146] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0147] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for recognizing speech sensitive words.
[0148] That is: obtaining a speech sample set, identifying multiple sensitive segments in each speech sample in the speech sample set, and determining a target frequency corresponding to each sensitive segment;
[0149] Determine the sensitive MFCC feature characteristics corresponding to each sensitive segment;
[0150] According to the target frequency, the sensitive MFCC features corresponding to each sensitive segment are input into the pre-built speech sensitive word decision tree, and various parameters in the speech sensitive word decision tree are configured;
[0151] The target MFCC features corresponding to the target speech are obtained, and the target MFCC features are input into the configured speech sensitive word decision tree to obtain the sensitive word recognition result for the target speech.
[0152] In some embodiments, the method for recognizing speech-sensitive words may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for recognizing speech-sensitive words described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method for recognizing speech-sensitive words in any other appropriate manner (e.g., by means of firmware).
[0153] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0154] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0155] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0156] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0157] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0158] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0159] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0160] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for recognizing speech-sensitive words, characterized in that: include: Acquire a speech sample set, identify multiple sensitive segments in each speech sample in the speech sample set, and determine a target frequency corresponding to each sensitive segment; Determine the sensitive Mel-frequency cepstral coefficient MFCC features corresponding to each sensitive segment; According to the target frequency, the sensitive MFCC features corresponding to each sensitive segment are input into the pre-built speech sensitive word decision tree, and various parameters in the speech sensitive word decision tree are configured; Obtain the target MFCC features corresponding to the target speech, and input the target MFCC features into the configured speech sensitive word decision tree to obtain the sensitive word recognition result of the target speech; Before inputting the target MFCC features into the configured speech sensitive word decision tree, the following steps are also included: Obtaining the duration of a signal that matches the target speech signal, and calculating the product of the duration of the signal and a preset error coefficient as a target weight value; Obtaining the cumulative sum of the node weights of each tree node in the speech sensitive word decision tree, and calculating a quotient of the cumulative sum divided by the target weight value as a dynamic weight coefficient; The dynamic weight coefficient is used to dynamically update the node weight of each tree node in the configured speech-sensitive word decision tree.
2. The method according to claim 1, characterized in that A plurality of sensitive segments are identified in each speech sample of the language sample set, and a target frequency corresponding to each sensitive segment is determined, including: Matching each speech sample in the language sample set with each sensitive speech in a pre-built sensitive speech library; The sensitive segments included in the speech sample set are obtained according to the matching results, and the target frequency corresponding to each sensitive segment is determined.
3. The method according to claim 2, characterized in that According to the matching results, each sensitive segment included in the voice sample set is obtained, and the target frequency corresponding to each sensitive segment is determined, including: Determining, based on all voice sample segments matching the same sensitive voice, a sensitive segment corresponding to the sensitive voice; According to the number of successful matches with the sensitive speech, the frequency of occurrence of the sensitive segment matching the sensitive speech in the target speech sample; According to the duration of each sensitive segment, the duration weight corresponding to each sensitive segment is calculated, and according to the duration weight and occurrence frequency of each sensitive segment, the target frequency corresponding to each sensitive segment is determined.
4. The method according to claim 1, characterized in that: Determine the sensitive MFCC features corresponding to each sensitive segment, including: Performing pre-emphasis processing on the target sensitive segment currently being processed to obtain an emphasized sensitive signal; Performing cross-framing processing on the emphasized sensitive signal to obtain multiple audio frames, and performing windowing processing on each audio frame to obtain multiple audio windowing frames; MFCC features are extracted from multiple audio windowing frames to obtain sensitive MFCC features corresponding to the target sensitive segment.
5. The method according to any one of claims 1 to 4, characterized in that: According to the target frequency, the sensitive MFCC features corresponding to each sensitive segment are input into the pre-built speech sensitive word decision tree, and various parameters in the speech sensitive word decision tree are configured, including: According to the target frequency, a plurality of repeated sensitive segments corresponding to each sensitive segment are generated; Each repeated sensitive segment is input into a pre-built speech sensitive word decision tree, and each parameter in the speech sensitive word decision tree is configured.
6. The method according to any one of claims 1 to 4, characterized in that: After obtaining the sensitive word recognition results of the target speech, it also includes: According to the duration of the target sensitive speech segment recognized in the target speech, obtaining a replacement speech matching the target sensitive speech segment in the replacement speech library; The target sensitive speech segment in the target speech is replaced by the replacement speech.
7. A device for recognizing speech-sensitive words, characterized in that: include: A sensitive segment identification module is used to obtain a speech sample set, identify multiple sensitive segments in each speech sample in the speech sample set, and determine a target frequency corresponding to each sensitive segment; A sensitive MFCC feature determination module is used to determine the sensitive Mel-frequency cepstral coefficient MFCC features corresponding to each sensitive segment; A speech sensitive word decision tree configuration module is used to input the sensitive MFCC features corresponding to each sensitive segment into a pre-built speech sensitive word decision tree according to the target frequency, and configure various parameters in the speech sensitive word decision tree; A sensitive word recognition module is used to obtain a target MFCC feature corresponding to a target speech, and input the target MFCC feature into a configured speech sensitive word decision tree to obtain a sensitive word recognition result for the target speech; wherein, before inputting the target MFCC feature into the configured speech sensitive word decision tree, it also includes: obtaining a signal duration matching the target speech signal, and calculating the product of the signal duration and a preset error coefficient as a target weight value; obtaining the cumulative sum of the node weights of each tree node in the speech sensitive word decision tree, and calculating the quotient of the cumulative sum divided by the target weight value as a dynamic weight coefficient; using the dynamic weight coefficient, dynamically updating the node weights of each tree node in the configured speech sensitive word decision tree.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for recognizing speech-sensitive words according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for recognizing speech-sensitive words according to any one of claims 1 to 6 when executed.
