Speech recognition method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202310786366.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-06-29
AI Technical Summary
但是在实际中,受多种因素的影响,语音识别的成功率较低
[0044]In the aforementioned speech recognition method, apparatus, electronic device, and storage medium, the speech information of the target user is acquired and speech features of the speech information are extracted; the speech features are compared with a first speech feature template to obtain a first comparison result; if the first comparison result satisfies a first matching condition, the speech features are compared with a second speech feature template to obtain a second comparison result; if the first comparison result satisfies a second matching condition, or the second comparison result satisfies a third matching condition, then speech recognition is determined to be successful; wherein, the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user. With this setup, when determining whether the acquired speech information matches the template word, the speech features corresponding to the speech information are compared with different speech feature templates corresponding to the template word. A successful match is considered to be achieved when a match is found with any of the speech feature templates. Therefore, the success rate of speech recognition can be improved through multiple comparisons. Furthermore, the second speech feature template is generated by dynamically tracking the speech features of the target user to obtain personalized speech features. Therefore, when comparing the acquired speech features with the second speech feature template, the speech characteristics of the user in different states can also be taken into account, thereby further improving the success rate of speech recognition.
Smart Images

Figure CN116844532B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech recognition technology, and in particular to a speech recognition method, apparatus, electronic device and storage medium. Background Technology
[0002] Speech recognition is a technology that enables machines to convert speech signals into corresponding text or commands through recognition and understanding. With the rapid development of speech recognition technology, it is widely used in voice interaction scenarios such as question and answer, smart home control, online shopping, and life services.
[0003] In some speech recognition scenarios, it's necessary to match and recognize the speech information acquired by the device with specific stored words, and determine subsequent processing steps based on the recognition results. Therefore, the success rate of matching and recognition is crucial. However, in practice, the success rate of speech recognition is relatively low due to various factors. Summary of the Invention
[0004] Therefore, it is necessary to provide a speech recognition method, device, electronic device, and storage medium that can improve the success rate of speech recognition in response to the above-mentioned technical problems.
[0005] In a first aspect, embodiments of this application provide a speech recognition method, the method comprising:
[0006] Acquire the voice information of the target user and extract the voice features of the voice information;
[0007] The speech features are compared with the first speech feature template to obtain the first comparison result;
[0008] If the first comparison result satisfies the first matching condition, the speech feature is compared with the second speech feature template to obtain the second comparison result; wherein the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user;
[0009] If the first comparison result meets the second matching condition, or the second comparison result meets the third matching condition, then the speech recognition is determined to be successful.
[0010] Secondly, embodiments of this application also provide a voice recognition device, the device comprising:
[0011] The acquisition module is used to acquire the voice information of the target user and extract the voice features of the voice information;
[0012] The first comparison module is used to compare the speech features with the first speech feature template to obtain the first comparison result;
[0013] The second comparison module is used to compare the speech features with the second speech feature template if the first comparison result meets the first matching condition, and obtain a second comparison result; wherein the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user;
[0014] The determination module is used to determine that speech recognition is successful if the first comparison result meets the second matching condition or the second comparison result meets the third matching condition.
[0015] In one embodiment, when the second comparison module compares the speech features with the second speech feature template to obtain the second comparison result, it is specifically used for:
[0016] The speech features are compared with each of the second speech feature templates in the target speech feature template set to obtain multiple second comparison results; wherein, the multiple second speech feature templates in the target speech feature template set are generated based on personalized speech features obtained by dynamically tracking the speech features of the target user in different states.
[0017] In one embodiment, when the determining module determines that speech recognition is successful based on the first comparison result meeting the second matching condition, or the second comparison result meeting the third matching condition, it is specifically used for:
[0018] If the first comparison result satisfies the second matching condition, or if any of the second comparison results satisfies the third matching condition, then the speech recognition is determined to be successful.
[0019] In one embodiment, the determining module is further configured to:
[0020] After a successful match is confirmed, the target speech feature template set is updated using the speech features based on the number of second speech feature templates included in the target speech feature template set. The multiple second speech feature templates included in the target speech feature template set are generated based on personalized speech features obtained by dynamically tracking the speech features of the target user in different states.
[0021] In one embodiment, when the determining module updates the target speech feature template set using the speech features based on the number of second speech feature templates included in the target speech feature template set, it is specifically used for:
[0022] If the number of second speech feature templates in the target speech feature template set is less than a preset value, then the speech feature is directly added to the target speech feature template set as a new second speech feature template.
[0023] If the number of second speech feature templates in the target speech feature template set reaches a preset value, then the second speech feature template in the target speech feature template set that is most similar to the speech feature is replaced with the speech feature.
[0024] In one embodiment, the step of obtaining the first speech feature template includes:
[0025] Acquire a first speech data sample and extract speech features from each of the first speech data samples; wherein, the first speech data sample includes multiple different speech information corresponding to the template word;
[0026] The speech features of each of the first speech data samples are fused to obtain the first speech feature template.
[0027] In one embodiment, the first comparison result includes: a first judgment result obtained based on the magnitude of the first similarity between the speech feature and the first speech feature template; the second comparison result includes: a second judgment result obtained based on the magnitude of the second similarity between the speech feature and the second speech feature template.
[0028] The first matching condition includes the first similarity being within a first threshold range, the second matching condition includes the first similarity being within a second threshold range, and the third matching condition includes the second similarity being within a third threshold range.
[0029] In one embodiment, the step of determining the first threshold range and the second threshold range includes:
[0030] Acquire a second speech data sample and extract speech features from each of the second speech data samples; wherein, the second speech data sample includes speech information from different users for words other than template words;
[0031] Calculate the similarity between the speech features of each of the second speech data samples to obtain multiple similarity values;
[0032] The similarity values are sorted from largest to smallest, and the first target similarity value and the second target similarity value with the same ratio as the preset first ratio and second ratio are determined respectively.
[0033] Based on the first target similarity value and the second target similarity value, the first threshold range and the second threshold range are divided.
[0034] In one embodiment, the step of determining the third threshold range includes:
[0035] Acquire third speech data samples and extract speech features from each of the third speech data samples; wherein, the third speech data samples include speech information of different users in different states for words other than template words;
[0036] Calculate the similarity between the speech features of each of the third speech data samples to obtain multiple similarity values;
[0037] The similarity values are sorted from largest to smallest to determine the third target similarity value whose ratio is the same as the preset third ratio;
[0038] The third threshold range is defined based on the third target similarity value.
[0039] In one embodiment, the voice information includes voice information used by a user to wake up the target device; the template words in the first voice feature template include a wake-up word for waking up the target device; the determining module is further configured to:
[0040] If the speech recognition is successful, the target device is woken up; the woken-up target device is used to recognize and execute the control commands corresponding to the acquired speech information.
[0041] Thirdly, embodiments of this application also provide an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the speech recognition method as described in the first aspect.
[0042] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the speech recognition method as described in the first aspect.
[0043] Fifthly, embodiments of this application also provide a computer program product or computer program, the computer program product or computer program including computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, it implements the steps of the speech recognition method as described in the first aspect.
[0044] In the aforementioned speech recognition method, apparatus, electronic device, and storage medium, the speech information of the target user is acquired and speech features of the speech information are extracted; the speech features are compared with a first speech feature template to obtain a first comparison result; if the first comparison result satisfies a first matching condition, the speech features are compared with a second speech feature template to obtain a second comparison result; if the first comparison result satisfies a second matching condition, or the second comparison result satisfies a third matching condition, then speech recognition is determined to be successful; wherein, the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user. With this setup, when determining whether the acquired speech information matches the template word, the speech features corresponding to the speech information are compared with different speech feature templates corresponding to the template word. A successful match is considered to be achieved when a match is found with any of the speech feature templates. Therefore, the success rate of speech recognition can be improved through multiple comparisons. Furthermore, the second speech feature template is generated by dynamically tracking the speech features of the target user to obtain personalized speech features. Therefore, when comparing the acquired speech features with the second speech feature template, the speech characteristics of the user in different states can also be taken into account, thereby further improving the success rate of speech recognition. Attached Figure Description
[0045] Figure 1 This is a diagram illustrating the implementation environment of a speech recognition method in one embodiment.
[0046] Figure 2 This is a flowchart illustrating a speech recognition method in one embodiment;
[0047] Figure 3 This is a schematic diagram illustrating the specific application process of the speech recognition method in one application scenario in one embodiment;
[0048] Figure 4 This is a schematic diagram illustrating the update process of the second speech feature template.
[0049] Figure 5 This is a schematic diagram of the structure of a speech recognition device in one embodiment;
[0050] Figure 6 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] Application Overview
[0053] As described in the background section, some speech recognition processes require matching the voice information acquired by the device with specific words stored in the memory. For example, a specific application scenario is voice wake-up. In this scenario, the device pre-stores specific keywords (usually called wake words). When a user emits voice information, the device can match and recognize the user's voice information with its stored wake words. Upon successful recognition, the device switches to a wake-up state. In the wake-up state, the user can issue voice commands to control the device to perform corresponding operations. In this scenario, if the device's speech recognition success rate is low, the user may need to try saying the wake word multiple times to wake the device, significantly impacting the user experience.
[0054] In practice, many factors affect the success rate of speech recognition. One of these factors is that changes in the user's state can alter the spoken information. For example, the speech information when a user is happy differs from that when they are upset, thus affecting the device's recognition success rate. For instance, a wake-up word spoken by a user in a happy state may have a higher wake-up success rate, while a wake-up word spoken in a depressed state may have a lower wake-up success rate.
[0055] To address the aforementioned problems, this application provides a speech recognition method, apparatus, device, and storage medium, aiming to improve the speech recognition success rate when users are in various states. The specific solutions are described in detail below through embodiments.
[0056] Exemplary Implementation Environment
[0057] The speech recognition method provided in this application can be applied to, for example... Figure 1 In the implementation environment shown, one or more smart devices 110 communicate with gateway 120 via Wi-Fi / Bluetooth / ZIGBEE, etc., and gateway 120 also communicates with user terminal 130 via Wi-Fi, etc., so user terminal 130 and smart devices 110 can communicate on a local area network (LAN). Furthermore, gateway 120 also communicates with server / cloud 140 via Wi-Fi, etc., while user terminal 130 also communicates with server / cloud 140 via 2G / 3G / 4G / 5G / Wi-Fi, etc., so user terminal 130 and smart devices 110 can also communicate on a wide area network (WAN). It should be understood that the communication connections of the above devices are not limited to the connection methods listed above and can be adjusted according to actual needs. After the above devices or terminals are interconnected, a communication process can be realized, including but not limited to data interaction and command transmission.
[0058] Based on the aforementioned implementation environment, the speech recognition method can be applied to the interaction between the user and the smart device 110, and also to the interaction between the user and the user terminal 130. Specifically, the smart device 110 or the user terminal 130 can acquire the speech information emitted by the user and extract the speech features of the speech information; compare the speech features with a first speech feature template to obtain a first comparison result; if the first comparison result meets a first matching condition, then compare the speech features with a second speech feature template to obtain a second comparison result; wherein, the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user; if the first comparison result meets a second matching condition, or the second comparison result meets a third matching condition, then the speech recognition is determined to be successful, and then the smart device 110 controls the corresponding device to perform the corresponding operation based on the corresponding text or command.
[0059] More specifically, the smart device 110 can be, but is not limited to, devices with voice recognition capabilities such as smart control panels, smart printers, smart fax machines, smart cameras, smart air conditioners, smart TVs, smart refrigerators, smart curtains, smart gateways, smart speakers, and smart voice devices; these are not limited here. Additionally, the user terminal 130 can be, but is not limited to, smartphones and tablets. Accordingly, the smart device 110 or user terminal 130 can control itself or external devices connected to it based on the voice recognition results. For example, when the user terminal 130 is a smartphone, it can open and display the interface of a specific app, set an alarm, or play music based on the recognized voice commands. Similarly, when the smart device 110 is a smart gateway, it can control the start / stop and operating status of connected smart devices such as smart TVs or smart air conditioners based on the recognized voice commands. The server 140 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0060] Exemplary methods
[0061] Please see Figure 2 In one exemplary embodiment, a speech recognition method is provided. The method is illustrated using an electronic device as an example. Specifically, the electronic device may be... Figure 1 The implementation environment shown refers to the smart device or user terminal; that is, the speech recognition method of this embodiment can be executed by a smart device or user terminal. The purpose of this embodiment is to consider the impact of the user's current state on the success rate of speech recognition, thereby improving the accuracy of speech recognition. Figure 3 As shown, the method in this embodiment may include the following steps:
[0062] Step S201: Obtain the voice information of the target user and extract the voice features of the voice information.
[0063] The target user can refer to a user who uses the voice interaction function, specifically a user who has registered their voice information, or a user who has previously used the voice recognition function of a smart voice device. In other words, the smart voice device has previously acquired the target user's voice information and performed voice recognition processing. In this case, the smart voice device can store the voice features corresponding to the target user's voice information and can utilize the stored voice features in subsequent steps.
[0064] The voice information can be emitted by the target user in the vicinity of the smart voice device. For example, when the target user wakes up the smart voice device by voice, they can speak a pre-set wake word in the vicinity of the smart voice device, and the electronic device can use its built-in microphone and other components to obtain the voice information corresponding to the wake word.
[0065] Furthermore, speech feature extraction refers to processing speech information through acoustic recognition and dimensionality reduction to extract representative speech features needed for subsequent matching and recognition from the large number of features contained in the speech information. Commonly used feature extraction algorithms include, but are not limited to, Dynamic Time Warping (DTW), Hidden Markov Models (HMM), and Vector Quantization (VQ). In practice, an appropriate feature extraction algorithm can be selected to extract features from the acquired speech information according to actual needs, and there are no specific restrictions.
[0066] Step S202: Compare the speech features with the first speech feature template to obtain the first comparison result.
[0067] The first speech feature template is a speech feature stored in the intelligent speech device. It can be a universal speech feature template generated based on the speech features of multiple users. For example, it can be a speech feature template generated based on the speech features of multiple different users in different states. The first speech feature template is used to compare with the speech features extracted in step S201. That is, the first speech feature template serves as a reference feature in the speech matching and recognition process, and it can be extracted in advance using speech samples.
[0068] In this embodiment, the electronic device first compares the voice features with a first voice feature template. Therefore, the first voice feature template should have good universality, that is, it should have good recognition accuracy for the voice information of the target user in different states. Furthermore, for the same intelligent voice device, its corresponding first voice feature template is generally fixed.
[0069] In one embodiment, the step of obtaining the first speech feature template may include: obtaining a first speech data sample and extracting speech features from each of the first speech data samples; wherein the first speech data sample includes multiple different speech information corresponding to the template word; and performing fusion processing on the speech features of each of the first speech data samples to obtain the first speech feature template.
[0070] Specifically, the template word is the word that the user needs to say for successful recognition. For example, in a voice wake-up scenario, the template word is a pre-set wake-up word. In this embodiment, the electronic device can pre-collect various different voice information corresponding to the template word, such as the voices of different people saying the template word, the voices of the same person saying the template word in different external environments, and the voices of the same person saying the template word in different emotional states such as happiness, depression, or anger. The collected voice data is the first voice data sample.
[0071] The electronic device can then extract features from these first speech data samples, obtaining a large number of speech features. These speech features are then fused to obtain the first speech feature template. Since the time spent comparing the speech features extracted in step S201 with the first speech feature template cannot be too long, otherwise it would significantly impact the user experience, it is inconvenient to compare the extracted speech features one by one with the large number of speech features extracted from the first speech data samples.
[0072] Based on this, in this embodiment, a large number of speech features extracted from the first speech data sample are fused to obtain a first speech feature template. Thus, when comparing, it is only necessary to compare the extracted speech features with the first speech feature template, which can effectively shorten the processing time.
[0073] In addition, after the electronic device fuses the speech features of each first speech data sample, it can comprehensively consider the characteristics of speech sample data under various conditions, so that the final first speech feature template can have a high recognition accuracy for speech information under different conditions, avoiding misjudgment in the subsequent recognition process due to the limitations set by the first speech feature template itself.
[0074] More specifically, in one embodiment, the process of fusing the speech features of each first speech data sample may involve calculating the average value of the speech features of each first speech data sample. That is, the calculated average value is used as the first speech feature template.
[0075] Furthermore, when the electronic device compares the speech features with the first speech feature template, the first comparison result can be: after calculating the first similarity between the speech features and the first speech feature template, a first judgment result is obtained based on the magnitude of the first similarity between the speech features and the first speech feature template. Optionally, the calculated first similarity can be a cosine similarity.
[0076] Step S203: If the first comparison result meets the first matching condition, then the speech feature is compared with the second speech feature template to obtain the second comparison result; if the first comparison result meets the second matching condition, or the second comparison result meets the third matching condition, then the speech recognition is determined to be successful.
[0077] The first matching condition can be a pre-defined judgment condition, specifically a pre-defined judgment condition for comparing the user's voice features with a first voice feature template. Specifically, the first comparison result is compared with this judgment condition; if they match, the first comparison result satisfies the first matching condition. For example, the first matching condition may include a first similarity within a first threshold range. The process of determining whether the first comparison result satisfies the first matching condition can be to determine whether the first similarity corresponding to the first comparison result is within the first threshold range. If the determination result is yes, then the first matching condition is satisfied; otherwise, the first matching condition is not satisfied.
[0078] Furthermore, the second speech feature template, similar to the first speech feature template, is also a speech feature stored in the intelligent speech device. It is used to compare with the speech features extracted in step S201 and can also serve as a reference feature in the speech matching and recognition process. Moreover, both the second and first speech feature templates can include the same template words; that is, both can be used to determine whether the words contained in the target user's speech information are the same as the template words. However, the difference lies in that the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the target user's speech features. In other words, unlike the first speech feature template, which is fixed, the second speech feature template can change over time. Thus, the second speech feature template can more reasonably identify the user's real-time state, thereby reducing the impact of user state changes on the speech recognition success rate.
[0079] Specifically, taking the first comparison result as an example, which is a first judgment result obtained based on the relationship between the first similarity and a set first similarity threshold, in a conventional scheme, after calculating the first similarity, it can be directly determined whether the speech features match the first speech feature template by judging whether the first similarity reaches the preset similarity threshold: if the first similarity reaches the preset similarity threshold, it can be considered a match; otherwise, it is considered a mismatch. However, such a judgment scheme has limitations because the first speech feature template is preset and fixed. Therefore, it may have different recognition accuracy rates for the user's speech information in different states. Among these, the user's state includes, but is not limited to, the external environment state, mood state, and emotional state, etc.
[0080] In this embodiment, a first matching condition and a second matching condition can be set for the first comparison result. When the first comparison result meets the second matching condition, the speech recognition can be directly determined to be successful. When the first comparison result meets the first matching condition, in order to avoid misjudgment, the speech features are further compared with the second speech feature template to obtain the second comparison result, and then the recognition is determined based on the second comparison result.
[0081] The second matching condition can also be a pre-set judgment condition, specifically a pre-set judgment condition for comparing the user's voice features with the first voice feature template. Specifically, the first comparison result is compared with this judgment condition; if they match, the first comparison result satisfies the second matching condition. For example, the second matching condition may include a first similarity within a second threshold range. The process of determining whether the first comparison result satisfies the second matching condition can be to determine whether the first similarity corresponding to the first comparison result is within the second threshold range. If the determination result is yes, then the second matching condition is satisfied; otherwise, the second matching condition is not satisfied.
[0082] Furthermore, it should be noted that the requirements for the second matching condition are higher than those for the first matching condition. In other words, the second matching condition is more difficult to meet than the first matching condition. For example, taking the first comparison result as the first judgment result obtained based on the magnitude of the first similarity between the speech feature and the first speech feature template, the first matching condition can be that the first similarity is within a first threshold range, and the second matching condition can be that the first similarity is within a second threshold range, and the minimum value of the first threshold range is greater than or equal to the maximum value of the second threshold range.
[0083] For example, in one embodiment, a first similarity threshold T1 and a second similarity threshold T2 can be preset, and T1 < T2. Then the range of the second threshold can be [T2, 1), and the range of the first threshold can be [T1, T2).
[0084] Furthermore, the purpose of setting a second voice feature template is to achieve a high recognition accuracy for user voice information in different states. Therefore, in this embodiment, the second voice feature template is generated based on personalized voice features obtained by dynamically tracking the voice features of the target user. That is, for the target user, the voice information emitted by the user during each use of the corresponding voice device within a certain period of time is dynamically tracked and recorded, and personalized voice features unique to the target user are generated using each voice information. The second voice feature template is then obtained based on the personalized voice features of the target user. This approach better takes into account the dynamic changes in voice information caused by factors such as different times, emotions, moods, and ages, thereby improving the accuracy of voice recognition.
[0085] Based on this, when the first comparison result meets the second matching condition, the electronic device can directly determine that the speech recognition is successful. However, if the first comparison result does not meet the second matching condition but meets the first matching condition, the user's speech features are compared with the second speech feature template to obtain the second comparison result. When the second comparison result meets the third matching condition, the speech recognition is determined to be successful. This achieves multiple matching and recognition of the user's speech features with different speech feature templates, thereby improving the success rate of speech recognition.
[0086] The third matching condition can also be a pre-defined judgment condition, specifically a pre-defined judgment condition for comparing the user's speech features with the second speech feature template. Specifically, the second comparison result is compared with this judgment condition; if they match, the second comparison result satisfies the third matching condition. For example, the third matching condition could include the second similarity being within a third threshold range. The process of determining whether the second comparison result satisfies the third matching condition could be to determine whether the second similarity corresponding to the second comparison result is within the third threshold range. If the result is yes, then the third matching condition is satisfied; otherwise, it is not satisfied.
[0087] Furthermore, since the third comparison result is obtained by comparing the user's voice features with the second voice feature template, the third matching condition is not directly related to the first and second matching conditions; that is, they can be independent judgment conditions. For example, taking the first comparison result corresponding to the first similarity, and the first threshold range being [T1, T2), and the second threshold range being [T2, 1), the second comparison result can include the second judgment result obtained based on the magnitude of the second similarity, and the third matching condition can include the second similarity being within the third threshold range. Then, the third threshold range can be [T3, 1), and T3 has no specific magnitude relationship with either T1 or T2. T3 can be greater than T2, less than T1, or between T1 and T2.
[0088] In this embodiment Since the second speech feature template is generated by dynamically tracking the speech features of the target user to obtain personalized speech features, when comparing the acquired speech features with the second speech feature template, the speech characteristics of the user in different states can also be taken into account, thereby further improving the speech recognition success rate.
[0089] In some embodiments, the step of determining the first threshold range and the second threshold range may include:
[0090] Acquire second speech data samples and extract speech features from each second speech data sample; calculate the similarity between the speech features of each second speech data sample to obtain multiple similarity values; sort the similarity values from largest to smallest, and determine the first target similarity value and the second target similarity value from them, which have the same proportion as the preset first proportion and second proportion; based on the first target similarity value and the second target similarity value, divide the first threshold range and the second threshold range; wherein, the second speech data samples include speech information from different users for words other than template words.
[0091] Specifically, in this embodiment, the electronic device can pre-collect speech information corresponding to words other than the template word spoken by different users. This collected speech data is the second speech data sample. Using speech information corresponding to words other than the template word as the second speech data sample is to avoid misidentification caused by misidentifying non-template words as template words in actual applications.
[0092] After acquiring sufficient second speech data samples, the electronic device extracts features from each speech data in the samples to obtain corresponding speech features. Then, it calculates the pairwise similarity between each speech feature. The corresponding similarity value represents the degree of similarity between any two speech data, which can be understood as the "probability" that the two speech data are the same. Therefore, the larger the similarity value, the higher the accuracy of the recognition result when it is used as the similarity threshold (such as the first similarity threshold T1) for successful recognition.
[0093] Based on this, in this embodiment, the electronic device sorts the calculated similarity values from largest to smallest, and selects the corresponding similarity values from them according to the required first ratio and second ratio, that is, the first target similarity value and the second target similarity value. Then, based on this, a first threshold range and a second threshold range are obtained. Taking the first threshold range as [T1, T2) and the second threshold range as [T2, 1) as an example, the first similarity threshold T1 can be the similarity value corresponding to the aforementioned preset first ratio, and the second similarity threshold T2 can be the similarity value corresponding to the aforementioned preset second ratio.
[0094] The preset first and second ratios can be two false acceptance rates (FARs) set according to actual needs. The false acceptance rate is the proportion of successfully matched objects that are mistakenly identified as matched objects. For example, in a voice wake-up scenario, the false acceptance rate can be further understood as the false wake-up rate, which is the proportion of times a device is successfully woken up when it shouldn't, relative to the total number of wake-ups. Suppose a user successfully wakes up the voice device N times, but M of these N times the user doesn't utter the wake word; then the false wake-up rate is M / N.
[0095] For example, in a voice wake-up scenario, to avoid misidentifying non-wake words as wake words and causing false wake-ups, the first false wake-up rate and the second false wake-up rate are set to 1 / 10,000 and 1 / 100,000 respectively. Then, from the similarity values sorted from largest to smallest, the similarity value at 1 / 100,000 is taken as the second similarity threshold T2, and the similarity value at 1 / 10,000 is taken as the first similarity threshold T1. Assuming there are 100,000 sorted similarity values, then the first similarity value in the 1 / 100,000 ranking is taken as the second similarity threshold T2, and the tenth similarity value in the 1 / 10,000 ranking is taken as the first similarity threshold T1.
[0096] In this embodiment, through Using the speech information corresponding to words other than template words as the second speech data sample can effectively avoid the misidentification caused by recognizing non-template words as template words in actual applications, thereby greatly improving the success rate of speech devices.
[0097] Similar to the steps for determining the first and second threshold ranges described above, in some embodiments, the step of determining the third threshold range includes:
[0098] Acquire third speech data samples and extract speech features from each third speech data sample; calculate the similarity between the speech features of each third speech data sample to obtain multiple similarity values; sort each similarity value from largest to smallest to determine a third target similarity value with the same proportion as the preset third proportion; divide the third threshold range based on the third target similarity value; wherein, the third speech data samples include speech information of different users in different states for words other than template words.
[0099] This process involves pre-collecting speech information from different users in various states, excluding template words; this collected speech data constitutes the second speech data sample. After obtaining sufficient third speech data samples, feature extraction is performed on each speech data point in the samples to obtain corresponding speech features. Then, the pairwise similarity between each speech feature is calculated, and the calculated similarity values are sorted from largest to smallest. Finally, the similarity value at the third ratio can be used as the lower limit of the third threshold range (e.g., the third similarity threshold T3 in the aforementioned example).
[0100] The principle is similar to the method for determining the first threshold range and the second threshold range, and will not be elaborated here.
[0101] Furthermore, in some embodiments, when comparing the speech features with the second speech feature templates to obtain a second comparison result, the steps may specifically include: comparing the speech features with each of the second speech feature templates in the target speech feature template set to obtain multiple second comparison results. Correspondingly, if any second comparison result satisfies a third matching condition, then speech recognition is determined to be successful. The multiple second speech feature templates in the target speech feature template set are generated based on personalized speech features obtained by dynamically tracking the speech features of the target user in different states.
[0102] That is, there can be multiple second speech feature templates, and each of these templates can correspond to the speech features of the target user in different states. These multiple second speech feature templates can be stored as a set (i.e., the aforementioned target speech feature template set). Thus, when the first comparison result satisfies the first matching condition, the speech features corresponding to the target user's current speech information can be compared with each of the second speech feature templates in the target speech feature template set, resulting in multiple second comparison results. Then, when any second comparison result satisfies the third matching condition, it is considered a match with the template.
[0103] Generally, the more second speech feature templates there are, the lower the possibility of misjudgment during speech recognition, and the higher the final speech recognition accuracy. However, the processing time required also increases accordingly. Therefore, in practice, the number of second speech feature templates can be set according to the actual needs of the scenario, and the target user can be allowed to customize the settings.
[0104] In this embodiment, through By using successfully matched speech features to update the target speech feature template set, the speech features of the target user in different states can be dynamically tracked and recorded, thereby improving the success rate of speech recognition.
[0105] In addition, in some embodiments, after determining that a match is successful, the electronic device can also update the target speech feature template set based on the number of second speech feature templates included in the target speech feature template set, using the successfully matched speech features.
[0106] Specifically, as mentioned above, the voice features of the target user's speech information may change over time. Therefore, after a certain period, the match between the target user's current voice features and the previously stored second voice feature template may decrease, potentially leading to a lower success rate in speech recognition. To address this issue, this embodiment updates the target voice feature template set using the successfully matched voice features after a successful match is confirmed. This allows for dynamic tracking and recording of the target user's voice features under different states, ultimately improving the success rate of speech recognition.
[0107] Furthermore, when updating the target speech feature template set using successfully matched speech features, the electronic device can consider the current number of second speech feature templates in the target speech feature template set. If the number of second speech feature templates is less than a preset value, the speech feature is directly added to the target speech feature template set as a new second speech feature template. If the number of second speech feature templates in the target speech feature template set reaches the preset value, the second speech feature template in the target speech feature template set that is most similar to the target user's current speech feature is replaced with the current speech feature.
[0108] Specifically, when the number of second speech feature templates is less than a preset value, speech features can be directly added to the target speech feature template set to increase the number of second speech feature templates; when the number of second speech feature templates reaches the preset value, that is, when the number of second speech feature templates reaches the set upper limit, the original second speech feature templates need to be replaced.
[0109] The replacement principle in this embodiment is to replace the second voice feature template that is most similar to the target user's current voice features. The principle is as follows: In practice, the second voice feature template that is most similar to the target user's current voice features is likely to be the same as or similar to the target user's current state. For example, when the current voice features are extracted based on the voice information emitted by the target user in a happy state, the second voice feature template that is most similar to it is most likely to correspond to the target user's happy state as well. However, the voice information emitted by the user in a happy state changes to some extent over time. Therefore, the voice features of the target user in the current state will also have some differences from the second voice feature templates of the same state in the target voice feature template set, but the differences are likely to be smaller than those corresponding to the second voice feature templates of other states. Based on this, the above replacement process can be understood as updating the voice feature template corresponding to a specific state, thus realizing the dynamic tracking of the user's voice features in various states.
[0110] In addition, in some embodiments, when the voice information acquired by the electronic device includes voice information for the user to wake up the target device, and the template word in the first voice feature template includes a wake-up word for waking up the target device, the above method may further include: if it is determined that the voice recognition is successful, then wake up the target device; wherein, the woken-up target device is used to recognize and execute the control command corresponding to the acquired voice information.
[0111] In other words, in a voice wake-up scenario, after the target device is woken up based on the user's voice information, the target device can further obtain the voice information subsequently issued by the user, and identify the corresponding control commands from these voice information, such as playing music, and then execute the corresponding control commands to realize the user's voice control of the target device.
[0112] Furthermore, if the first comparison result does not meet the first and second matching conditions, and the second comparison result does not meet the third matching condition, then speech recognition is determined to have failed. If speech recognition is determined to have failed, a voice or other form of prompt can be issued to encourage the user to retry.
[0113] In this embodiment, based on the universal first speech feature template, and based on The system dynamically tracks and records the personalized second voice feature templates of the target user to recognize the current voice. It can better take into account the dynamic changes in voice information caused by factors such as different times, emotions, moods and ages of the user, thereby improving the accuracy of voice recognition. When the voice recognition is successful, the system wakes up the target device, which greatly improves the wake-up success rate of the target device.
[0114] Exemplary application scenarios
[0115] Reference Figure 3 This application also provides an application scenario in which the above-described speech recognition method is applied to improve the speech recognition success rate when the user is in various different states. In this application scenario, the speech recognition method can be used for voice wake-up of smart voice devices.
[0116] like Figure 3 As shown, the speech recognition method is applied in this application scenario as follows:
[0117] Step S401: The intelligent voice device acquires the user's voice information.
[0118] Step S402: Extract features from the acquired speech information to obtain speech features.
[0119] Step S403: Compare the extracted speech features with the first speech feature template to calculate the first similarity sim1.
[0120] The first speech feature template is obtained by extracting features from a large number of template words spoken by users. Furthermore, during the comparison process, the cosine similarity between the speech features and the first speech feature template can be calculated as the first similarity score, sim1.
[0121] Step S404: Determine whether the first similarity sim1 is greater than or equal to the second similarity threshold T2. If yes, proceed to step S411; otherwise, proceed to step S405.
[0122] The second similarity threshold T2 is a pre-set parameter.
[0123] Step S405: Determine whether the first similarity sim1 is greater than or equal to the first similarity threshold T1. If yes, proceed to step S406; otherwise, proceed to step S412.
[0124] The first similarity threshold T1 is also a pre-set parameter, and T1 < T2.
[0125] Step S406: Compare the extracted speech features with the second speech feature template to calculate the second similarity sim2.
[0126] During the comparison process, the cosine similarity between the speech features and the second speech feature template can be calculated as the second similarity sim2. Furthermore, the template library stores N second speech feature templates, where N≥1. When N>1, the extracted speech features are compared sequentially or simultaneously with each of the second speech feature templates to obtain multiple second similarities sim2.
[0127] Step S407: Determine whether the second similarity sim2 is greater than or equal to the third similarity threshold T3. If yes, proceed to steps S408 and S411 respectively; otherwise, proceed to step S412.
[0128] Step S408: Determine whether the number N of the second speech feature templates in the template library is less than the set value n. If yes, proceed to step S406; otherwise, proceed to step S410.
[0129] Step S409: Add the extracted speech features directly to the template library as a new second speech feature template.
[0130] Step S410: Replace the second speech feature template with the one that has the highest similarity to the extracted speech features in the template library with the extracted speech features, and use it as the new second speech feature template.
[0131] Step S411: Confirm that the speech recognition was successful.
[0132] Step S412: Determine that speech recognition has failed.
[0133] To more easily understand the update process of the second speech feature template, refer to Figure 4 Please provide an explanation.
[0134] like Figure 4 As shown, after inputting speech and extracting features, the extracted features are first compared with the base template (that is, the first speech feature template mentioned above, which is called the base template because it has universality) to calculate the cosine similarity score sim1, and it is determined whether the cosine similarity score sim1 is less than ThresholdL (that is, the first similarity threshold T1 mentioned above).
[0135] If the value is less than the input value, it indicates that the two are completely mismatched, so the subsequent processing of the speech will end directly until the next input speech is processed again.
[0136] If it is not less than, then determine whether the number of private templates (that is, the second speech feature template mentioned above, which is obtained by dynamically tracking the target user and is equivalent to being private to the target user, hence it is called a private template) is 0.
[0137] If the number of private templates is 0, then it is determined whether the cosine similarity score sim1 is greater than ThresholdH (that is, the second similarity threshold T2 mentioned above). If sim1 is greater than ThresholdH, then the extracted features are directly added to the private template, that is, the second speech feature template is updated. If sim1 is not greater than ThresholdH, then the extracted features are not added to the private template.
[0138] Furthermore, if the number of private templates is not zero, the extracted features are compared with the private templates to calculate a cosine similarity score sim2, and it is determined whether this cosine similarity score sim2 is greater than Threshold (i.e., the third similarity threshold T3 mentioned above). If it is not greater than Threshold, then the matching is determined to be unsuccessful.
[0139] If the number is greater than N, then check if the number of private templates has reached the upper limit N. If it has not reached the upper limit N, then directly add the extracted features to the private templates. If it has reached the upper limit N, then replace the template feature with the highest cosine similarity to the current feature in the private template features with the current feature.
[0140] The above scheme compares the speech features corresponding to the speech information with different speech feature templates during speech recognition. Successful recognition is considered achieved when a match is found with any given template. Furthermore, the second speech feature template is generated based on successfully recognized speech features from each of the user's previous uses of the smart voice device. Therefore, when comparing the acquired speech features with the second template, the speech characteristics of the user in different states during each use can also be considered. Through these two aspects, the success rate of speech recognition can be effectively improved, the possibility of incorrect speech recognition can be reduced or even eliminated, and the user experience can be enhanced.
[0141] It should be understood that although the steps in the flowcharts above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0142] Exemplary device
[0143] In one embodiment, such as Figure 5 As shown, a speech recognition device 500 is provided, which includes: an acquisition module 501, a first comparison module 502, a second comparison module 503, and a determination module 504; wherein:
[0144] The acquisition module 501 is used to acquire the voice information of the target user and extract the voice features of the voice information;
[0145] The first comparison module 502 is used to compare the speech features with the first speech feature template to obtain the first comparison result;
[0146] The second comparison module 503 is used to compare the speech features with the second speech feature template if the first comparison result meets the first matching condition, and obtain the second comparison result; wherein the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user;
[0147] The determination module 504 is used to determine that speech recognition is successful if the first comparison result meets the second matching condition or the second comparison result meets the third matching condition.
[0148] In one embodiment, when the second comparison module 503 compares the speech features with the second speech feature template to obtain the second comparison result, it is specifically used to: compare the speech features with each of the second speech feature templates in the target speech feature template set to obtain multiple second comparison results; wherein, the multiple second speech feature templates in the target speech feature template set are generated based on personalized speech features obtained by dynamically tracking the speech features of the target user in different states.
[0149] In one embodiment, when the determining module 504 determines that the speech recognition is successful if the first comparison result meets the second matching condition or the second comparison result meets the third matching condition, it is specifically used to: determine that the speech recognition is successful if the first comparison result meets the second matching condition or any one of the second comparison results meets the third matching condition.
[0150] In one embodiment, the determining module 504 is further configured to: after determining that the match is successful, update the target speech feature template set using speech features based on the number of second speech feature templates included in the target speech feature template set; the multiple second speech feature templates included in the target speech feature template set are generated based on personalized speech features obtained by dynamically tracking the speech features of the target user in different states.
[0151] In one embodiment, when the determining module 504 updates the target speech feature template set using speech features based on the number of second speech feature templates included in the target speech feature template set, it is specifically used to: if the number of second speech feature templates in the target speech feature template set is less than a preset value, then directly add the speech feature to the target speech feature template set as a new second speech feature template; if the number of second speech feature templates in the target speech feature template set reaches the preset value, then replace the second speech feature template in the target speech feature template set that is most similar to the speech feature with the speech feature.
[0152] In one embodiment, the step of obtaining the first speech feature template includes: obtaining a first speech data sample and extracting speech features of each first speech data sample; wherein the first speech data sample includes multiple different speech information corresponding to the template word; and performing fusion processing on the speech features of each first speech data sample to obtain the first speech feature template.
[0153] In one embodiment, the first comparison result includes: a first judgment result obtained based on the magnitude of the first similarity between the speech feature and the first speech feature template; the second comparison result includes: a second judgment result obtained based on the magnitude of the second similarity between the speech feature and the second speech feature template; the first matching condition includes the first similarity being within a first threshold range, the second matching condition includes the first similarity being within a second threshold range, and the third matching condition includes the second similarity being within a third threshold range.
[0154] In one embodiment, the step of determining the first threshold range and the second threshold range includes: acquiring second speech data samples and extracting speech features from each second speech data sample; wherein the second speech data samples include speech information from different users for words other than template words; calculating the similarity between the speech features of each second speech data sample to obtain multiple similarity values; sorting each similarity value from largest to smallest, and determining a first target similarity value and a second target similarity value from them with the same proportion as a preset first proportion and second proportion; and dividing the first threshold range and the second threshold range based on the first target similarity value and the second target similarity value.
[0155] In one embodiment, the step of determining the third threshold range includes: acquiring third speech data samples and extracting speech features from each third speech data sample; wherein, the third speech data samples include speech information from different users in different states for words other than template words; calculating the similarity between the speech features of each third speech data sample to obtain multiple similarity values; sorting each similarity value from largest to smallest to determine a third target similarity value with the same proportion as a preset third proportion; and dividing the third threshold range based on the third target similarity value.
[0156] In one embodiment, the voice information includes voice information for the user to wake up the target device; the template words in the first voice feature template include wake-up words for waking up the target device; the determining module 504 is further configured to: if the voice recognition is determined to be successful, then wake up the target device; the woken-up target device is used to recognize and execute the control commands corresponding to the acquired voice information.
[0157] For specific limitations regarding the speech recognition device, please refer to the limitations on the speech recognition method above, which will not be repeated here. Each module in the aforementioned speech recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0158] Exemplary electronic devices
[0159] In one embodiment, an electronic device is provided, which may be a smartphone, tablet, smart home appliance, smart gateway, server, or cloud server, etc. Its internal structure diagram can be as follows: Figure 6 As shown, the electronic device may include a processor, memory, network interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a voice recognition method. The display screen may be an LCD screen or an e-ink screen. The input device may be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.
[0160] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. Specifically, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0161] In one embodiment, an electronic device is provided, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when executed by the processor, the computer program implements the steps of the speech recognition method as described in any embodiment of the "Exemplary Methods" section.
[0162] Exemplary computer program products and computer-readable storage media
[0163] In one embodiment, a computer program product is provided, which includes computer program instructions that, when executed by a processor, cause the processor to perform the steps of the speech recognition methods according to various embodiments of this application as described in the "Exemplary Methods" section above.
[0164] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the device or as a standalone software package.
[0165] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the various steps of the speech recognition method shown in the embodiments of the exemplary method section above.
[0166] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0168] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A speech recognition method, characterized in that, The method includes: Acquire the voice information of the target user and extract the voice features of the voice information; The speech features are compared with the first speech feature template to obtain a first comparison result; wherein, the first speech feature template is a universal speech feature template generated based on the speech features of multiple different users in different states. If the first comparison result satisfies the first matching condition, the speech feature is compared with the second speech feature template to obtain a second comparison result; wherein the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user; the first matching condition includes that the first similarity between the speech feature and the first speech feature template is within a first threshold range, and the first threshold range is a range greater than the first target similarity value and less than the second target similarity value; If the first comparison result meets the second matching condition, or the second comparison result meets the third matching condition, then the speech recognition is determined to be successful; the second matching condition includes that the first similarity between the speech feature and the first speech feature template is within a second threshold range, and the second threshold range is a range greater than the second target similarity value; If the first comparison result indicates that the first similarity between the speech feature and the first speech feature template is less than the first target similarity value, then speech recognition is determined to have failed.
2. The method according to claim 1, characterized in that, The step of comparing the speech features with the second speech feature template to obtain a second comparison result includes: The speech features are compared with each of the second speech feature templates in the target speech feature template set to obtain multiple second comparison results; wherein, the multiple second speech feature templates in the target speech feature template set are generated based on personalized speech features obtained by dynamically tracking the speech features of the target user in different states.
3. The method according to claim 2, characterized in that, The step of determining that speech recognition is successful if the first comparison result meets the second matching condition, or the second comparison result meets the third matching condition, includes: If the first comparison result satisfies the second matching condition, or if any of the second comparison results satisfies the third matching condition, then the speech recognition is determined to be successful.
4. The method according to claim 1, characterized in that, The method further includes: After a successful match is confirmed, the target speech feature template set is updated using the speech features based on the number of second speech feature templates included in the target speech feature template set. The multiple second speech feature templates included in the target speech feature template set are generated based on personalized speech features obtained by dynamically tracking the speech features of the target user in different states.
5. The method according to claim 4, characterized in that, The process of updating the target speech feature template set based on the number of second speech feature templates included in the target speech feature template set, and using the speech features to update the target speech feature template set, includes: If the number of second speech feature templates in the target speech feature template set is less than a preset value, then the speech feature is directly added to the target speech feature template set as a new second speech feature template. If the number of second speech feature templates in the target speech feature template set reaches a preset value, then the second speech feature template in the target speech feature template set that is most similar to the speech feature is replaced with the speech feature.
6. The method according to claim 1, characterized in that, The steps for obtaining the first speech feature template include: Acquire a first speech data sample and extract speech features from each of the first speech data samples; wherein, the first speech data sample includes multiple different speech information corresponding to the template word; The speech features of each of the first speech data samples are fused to obtain the first speech feature template.
7. The method according to claim 1, characterized in that, The first comparison result includes: a first judgment result obtained based on the magnitude of the first similarity between the speech feature and the first speech feature template; the second comparison result includes: a second judgment result obtained based on the magnitude of the second similarity between the speech feature and the second speech feature template. The third matching condition includes the second similarity being within the third threshold range.
8. The method according to claim 1, characterized in that, The steps for determining the first threshold range and the second threshold range include: Acquire a second speech data sample and extract speech features from each of the second speech data samples; wherein, the second speech data sample includes speech information from different users for words other than template words; Calculate the similarity between the speech features of each of the second speech data samples to obtain multiple similarity values; The similarity values are sorted from largest to smallest, and the first target similarity value and the second target similarity value with the same ratio as the preset first ratio and second ratio are determined respectively. Based on the first target similarity value and the second target similarity value, the first threshold range and the second threshold range are divided.
9. The method according to claim 7, characterized in that, The steps for determining the third threshold range include: Acquire third speech data samples and extract speech features from each of the third speech data samples; wherein, the third speech data samples include speech information of different users in different states for words other than template words; Calculate the similarity between the speech features of each of the third speech data samples to obtain multiple similarity values; The similarity values are sorted from largest to smallest to determine the third target similarity value whose ratio is the same as the preset third ratio; The third threshold range is defined based on the third target similarity value.
10. The method according to any one of claims 1 to 9, characterized in that, The voice information includes voice information used by a user to wake up the target device; the template words in the first voice feature template include wake-up words used to wake up the target device; the method further includes: If the speech recognition is successful, the target device is woken up; the woken-up target device is used to recognize and execute the control commands corresponding to the acquired speech information.
11. A voice recognition device, characterized in that, The device includes: The acquisition module is used to acquire the voice information of the target user and extract the voice features of the voice information; The first comparison module is used to compare the speech features with the first speech feature template to obtain a first comparison result; wherein, the first speech feature template is a universal speech feature template generated based on the speech features of multiple different users in different states. The second comparison module is used to compare the speech feature with the second speech feature template to obtain a second comparison result if the first comparison result satisfies the first matching condition; wherein the second speech feature template and the first speech feature template correspond to the same template word, and the second speech feature template is generated based on personalized speech features obtained by dynamically tracking the speech features of the target user; the first matching condition includes that the first similarity between the speech feature and the first speech feature template is within a first threshold range, and the first threshold range is a range greater than the first target similarity value and less than the second target similarity value; The determination module is used to determine that speech recognition is successful if the first comparison result meets the second matching condition or the second comparison result meets the third matching condition; the second matching condition includes that the first similarity between the speech feature and the first speech feature template is within a second threshold range, and the second threshold range is a range greater than the second target similarity value; If the first comparison result indicates that the first similarity between the speech feature and the first speech feature template is less than the first target similarity value, then speech recognition is determined to have failed.
12. An electronic device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when executed by the processor, the computer program implements the steps of the speech recognition method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the speech recognition method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Voice recognition method and voice recognition device
CN108899030A
Personalized lexicon updating method and device, equipment and storage medium
CN111354342A
Speech recognition method, device, electronic equipment, system and medium
CN114694653A