A speech recognition method, device and terminal equipment

By optimizing the speech recognition model and training it with easily confused corpora, the problem of the CTC algorithm's difficulty in distinguishing similar words in speech recognition was solved, thus improving the accuracy and reliability of speech recognition and enhancing the human-computer interaction experience.

CN121838738BActive Publication Date: 2026-07-31SHENZHEN HAIBEN ELECTRONIC TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HAIBEN ELECTRONIC TECH CO LTD
Filing Date
2025-12-05
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing CTC algorithms have difficulty distinguishing similar words in speech recognition, resulting in low recognition accuracy and affecting the human-computer interaction experience.

Method used

By optimizing the speech recognition model and training it with easily confused corpora, the model's ability to distinguish easily confused words is enhanced, the inference time of embedded devices is reduced, and the generalization ability of the speech recognition model is improved.

Benefits of technology

It significantly reduces the number of misidentifications, improves the real-time performance and accuracy of speech recognition, and enhances the reliability of command word recognition in human-computer interaction scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121838738B_ABST
    Figure CN121838738B_ABST
Patent Text Reader

Abstract

This application provides a speech recognition method, apparatus, and terminal device, applicable to the field of data processing technology. The method includes: calculating multiple edit distance information of multiple corpora to be recognized based on multiple corpora to be recognized; generating multiple easily confused corpora to be recognized based on the multiple corpora to be recognized, the multiple edit distance information of the multiple corpora to be recognized, and a preset edit distance threshold for the corpora to be recognized; and generating a target speech recognition model based on the multiple easily confused corpora to be recognized and an initial speech recognition model. This application effectively enhances the distinguishability of easily confused words in speech recognition, thereby improving the accuracy and effectiveness of mixed word recognition in speech recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, and in particular relates to speech recognition methods, devices and terminal equipment. Background Technology

[0002] Currently, speech recognition technology is widely used in voice controls of smart devices. Typically, it is used when a user inputs a command word into a smart device via voice, and the smart device responds with an action after receiving the command word.

[0003] Existing CTC algorithms have advantages such as not requiring alignment for sequence tasks, speed, and low memory consumption, and are widely used in embedded devices in voice controls for smart devices.

[0004] However, existing CTC algorithms often suffer from mixed recognition, meaning they struggle to accurately identify easily confused words, resulting in low speech recognition accuracy and negatively impacting the human-computer interaction experience. Summary of the Invention

[0005] In view of this, embodiments of this application provide a speech recognition method, apparatus, and terminal device, aiming to solve the problem in the prior art that it is difficult to distinguish similar speech words, resulting in low accuracy and effectiveness of speech recognition.

[0006] The first aspect of this application provides a speech recognition method, including:

[0007] Obtain the speech information to be recognized;

[0008] Based on the speech information to be recognized and the target speech recognition model, speech recognition information is obtained.

[0009] A second aspect of this application provides a voice recognition device, including:

[0010] The speech information acquisition module is used to acquire the speech information to be recognized;

[0011] The speech recognition information generation module is used to obtain speech recognition information based on the speech information to be recognized and the target speech recognition model.

[0012] A third aspect of this application provides a terminal device, the terminal device including a memory and a processor, the memory storing a computer program executable on the processor, the processor executing the computer program to implement the steps of the speech recognition method as described in the first aspect above.

[0013] A fourth aspect of this application provides a computer-readable storage medium, comprising: storing a computer program, wherein when executed by a processor, the computer program implements the steps of the speech recognition method described in the first aspect above.

[0014] The beneficial effects of this application embodiment compared with the prior art are as follows: This application optimizes the speech recognition model by using easily confused corpora, reduces the inference time of embedded devices in the speech recognition process, and improves the generalization ability of the speech recognition model. Furthermore, by enhancing the distinguishability of easily confused words in speech recognition, it significantly reduces the number of mixed recognitions, thereby improving the real-time performance and accuracy of command word recognition in human-computer interaction scenarios, and thus improving the timeliness and reliability of speech recognition. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram illustrating the implementation process of the speech recognition method provided in Embodiment 1 of this application;

[0017] Figure 2 This is a schematic diagram illustrating the implementation process of the target speech recognition model generation steps provided in Embodiment 1 of this application;

[0018] Figure 3 This is a schematic diagram illustrating the implementation process of the speech recognition method provided in Embodiment 2 of this application;

[0019] Figure 4 This is a schematic diagram illustrating the implementation process of the speech recognition method provided in Embodiment 3 of this application;

[0020] Figure 5 This is a schematic diagram illustrating the implementation process of the speech recognition method provided in Embodiment 4 of this application;

[0021] Figure 6 This is a schematic diagram illustrating the implementation process of the speech recognition method provided in Embodiment 5 of this application;

[0022] Figure 7 This is a schematic diagram illustrating the implementation process of the speech recognition method provided in Embodiment Six of this application;

[0023] Figure 8 This is a schematic diagram illustrating the implementation process of the speech recognition method provided in Embodiment 7 of this application;

[0024] Figure 9This is a schematic diagram of the structure of the speech recognition device provided in the embodiments of this application;

[0025] Figure 10 This is a schematic diagram of the terminal device provided in the embodiments of this application. Detailed Implementation

[0026] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0027] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0028] Figure 1 A flowchart illustrating the implementation of the speech recognition method provided in Embodiment 1 of this application is shown, and is described in detail below:

[0029] Step S101: Obtain the speech information to be recognized.

[0030] In this embodiment, the voice information to be recognized can be voice information containing command words issued by the user in voice interaction scenarios such as smart homes and smart terminals to achieve specific control needs, which can be received by the audio acquisition hardware on the embedded device or the smart terminal.

[0031] Step S102: Obtain speech recognition information based on the speech information to be recognized and the target speech recognition model.

[0032] In this embodiment, the target speech recognition model can be manually defined, and can be a trained CNN model, RNN model, TDNN model, DFSMN model, Conformer model, Zipforme model, etc., or a model constructed based on operators such as CNN, FC, and RNN. The speech information to be recognized can be used as input information to the target speech recognition model, and after inference calculation by the target speech recognition model, speech recognition information is output. It is understood that the speech recognition information can be control commands used to instruct the embedded device to perform corresponding action responses.

[0033] Figure 2 The flowchart illustrating the implementation steps of the target speech recognition model generation step provided in Embodiment 1 of this application is shown below in detail:

[0034] Step S1101: Obtain multiple sets of textual information to be identified.

[0035] In this embodiment, the corpus information to be identified can refer to the basic corpus information used to train the initial speech recognition model to generate the target speech recognition model. This can be speech corpus from general scenarios, or open-source real-world speech datasets, such as aishell, weetspeech, and kespeech. Understandably, since collecting real-world corpus is time-consuming and costly, the corpus information to be identified can also be corpus information generated using TTS technology based on a predefined list of fixed command words by technical personnel.

[0036] Step S1102: Calculate the edit distance information of the multiple corpora to be identified based on the multiple corpora to be identified.

[0037] In this embodiment, the command words in each piece of corpus information to be identified can first be converted into token sequences. For Chinese command words, they can be converted into pinyin sequences containing initials and finals; for English command words, they can be converted into corresponding character or sub-word sequences. Then, pairwise combinations of token sequences can be selected from the token sequences corresponding to each piece of corpus information to be identified, and the edit distance can be calculated. The calculation result is used as the edit distance information of the corpus to be identified. For example, when the corpus information to be identified is Chinese, the edit distance of the sequences after conversion to initials and finals can be calculated as the edit distance information of the corpus to be identified.

[0038] Step S1103: Generate multiple easily confused corpus information to be identified based on the multiple corpus information to be identified, the multiple corpus edit distance information to be identified, and the preset corpus edit distance threshold.

[0039] In this embodiment, the preset edit distance threshold for the corpus to be identified can be set manually. It can be achieved by comparing the calculated edit distance information of the corpus to be identified with the preset edit distance threshold. When the edit distance information of the corpus to be identified is greater than the preset edit distance threshold, the multiple command words contained in the corpus information corresponding to the edit distance information are determined to be easily confused corpus information to be identified. For example, if the corpus contains the command words "twenty-seven degrees" and "twenty-one degrees", and the edit distance between "twenty-seven degrees" and "twenty-one degrees" is greater than the preset edit distance threshold of the corpus to be identified, then "twenty-seven degrees" and "twenty-one degrees" will be determined as easily confused words, and "twenty-seven degrees" and "twenty-one degrees" will be treated as easily confused corpus information to be identified; for example, if the corpus contains the command words "previous song" and "next song", and the edit distance between "previous song" and "next song" is greater than the preset edit distance threshold of the corpus to be identified, then "previous song" and "next song" will be determined as easily confused words, and "previous song" and "next song" will be treated as easily confused corpus information to be identified.

[0040] Step S1104: Generate a target speech recognition model based on the multiple easily confused corpus information to be identified and the initial speech recognition model.

[0041] In this embodiment, the initial speech recognition model can be manually set, and can be an untrained CNN model, RNN model, TDNN model, DFSMN model, Conformer model, Zipforme model, etc., or it can be a model constructed based on operators such as CNN, FC, and RNN. Multiple easily confused corpora to be recognized can be used as training data for the initial speech recognition model. The number of easily confused corpora to be recognized can be around 2000. After training the initial speech recognition model, when the loss function of the validation set no longer decreases or the word error rate (WER) no longer decreases, it indicates that the model training is complete. The trained model is then used as the target speech recognition model for voice interaction applications that rely on wake words and command word recognition, such as smart homes and smart terminals.

[0042] The speech recognition method provided in this application optimizes the speech recognition model through easily confused corpora, reduces the inference time of embedded devices in the speech recognition process, and improves the generalization ability of the speech recognition model. Furthermore, by enhancing the distinguishability of easily confused words in speech recognition, it significantly reduces the number of confused recognitions, thereby improving the real-time performance and accuracy of command word recognition in human-computer interaction scenarios, and thus improving the timeliness and reliability of speech recognition.

[0043] Figure 3 The flowchart illustrating the implementation of the speech recognition method provided in Embodiment 2 of this application is shown. The difference between this method and Embodiment 1 is that step S1103 specifically includes:

[0044] Step S201: Determine whether the edit distance information of the corpus to be identified is less than the preset edit distance threshold of the corpus to be identified; if yes, proceed to step S202; if no, proceed to step S203.

[0045] In this embodiment, the preset edit distance threshold of the corpus to be identified can be set manually and can be used to compare the size with the edit distance information of the corpus to be identified, so as to ensure that the subsequently generated corpus information of easily confused words is consistent with the scenarios in actual voice interaction that are prone to confusion, thereby improving the model training effect and enabling the trained model to accurately identify easily confused words in voice commands.

[0046] Step S202: The multiple pieces of corpus information corresponding to the edit distance information of the corpus to be identified are taken as multiple pieces of easily confused corpus information to be identified.

[0047] In this embodiment, when the edit distance information of the corpus to be identified is less than the preset edit distance threshold of the corpus to be identified, it indicates that the difference between the token sequences of the multiple corpus information to be identified corresponding to the edit distance information of the corpus to be identified is small, which meets the characteristics of easily confused corpus. The corpus information to be identified can be identified as easily confused corpus information to be identified, so as to serve as the corpus information for targeted training of the speech recognition model.

[0048] Step S203: The corpus information corresponding to the edit distance information of the corpus to be identified is used as candidate easily confused corpus information.

[0049] In this embodiment, when the edit distance information of the corpus to be identified is not less than the preset edit distance threshold of the corpus to be identified, it means that although the corpus information corresponding to the edit distance information of the corpus to be identified does not directly meet the screening conditions for easily confused words, there is still a possibility of potential easily confused words. Therefore, the corpus information to be identified can be used as candidate easily confused corpus information to serve as a data reserve for mining easily confused corpus and avoid missing possible easily confused scenario information.

[0050] Step S204: Extract the minimum value of the multiple edit distance information of the candidate easily confused corpus information to obtain the maximum and minimum edit distance information of the corpus to be identified.

[0051] In this embodiment, it can be understood that candidate easily confused corpus information can correspond to one or more edit distance information of corpus to be identified. The edit distance information of corpus to be identified can quantify the similarity between different candidate easily confused corpus information. By extracting the minimum value of multiple edit distance information of corpus to be identified, the corpus word with the highest similarity to each candidate easily confused corpus information can be accurately located. Then, the edit distance information of the corpus to be identified corresponding to the combination of the corpus words with the highest similarity is taken as the maximum value information of the edit distance of the corpus to be identified.

[0052] Step S205: Based on the maximum and minimum distance information of the corpus to be identified, multiple pieces of corpus information corresponding to the corpus to be identified are used as multiple pieces of easily confused corpus information to be identified.

[0053] In this embodiment, the minimum edit distance information of the corpus to be identified represents the word combination with the smallest similarity difference among the candidate easily confused corpus information, that is, the command word combination that is most likely to be confused in actual application scenarios. Therefore, the corpus information corresponding to the minimum edit distance information of the corpus to be identified can be used as multiple easily confused corpus information to be identified, which can be used to improve the training effect of the speech recognition model.

[0054] The speech recognition method provided in this application accurately identifies easily confused words in a large amount of corpus information and deeply mines potential easily confused information in candidate corpus information, ensuring the accuracy and comprehensiveness of the generated multiple easily confused corpus information to be identified, thereby effectively improving the ability of the target speech recognition model to distinguish easily confused command words, and can meet the speech recognition needs of different voice interaction scenarios while improving the user's interactive experience.

[0055] Figure 4 The flowchart illustrating the implementation of the speech recognition method provided in Embodiment 3 of this application is shown. The difference between this method and Embodiment 1 is that step S1104 specifically includes:

[0056] Step S301: Based on the preset probability range for selecting easily confused words in speech recognition, randomly generate probability information for selecting easily confused words in speech recognition.

[0057] In this embodiment, the preset probability range for selecting easily confused word paths in speech recognition can be set manually, and can be set between 0 and 1. This can be achieved by generating random numbers between 0 and 1 to randomly select easily confused word paths in speech recognition, thereby improving the generalization ability of the initial speech recognition model.

[0058] Step S302: Determine that the probability information of the path selection of easily confused words in speech recognition is greater than the preset threshold of the probability information of the path selection of easily confused words in speech recognition; if yes, proceed to step S303; if no, proceed to step S304.

[0059] In this embodiment, the preset threshold for the probability information of easily confused speech recognition paths can be set manually. It can be achieved by comparing the probability information of easily confused speech recognition paths with the preset threshold for the probability information of easily confused speech recognition paths, thereby clarifying the selection method of easily confused speech recognition paths and improving the diversity and relevance of easily confused speech recognition paths.

[0060] Step S303: Based on the preset information on the number of easily confused speech recognition paths, randomly select from the multiple easily confused speech data to be identified, and generate multiple easily confused speech recognition path information.

[0061] In this embodiment, the preset number of easily confused speech recognition paths can be manually set, and can be 3 or 5. When the probability of selecting easily confused speech recognition paths is greater than the preset threshold, a combination of speech data can be randomly selected from multiple easily confused speech data to be identified, and each selected combination of speech data can be assigned as a path for easily confused speech recognition.

[0062] Step S304: Based on the preset information on the number of easily confused speech recognition paths, the editing distance information of multiple corpora to be recognized, the information on multiple easily confused corpora to be recognized, and the preset distance threshold for selecting easily confused speech recognition paths, generate multiple easily confused speech recognition path information.

[0063] In this embodiment, the preset threshold for selecting easily confused word paths in speech recognition can be set manually. When the probability information for selecting easily confused word paths in speech recognition is less than or equal to the preset threshold, multiple pieces of easily confused corpus information to be identified can be filtered out whose edit distance to each piece of easily confused corpus information to be identified is less than the preset threshold. Then, a combination of corpus information whose number equals the number of easily confused word paths in speech recognition can be selected from the multiple pieces of easily confused corpus information to be identified as the easily confused word path information in speech recognition.

[0064] Step S305: Generate a target speech recognition model based on the multiple easily confused word path information and the initial speech recognition model.

[0065] In this embodiment, the initial speech recognition model can be manually set. The initial speech recognition model can be used to calculate the objective function for multiple easily confused word path information to train the initial speech recognition model. This is used to simultaneously optimize the basic recognition objective and the easily confused path discrimination objective during training. When the loss function on the validation set no longer decreases or the word error rate (wer) no longer decreases, it indicates that the speech recognition model has fully learned the easily confused word discrimination features, and training can then be stopped to obtain the target speech recognition model.

[0066] The speech recognition method provided in this application improves the diversity and comprehensiveness of training data, provides comprehensive training support for easily confused initial speech recognition models, thereby meeting the needs of different smart home, smart terminal and other voice interaction scenarios, significantly improving the accuracy of distinguishing easily confused command words, reducing the number of confused recognitions, and improving the reliability of speech recognition and user experience in human-computer interaction.

[0067] Figure 5 The flowchart illustrating the implementation of the speech recognition method provided in Embodiment 4 of this application is shown. The difference between this method and Embodiment 3 above is that step S304 specifically includes:

[0068] Step S401: Determine whether the edit distance information of the corpus to be identified is less than or equal to the preset speech recognition path selection distance threshold; if yes, proceed to step S402; if no, randomly select multiple corpus information to be identified as multiple corpus information to be selected.

[0069] In this embodiment, the preset distance threshold for selecting easily confused words in speech recognition can be set manually. It can be achieved by comparing the edit distance information of the corpus to be recognized with the distance threshold for selecting easily confused words in speech recognition to filter out easily confused corpora with high similarity.

[0070] Step S402: The multiple easily confused corpus information corresponding to the edit distance information of the corpus to be identified are taken as multiple easily confused corpus information to be selected.

[0071] In this embodiment, when the edit distance information of the corpus to be identified is less than or equal to the preset distance threshold for selecting easily confused word paths in speech recognition, it indicates that the token sequences of multiple easily confused corpus information to be identified corresponding to the edit distance information of the corpus to be identified have small differences and high similarity, which meets the requirements for constructing easily confused word paths. Therefore, the easily confused corpus information to be identified can be determined as multiple easily confused corpus information to be selected.

[0072] Step S403: Based on the preset information on the number of easily confused speech recognition paths, select and process the multiple easily confused speech data to generate multiple easily confused speech recognition path information.

[0073] In this embodiment, the preset number of easily confused speech recognition paths can be manually set. It can be achieved by randomly selecting from multiple candidate easily confused speech corpora based on the preset number of easily confused speech recognition paths, and using the selected candidate easily confused speech corpora as the speech recognition easily confused path information, ensuring that the final number of multiple speech recognition easily confused path information is equal to the numerical value of the speech recognition easily confused path information.

[0074] The speech recognition method provided in this application enables accurate screening of highly similar and easily confused corpora, generates highly targeted speech recognition path information for easily confused words, thereby adapting to the easily confused word recognition needs of different smart home and smart terminal scenarios, providing more comprehensive easily confused training data for the initial speech recognition model, improving the discrimination accuracy of the target speech recognition model for easily confused command words, reducing the number of confused recognitions, and effectively optimizing the human-computer interaction experience.

[0075] Figure 6 The flowchart illustrating the implementation of the speech recognition method provided in Embodiment 5 of this application is shown. The difference between this method and Embodiment 3 above is that step S305 specifically includes:

[0076] Step S501: Calculate the initial score information of the easily confused word paths in speech recognition based on the multiple speech recognition path information and the initial speech recognition model.

[0077] In this embodiment, the initial speech recognition model can be manually set and can be constructed based on operators such as CNN, FC, and RNN, or can adopt models such as TDNN and DFSMN. The initial speech recognition model can be used to perform inference calculations on multiple easily confused word path information. The initial speech recognition model can output the logits corresponding to each path, and the probability sum of each path can be calculated using the CTC forward and backward algorithm. This probability sum is the initial score information for easily confused word paths, i.e., the confidence level of the initial speech recognition model for each easily confused word path information.

[0078] Step S502: Based on the multiple easily confused word path information in speech recognition and the initial speech recognition model, calculate the similarity information of easily confused word paths in speech recognition.

[0079] In this embodiment, based on the logits corresponding to each easily confused word path information output by the initial speech recognition model, the cosine similarity or Euclidean distance of logits between different paths can be calculated, and the calculation result can be used as the path similarity information of easily confused words in speech recognition.

[0080] Step S503: Based on the initial score information of the easily confused word path in speech recognition, the similarity information of the easily confused word path in speech recognition, and the preset easily confused word path similarity differentiation enhancement variable, the target score information of the easily confused word path in speech recognition is obtained.

[0081] In this embodiment, the preset easily confused word path similarity differentiation enhancement variable can be manually set, and can take a value of 2.5 or other values ​​greater than 1. This is used to avoid the target path score being too high, causing the similarity score of similar paths to differ too much from the target path's similarity score, thus failing to differentiate the paths. The target score information for the easily confused word path can be obtained by dividing the logits corresponding to the initial score information of the easily confused word path in speech recognition by the preset easily confused word path similarity differentiation enhancement variable, and then dividing the result of this division by the similarity information of the easily confused word path in speech recognition.

[0082] Step S504: Generate a target speech recognition model based on the target score information of the easily confused word path in speech recognition and the initial speech recognition model.

[0083] In this embodiment, the training objective can be to maximize the target score information of easily confused words in speech recognition. An initial speech recognition model can be trained using corpus containing multiple easily confused word path information. When the loss function of the validation set no longer decreases or the word error rate wer no longer decreases, it indicates that the speech recognition model has fully learned the easily confused word discrimination rules, and then training is stopped. The model that has stopped training is used as the target speech recognition model.

[0084] The speech recognition method provided in this application provides more accurate training guidance for the initial speech recognition model, so that the generated target speech recognition model retains the advantage of fast reasoning while significantly improving the ability to distinguish easily confused words, reducing the number of mixed recognitions in scenarios such as smart homes and smart terminals, thereby ensuring the reliability of voice interaction and user experience.

[0085] Figure 7 The flowchart illustrating the implementation of the speech recognition method provided in Embodiment Six of this application is shown. The difference between this method and Embodiment Five is that step S503 specifically includes:

[0086] Step S601: Perform division calculation based on the speech recognition path similarity information and the preset path similarity differentiation enhancement variable to obtain speech recognition path differentiation enhancement information.

[0087] In this embodiment, the preset variable for distinguishing and enhancing the similarity of easily confused word paths can be manually set and can have a value of 2.5. It can be achieved by dividing the speech recognition path similarity information of easily confused words by the preset variable for distinguishing and enhancing the similarity of easily confused word paths, and using the division result as the speech recognition path similarity distinguishing and enhancing information.

[0088] Step S602: Perform division calculation based on the initial score information of the easily confused word path in speech recognition and the differentiation enhancement information of the easily confused word path in speech recognition to obtain the target score information of the easily confused word path in speech recognition.

[0089] In this embodiment, the initial score information of the easily confused word path in speech recognition can be divided by the easily confused word path differentiation enhancement information in speech recognition, and the result of the division can be used as the target score information of the easily confused word path in speech recognition.

[0090] The speech recognition method provided in this application suppresses the scores of similar paths during model training, ensuring the distinguishability between the target path and similar paths. This improves the recognition accuracy of easily confused words in different smart home and smart terminal scenarios, thereby enhancing the speech recognition capability of the target speech recognition model, reducing the number of mixed recognitions, and improving the effectiveness and reliability of voice interaction.

[0091] Figure 8 The flowchart illustrating the implementation of the speech recognition method provided in Embodiment Seven of this application is shown. The difference between this method and Embodiment Five is that step S504 specifically includes:

[0092] Step S701: Based on the target score information of the easily confused words in speech recognition and the initial speech recognition model, calculate the speech recognition loss value information and the speech recognition error rate information.

[0093] In this embodiment, the target score information of easily confused words in speech recognition can be combined with the CTC basic objective function to form a multi-task loss function. This multi-task loss function quantifies the effect of each iteration of training the initial speech recognition model. The calculated function value can be used as the speech recognition loss value information, which can be denoted as loss. The easily confused words to be recognized in the validation set can be input into the initial speech recognition model, and the percentage of times the initial speech recognition model misidentifies the target easily confused word as a similar easily confused word can be counted. The calculated percentage of times is used as the speech recognition error rate information, which can be denoted as wer.

[0094] Step S702: Generate a target speech recognition model based on the initial speech recognition model, speech recognition loss value information, and speech recognition error rate information.

[0095] In this embodiment, when the speech recognition loss value information loss no longer decreases or the speech recognition error rate information wer no longer decreases, it indicates that the initial speech recognition model has fully learned the rules for distinguishing easily confused words, so training is stopped, and the model that has stopped training is used as the target speech recognition model.

[0096] The speech recognition method provided in this application is adapted to the needs of different speech interaction scenarios, so as to improve the reasoning ability of the target speech recognition model in embedded devices, reduce the number of times of mixed recognition for easily confused words, and thus improve the user experience and speech recognition reliability in human-computer interaction scenarios such as smart homes and smart terminals.

[0097] Corresponding to the method in the above embodiments, Figure 9 A structural block diagram of a speech recognition device provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown. Figure 9 The example speech recognition device may be the execution subject of the speech recognition method provided in the aforementioned embodiment one.

[0098] Reference Figure 9 The voice recognition device includes:

[0099] The speech information acquisition module 810 is used to acquire speech information to be recognized.

[0100] The speech recognition information generation module 820 is used to obtain speech recognition information based on the speech information to be recognized and the target speech recognition model.

[0101] For details on how each module in the speech recognition device provided in this application implements its respective function, please refer to the foregoing. Figure 1 The description of Embodiment 1 shown will not be repeated here.

[0102] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0103] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0104] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0105] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0106] The speech recognition method provided in this application can be applied to terminal devices such as mobile phones, tablets, wearable devices, in-vehicle devices, laptops, super mobile personal computers, and netbooks. This application does not impose any restrictions on the specific type of terminal device.

[0107] For example, the terminal device may be a station in a WLAN, a cellular phone, a cordless phone, a personal digital processing device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a set-top box, a user premises equipment, and / or other devices for communication over a wireless system, as well as next-generation communication systems, such as mobile terminals in 5G networks or mobile terminals in future evolved public terrestrial mobile networks, etc.

[0108] Figure 10 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. For example... Figure 10As shown, the terminal device 9 of this embodiment includes: at least one processor 90 ( Figure 10 Only one is shown in the image), and a memory 91 stores a computer program 92 that can run on the processor 90. When the processor 90 executes the computer program 92, it implements the steps in the various speech recognition method embodiments described above, for example... Figure 1 Steps S101 to S102 are shown. Alternatively, when the processor 90 executes the computer program 92, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 9 The functions of modules 810 to 820 are shown.

[0109] The terminal device 9 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will understand that... Figure 10 This is merely an example of terminal device 9 and does not constitute a limitation on terminal device 9. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may also include input transmission devices, network access devices, buses, etc.

[0110] The processor 90 may be a central processing unit, or it may be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0111] In some embodiments, the memory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., equipped on the terminal device 9. Furthermore, the memory 91 may include both internal and external storage units of the terminal device 9. The memory 91 is used to store operating systems, applications, bootloaders, data, and other programs, such as the program code of computer programs. The memory 91 can also be used to temporarily store data that has been sent or will be sent.

[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0113] This application also provides a terminal device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, it causes the terminal device to implement the steps in any of the above method embodiments.

[0114] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0115] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0116] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0117] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0118] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0119] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0120] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A speech recognition method, characterized in that, include: Obtain the speech information to be recognized; Based on the speech information to be recognized and the target speech recognition model, speech recognition information is obtained; The target speech recognition model is obtained through the following steps: Obtain information from multiple corpora to be identified; Based on the multiple corpus information to be identified, calculate the edit distance information of the multiple corpus information to be identified; Based on the multiple corpus information to be identified, the multiple corpus edit distance information to be identified, and the preset corpus edit distance threshold, multiple easily confused corpus information to be identified is generated; Based on the preset probability range for selecting easily confused words in speech recognition, the probability information for selecting easily confused words in speech recognition is randomly generated. The probability information of the path selection of easily confused words in speech recognition is determined to be greater than the preset threshold for the probability information of the path selection of easily confused words in speech recognition. If so, then based on the preset information on the number of easily confused speech recognition paths, the multiple easily confused speech corpus information to be identified are randomly selected to generate multiple easily confused speech recognition path information. If not, then based on the preset information on the number of easily confused speech recognition paths, the editing distance information of multiple corpora to be recognized, the information on multiple easily confused corpora to be recognized, and the preset distance threshold for selecting easily confused speech recognition paths, multiple easily confused speech recognition path information are generated to generate multiple easily confused speech recognition path information. Based on the multiple easily confused word path information in speech recognition and the initial speech recognition model, the initial score information of the easily confused word path in speech recognition is calculated; Based on the multiple easily confused word path information in speech recognition and the initial speech recognition model, the similarity information of easily confused word paths in speech recognition is calculated. Based on the initial score information of the easily confused word path in speech recognition, the similarity information of the easily confused word path in speech recognition, and the preset easily confused word path similarity differentiation enhancement variable, the target score information of the easily confused word path in speech recognition is obtained. Based on the target score information of the easily confused word path in speech recognition and the initial speech recognition model, a target speech recognition model is generated.

2. The speech recognition method as described in claim 1, characterized in that, The step of generating multiple easily confused corpus information based on the multiple corpus information to be identified, the multiple corpus edit distance information to be identified, and a preset corpus edit distance threshold specifically includes: Determine whether the edit distance information of the corpus to be identified is less than a preset edit distance threshold for the corpus to be identified; If so, then the multiple pieces of corpus information corresponding to the edit distance information of the corpus to be identified are taken as multiple pieces of easily confused corpus information to be identified; If not, the corpus information corresponding to the edit distance information of the corpus to be identified will be used as candidate easily confused corpus information; Extract the minimum value of multiple edit distance information of the candidate easily confused corpus information to obtain the maximum and minimum edit distance information of the corpus to be identified; Multiple pieces of corpus information corresponding to the minimum and maximum distance information of the corpus to be identified are used as multiple pieces of easily confused corpus information to be identified.

3. The speech recognition method as described in claim 1, characterized in that, The step of generating multiple speech recognition easily confused word path information based on the preset speech recognition easily confused word path quantity information, multiple corpus editing distance information, multiple corpus information of easily confused words to be recognized, and the preset speech recognition easily confused word path selection distance threshold specifically includes: When the edit distance information of the corpus to be identified is less than or equal to the preset path selection distance threshold for easily confused words in speech recognition, the multiple easily confused corpus information corresponding to the edit distance information of the corpus to be identified is taken as multiple easily confused corpus information to be selected. Based on the preset information on the number of easily confused speech recognition paths, the multiple sets of easily confused speech data are selected and processed to generate multiple sets of easily confused speech recognition path information.

4. The speech recognition method as described in claim 1, characterized in that, The step of obtaining the target score information of the easily confused word path based on the initial score information of the easily confused word path, the similarity information of the easily confused word path, and the preset easily confused word path similarity differentiation enhancement variable specifically includes: Based on the speech recognition path similarity information and the preset path similarity differentiation enhancement variable, a division calculation is performed to obtain the speech recognition path differentiation enhancement information. The target score information for the easily confused word path in speech recognition is obtained by performing a division calculation based on the initial score information of the easily confused word path in speech recognition and the differentiation enhancement information of the easily confused word path in speech recognition.

5. The speech recognition method as described in claim 1, characterized in that, The step of generating a target speech recognition model based on the target score information of the easily confused word path and the initial speech recognition model specifically includes: Based on the target score information of the easily confused words in speech recognition and the initial speech recognition model, the speech recognition loss value information and speech recognition error rate information are calculated. Based on the initial speech recognition model, speech recognition loss value information, and speech recognition error rate information, a target speech recognition model is generated.

6. A voice recognition device, characterized in that, include: The speech information acquisition module is used to acquire the speech information to be recognized; The speech recognition information generation module is used to obtain speech recognition information based on the speech information to be recognized and the target speech recognition model; The target speech recognition model is obtained through the following steps: Obtain information from multiple corpora to be identified; Based on the multiple corpus information to be identified, calculate the edit distance information of the multiple corpus information to be identified; Based on the multiple corpus information to be identified, the multiple corpus edit distance information to be identified, and the preset corpus edit distance threshold, multiple easily confused corpus information to be identified is generated; Based on the preset probability range for selecting easily confused words in speech recognition, the probability information for selecting easily confused words in speech recognition is randomly generated. The probability information of the path selection of easily confused words in speech recognition is determined to be greater than the preset threshold for the probability information of the path selection of easily confused words in speech recognition. If so, then based on the preset information on the number of easily confused speech recognition paths, the multiple easily confused speech corpus information to be identified are randomly selected to generate multiple easily confused speech recognition path information. If not, then based on the preset information on the number of easily confused speech recognition paths, the editing distance information of multiple corpora to be recognized, the information on multiple easily confused corpora to be recognized, and the preset distance threshold for selecting easily confused speech recognition paths, multiple easily confused speech recognition path information are generated to generate multiple easily confused speech recognition path information. Based on the multiple easily confused word path information in speech recognition and the initial speech recognition model, the initial score information of the easily confused word path in speech recognition is calculated; Based on the multiple easily confused word path information in speech recognition and the initial speech recognition model, the similarity information of easily confused word paths in speech recognition is calculated. Based on the initial score information of the easily confused word path in speech recognition, the similarity information of the easily confused word path in speech recognition, and the preset easily confused word path similarity differentiation enhancement variable, the target score information of the easily confused word path in speech recognition is obtained. Based on the target score information of the easily confused word path in speech recognition and the initial speech recognition model, a target speech recognition model is generated.

7. A terminal device, characterized in that, The terminal device includes a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.