Voice keyword detection method and device, electronic equipment and storage medium

CN114974214BActive Publication Date: 2026-08-07BEIJING XUEZHITU NETWORK TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XUEZHITU NETWORK TECH
Filing Date
2022-04-28
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]本申请提供了一种语音关键词的检测方法、装置、电子设备及存储介质,以解决相关技术中的关键词检索技术检测结果不准确的问题

Benefits of technology

[0010] The technical solution of this application can be applied to the field of deep learning technology based on speech recognition and processing. The technical solution provided in this application has the following advantages compared to the prior art:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114974214B_ABST
    Figure CN114974214B_ABST
Patent Text Reader

Abstract

The application relates to a voice keyword detection method and device, electronic equipment and a storage medium. The method comprises the following steps: obtaining a detection result of a voice detection model on audio to be detected, wherein the detection result is used to represent a stage pronunciation duration feature of a first word, the first word is a word of a target keyword in a keyword set which is to be a keyword identified by the voice detection model from the audio to be detected, and the keyword set stores a plurality of keywords selected in advance; and in the case that the stage pronunciation duration feature of the first word matches a stage pronunciation duration feature of the target keyword, the first word is determined as the target keyword. In the case that the target keyword may exist in the audio to be detected, the stage pronunciation duration feature of the first word which is to be the target keyword is used for secondary judgment, so that the accuracy of the detection result is further improved, and the problem that the detection result of the keyword retrieval technology in the related art is inaccurate is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of speech recognition technology, and in particular to a method, apparatus, electronic device and storage medium for detecting speech keywords. Background Technology

[0002] Voice keyword retrieval technology is a special speech recognition technology that identifies and determines specific keywords in continuous speech, or searches for keywords that users are interested in. The retrieval system returns the specific location or time in which these keywords appear in the audio.

[0003] Currently, keyword retrieval technologies all employ machine learning or deep neural network methods. The input is audio to be detected, and the machine uses a model to automatically predict whether the keyword exists in the audio and its corresponding location (start and end time points). However, the machine prediction results are often affected by the environment or unclear pronunciation, leading to errors in the prediction results.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and storage medium for detecting voice keywords, in order to solve the problem of inaccurate detection results in keyword retrieval technologies in related technologies.

[0006] In a first aspect, this application provides a method for detecting speech keywords, comprising: obtaining the detection result of a speech detection model on an audio to be detected, wherein the detection result is used to represent the phased pronunciation duration feature of a first word, the first word being a word identified by the speech detection model from the audio to be detected as a target keyword in a keyword set, the keyword set storing a plurality of pre-selected keywords; and determining the first word as the target keyword when the phased pronunciation duration feature of the first word matches the phased pronunciation duration feature of the target keyword.

[0007] Secondly, this application provides a speech keyword detection device, comprising: an acquisition unit, configured to acquire the detection result of a speech detection model on an audio to be detected, wherein the detection result is used to represent the phased pronunciation duration feature of a first word, the first word being a word identified by the speech detection model from the audio to be detected as a target keyword in a keyword set, the keyword set storing a plurality of pre-selected keywords; and a determination unit, configured to determine the first word as the target keyword when the phased pronunciation duration feature of the first word matches the phased pronunciation duration feature of the target keyword.

[0008] Thirdly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements the steps of any of the aforementioned voice keyword detection methods.

[0009] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of any of the aforementioned speech keyword detection methods.

[0010] The technical solution of this application can be applied to the field of deep learning technology based on speech recognition and processing. The technical solution provided in this application has the following advantages compared to the prior art:

[0011] The method provided in this application first obtains the detection results of a speech detection model on the audio to be detected. The detection results represent the phased pronunciation duration features of a first word that is suspected to be a target keyword in the audio. Then, if the phased pronunciation duration features of the first word match the phased pronunciation duration features of the target keyword, the first word is determined to be the target keyword. This method first uses a speech detection model to detect the audio. If a target keyword may exist in the audio, it determines whether the first word is a target keyword based on the phased pronunciation duration features of the first word that is suspected to be a target keyword. This embodiment performs a second judgment on the speech keyword detection, thereby further increasing the accuracy of the detection results and solving the problem of inaccurate detection results in keyword retrieval techniques in related technologies. Attached Figure Description

[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A flowchart illustrating a method for detecting speech keywords provided in an embodiment of this application;

[0015] Figures 2 to 4 A flowchart illustrating the method for obtaining detection results using a deep neural network, as provided in an embodiment of this application;

[0016] Figure 5 A flowchart illustrating a method for detecting speech keywords provided in an embodiment of this application;

[0017] Figure 6 A schematic diagram of a speech keyword detection device provided in an embodiment of this application;

[0018] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] According to one aspect of the embodiments of this application, a method for detecting voice keywords is provided. Optionally, in this embodiment, the above-described method for detecting voice keywords can be applied to a hardware environment consisting of a terminal and a server. The server is connected to the terminal via a network and can be used to provide services to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services to the server.

[0021] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal is not limited to PC, mobile phone, tablet computer, etc.

[0022] The voice keyword detection method of this application embodiment can be executed by a server, a terminal, or both. Alternatively, the voice keyword detection method of this application embodiment can be executed by a client installed on the terminal.

[0023] Taking the voice keyword detection method in this embodiment, executed by a server, as an example, Figure 1 This is a flowchart illustrating a method for detecting speech keywords provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps:

[0024] Step S201: Obtain the detection result of the voice detection model for the audio to be detected. The detection result is used to represent the phased pronunciation duration feature of the first word. The first word is the word in the set of candidate keywords recognized by the voice detection model from the audio to be detected as the target keyword in the set of keywords, and multiple pre-selected keywords are stored in the set of keywords.

[0025] In this embodiment, the phased pronunciation duration feature may be the initial consonant duration and the final vowel duration of each character in the first word. For example, the initial consonants and finals of "potato" are "t - u d - ou", and the phased pronunciation duration feature of "potato" is the pronunciation duration of t, the pronunciation duration of u, the pronunciation duration of d, and the pronunciation duration of ou. In actual applications, because people speak at different frequencies, the pronunciation durations of the initial consonants and finals of the same word may vary greatly, but the ratio differences of the initial consonant and final vowel durations are relatively small. To further improve the accuracy of the detection result, the phased pronunciation duration feature may be the ratio of the initial consonant duration to the final vowel duration, such as the ratio of the pronunciation duration of t to the pronunciation duration of u. The phased pronunciation duration feature may also be the normalized initial consonant duration and final vowel duration, so as to reduce the error caused by different speaking frequencies.

[0026] The first word is the word in the set of candidate keywords recognized by the voice detection model from the audio to be detected as the target keyword, indicating that the first word is recognized as the target keyword by the voice detection model. However, due to misrecognition by the voice detection model, this first word may not actually be the target keyword. For example, the target keyword is "potato", and the first word is actually "copper bean", but is recognized as "potato" by the voice detection model.

[0027] The set of keywords includes multiple keywords, such as "open", "close", "mute", etc. The target keyword can be one or multiple.

[0028] Step S202: When the phased pronunciation duration feature of the first word matches the phased pronunciation duration feature of the target keyword, determine that the first word is the target keyword.

[0029] In this embodiment, the phased pronunciation duration feature of the target keyword may be the initial consonant duration and the final vowel duration of each character, or the ratio of the initial consonant duration to the final vowel duration, or the normalized initial consonant duration and final vowel duration. The phased pronunciation duration feature of the target keyword is obtained by calculating the mean value of the initial consonant duration or the final vowel duration of each category of a large number of labeled voices in the voice database. If the difference between the phased pronunciation duration feature of the first word and the phased pronunciation duration feature of the target keyword is within a certain range, it indicates that the difference between the first word and the target keyword is relatively small, and the first word is the target keyword.

[0030] To quickly obtain detection results, in one embodiment, if the phased pronunciation duration feature of the first word matches the phased pronunciation duration feature of the target keyword, the first word is determined to be the target keyword, including: determining a first difference between the phased pronunciation duration feature of the first word and the phased pronunciation duration feature of the target keyword; and determining the first word as the target keyword based on the first difference.

[0031] In this embodiment, it is first necessary to determine the first difference between the phased pronunciation duration feature of the first word and the phased pronunciation duration feature of the target keyword. Based on the first difference, it can be determined whether the first word is the target keyword. This detection method is relatively simple and does not require a complicated calculation process, so the detection result can be obtained quickly.

[0032] In one embodiment, determining the first word as the target keyword based on the first difference includes: determining the first word as the target keyword when the first difference is less than a first predetermined value; or, inputting the first difference into a binary classification network to obtain the probability of the first word, wherein the probability of the first word is used to characterize the probability that the first word is the target keyword, the binary classification network is obtained by training an initial binary classification network using a first sample, and the first sample is obtained by labeling the difference between the phased pronunciation duration features of words that are potential keywords in the speech database and reference phased pronunciation duration features; and determining the first word as the target keyword when the probability of the first word is greater than a second predetermined value.

[0033] In this embodiment, the comparison can be directly based on the magnitude of the first difference. If the first difference is less than a first predetermined value, it indicates that the phased pronunciation duration feature of the first word is relatively close to the phased pronunciation duration feature of the target keyword, and the first word is the target keyword. Alternatively, the first difference can be input into a binary classification network to obtain the probability that the first word is the target keyword. When the probability is greater than a second predetermined value, the first word is the target keyword, thereby further improving the accuracy of the speech keyword detection results.

[0034] The labels of the above binary classification network are 0 and 1, corresponding to the two categories of non-keyword and keyword respectively. The above binary classification network generally uses machine learning algorithms such as Logistic Regression (LR for short) and Support Vector Machine (SVM for short) to train the secondary classification network. The parameters of the Logistic binary classification network are obtained by training with the first sample. The above first sample is the difference between the phased pronunciation duration feature of the word that is intended to be the target keyword in the speech database and the reference phased pronunciation duration feature, and the labels are 0 and 1.

[0035] In one embodiment, determining the first difference between the phased pronunciation duration feature of the above first word and the phased pronunciation duration feature of the above target keyword includes: using to obtain the above first difference, where MSE represents the above first difference, represents the mean initial consonant duration or the mean final consonant duration of the above target keyword, y i represents the initial consonant duration or the final consonant duration of the above first word, n represents the sum of the number of initial consonants and the number of final consonants of the above first word, and i is an integer greater than or equal to 1 and less than or equal to n.

[0036] Because the loss function usually uses the mean square error, in this embodiment, the above formula is used to calculate the mean square error between the initial consonant duration and the final consonant duration of the first word and the initial consonant duration and the final consonant duration of the target keyword, which is beneficial for subsequent judgment using the model method.

[0037] For example, the target keyword is potato, and the corresponding initial and final consonant combinations are "t-u d-ou". The mean durations of these four initial and final consonants are x, y, z, m. The speech detection model detects that the first word is actually "copper bean", and the corresponding initial and final consonant combination is "t-ong d-ou", obtaining the durations a, b, c, d of these four initial and final consonants, and calculating the mean square error of these four initial and final consonants.

[0038] In one embodiment, determining the first difference between the phased pronunciation duration feature of the above first word and the phased pronunciation duration feature of the above target keyword includes: determining the first ratio of the initial consonant duration and the final consonant duration of the above first word and the second ratio of the initial consonant duration and the final consonant duration of the above target keyword; obtaining the above first difference according to the difference between the above first ratio and the above second ratio.

[0039] As mentioned above, different speaking frequencies lead to significant differences in the duration of phased pronunciations. To avoid these differences and further improve the accuracy of the detection results, this embodiment calculates the ratio of the initial consonant duration to the final vowel duration, and then judges based on the difference between the first ratio of the first word and the second ratio of the target keyword.

[0040] The ratio of the initial consonant duration to the final vowel duration of the first word or target keyword can be either the ratio of the sum of the initial consonant duration to the sum of the final vowel duration of each character in the first word or target keyword, or the ratio of the initial consonant duration to the final vowel duration of each character. If it is the ratio of the initial consonant duration to the final vowel duration of each character, there will be multiple ratios. Calculating the error of the ratio for each character in the first word and the target keyword, and then calculating the mean squared error, will yield the first difference value.

[0041] In one embodiment, obtaining the detection result of the speech detection model for the audio to be detected includes: decoding the audio to be detected using a speech recognition model to obtain a candidate word sequence, wherein the speech recognition model is used to convert the audio to be detected into text data; generating a word grid based on the candidate word sequence and the corresponding backtracking path and matching score; retrieving the pinyin of words in the word grid using the pinyin of multiple keywords in the keyword set to obtain the first word; and obtaining the phased pronunciation duration feature of the first word based on the pinyin of the first word.

[0042] In this embodiment, a speech recognition model is used to first decode the audio to be detected to obtain a word grid. A fast search is then performed on the word grid to retrieve the first word and its corresponding phased pronunciation duration features. This detection method has high accuracy, but because it requires decoding, the running time is relatively long.

[0043] In one embodiment, obtaining the detection result of the speech detection model on the audio to be detected includes: extracting speech features of each frame of the audio to be detected to obtain a speech feature vector of each frame; inputting the speech feature vector of each frame into a deep neural network model for classification to obtain multiple labels and the probability of each label, wherein the label is a word identified from the audio to be detected as a target keyword or a part of the target keyword in the set of proposed keywords; if the probability of the label is greater than a third predetermined value, determining the label as the first word; and determining the phased pronunciation duration feature of the first word based on the start speech frame and the end speech frame of the first word.

[0044] In this embodiment, a neural network is used for keyword retrieval. This method does not require decoding the audio to be detected, thereby reducing runtime computation time and memory usage. Figures 2 to 4The flowchart shows a method for obtaining detection results using a deep neural network provided by an embodiment of the present application. As shown in Figure 2 below, first, feature extraction is performed on the audio to be detected to extract the speech feature vector of the audio to be detected. The audio to be detected includes the key phrases "okay, google". Then, the speech feature vector is input into the deep neural network as shown in Figure 3 below, and three labels "okay", "google", and ", filler" are output, and frame-level posterior probabilities as shown in Figure 4 below are generated. The post-processing module combines these probabilities to provide the final confidence score for this window.

[0045] The technical solution of the present application will be further described in detail below in combination with specific embodiments, as shown in Figure 5 below:

[0046] Step 1: Decode the audio to be detected using a speech recognition model to obtain a candidate word sequence. The speech recognition model is used to convert the audio to be detected into text data. Then, a word lattice is generated based on the candidate word sequence, the corresponding backtracking path, and the matching score. After that, the pinyin of the words in the word lattice is retrieved using the pinyin of multiple keywords in the keyword set to obtain the first word, and based on the pinyin of the first word, the initial consonant duration and the final consonant duration of each character in the first word are obtained.

[0047] Step 2: Calculate the mean value of the initial consonant duration or the final consonant duration of each category of a large number of labeled speeches in the speech database, and then find the initial consonant duration and the final consonant duration of each character in the target keyword.

[0048] Step 3: Use to calculate the mean square error between the initial consonant duration and the final consonant duration of the first word and the initial consonant duration and the final consonant duration of the target keyword.

[0049] For example, the target keyword is "potato", and the corresponding initial and final consonant combinations are "t-u d-ou". The mean values of the durations of these four initial and final consonants are x, y, z, m. The speech detection model detects that the first word is actually "copper bean", and the corresponding initial and final consonant combinations are "t-ong d-ou", obtaining the durations a, b, c, d of these four initial and final consonants, and calculating the mean square error of these four initial and final consonants.

[0050] Step 4: Input the mean square error in Step 3 into a binary classification model to obtain the probability of the first word. The probability of the first word is used to represent the probability that the first word is the target keyword.

[0051] The training process of the binary classification network is as follows: Machine learning algorithms such as Logistic Regression (LR) and Support Vector Machine (SVM) are used to train the binary classification network. The parameters of the binary classification network are obtained through training with the first sample. The first sample is the difference between the phased pronunciation duration feature of the word in the speech database that is intended to be the target keyword in the keyword set and the reference phased pronunciation duration feature, which is labeled as 0 and 1, corresponding to the two categories of not being a keyword and being a keyword respectively.

[0052] Step five, perform a secondary judgment based on the probability of the first word. If the probability of the first word is greater than the second predetermined value, determine the first word as the target keyword.

[0053] Figure 6 This is a schematic structural diagram of a voice keyword detection device provided by an embodiment of the present application. As Figure 6 shown, the device includes:

[0054] An acquisition unit 10, configured to acquire the detection result of the voice detection model for the to-be-detected audio. The detection result is used to represent the phased pronunciation duration feature of the first word. The first word is the word in the keyword set that is intended to be the target keyword in the to-be-detected audio identified by the voice detection model from the to-be-detected audio. A plurality of pre-selected keywords are stored in the keyword set;

[0055] In this embodiment, the phased pronunciation duration feature may be the initial consonant duration and the final vowel duration of each character in the first word. For example, the initial consonants and finals of "potato" are "t - u d - ou", and the phased pronunciation duration feature of "potato" is the pronunciation duration of t, the pronunciation duration of u, the pronunciation duration of d, and the pronunciation duration of ou. In actual applications, because people speak at different frequencies, the pronunciation durations of the initial consonants and finals of the same word may vary greatly, but the ratio of the initial consonant duration to the final vowel duration varies less. To further improve the accuracy of the detection result, the phased pronunciation duration feature may be the ratio of the initial consonant duration to the final vowel duration, such as the ratio of the pronunciation duration of t to the pronunciation duration of u. The phased pronunciation duration feature may also be the normalized initial consonant duration and final vowel duration, so as to reduce the error caused by different speaking frequencies.

[0056] The first word is the word in the keyword set that is intended to be the target keyword in the to-be-detected audio identified by the voice detection model from the to-be-detected audio, indicating that the first word is recognized as the target keyword by the voice detection model. However, due to misrecognition by the voice detection model, the first word may actually not be the target keyword. For example, the target keyword is "potato", and the first word is actually "copper bean", but is recognized as "potato" by the voice detection model.

[0057] The keyword set mentioned above includes multiple keywords, such as "on," "off," and "mute." There can be one or more target keywords.

[0058] The determining unit 20 is used to determine the first word as the target keyword when the phased pronunciation duration feature of the first word matches the phased pronunciation duration feature of the target keyword.

[0059] In this embodiment, the phased pronunciation duration features of the target keyword can be the initial consonant duration and final vowel duration of each character, the ratio of initial consonant duration to final vowel duration, or the normalized initial consonant duration and final vowel duration. The phased pronunciation duration features of the target keyword are obtained by calculating the average of the initial consonant duration or final vowel duration of a large number of annotated speech samples in a speech database. If the difference between the phased pronunciation duration features of the first word and the target keyword is within a certain range, it indicates that the difference between the first word and the target keyword is small, and therefore the first word is the target keyword.

[0060] To quickly obtain detection results, in one embodiment, the determining unit includes a first determining module and a second determining module, wherein the first determining module is used to determine a first difference between the phased pronunciation duration feature of the first word and the phased pronunciation duration feature of the target keyword; the second determining module is used to determine the first word as the target keyword based on the first difference.

[0061] In this embodiment, it is first necessary to determine the first difference between the phased pronunciation duration feature of the first word and the phased pronunciation duration feature of the target keyword. Based on the first difference, it can be determined whether the first word is the target keyword. This detection method is relatively simple and does not require a complicated calculation process, so the detection result can be obtained quickly.

[0062] In one embodiment, the second determining module includes a first determining submodule, an input submodule, and a second determining submodule. The first determining submodule is used to determine the first word as the target keyword when the first difference is less than a first predetermined value. Alternatively, the input submodule is used to input the first difference into a binary classification network to obtain the probability of the first word, where the probability of the first word represents the probability that the first word is the target keyword. The binary classification network is obtained by training an initial binary classification network using first samples. The first samples are obtained by labeling the difference between the phased pronunciation duration features of words that are potential keywords in a speech database and reference phased pronunciation duration features. The second determining submodule is used to determine the first word as the target keyword when the probability of the first word is greater than a second predetermined value.

[0063] In this embodiment, the comparison can be directly based on the magnitude of the first difference. If the first difference is less than a first predetermined value, it indicates that the phased pronunciation duration feature of the first word is relatively close to the phased pronunciation duration feature of the target keyword, and the first word is the target keyword. Alternatively, the first difference can be input into a binary classification network to obtain the probability that the first word is the target keyword. When the probability is greater than a second predetermined value, the first word is the target keyword, thereby further improving the accuracy of the speech keyword detection results.

[0064] The binary classification network described above is labeled with 0 and 1, corresponding to the categories of "not a keyword" and "time keyword," respectively. This binary classification network is generally trained using machine learning algorithms such as Logistic Regression (LR) and Support Vector Machine (SVM). The parameters of the Logistic binary classification network are obtained through training with a first sample, which is the difference between the phased pronunciation duration features of the target keyword in the proposed keyword set of the speech database and the reference phased pronunciation duration features, labeled with 0 and 1.

[0065] In one embodiment, the first determining module includes a first calculation submodule, wherein the first calculation submodule is used to utilize... The first difference is obtained above, where MSE represents the first difference. y represents the average duration of the initial consonant or the average duration of the final vowel of the target keywords mentioned above. i The initial consonant duration or final vowel duration of the first word mentioned above is represented by , n represents the sum of the number of initial consonants and final vowels of the first word mentioned above, and i is an integer greater than or equal to 1 and less than or equal to n.

[0066] Since the loss function usually adopts the mean square error, in this embodiment, the mean square error between the initial consonant duration and the final vowel duration of the first word and those of the target keyword is calculated using the above formula, which is beneficial for subsequent judgment using the model method.

[0067] For example, the target keyword is "potato", and the corresponding initial consonant and final vowel combinations are "t-u d-ou". The average durations of these four initial consonants and final vowels are x, y, z, m. The speech detection model detects that the first word is actually "copper bean", and the corresponding initial consonant and final vowel combinations are "t-ong d-ou", obtaining the durations a, b, c, d of these four initial consonants and final vowels, and calculating the mean square error of these four initial consonants and final vowels.

[0068] In one embodiment, the above first determination module includes a second calculation sub-module and a third calculation sub-module. Among them, the second calculation sub-module is used to determine the first ratio of the initial consonant duration and the final vowel duration of the first word and the second ratio of the initial consonant duration and the final vowel duration of the target keyword; the third calculation sub-module is used to obtain the first difference according to the difference between the first ratio and the second ratio.

[0069] As mentioned in the above content, different speaking frequencies of people result in significant differences in the phased pronunciation duration characteristics. To avoid this difference and further improve the accuracy of the detection results, in this embodiment, the ratio of the initial consonant duration to the final vowel duration is calculated, and then the difference between the first ratio of the first word and the second ratio of the target keyword is used for judgment.

[0070] The ratio of the initial consonant duration and the final vowel duration of the above first word or target keyword can be the ratio of the sum of the initial consonant durations and the sum of the final vowel durations of each character in the first word or target keyword, or the ratio of the initial consonant duration and the final vowel duration of each character. If it is the ratio of the initial consonant duration and the final vowel duration of each character, there will be multiple ratios. Calculate the error of the ratio of each character in the first word and the target keyword, and then calculate the mean square error to obtain the first difference.

[0071] In one embodiment, the above acquisition unit includes a decoding module, a generation module, a retrieval module, and a third determination module. Among them, the decoding module is used to decode the to-be-detected audio using a speech recognition model to obtain a candidate word sequence, where the speech recognition model is used to convert the to-be-detected audio into text data; the generation module is used to generate a word grid according to the candidate word sequence and the corresponding backtracking path and matching score; the retrieval module is used to retrieve the word pinyin in the word grid using the pinyin of multiple keywords in the keyword set to obtain the first word; the third determination module is used to obtain the phased pronunciation duration characteristics of the first word according to the pinyin of the first word.

[0072] In this embodiment, a speech recognition model is used to first decode the audio to be detected to obtain a word grid. A fast search is then performed on the word grid to retrieve the first word and its corresponding phased pronunciation duration features. This detection method has high accuracy, but because it requires decoding, the running time is relatively long.

[0073] In one embodiment, the acquisition unit includes an extraction module, an input module, a fourth determination module, and a fifth determination module. The extraction module extracts speech features from each frame of the audio to be detected, obtaining a speech feature vector for each frame. The input module inputs the speech feature vector of each frame into a deep neural network model for classification, obtaining multiple labels and the probability of each label. The labels are words identified from the audio to be detected that are potential keywords or parts of the target keywords. The fourth determination module determines the label as the first word if the probability of the label is greater than a third predetermined value. The fifth determination module determines the phased pronunciation duration features of the first word based on its start and end speech frames.

[0074] In this embodiment, a neural network is used for keyword retrieval. This method does not require decoding the audio to be detected, thereby reducing runtime computation time and memory usage. Figures 2 to 4 This is a flowchart illustrating the method for obtaining detection results using a deep neural network, as provided in the embodiments of this application. Figure 2 As shown, firstly, feature extraction is performed on the audio to be detected, extracting the speech feature vector. The audio to be detected includes the key phrases "okay" and "google". Then, the speech feature vector is input into a program such as... Figure 3 The deep neural network shown outputs three labels: "okay", "google", and "filler", and generates a result like this: Figure 4 The frame-level posterior probabilities shown are combined by the post-processing module to provide the final confidence score for the window.

[0075] like Figure 7 As shown in the figure, this application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0076] Memory 113 is used to store computer programs;

[0077] In one embodiment of this application, the processor 111, when executing the program stored in the memory 113, implements the control method for detecting voice keywords provided in any of the foregoing method embodiments.

[0078] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the voice keyword detection method provided in any of the foregoing method embodiments.

[0079] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0080] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for detecting speech keywords, characterized in that, include: The detection results of the speech detection model on the audio to be detected are obtained, wherein the detection results are used to represent the phased pronunciation duration features of the first word, the first word being a word identified by the speech detection model from the audio to be detected as a target keyword in the keyword set, and the keyword set storing multiple pre-selected keywords; If the phased pronunciation duration feature of the first word matches the phased pronunciation duration feature of the target keyword, the first word is determined to be the target keyword, including: determining a first ratio of the initial consonant duration to the final vowel duration of the first word and a second ratio of the initial consonant duration to the final vowel duration of the target keyword; obtaining a first difference based on the difference between the first ratio and the second ratio; and determining the first word as the target keyword based on the first difference. Alternatively, the first difference utilizes We obtained, among which, express The first difference, This represents the average duration of the initial consonant or the average duration of the final vowel of the target keyword. This indicates the duration of the initial consonant or the duration of the final vowel in the first word. The sum of the number of initials and finals of the first word is represented by i, where i is an integer greater than or equal to 1 and less than or equal to n.

2. The method according to claim 1, characterized in that, Based on the first difference, the first word is determined to be the target keyword, including: If the first difference is less than a first predetermined value, the first word is determined to be the target keyword; or, The first difference is input into a binary classification network to obtain the probability of the first word, wherein the probability of the first word is used to characterize the probability that the first word is the target keyword. The binary classification network is obtained by training an initial binary classification network using a first sample. The first sample is obtained by labeling the difference between the phased pronunciation duration features of words that are potential keywords in the speech database and the reference phased pronunciation duration features. If the probability of the first word is greater than a second predetermined value, the first word is determined to be the target keyword.

3. The method according to claim 1, characterized in that, Obtain the detection results of the speech detection model for the audio to be detected, including: The audio to be detected is decoded using a speech recognition model to obtain a candidate word sequence, wherein the speech recognition model is used to convert the audio to be detected into text data; A word grid is generated based on the candidate word sequence, the corresponding backtracking path, and the matching score; The first word is obtained by retrieving the pinyin of words in the word grid using the pinyin of multiple keywords in the keyword set; Based on the pinyin of the first word, the phased pronunciation duration characteristics of the first word are obtained.

4. The method according to claim 1, characterized in that, Obtain the detection results of the speech detection model for the audio to be detected, including: Extract the speech features of each frame of the audio to be detected to obtain the speech feature vector of each frame; The speech feature vector of each frame is input into a deep neural network model for classification to obtain multiple labels and the probability of each label. The label is a word identified from the audio to be detected as a target keyword or a part of the target keyword in the set of proposed keywords. If the probability of a tag is greater than a third predetermined value, the tag is determined to be the first word; Based on the start and end speech frames of the first word, determine the phased pronunciation duration features of the first word.

5. A device for detecting speech keywords, characterized in that, include: The acquisition unit is used to acquire the detection result of the speech detection model on the audio to be detected, wherein the detection result is used to represent the phased pronunciation duration feature of the first word, the first word being a word identified by the speech detection model from the audio to be detected as a target keyword in the keyword set, and the keyword set storing multiple pre-selected keywords; The determining unit is configured to determine the first word as the target keyword when the phased pronunciation duration features of the first word match the phased pronunciation duration features of the target keyword: determining a first ratio of the initial consonant duration to the final vowel duration of the first word and a second ratio of the initial consonant duration to the final vowel duration of the target keyword; obtaining a first difference based on the difference between the first ratio and the second ratio; and determining the first word as the target keyword based on the first difference. Alternatively, the first difference utilizes We obtained, among which, express The first difference, This represents the average duration of the initial consonant or the average duration of the final vowel of the target keyword. This indicates the duration of the initial consonant or the duration of the final vowel in the first word. The sum of the number of initials and finals of the first word is represented by i, where i is an integer greater than or equal to 1 and less than or equal to n.

6. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of the speech keyword detection method according to any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the speech keyword detection method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Method and device for detecting keywords in voice

    CN103730115A

  • Speech evaluation method, device and apparatus, and readable storage medium

    CN109192224A

  • Audio frequency processing method, device and system, storage medium, terminal and server

    CN110148427A