Speech recognition method and device, electronic equipment, storage medium and vehicle
By combining the acoustic model and the contact language model, and using generalization processing and multi-path matching methods, the problem of poor contact information recognition in the existing technology is solved, and the accuracy of speech recognition in contact scenarios is improved.
Patent Information
- Application Number
- CN202310260666.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2024-09-13
AI Technical Summary
Existing end-to-end speech recognition technology is not effective in identifying contact information, resulting in a degraded user experience.
Using a method based on the combination of acoustic model and contact language model, the acoustic features and contact language features of the speech to be recognized are identified, and multiple contact decoding maps are constructed through generalization processing to improve the recognition accuracy of contact information.
Through generalization processing and multi-path matching, the accuracy of speech recognition in contact scenarios is improved, consistent with the user's generalization, and the ability to identify contact information is enhanced.
Smart Images

Figure CN118645086A
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech recognition technology, and in particular to a speech recognition method, device, electronic device, storage medium and vehicle. Background Art
[0002] With the development of artificial intelligence technology, speech recognition technology has been widely used in various industries, and speech recognition technology based on traditional modeling methods is relatively mature. In recent years, with the development of end-to-end speech recognition, speech recognition systems have gradually overcome the traditional modular design and independence assumptions, and have the advantages of joint optimization and easy deployment. When the front-end speech recognition model mainly relies on deep learning technology and uses an integrated neural network for modeling, in the actual application of speech recognition, the system has a good recognition effect on general fields, but when it comes to user-specific information, such as contact information, the effect is always unsatisfactory. However, contact information often contains important information that users are concerned about, so the correct recognition of contact information is crucial to the user experience. Summary of the invention
[0003] The present application provides a speech recognition method, device, electronic device, storage medium and vehicle, which can improve the speech recognition accuracy in contact scenarios.
[0004] In a first aspect, the present application provides a speech recognition method, comprising: performing acoustic feature recognition on a speech to be recognized based on an acoustic model to obtain acoustic features corresponding to the speech to be recognized; performing contact language feature recognition on the speech to be recognized based on a contact language model to obtain contact language features corresponding to the speech to be recognized, wherein the contact language model is constructed based on multiple contact decoding graphs that perform speech generalization processing on contact information, each contact decoding graph is generated based on keywords related to contact search and a user's contact list, and each contact decoding graph is used to indicate multiple contact recognition paths; decoding the acoustic features and the contact language features based on a contact decoder to obtain a contact recognition result; and outputting the contact recognition result.
[0005] In some embodiments of the present application, each contact decoding graph includes a keyword subgraph and a contact subgraph connected in series; the keyword subgraph is used to indicate a keyword related to contact search, the keyword subgraph includes multiple nodes and lines between any two adjacent nodes, and each line in the keyword subgraph is used to indicate a character in the corresponding keyword; the contact subgraph includes multiple contact branches, each contact branch corresponds to a contact in the contact list, each contact branch includes multiple nodes and real lines between any two adjacent nodes, each real line in each contact branch is used to indicate a character in the corresponding contact, the starting nodes of the multiple contact branches are the same node, and the ending nodes of the multiple contact branches are the same node.
[0006] In some embodiments of the present application, the contact recognition result is the one with the highest recognition probability among multiple candidate recognition results corresponding to the acoustic feature and the contact language feature, and the recognition probability is the product of the acoustic recognition probability and the language recognition probability; the language recognition probability is determined based on the product of the language matching probabilities corresponding to each character in the contact recognition result, and one of the language matching probabilities is the matching probability of a character in the contact recognition result obtained based on the contact language feature and the corresponding character in the speech to be recognized; the acoustic recognition probability is determined based on the product of the acoustic matching probabilities corresponding to each character in the contact recognition result, and one of the acoustic matching probabilities is the matching probability of a character in the contact recognition result obtained based on the acoustic feature and the corresponding character in the speech to be recognized; each solid line corresponds to an enhancement coefficient, and when the contact recognition path corresponding to the contact recognition result includes at least one solid line in the first contact branch, the language recognition probability is determined based on a first value, and the first value is the product of the enhancement coefficients corresponding to at least one solid line in the first contact branch; the enhancement coefficient is greater than 1.
[0007] In some embodiments of the present application, each contact branch also includes multiple empty lines; the two nodes of each empty line are the two nodes of a real line, and each empty line in each contact branch is used to implement generalization processing of a character in the contact indicated by the corresponding real line; or, the two nodes of each empty line are the starting node of the first real line of at least two real lines and the ending node of the last real line; each empty line in each contact branch is used to implement generalization processing of a word in the contact indicated by the corresponding at least two real lines.
[0008] In some embodiments of the present application, each empty line corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes a target empty line or multiple target empty lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; wherein, when the contact identification path corresponding to the contact identification result includes the target empty line, the second value is the penalty coefficient corresponding to the target empty line, and when the contact identification path corresponding to the contact identification result includes multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
[0009] In some embodiments of the present application, when at least two contact branches included in the contact subgraph indicate the same contact, the contact subgraph also includes an empty branch, the starting node of the empty branch is the ending node of any contact branch, and the ending node of the empty branch is the starting node of any contact branch; the empty branch is used to implement generalized processing of the order of words in the corresponding contacts.
[0010] In some embodiments of the present application, the empty branch corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes a target empty line or multiple target empty lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; wherein, when the contact identification path corresponding to the contact identification result includes the target empty line, the second value is the penalty coefficient corresponding to the target empty line, and when the contact identification path corresponding to the contact identification result includes the multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
[0011] In some embodiments of the present application, before the contact language feature recognition of the speech to be recognized based on the contact language model to obtain the contact language feature corresponding to the speech to be recognized, the method also includes: recognizing the general language feature of the speech to be recognized based on the general language model to obtain the general language feature corresponding to the speech to be recognized; decoding the acoustic feature and the general language feature based on a general decoder to obtain a general recognition result; determining whether the general speech recognition result is related to the contact based on a binary classification algorithm; the contact language feature recognition of the speech to be recognized based on the contact language model to obtain the contact language feature corresponding to the speech to be recognized includes: when it is determined that the general speech recognition result is related to the contact, recognizing the contact language feature of the speech to be recognized based on the contact language model to obtain the contact language feature.
[0012] In some embodiments of the present application, after determining whether the general voice recognition result is related to the contact based on the binary classification algorithm, the method further includes: if it is determined that the general voice recognition result is not related to the contact, outputting the general voice recognition result.
[0013] In the second aspect, the present application provides a speech recognition device, including: a feature recognition module, which is used to perform acoustic feature recognition on a speech to be recognized based on an acoustic model to obtain acoustic features corresponding to the speech to be recognized; perform contact language feature recognition on the speech to be recognized based on a contact language model to obtain contact language features corresponding to the speech to be recognized, the contact language model is constructed based on multiple contact decoding graphs that perform speech generalization processing on contact information, and each contact decoding graph is generated based on keywords related to contact search and a user's contact list; a decoding module, which is used to decode the acoustic features and the contact language features based on a contact decoder to obtain a contact recognition result; and an output module, which is used to output the contact recognition result.
[0014] In some embodiments of the present application, each contact decoding graph includes a keyword subgraph and a contact subgraph connected in series; the keyword subgraph is used to indicate a keyword related to contact search, the keyword subgraph includes multiple nodes and lines between any two adjacent nodes, and each line in the keyword subgraph is used to indicate a character in the corresponding keyword; the contact subgraph includes multiple contact branches, each contact branch corresponds to a contact in the contact list, each contact branch includes multiple nodes and real lines between any two adjacent nodes, each real line in each contact branch is used to indicate a character in the corresponding contact, the starting nodes of the multiple contact branches are the same node, and the ending nodes of the multiple contact branches are the same node.
[0015] In some embodiments of the present application, the contact recognition result is the one with the highest recognition probability among multiple candidate recognition results corresponding to the acoustic feature and the contact language feature, and the recognition probability is the product of the acoustic recognition probability and the language recognition probability; the language recognition probability is determined based on the product of the language matching probabilities corresponding to each character in the contact recognition result, and one of the language matching probabilities is the matching probability of a character in the contact recognition result obtained based on the contact language feature and the corresponding character in the speech to be recognized; the acoustic recognition probability is determined based on the product of the acoustic matching probabilities corresponding to each character in the contact recognition result, and one of the acoustic matching probabilities is the matching probability of a character in the contact recognition result obtained based on the acoustic feature and the corresponding character in the speech to be recognized; each solid line corresponds to an enhancement coefficient, and when the contact recognition path corresponding to the contact recognition result includes at least one solid line in the first contact branch, the language recognition probability is determined based on a first value, and the first value is the product of the enhancement coefficients corresponding to at least one solid line in the first contact branch; the enhancement coefficient is greater than 1.
[0016] In some embodiments of the present application, each contact branch also includes multiple empty lines; the two nodes of each empty line are the two nodes of a real line, and each empty line in each contact branch is used to implement generalization processing of a character in the contact indicated by the corresponding real line; or, the two nodes of each empty line are the starting node of the first real line of at least two real lines and the ending node of the last real line; each empty line in each contact branch is used to implement generalization processing of a word in the contact indicated by the corresponding at least two real lines.
[0017] In some embodiments of the present application, each empty line corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes a target empty line or multiple target empty lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; wherein, when the contact identification path corresponding to the contact identification result includes the target empty line, the second value is the penalty coefficient corresponding to the target empty line, and when the contact identification path corresponding to the contact identification result includes multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
[0018] In some embodiments of the present application, when at least two contact branches included in the contact subgraph indicate the same contact, the contact subgraph also includes an empty branch, the starting node of the empty branch is the ending node of any contact branch, and the ending node of the empty branch is the starting node of any contact branch; the empty branch is used to implement generalized processing of the order of words in the corresponding contacts.
[0019] In some embodiments of the present application, the empty branch corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes a target empty line or multiple target empty lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; wherein, when the contact identification path corresponding to the contact identification result includes the target empty line, the second value is the penalty coefficient corresponding to the target empty line, and when the contact identification path corresponding to the contact identification result includes the multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
[0020] In some embodiments of the present application, the feature recognition module is further used to recognize the general language features of the speech to be recognized based on the general language model before performing contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language features corresponding to the speech to be recognized; the decoding module is further used to decode the acoustic features and the general language features based on a general decoder to obtain a general recognition result; the determination module is further used to determine whether the general speech recognition result is related to the contact based on a binary classification algorithm; the feature recognition module is specifically used to recognize the contact language features of the speech to be recognized based on the contact language model to obtain the contact language features when it is determined that the general speech recognition result is related to the contact.
[0021] In some embodiments of the present application, the output module is further used to, after determining whether the general voice recognition result is related to the contact based on a binary classification algorithm, output the general voice recognition result if it is determined that the general voice recognition result is not related to the contact.
[0022] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, wherein the processor is used to execute a computer program stored in a memory, and when the computer program is executed by the processor, the steps of any one of the speech recognition methods provided in the first aspect are implemented.
[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the speech recognition methods provided in the first aspect are implemented.
[0024] In a fifth aspect, an embodiment of the present application provides a vehicle, comprising: a speech recognition device as described in the second aspect, or an electronic device as described in the third aspect, or a computer-readable storage medium as described in the fourth aspect.
[0025] In a sixth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program or instructions. When the computer program product runs on a processor, the processor executes the computer program or instructions to implement the steps of the speech recognition method as described in the first aspect.
[0026] In the seventh aspect, an embodiment of the present application provides a chip, which includes a processor, a memory and a communication interface, the communication interface is coupled to the processor, the memory is used to store programs or instructions that can be run on the processor, and the processor is used to execute the program or instructions to implement the steps of the speech recognition method as described in the first aspect.
[0027] The technical solution provided by the embodiments of the present application has the following advantages over the prior art: in the embodiments of the present application, acoustic feature recognition is performed on the speech to be recognized based on the acoustic model to obtain the acoustic features corresponding to the speech to be recognized; contact language feature recognition is performed on the speech to be recognized based on the contact language model to obtain the contact language features corresponding to the speech to be recognized, the contact language model is constructed based on multiple contact decoding graphs for generalizing the contact information, each contact decoding graph is generated based on keywords related to contact search and the user's contact list, and each contact decoding graph is used to indicate multiple contact recognition paths; the acoustic features and the contact language features are decoded based on the contact decoder to obtain a contact recognition result; and the contact recognition result is output. Since the contact information is generalized in terms of terms, one contact information can be transformed into multiple transformed contact information, each transformed contact information is a generalized term equivalent to the one contact information, and each transformed contact information refers to the one contact information. Therefore, at least two contact identification paths indicated by each contact decoding graph in the multiple contact decoding graphs that generalize the contact information are used to indicate the one contact information. Further, in this scheme, a contact language model is constructed based on the multiple contact decoding graphs that generalize the contact information, so that the voice recognition of the contact scenario is more in line with the actual scenario in which the user uses the generalized term of the contact (the corresponding transformed contact information term) to search for the contact, and the accuracy of the voice recognition of the contact scenario can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0030] Figure 1 A flowchart of a speech recognition method provided in this application;
[0031] Figure 2 A schematic diagram of a model structure of a speech recognition method provided in this application;
[0032] Figure 3 A schematic diagram of the structure of a contact decoding diagram of a speech recognition method provided by the present application;
[0033] Figure 4 A schematic diagram of the structure of a contact subgraph of a speech recognition method provided in this application;
[0034] Figure 5 A schematic diagram of the structure of a contact subgraph of another speech recognition method provided by the present application;
[0035] Figure 6 A schematic diagram of the structure of a contact subgraph of another speech recognition method provided by the present application;
[0036] Figure 7 A flowchart of another speech recognition method provided by the present application;
[0037] Figure 8 A flowchart of another speech recognition method provided by this application;
[0038] Fig. 9 A schematic diagram of a model structure of another speech recognition method provided in this application;
[0039] Fig.10 A schematic diagram of the structure of a speech recognition device provided in this application;
[0040] Fig.11 A schematic diagram of the hardware structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0041] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0042] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0043] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0044] Use the hot word enhancement solution to strengthen the weight of contacts in the general speech recognition process and optimize the recognition of contacts. After the contacts are weighted, it will affect the results of speech recognition in other scenarios. For example, if the contact is "Li Si", and the user's request is "where is it", because "Li Si" and "where is it" sound similar, it may cause the user to say "that Li Si is it". In order to avoid the above problem, the weight of the contact will be reduced. Reducing the weight of the contact will eventually lead to the hot word enhancement not being able to recognize all contacts correctly, and speech recognition in other scenarios (non-contact recognition scenarios) is also affected by hot words. As a result, not only the recognition accuracy of the contact recognition scenario is not well improved, but the recognition accuracy of the non-contact scenario is also reduced.
[0045] The strategy of post-pinyin matching is used, that is, after obtaining the general recognition result through general voice recognition, the result that may be a contact in the general recognition result is found and converted into pinyin, and matched with the contact list. For example, if the user's voice is "call Li Shi", the general recognition result is "call Li Shi", where "Li Shi" may be a contact, "Li Shi" is converted into pinyin, and the pinyin can be matched with "Li Shi" in the contact. However, the strategy of post-pinyin matching depends on the result of general recognition. Once the pinyin of the result that may be a contact in the general recognition result is inconsistent with the user's voice, the contact recognition is wrong, so the voice recognition accuracy of the contact recognition scenario is low.
[0046] In order to solve the above problems, an embodiment of the present application provides a speech recognition method, which performs acoustic feature recognition on a speech to be recognized based on an acoustic model to obtain acoustic features corresponding to the speech to be recognized; performs contact language feature recognition on the speech to be recognized based on a contact language model to obtain contact language features corresponding to the speech to be recognized, the contact language model is constructed based on multiple contact decoding graphs that perform speech generalization processing on contact information, each contact decoding graph is generated based on keywords related to contact search and a user's contact list, and each contact decoding graph is used to indicate multiple contact recognition paths; decodes the acoustic features and the contact language features based on a contact decoder to obtain a contact recognition result; and outputs the contact recognition result. Since the contact information is generalized in terms of terms, one contact information can be transformed into multiple transformed contact information, each transformed contact information is a generalized term equivalent to the one contact information, and each transformed contact information refers to the one contact information. Therefore, at least two contact identification paths indicated by each contact decoding graph in the multiple contact decoding graphs that generalize the contact information are used to indicate the one contact information. Further, in this scheme, a contact language model is constructed based on the multiple contact decoding graphs that generalize the contact information, so that the voice recognition of the contact scenario is more in line with the actual scenario in which the user uses the generalized term of the contact (the corresponding transformed contact information term) to search for the contact, and the accuracy of the voice recognition of the contact scenario can be improved.
[0047] The present application is applied to voice recognition scenarios. The electronic device in the embodiments of the present application may be a vehicle-mounted terminal, or a mobile phone, notebook, computer, etc. that is connected to the vehicle for communication. The specific details may be determined based on actual conditions and are not limited here.
[0048] The executor of the speech recognition method provided in the embodiment of the present application may be an electronic device or a vehicle, or may be a functional module or functional entity in the electronic device or vehicle that can implement the speech recognition method. The specific execution subject may be determined based on actual conditions and is not limited here.
[0049] The technical solution of the present application is explained in detail below through several specific embodiments.
[0050] Figure 1 A flow chart of a speech recognition method provided in this application is as follows: Figure 1 As shown, the speech recognition method may include the following steps 101 to 104:
[0051] 101. Perform acoustic feature recognition on the speech to be recognized based on the acoustic model to obtain acoustic features corresponding to the speech to be recognized.
[0052] Among them, the acoustic feature is specifically an acoustic feature probability matrix, which includes probability vectors corresponding to each character in the speech to be recognized. Each element in the probability vector corresponding to a character is a matching probability value between a candidate character and the character.
[0053] For example, assume that the acoustic model is generated based on a character library of 8000 characters. Each of the 8000 characters is a candidate character corresponding to the character. The speech to be recognized is "What's the weather like today?". Then, the acoustic feature probability matrix corresponding to "What's the weather like today?" includes the probability vector corresponding to "今", the probability vector corresponding to the first "天", the probability vector corresponding to the second "天", the probability vector corresponding to "气", the probability vector corresponding to "怎", the probability vector corresponding to "么", and the probability vector corresponding to "样". Among them, the probability vector corresponding to "今" is the matching probability value between each of the 8000 characters and "今", the probability vector corresponding to the first "天" is the matching probability value between each of the 8000 characters and "天", the probability vector corresponding to the second "天" is the matching probability value between each of the 8000 characters and "天", the probability vector corresponding to "气" is the matching probability value between each of the 8000 characters and "气", the probability vector corresponding to "怎" is the matching probability value between each of the 8000 characters and "怎", the probability vector corresponding to "么" is the matching probability value between each of the 8000 characters and "么", and the probability vector corresponding to "样" is the matching probability value between each of the 8000 characters and "样".
[0054] During the process of the acoustic model recognizing the speech to be recognized, the speech to be recognized is divided into multiple frames, and each frame is recognized separately. Usually, each frame corresponds to at most one character.
[0055] 102. Perform contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language feature corresponding to the speech to be recognized.
[0056] Among them, the contact language model is constructed based on multiple contact decoding graphs obtained by performing generalization processing on contact information. Each contact decoding graph is generated based on keywords related to searching for contacts and the user's contact list. Each contact decoding graph is used to indicate multiple contact recognition paths.
[0057] Among them, the contact language feature is specifically a contact language probability matrix, which includes probability vectors corresponding to each character in the speech to be recognized. Each element in the probability vector corresponding to a character is a matching probability value between a candidate character and the character. For specific descriptions, reference can be made to the relevant descriptions of the acoustic feature probability matrix above, which will not be elaborated here.
[0058] The character library corresponding to the acoustic model is different from the character library corresponding to the contact language model, which is generated based on the contact list. The feature extraction process corresponding to the acoustic model is different from the feature extraction process of the contact language model.
[0059] The contact information is generalized, that is, the contact is segmented to obtain a plurality of contact segments, and then the plurality of contact segments are combined to obtain a plurality of generalized segments indicating the contact.
[0060] For example, the generalized statements corresponding to the contact person "Yang Feng, Factory Director of Factory No. 12" include: "Factory No. 12", "Factory Director", "Yang Feng", "Factory Director of Factory No. 12", "Yang Feng of Factory No. 12", "Factory Director Yang Feng ... No. 12 Yang Feng", and "Factory Director Factory No. 12".
[0061] 103. Decode the acoustic feature and the contact language feature based on a contact decoder to obtain a contact recognition result.
[0062] Among them, the contact decoder searches based on acoustic features and contact language features, and determines a contact recognition result from multiple contact candidate recognition results. Each contact candidate result is determined by acoustic features and contact language features, and the contact recognition result is the one that best matches the voice to be recognized among the multiple contact candidate recognition results.
[0063] Among them, the contact language model is generated based on keywords related to contact search and the user's contact list, the language recognition probability is determined by the product of the language matching probabilities corresponding to each character in the contact recognition result, and one of the language matching probabilities is the matching probability between a character in the contact recognition result obtained based on the contact language feature and the corresponding character in the speech to be recognized; the acoustic recognition probability is determined by the product of the acoustic matching probabilities corresponding to each character in the contact recognition result, and one of the acoustic matching probabilities is the matching probability between a character in the contact recognition result obtained based on the acoustic feature and the corresponding character in the speech to be recognized.
[0064] Exemplarily, the speech to be recognized is "Call Li Si?". The contact recognition result is "Call Li Si". Among them, the language recognition probability is determined by the product of the language matching probabilities of the characters "Call", "phone", "call", "give", "Li", and "Si" in the contact recognition result ("Call Li Si") based on the language features of the contact. Among them, the language matching probability of the character "Call" is the matching probability of the character "Call" in the contact recognition result ("Call Li Si") and the corresponding character "Call" in the speech to be recognized ("Call Li Si?"); the language matching probability of the character "Si" is the matching probability of the character "Si" in the contact recognition result ("Call Li Si") and the corresponding character "Si" in the speech to be recognized ("Call Li Si?").
[0065] For the acoustic recognition probability, reference can be made to the above example of the language recognition probability, which will not be elaborated here.
[0066] 104. Output the contact recognition result.
[0067] Exemplarily, as Figure 2 shown, it is a schematic diagram of the model structure of the speech recognition method provided by the embodiment of the present application. Among them, the acoustic model corresponds to the above step 101, the contact language model corresponds to the above step 102, and the contact decoder corresponds to the above steps 103 and 104. For the user's contact-related speech request (the speech to be recognized includes a contact), such as "Call ***", the contact can be correctly recognized.
[0068] In the embodiment of the present application, since the generalization processing of the contact information is performed, a contact information can be transformed into multiple transformed contact information. Each transformed contact information is a generalization statement equivalent to the one contact information, and each transformed contact information refers to the one contact information. Therefore, at least two contact recognition paths indicated by each contact decoding graph in the multiple contact decoding graphs for the generalization processing of the contact information are used to indicate the one contact information. Furthermore, in this solution, by constructing a contact language model based on the multiple contact decoding graphs for the generalization processing of the contact information, the speech recognition in the contact scenario can be made more in line with the scenario where the user uses the generalization statement (the statement of the corresponding transformed contact information) of the contact to search for the contact in practice, and the accuracy of the speech recognition in the contact scenario can be improved.
[0069] In some embodiments of the present application, each contact decoding graph includes a keyword subgraph and a contact subgraph connected in series; the keyword subgraph is used to indicate a keyword related to contact search, the keyword subgraph includes multiple nodes and lines between any two adjacent nodes, and each line in the keyword subgraph is used to indicate a character in the corresponding keyword; the contact subgraph includes multiple contact branches, each contact branch corresponds to a contact in the contact list, each contact branch includes multiple nodes and real lines between any two adjacent nodes, each real line in each contact branch is used to indicate a character in the corresponding contact, the starting nodes of the multiple contact branches are the same node, and the ending nodes of the multiple contact branches are the same node.
[0070] Among them, the keywords related to searching for contacts include: "call", "check number", etc. For example, Figure 3 As shown in (a) in the figure, the contact decoding graph can be "call @CONTACT", where "call" is the keyword subgraph and "@CONTACT" represents the contact subgraph. When receiving the user's request, the request carries the user's contact list. Assuming that the contact list includes: Zhang San, Li Si, Wang Wu, the contact list is converted into the form of a contact subgraph, such as Figure 3 (b) in FIG. 1 shows a contact subgraph obtained according to the contact list; the contact subgraph is then inserted into the contact decoding graph to form a complete contact decoding graph, as shown in FIG. Figure 3 As shown in (c) in the figure. Figure 3 The contact decoding graph shown in (c) is used to indicate three contact identification paths: "call Zhang San", "call Li Si", and "call Wang Wu".
[0071] In an embodiment of the present application, the user's address book list can be obtained through Bluetooth connection, WiFi connection, etc. Specifically, the local device and the server can both have the ability to recognize the voice to be recognized through the voice recognition method provided in the embodiment of the present application. In actual situations, the server can be given priority to recognize the voice to be recognized based on the voice recognition method provided in the embodiment of the present application. If the local device does not receive the recognition result returned by the server within a preset time period (poor signal quality or server failure, etc.), the local device recognizes the voice to be recognized based on the voice recognition method provided in the embodiment of the present application.
[0072] In the embodiments of the present application, by combining a keyword related to a contact with a contact list, the above-mentioned contact decoding graph constructed has a simple and clear structure, making the contact recognition path clearer, which is beneficial to improving the extraction of contact language features by the contact language model, and is also beneficial to the contact decoding graph to decode acoustic features and contact language features, and can improve the recognition speed and recognition accuracy of the contact recognition path.
[0073] In the embodiments of the present application, the accuracy of speech recognition in the contact scenario can be improved by enhancing the weight of each character in the contact sub-graph in the contact language model.
[0074] In some embodiments of the present application, the contact recognition result is the one with the highest recognition probability among multiple candidate recognition results corresponding to the acoustic feature and the contact language feature, and the recognition probability is the product of the acoustic recognition probability and the language recognition probability; the language recognition probability is determined based on the product of the language matching probabilities corresponding to each character in the contact recognition result, and one such language matching probability is the matching probability between a character in the contact recognition result obtained based on the contact language feature and the corresponding character in the to-be-recognized speech; the acoustic recognition probability is determined based on the product of the acoustic matching probabilities corresponding to each character in the contact recognition result, and one such acoustic matching probability is the matching probability between a character in the contact recognition result obtained based on the acoustic feature and the corresponding character in the to-be-recognized speech; each solid connection line corresponds to an enhancement coefficient. When the contact recognition path corresponding to the contact recognition result includes at least one solid connection line in the first contact branch, the language recognition probability is determined based on a first value, and the first value is the product of the enhancement coefficients corresponding to at least one solid connection line in the first contact branch; the enhancement coefficient is greater than 1.
[0075] It can be understood that because the problem of homophone substitution may occur during recognition. For example, the recognition result is "Li Si", while the user's contact is "Li Si", that is, the probability of recognizing "Si" is greater than that of "Si", which may lead to the failure of the final contact recognition or a very low confidence level of the contact recognition result of "Li Si"; for this kind of homophone situation, when constructing the contact sub-graph, weights are added to each character of the contact (that is, an enhancement coefficient is set for each solid connection line), so that the probability of each edge in the contact sub-graph is greater than 1, that is, the probability of "Si" is increased by using the language model, making the probability of "Si" greater than that of "Si", and the contact recognition probability corresponding to "Li Si" is improved, and at the same time, the recognition confidence level corresponding to "Li Si" is improved, and the final recognition result is the recognition confidence level of the contact recognition result. After using this method to add weights to the contact (that is, regarding each word in the contact list as a hot word and enhancing the weight), the contact recognition can be made more accurate, and the boundary between contacts and non-contacts can be made clearer, avoiding the influence on non-contact scenarios.
[0076] In the embodiment of the present application, the speech generalization process can be performed on each contact in the contact subgraph in the contact language model to improve the speech recognition accuracy of the contact scenario. For example, if there is a long name such as a job title + a person's name in the contact, only the job title or the person's name in the speech to be recognized can be correctly recognized.
[0077] For example, the contact stored in the contact list is "Yang Feng, the director of the 12th factory", but when the user searches for a contact, he only says "Yang Feng", omitting part of the contact name stored by the user. This phenomenon is called generalization of the name. In order to adapt to this generalization of the name, we add an edge that can be directly jumped when constructing the contact subgraph (in the following Figures 4 to 6 middle," <eps>" means that the edge that can jump directly to the next state, that is, an empty line), so that part of the content in the contact can be omitted; to improve the accuracy of speech recognition in the contact scenario.
[0078] In some embodiments of the present application, each contact branch further includes a plurality of empty lines; the two nodes of each empty line are the two nodes of a solid line (i.e., the starting node of each empty line is the starting node of the corresponding solid line, and the ending node of each empty line is the ending node of the corresponding solid line), and each empty line in each contact branch is used to implement the generalization processing of the statement of a character in the contact indicated by the corresponding solid line. That is, the generalization processing of the statement is performed on each character in the contact subgraph.
[0079] Among them, each empty line in each contact branch is used to indicate emptiness. It can be understood that when a character in the speech to be recognized is recognized as the character indicated by the current solid line in the target contact branch, the recognition path includes the current solid line; when a character is recognized that is not the character indicated by the current solid line in the target contact branch, the recognition path includes the empty line corresponding to the current solid line, that is, the corresponding empty line is used to realize empty transfer at the starting node of the current solid line, and continue to recognize whether the character is the character indicated by the next solid line in the target contact branch, and repeat the above process until the end node of the target contact branch is reached.
[0080] It can be understood that in the process of constructing the contact subgraph, we add an empty link for each character to jump to, so that each character in the contacts stored by the user can be skipped during the recognition process. Taking "Yang Feng, the director of the 12th factory" as an example, the contact subgraph it constructs is as follows Figure 4 As shown; when character-level generalization is used, each character in the contacts stored by the user can be skipped. For the contact "Yang Feng, Director of the 12th Factory", contact recognition can support generalized statements such as "Yang Feng" and "Director of the 12th Factory", and also support the generalized statement of "Yang Feng of the 10th Factory".
[0081] In the embodiment of the present application, by setting an empty link for each character in the contact subgraph, generalization of the expression for each character in the contact is achieved, which can improve the recognition accuracy of the contact subgraph and the speech to be recognized.
[0082] In some embodiments of the present application, each contact branch further includes a plurality of empty links; the two nodes of each empty link are the starting node of the first real link among the at least two real links and the ending node of the last real link (i.e., the starting node of each empty link is the starting node of the first real link among the at least two real links, and the ending node of each empty link is the ending node of the last real link among the at least two real links); each empty link in each contact branch is used to implement a generalization process of a word in the contact indicated by the corresponding at least two real links. That is, a generalization process of a word is performed on each word in the contact subgraph.
[0083] Among them, each empty line in each contact branch is used to indicate emptiness. It can be understood that when a word in the speech to be recognized is recognized as a word indicated by at least two solid lines in the target contact branch, the recognition path includes the at least two solid lines; when a word is recognized that is not a word indicated by at least two solid lines in the target contact branch, the recognition path includes the empty line corresponding to the at least two solid lines, that is, the corresponding empty line is used to realize empty transfer at the starting node of the at least two solid lines, and continue to recognize whether the word is the word indicated by the next at least two solid lines in the target contact branch, and repeat the above process until the end node of the target contact branch is reached.
[0084] It is understandable that when a user searches for a long contact, he or she will definitely say a word that can represent the contact, and will not just say a character or some incoherent characters (not a word). Therefore, the Neuro-Linguistic Programming (NLP) word segmentation model is used for word segmentation. When constructing the contact subgraph, the character is still used as the modeling unit to construct the decoding graph, but the edge (empty connection) that can be jumped empty is added to the word unit. For example, "Yang Feng, the director of the 12th factory", after word segmentation, the three words "12th factory", "factory director", and "Yang Feng" are obtained. The contact subgraph constructed using it is as follows Figure 5 As shown, using this word-level generalization, only an entire word can be selectively skipped. Finally, the contact decoder can only recognize 7 statements, namely "Factory 12", "Factory Director", "Yang Feng", "Factory Director of Factory 12", "Factory Director Yang Feng", and "Factory Director of Factory 12", thus avoiding the situation in which the statement "Factory 10 Yang Feng" is supported when every word can be skipped.
[0085] In the embodiment of the present application, by setting empty links for words in the contact subgraph, generalization of the words in the contact is achieved, which can improve the recognition accuracy of the contact subgraph and the speech to be recognized.
[0086] In some embodiments of the present application, each empty connection line corresponds to a penalty coefficient. When the contact recognition path corresponding to the contact recognition result includes one or more target empty connection lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value. Wherein, when the contact recognition path corresponding to the contact recognition result includes the one target empty connection line, the second value is the penalty coefficient corresponding to the one target empty connection line. When the contact recognition path corresponding to the contact recognition result includes the multiple target empty connection lines, the second value is the product of the penalty coefficients corresponding to each target empty connection line among the multiple target empty connection lines. The penalty coefficient is less than 1.
[0087] It can be understood that since there may be a problem of homophone substitution during recognition. For example, the recognition result is "Li Si", while the user's contact is "Li Si". After adding the jumpable edges, because the probability of recognizing "Si" is not high, it may discard "Si" because the probability of an empty jump is higher than that of "Si", and finally there is a phenomenon of missing characters in the contact recognition. To avoid this situation, penalties are set for all empty jump edges to reduce the probability of empty jumps, that is, the probability of the empty jump edge is set to be less than 1 (that is, a penalty coefficient is set for each empty connection line, and the penalty coefficient is less than 1), so that the probability of the empty jump is less than the probability of "Si", ensuring the accuracy of speech recognition in the contact scenario.
[0088] In some embodiments of the present application, in the case where at least two contact branches included in the contact subgraph indicate the same contact, the contact subgraph further includes an empty branch. The starting node of the empty branch is the termination node of any contact branch, and the termination node of the empty branch is the starting node of any contact branch. The empty branch is used to implement the generalization processing of the order of words in the corresponding contact.
[0089] Wherein, when the current contact branch reaches the termination node, but the characters in the speech to be recognized have not been completely recognized, the recognition path includes the empty branch, that is, an empty jump is realized through the empty branch at the termination node of the current contact branch, and the starting node of the contact subgraph is returned to continue to recognize whether the unrecognized characters in the speech to be recognized are the characters in other contact branches in the contact subgraph until the speech to be recognized is completely recognized.
[0090] It can be understood that after using character-level (or word-level) generalization, the user's stored contacts can be generalized in terms of characters (or words), but the reverse order (adjusting the order of words in the contact) cannot be recognized. For example, the contact "Yang Feng, the director of the 12th factory" cannot be recognized as "Yang Feng, the director" in the contact decoder. To address this problem, the contact subgraph construction method is optimized. After obtaining the word segmentation results of the contact's name, each word segmentation result is constructed in parallel, and the end point is connected to the starting point in the form of an empty jump (i.e., an empty branch). The contact subgraph is as follows: Figure 6 As shown in the figure, "Yang Feng, the director of the 12th factory" can be generalized into three statements according to the word segmentation results: "12th factory", "factory director", and "Yang Feng". After recognizing "Yang Feng" and reaching the end point 3, it can be <eps>The empty jump directly jumps to the starting point 0, and can continue to recognize titles such as "factory director". In this way, the contact decoder has the ability to recognize the reverse combination "factory director Yang Feng". This can improve the accuracy of voice recognition in the contact scene.
[0091] In some embodiments of the present application, the empty branch corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes a target empty line or multiple target empty lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; wherein, when the contact identification path corresponding to the contact identification result includes the target empty line, the second value is the penalty coefficient corresponding to the target empty line, and when the contact identification path corresponding to the contact identification result includes the multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
[0092] In the embodiment of the present application, in order to solve the problem that an empty branch may lead to inaccurate recognition results, a penalty coefficient is also set for the empty branch, and the penalty coefficient is less than 1, so that the accuracy of the contact recognition scenario can be guaranteed.
[0093] The present application makes contact recognition independent, constructs a decoding graph for contact recognition separately, and increases the weight of the contact in the decoding graph to ensure contact recognition without affecting speech recognition in non-contact scenarios; by adding empty jump edges to the contact subgraph and setting an empty jump penalty, the recognition of generalized statements of the contact is guaranteed.
[0094] In some embodiments of the present application, in addition to the above method of adding empty lines and / or empty branches in the contact decoding graph to achieve generalization of the contact's statement, the generalization of the contact's statement can also be achieved by adding multiple solid line branches in the contact subgraph. Each added solid line branch is used to indicate a branch that is equivalent to the contact branch. For example, if the contact is "Factory Director Yang Feng of the 12th Factory", the added solid line branches may include "Factory 12", "Director", "Yang Feng", "Director of Factory 12", "Factory Director Yang Feng of Factory 12", "Director Yang Feng", "Factory Director Yang Feng", "Factory Director Yang Feng", "Factory Director Yang Feng", etc.
[0095] In some embodiments of the present application, Figure 1 ,like Figure 7 As shown, before the above step 102, the speech recognition method provided in the embodiment of the present application may further include the following steps 105 to 107, and the above step 102 may be specifically implemented by the following step 102a:
[0096] 105. Recognize the general language features of the speech to be recognized based on the general language model to obtain the general language features corresponding to the speech to be recognized.
[0097] The general language feature is specifically a general language probability matrix, which includes a probability vector corresponding to each character in the speech to be recognized, and each element in the probability vector corresponding to a character is a matching probability value between a candidate character and the character. For a specific description, please refer to the above description of the acoustic feature probability matrix, which will not be repeated here.
[0098] The character library corresponding to the acoustic model and the character library corresponding to the general language model may be the same or different, which is not limited here. The feature extraction process corresponding to the acoustic model is different from the feature extraction process of the general language model.
[0099] 106. Decode the acoustic feature and the universal language feature based on a universal decoder to obtain a universal recognition result.
[0100] Among them, the universal decoder searches based on acoustic features and universal language features, and determines a universal recognition result from multiple universal candidate recognition results. Each universal candidate result is determined by acoustic features and universal language features, and the universal recognition result is the one that best matches the speech to be recognized among the multiple universal candidate recognition results.
[0101] 107. Based on a binary classification algorithm, determine whether the general voice recognition result is related to the contact.
[0102] The binary classification algorithm may be a naive Bayes algorithm, or a logistic regression algorithm, a random forest (RF) algorithm, a support vector machine (SVM) algorithm, etc., which are not limited here. For example, when implementing the above step 107, it may be determined whether the general voice recognition result is related to the contact through a binary classification algorithm model.
[0103] For example, if the general recognition result includes keywords related to contacts, such as "make a call" and "check a number", it is determined that the general voice recognition result is related to the contact.
[0104] 102a. When it is determined that the general speech recognition result is related to a contact, perform contact language feature recognition on the speech to be recognized based on a contact language model to obtain the contact language feature.
[0105] In an embodiment of the present application, a universal recognition is first performed on the speech to be recognized based on a universal language model and a universal decoder to obtain a universal recognition result, and then it is determined whether the universal recognition result is related to a contact. When it is determined that the universal recognition result is related to a contact, contact recognition is performed on the speech to be recognized based on a contact language model and a contact decoder to obtain a contact recognition result, and the contact recognition result is output, thereby improving the accuracy of speech recognition in contact scenarios.
[0106] In some embodiments of the present application, Figure 7 ,like Figure 8 As shown, after the above step 107, the speech recognition method provided in the embodiment of the present application may further include the following step 108:
[0107] 108. When it is determined that the general voice recognition result is not related to the contact, output the general voice recognition result.
[0108] For example, Fig. 9 As shown, it is a schematic diagram of the model structure of the speech recognition method provided in the embodiment of the present application. Among them, the acoustic model corresponds to the above step 101, the general language model corresponds to the above step 105, the general decoder model corresponds to the above step 106, the contact language model corresponds to the above step 102, the contact decoder corresponds to the above step 103, and judging whether it is related to the contact corresponds to the above step 107.
[0109] In the embodiment of the present application, when it is determined that the general recognition result is not related to the contact, the general speech recognition result is output, so that the speech recognition accuracy of the contact scenario is improved without affecting the speech recognition accuracy of the non-contact scenario.
[0110] The present application makes contact recognition independent, constructs a contact decoding graph for contact recognition separately, and increases the weight of the contact in the contact subgraph to ensure contact recognition without affecting speech recognition in non-contact scenarios; by adding empty jump edges to the contact subgraph and setting empty jump penalties, the recognition of generalized statements of contacts is guaranteed.
[0111] The present application also provides a speech recognition device, Fig.10 A schematic diagram of the structure of a speech recognition device provided in this application, such as Fig.10 As shown, the speech recognition device includes: a feature recognition module 1001, which is used to perform acoustic feature recognition on the speech to be recognized based on the acoustic model to obtain the acoustic features corresponding to the speech to be recognized; perform contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language features corresponding to the speech to be recognized, the contact language model is constructed based on multiple contact decoding graphs that perform utterance generalization processing on contact information, and each contact decoding graph is generated based on keywords related to contact search and the user's contact list; a decoding module 1002, which is used to decode the acoustic features and the contact language features based on a contact decoder to obtain a contact recognition result; an output module 1003, which is used to output the contact recognition result.
[0112] In some embodiments of the present application, each contact decoding graph includes a keyword subgraph and a contact subgraph connected in series; the keyword subgraph is used to indicate a keyword related to contact search, the keyword subgraph includes multiple nodes and lines between any two adjacent nodes, and each line in the keyword subgraph is used to indicate a character in the corresponding keyword; the contact subgraph includes multiple contact branches, each contact branch corresponds to a contact in the contact list, each contact branch includes multiple nodes and real lines between any two adjacent nodes, each real line in each contact branch is used to indicate a character in the corresponding contact, the starting nodes of the multiple contact branches are the same node, and the ending nodes of the multiple contact branches are the same node.
[0113] In some embodiments of the present application, the contact recognition result is the one with the highest recognition probability among multiple candidate recognition results corresponding to the acoustic feature and the contact language feature, and the recognition probability is the product of the acoustic recognition probability and the language recognition probability; the language recognition probability is determined based on the product of the language matching probabilities corresponding to each character in the contact recognition result, and one of the language matching probabilities is the matching probability of a character in the contact recognition result obtained based on the contact language feature and the corresponding character in the speech to be recognized; the acoustic recognition probability is determined based on the product of the acoustic matching probabilities corresponding to each character in the contact recognition result, and one of the acoustic matching probabilities is the matching probability of a character in the contact recognition result obtained based on the acoustic feature and the corresponding character in the speech to be recognized; each solid line corresponds to an enhancement coefficient, and when the contact recognition path corresponding to the contact recognition result includes at least one solid line in the first contact branch, the language recognition probability is determined based on a first value, and the first value is the product of the enhancement coefficients corresponding to at least one solid line in the first contact branch; the enhancement coefficient is greater than 1.
[0114] In some embodiments of the present application, each contact branch also includes multiple empty lines; the two nodes of each empty line are the two nodes of a real line, and each empty line in each contact branch is used to implement generalization processing of a character in the contact indicated by the corresponding real line; or, the two nodes of each empty line are the starting node of the first real line of at least two real lines and the ending node of the last real line; each empty line in each contact branch is used to implement generalization processing of a word in the contact indicated by the corresponding at least two real lines.
[0115] In some embodiments of the present application, each empty line corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes a target empty line or multiple target empty lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; wherein, when the contact identification path corresponding to the contact identification result includes the target empty line, the second value is the penalty coefficient corresponding to the target empty line, and when the contact identification path corresponding to the contact identification result includes multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
[0116] In some embodiments of the present application, when at least two contact branches included in the contact subgraph indicate the same contact, the contact subgraph also includes an empty branch, the starting node of the empty branch is the ending node of any contact branch, and the ending node of the empty branch is the starting node of any contact branch; the empty branch is used to implement generalized processing of the order of words in the corresponding contacts.
[0117] In some embodiments of the present application, the empty branch corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes a target empty line or multiple target empty lines in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; wherein, when the contact identification path corresponding to the contact identification result includes the target empty line, the second value is the penalty coefficient corresponding to the target empty line, and when the contact identification path corresponding to the contact identification result includes the multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
[0118] In some embodiments of the present application, the feature recognition module 1001 is further used to recognize the general language features of the speech to be recognized based on the general language model before performing contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language features corresponding to the speech to be recognized; the decoding module 1002 is further used to decode the acoustic features and the general language features based on a general decoder to obtain a general recognition result; the device also includes: a determination module, which is used to determine whether the general speech recognition result is related to the contact based on a binary classification algorithm; the feature recognition module 1001 is specifically used to perform contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language features when it is determined that the general speech recognition result is related to the contact.
[0119] In some embodiments of the present application, the output module 1003 is further used to output the general voice recognition result after determining whether the general voice recognition result is related to the contact based on a binary classification algorithm, if it is determined that the general voice recognition result is not related to the contact.
[0120] It should be noted that the above-mentioned speech recognition device can be the electronic device in the above-mentioned method embodiment of the present application, or it can be a functional module and / or functional entity in the electronic device that can realize the function of the device embodiment, and the embodiment of the present application is not limited.
[0121] In the embodiments of the present application, each module can implement the speech recognition method provided in the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0122] Fig.11 The structural diagram of an electronic device provided in an embodiment of the present application is used to exemplify an electronic device that implements any speech recognition method in an embodiment of the present application, and should not be understood as a specific limitation on the embodiment of the present application.
[0123] like Fig.11 As shown, the electronic device 1100 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are also stored. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0124] Typically, the following devices may be connected to the I / O interface 1105: input devices 1106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1108 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1109. The communication devices 1109 may allow the electronic device 1100 to communicate wirelessly or wired with other devices to exchange data. Although the electronic device 1100 having various devices is shown, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0125] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 1109, or installed from a storage device 1108, or installed from a ROM 1102. When the computer program is executed by the processor 1101, the functions defined in any speech recognition method provided in the embodiment of the present application can be executed.
[0126] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0127] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0128] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0129] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: performs acoustic feature recognition on the speech to be recognized based on the acoustic model to obtain the acoustic features corresponding to the speech to be recognized; performs contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language features corresponding to the speech to be recognized, the contact language model is constructed based on multiple contact decoding graphs that perform utterance generalization processing on contact information, each contact decoding graph is generated based on keywords related to contact search and the user's contact list, and each contact decoding graph is used to indicate multiple contact recognition paths; decodes the acoustic features and the contact language features based on a contact decoder to obtain a contact recognition result; and outputs the contact recognition result.
[0130] In an embodiment of the present application, a computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, and the above-mentioned programming languages include but are not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer, or completely on a remote computer or a server. In the case of a remote computer, the remote computer can be connected to the computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0131] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] The units involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of a unit does not, in some cases, constitute a limitation on the unit itself.
[0133] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0134] In the context of the present application, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0135] An embodiment of the present application also provides a vehicle, comprising: the above-mentioned speech recognition device, or the above-mentioned electronic device, or the above-mentioned computer-readable storage medium.
[0136] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
[0137] In addition, although each operation is described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or to be performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the application. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0138] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.< / eps> < / eps>
Claims
1. A speech recognition method, characterized in that: The method comprises: Performing acoustic feature recognition on the speech to be recognized based on the acoustic model to obtain acoustic features corresponding to the speech to be recognized; performing contact language feature recognition on the speech to be recognized based on a contact language model to obtain contact language features corresponding to the speech to be recognized, wherein the contact language model is constructed based on a plurality of contact decoding graphs that perform utterance generalization processing on contact information, each contact decoding graph is generated based on keywords related to contact search and a contact list of a user, and each contact decoding graph is used to indicate a plurality of contact recognition paths; Decoding the acoustic features and the contact language features based on a contact decoder to obtain a contact recognition result; The contact identification result is outputted.
2. The method according to claim 1, characterized in that Each contact decoding graph includes a concatenated keyword subgraph and a contact subgraph; The keyword subgraph is used to indicate a keyword related to contact search, the keyword subgraph includes a plurality of nodes and lines between any two adjacent nodes, and each line in the keyword subgraph is used to indicate a character in the corresponding keyword; The contact subgraph includes multiple contact branches, each contact branch corresponds to a contact in the contact list, each contact branch includes multiple nodes and solid lines between any two adjacent nodes, each solid line in each contact branch is used to indicate a character in the corresponding contact, the starting nodes of the multiple contact branches are the same node, and the ending nodes of the multiple contact branches are the same node.
3. The method according to claim 2, characterized in that The contact recognition result is the one with the highest recognition probability among multiple candidate recognition results corresponding to the acoustic features and the contact language features, and the recognition probability is the product of the acoustic recognition probability and the language recognition probability; the language recognition probability is determined based on the product of the language matching probabilities corresponding to each character in the contact recognition result, and one of the language matching probabilities is the matching probability between a character in the contact recognition result obtained based on the contact language features and the corresponding character in the speech to be recognized; the acoustic recognition probability is determined based on the product of the acoustic matching probabilities corresponding to each character in the contact recognition result, and one of the acoustic matching probabilities is the matching probability between a character in the contact recognition result obtained based on the acoustic features and the corresponding character in the speech to be recognized; Each of the solid lines corresponds to an enhancement coefficient, and when the contact identification path corresponding to the contact identification result includes at least one solid line in the first contact branch, the language recognition probability is determined based on a first value, and the first value is the product of the enhancement coefficients corresponding to the at least one solid line in the first contact branch; The enhancement factor is greater than 1.
4. The method according to claim 3, characterized in that: Each contact branch also includes a plurality of empty lines; The two nodes of each empty line are the two nodes of a solid line, and each empty line in each contact branch is used to implement the generalization processing of a character in the contact indicated by the corresponding solid line; or, The two nodes of each empty link are the starting node of the first solid link and the ending node of the last solid link among the at least two solid links; each empty link in each contact branch is used to implement the generalization processing of a word in the contact indicated by the corresponding at least two solid links.
5. The method according to claim 4, characterized in that Each empty link corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result includes one target empty link or multiple target empty links in the first contact branch, the language recognition probability is determined based on the product of the first value and the second value; Among them, when the contact identification path corresponding to the contact identification result includes the one target empty line, the second value is the penalty coefficient corresponding to the one target empty line; when the contact identification path corresponding to the contact identification result includes multiple target empty lines, the second value is the product of the penalty coefficients corresponding to each of the multiple target empty lines; the penalty coefficient is less than 1.
6. The method according to claim 4, characterized in that In the case where at least two contact branches included in the contact subgraph indicate the same contact, the contact subgraph also includes an empty branch, the starting node of the empty branch is the ending node of any contact branch, and the ending node of the empty branch is the starting node of any contact branch; the empty branch is used to implement generalized processing of the order of words in the corresponding contact.
7. The method according to claim 6, characterized in that The empty branch corresponds to a penalty coefficient, and when the contact identification path corresponding to the contact identification result further includes the empty branch and one or more target real lines in the second contact branch, the language recognition probability is determined based on the product of the first value, the third value and the fourth value; Among them, when the contact identification path corresponding to the contact identification result also includes the target real line, the third value is the enhancement coefficient of the target real line; when the contact identification path corresponding to the contact identification result also includes the multiple target real lines, the third value is the product of the enhancement coefficients corresponding to each of the multiple target real lines, and the fourth value is the penalty coefficient corresponding to the empty branch; the penalty coefficient is less than 1.
8. The method according to any one of claims 1 to 7, characterized in that Before performing contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language feature corresponding to the speech to be recognized, the method further includes: Recognize the general language features of the speech to be recognized based on the general language model to obtain the general language features corresponding to the speech to be recognized; Decoding the acoustic features and the universal language features based on a universal decoder to obtain a universal recognition result; Based on a binary classification algorithm, determining whether the general voice recognition result is related to the contact; The performing contact language feature recognition on the speech to be recognized based on the contact language model to obtain the contact language feature corresponding to the speech to be recognized includes: When it is determined that the general speech recognition result is related to a contact, contact language feature recognition is performed on the speech to be recognized based on a contact language model to obtain the contact language feature.
9. The method according to claim 8, characterized in that After determining whether the general voice recognition result is related to the contact person based on the binary classification algorithm, the method further includes: In the case where it is determined that the general voice recognition result is not related to the contact, the general voice recognition result is output.
10. A speech recognition device, characterized in that: include: A feature recognition module, used to perform acoustic feature recognition on the speech to be recognized based on the acoustic model to obtain the acoustic features corresponding to the speech to be recognized; Performing contact language feature recognition on the speech to be recognized based on a contact language model to obtain contact language features corresponding to the speech to be recognized, wherein the contact language model is constructed based on a plurality of contact decoding graphs that generalize the contact information, each of which is generated based on a keyword related to contact search and a contact list of a user; A decoding module, used for decoding the acoustic features and the contact language features based on a contact decoder to obtain a contact recognition result; An output module is used to output the contact identification result.
11. An electronic device, characterized in that: include: A processor, wherein the processor is used to execute a computer program stored in a memory, wherein the computer program, when executed by the processor, implements the steps of the speech recognition method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the speech recognition method according to any one of claims 1 to 9 are implemented.
13. A vehicle, characterized in that: include: The speech recognition device as claimed in claim 10, or the electronic device as claimed in claim 11, or comprising the computer-readable storage medium as claimed in claim 12.
