Speech recognition methods, devices, equipment and computer-readable storage media
By introducing a caching mechanism into speech recognition, the system determines whether to directly output text or call the decoder based on the pinyin score and frequency/weight, thus solving the problems of low recognition efficiency and resource waste in existing technologies and achieving more efficient speech recognition and resource conservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CO WHEELS TECH CO LTD
- Filing Date
- 2023-09-13
- Publication Date
- 2026-05-05
AI Technical Summary
In existing speech recognition solutions, all speech commands need to be processed by acoustic models and decoders, resulting in low recognition efficiency, high resource consumption, and the problem of repeated recognition.
The system identifies the pinyin and determines the score using a preset acoustic model. If the score is greater than the threshold, it searches for the corresponding text in the cache and outputs it directly. If the score is less than the threshold or not found, it calls the decoder to correct and identify the final text. The cache stores high-frequency or high-weight pinyin and text.
It improves speech recognition efficiency, reduces resource consumption, and directly outputs high-scoring pinyin-corresponding text through caching, reducing the number of decoder calls.
Smart Images

Figure CN119626212B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of speech, and more particularly to the field of speech recognition technology. Background Technology
[0002] Existing speech recognition solutions all use acoustic models to identify the pinyin of a speech command and its score (e.g., probability), and then use a decoder to correct the pinyin and score to obtain the final text and score of the speech command, and then output the result. However, this process is required to recognize the final sentence regardless of the user's input speech command, which leads to low recognition efficiency and the possibility of repeated recognition, thus consuming a lot of resources. Summary of the Invention
[0003] This disclosure provides a speech recognition method, apparatus, device, storage medium, and vehicle.
[0004] According to a first aspect of this disclosure, a speech recognition method is provided. The method includes:
[0005] Get voice commands;
[0006] The voice command is recognized by a preset acoustic model to obtain the corresponding pinyin and the score of the pinyin;
[0007] Determine whether the score of the pinyin is greater than a preset score threshold;
[0008] If the score of the pinyin is greater than the preset score threshold, then it is determined whether the text corresponding to the pinyin is found in the cache;
[0009] If the text corresponding to the pinyin is found in the cache, then the text corresponding to the pinyin is output.
[0010] In addition to the aspects described above and any possible implementations, a further implementation is provided, wherein the method further includes:
[0011] If the score of the pinyin is less than or equal to the preset score threshold, or if the text corresponding to the pinyin is not found in the cache, then the preset decoder is invoked to correct the pinyin and / or the score of the pinyin, and the final text is identified, wherein the final text is the text corresponding to the pinyin with the highest score;
[0012] Output the final text.
[0013] In addition to the aspects described above and any possible implementations, a further implementation is provided, wherein the method further includes:
[0014] Analyze the text corresponding to the voice commands collected by each vehicle's infotainment system;
[0015] Select texts that appear more frequently than a preset frequency from the texts corresponding to the voice commands collected by each vehicle system;
[0016] Determine the pinyin corresponding to the text whose frequency of occurrence is higher than a preset frequency;
[0017] The texts that appear more frequently than a preset frequency, along with their corresponding pinyin, are stored in the cache.
[0018] In addition to the aspects described above and any possible implementations, a further implementation is provided, wherein the method further includes:
[0019] Analyze the text corresponding to the voice commands collected by each vehicle's infotainment system;
[0020] Determine the number of occurrences of each text and the total number of occurrences of the text corresponding to each voice command collected by the vehicle system;
[0021] Calculate the percentage of each text's occurrence count relative to the total number of occurrences;
[0022] The weight of each text is calculated based on its proportion.
[0023] Select target texts from the given texts that have a weight higher than a preset weight;
[0024] The target text, the weight of the target text, and the corresponding pinyin of the target text are stored in the cache.
[0025] In addition to the aspects and any possible implementations described above, a further implementation is provided in which the calculation of the weight of each text based on the proportion of each text includes:
[0026] Obtain the correspondence between text proportion and text weight;
[0027] The weight of each text is determined by matching the proportion of each text with the corresponding relationship.
[0028] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein the method further includes: determining the polyphonic characters in the cache and the corresponding pinyin of the polyphonic characters;
[0029] A preset pronunciation dictionary is used to determine whether the polyphonic character and its corresponding pinyin match; wherein, the preset pronunciation dictionary records the polyphonic character and its corresponding correct pinyin;
[0030] If there is a mismatch, the pinyin corresponding to the polyphonic character will be updated to the correct pinyin recorded in the preset pronunciation dictionary.
[0031] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein the method further includes: determining each text in the cache, the pinyin corresponding to each text, and the weight of each text;
[0032] The system uses a preset pronunciation dictionary to determine whether each text and its corresponding pinyin match, and recalculates the new weights of each text using the texts corresponding to voice commands collected by the vehicle system at different time periods; wherein, the preset pronunciation dictionary records each text and its corresponding correct pinyin;
[0033] If any text does not match the corresponding pinyin, then the pinyin corresponding to any text is updated to the correct pinyin corresponding to any text recorded in the preset pronunciation dictionary;
[0034] If the difference between the new weight of any text and the weight in the cache is greater than a preset threshold, then the weight of any text will be updated to the new weight.
[0035] According to a second aspect of this disclosure, a speech recognition device is provided. The device includes:
[0036] The acquisition module is used to acquire voice commands;
[0037] The recognition module is used to recognize the voice command through a preset acoustic model to obtain the corresponding pinyin and the score of the pinyin;
[0038] The first judgment module is used to determine whether the score of the pinyin is greater than a preset score threshold;
[0039] The second judgment module is used to determine whether the text corresponding to the pinyin is found in the cache if the score of the pinyin is greater than the preset score threshold.
[0040] The output module is used to output the text corresponding to the pinyin if the text corresponding to the pinyin is found in the cache.
[0041] According to a third aspect of this disclosure, an electronic device is provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described above.
[0042] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method according to a first aspect of this disclosure.
[0043] According to a fifth aspect of this disclosure, a vehicle is provided, the vehicle including a voice recognition device as described in the second aspect and / or an electronic device as described in the third aspect.
[0044] In this disclosure, the speech command is recognized using the preset acoustic model to obtain the corresponding pinyin and its score. Then, it is automatically determined whether the pinyin score is greater than a preset score threshold. If the pinyin score is greater than the preset score threshold, it indicates that the pinyin has a high accuracy rate. Therefore, it can be further determined whether the text corresponding to the pinyin is found in the cache. If the text corresponding to the pinyin is found in the cache, the text corresponding to the pinyin is output. In this way, for pinyin with a high score, the corresponding text can be directly searched in the cache. If it is found, the final text can be obtained without calling the decoder. This speeds up the speech recognition rate and improves recognition efficiency. Furthermore, for speech commands corresponding to pinyin with a cache, there is no need to call the decoder again for re-recognition, which helps to reduce resource consumption.
[0045] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0046] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0047] Figure 1 A flowchart of a speech recognition method according to an embodiment of the present disclosure is shown;
[0048] Figure 2 A flowchart of another speech recognition method according to an embodiment of the present disclosure is shown;
[0049] Figure 3A A flowchart illustrating a method for storing cached Chinese text according to an embodiment of the present disclosure is shown;
[0050] Figure 3B A flowchart illustrating another method for storing cached Chinese text according to an embodiment of the present disclosure is shown;
[0051] Figure 4 A block diagram of a speech recognition device according to an embodiment of the present disclosure is shown;
[0052] Figure 5 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0054] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0055] Figure 1 A flowchart of a speech recognition method 100 according to an embodiment of the present disclosure is shown. The execution entity of method 100 may be an in-vehicle system, and the method may include:
[0056] Step 110, obtain voice commands;
[0057] Voice commands are voice commands issued by the user.
[0058] Step 120: Recognize the voice command using a preset acoustic model to obtain the corresponding pinyin and the score of the pinyin;
[0059] The acoustic model is one of the most important components of a speech recognition system, and most mainstream systems use Hidden Markov Models (HMMs) for modeling. The acoustic model is used to recognize the speech command, obtaining its pinyin and a score. A higher score corresponds to a higher accuracy rate. This score is essentially a probability.
[0060] Step 130: Determine whether the score of the pinyin is greater than a preset score threshold;
[0061] Step 140: If the score of the pinyin is greater than the preset score threshold, then determine whether the text corresponding to the pinyin is found in the cache;
[0062] If the score of a certain pinyin is greater than the preset score threshold, it indicates that the accuracy of the pinyin is very high.
[0063] In an alternative embodiment, the pinyin and the corresponding text stored in the cache can be the pinyin and the corresponding text with relatively high usage frequencies. The storage method for high-frequency texts can be as follows: Count the texts collected by each vehicle-mounted computer and the occurrence frequencies of each text, then select the texts with higher occurrence frequencies as high-frequency texts, and confirm the pinyin corresponding to the high-frequency texts. Then, store the high-frequency texts and the pinyin corresponding to the high-frequency texts in the cache.
[0064] and / or
[0065] In an alternative embodiment, the pinyin and the corresponding text stored in the cache can be the pinyin and the corresponding text with relatively high usage frequencies. The storage method for high-frequency texts can be as follows: Count the texts collected by each vehicle-mounted computer and the number of occurrences of each text, then assign weights according to the proportion of the number of occurrences of each text to the total number of occurrences of all texts. The larger the proportion, the larger the weight; the smaller the proportion, the smaller the weight. Then, select the texts with large weights as high-frequency texts, and confirm the pinyin corresponding to the high-frequency texts. Then, store the high-frequency texts and the pinyin corresponding to the high-frequency texts in the cache.
[0066] Step 150, if the text corresponding to the pinyin is found in the cache, output the text corresponding to the pinyin.
[0067] In the present disclosure, the text corresponding to the pinyin is the recognition result corresponding to the voice command. Among them, the composition of the pinyin cache is similar to the composition of the dictionary, and they are all in a one-to-one correspondence. For example, the text corresponding to the pinyin 'wo3 yao2 kan4 dian4 shi4' (the numbers in the pinyin are tones) is '我要看电视'. Each pinyin with tones corresponds to one character.
[0068] By using the preset acoustic model to recognize the voice command, the pinyin corresponding to the voice command and the score of the pinyin can be obtained. Then, automatically determine whether the score of the pinyin is greater than the preset score threshold. If the score of the pinyin is greater than the preset score threshold, it means that the accuracy of the pinyin is high. Therefore, it can be further determined whether the text corresponding to the pinyin is found in the cache. If the text corresponding to the pinyin is found in the cache, just output the text corresponding to the pinyin. In this way, for pinyins with relatively high scores, an attempt can be made to directly find the corresponding text in the cache. If found, there is no need to call the decoder to obtain the final text, which speeds up the voice recognition rate, is beneficial to improving the recognition efficiency, and for voice commands corresponding to pinyins with a cache, there is no need to call the decoder to re-recognize. Therefore, it is beneficial to reduce resource consumption. <.
[0069] In some optional embodiments of this disclosure, if the score of the pinyin is less than or equal to the preset score threshold, or if the text corresponding to the pinyin is not found in the cache, a preset decoder is invoked to correct the pinyin and / or the score of the pinyin, and the final text is identified, wherein the final text is the text corresponding to the pinyin with the highest score; the final text is then output.
[0070] In one optional embodiment of this disclosure, after the preset decoder is invoked, the associated or built-in language model can be automatically invoked. The language model can be used to correct the pinyin and its score, and the final text can be generated based on the pinyin.
[0071] Specifically, the acoustic model is trained using sound and outputs pinyin and its score, while the language model is trained using pinyin and outputs the final text corresponding to that pinyin. Therefore, after the decoder calls the language model, the language model uses the semantic logic obtained during training to re-identify each pinyin given by the acoustic model (such as identifying incorrect pinyin or incoherent pinyin), and corrects the score of each pinyin according to the recognition result. Then, it outputs the text corresponding to the pinyin with the highest score as the final text.
[0072] Understandably, if the score of the pinyin is less than or equal to the preset score threshold, it means that the pinyin is not very accurate and needs to be modified. If the text corresponding to the pinyin is not found in the cache, it means that the text corresponding to the pinyin needs to be re-identified. Therefore, in both cases, the preset decoder needs to be called to correct the pinyin and / or the score of the pinyin and identify the final text.
[0073] like Figure 3A As shown, in some optional embodiments of this disclosure, the method further includes:
[0074] Step A1: Calculate the text corresponding to the voice commands collected by each vehicle system;
[0075] The system can statistically analyze the text corresponding to voice commands collected by each vehicle's infotainment system over a certain period of time. For example, it can analyze the text corresponding to voice commands collected by vehicle A, vehicle B, and vehicle C.
[0076] Step A2: Select texts from the texts corresponding to the voice commands collected by each vehicle system that have a frequency higher than a preset frequency;
[0077] Texts that appear more frequently than a preset frequency are texts that are used more often and correspond to the voices frequently emitted by different users in the vehicle's infotainment system.
[0078] Step A3: Determine the pinyin corresponding to the text whose frequency of occurrence is higher than a preset frequency;
[0079] Step A4: Store the texts that appear more frequently than a preset frequency and their corresponding pinyin in the cache.
[0080] By statistically analyzing the text corresponding to the voice commands collected by each vehicle's infotainment system, texts with a frequency higher than a preset frequency can be selected from the texts corresponding to the voice commands collected by each vehicle's infotainment system. Then, the pinyin corresponding to the text with a frequency higher than the preset frequency is determined. The text with a frequency higher than the preset frequency and the pinyin corresponding to the text with a frequency higher than the preset frequency are then stored in the cache. In this way, when the pinyin corresponding to a certain voice command is identified again as the pinyin in the cache, the corresponding text can be directly called as the final recognition result.
[0081] like Figure 3B As shown, in some optional embodiments of this disclosure, the method further includes:
[0082] Step B1: Calculate the text corresponding to the voice commands collected by each vehicle's infotainment system;
[0083] Step B2: Determine the number of times each text appears and the total number of times the text corresponding to the voice commands collected by each vehicle system appears;
[0084] The number of occurrences of each text is the number of occurrences of each text in the text corresponding to all voice commands collected by the vehicle system. The total number of occurrences of the text corresponding to all voice commands collected by the vehicle system is the total number of occurrences of the text corresponding to all voice commands collected by the vehicle system.
[0085] Step B3: Calculate the ratio of the occurrence count of each text to the total occurrence count;
[0086] The percentage of each text is the quotient of the number of times each text appears to the total number of times it appears.
[0087] Step B4: Calculate the weight of each text based on its proportion; different proportions correspond to different weights.
[0088] Step B5: Select target texts with weights higher than preset weights from the texts.
[0089] Step B6: Store the target text, the weight of the target text, and the corresponding pinyin of the target text in the cache.
[0090] For example, we can analyze frequently used phrases from online statistics. If a command like "I want to listen to music" appears frequently in online recognition results, we can add the pinyin, text, and weight of "I want to listen to music" to the pinyin cache. Simultaneously, we can calculate the proportion based on the frequency of occurrence and all phrases, assigning weights accordingly. The structure might look like this:
[0091] wo3 yao4 ting1 ge1 I want to listen to songs 0.56 (weight).
[0092] By statistically analyzing the text corresponding to the voice commands collected by each vehicle's infotainment system, the proportion of each text can be calculated. Then, based on the proportion of each text, the weight of each text is automatically calculated. Target texts with higher weights than a preset weight are selected from the texts. The target text, its weight, and its corresponding pinyin are then stored in the cache. In this way, texts with high weights and their corresponding pinyin can be stored in the cache. When a voice command is recognized again and its pinyin matches the pinyin in the cache, the corresponding text can be directly retrieved as the final recognition result.
[0093] In some embodiments, calculating the weight of each text based on its proportion includes:
[0094] Obtain the correspondence between text proportion and text weight;
[0095] The weight of each text is determined by matching the proportion of each text with the corresponding relationship.
[0096] Different file proportions correspond to different text weights. For example, the higher the proportion, the higher the weight. Therefore, there is a corresponding relationship between text proportion and text weight. By matching the proportion of each text with the corresponding relationship, the weight of each text can be automatically determined.
[0097] In some embodiments, the polyphonic characters in the cache and the corresponding pinyin of the polyphonic characters are determined;
[0098] A preset pronunciation dictionary is used to determine whether the polyphonic character and its corresponding pinyin match; wherein, the preset pronunciation dictionary records the polyphonic character and its corresponding correct pinyin;
[0099] The method to determine whether there is a match is as follows: search for the correct pinyin corresponding to the polyphonic character in the preset pronunciation dictionary, and then determine whether the pinyin corresponding to the polyphonic character is consistent with the correct pinyin. If they are consistent, it means that the polyphonic character and its corresponding pinyin are a match.
[0100] If there is a mismatch, the pinyin corresponding to the polyphonic character will be updated to the correct pinyin recorded in the preset pronunciation dictionary.
[0101] Since the preset pronunciation dictionary records each polyphonic character and its corresponding correct pinyin, the preset pronunciation dictionary can be used to automatically determine whether the polyphonic character and its corresponding pinyin match. If they do not match, it means that the pinyin corresponding to the polyphonic character is not accurate. Therefore, the pinyin corresponding to the polyphonic character can be automatically updated to the correct pinyin recorded in the preset pronunciation dictionary, thus ensuring the correctness of the pinyin corresponding to the polyphonic character.
[0102] In some embodiments, each text in the cache, the pinyin corresponding to each text, and the weight of each text are determined;
[0103] The system uses a preset pronunciation dictionary to determine whether each text and its corresponding pinyin match, and recalculates the new weights of each text using the texts corresponding to voice commands collected by the vehicle system at different time periods; wherein, the preset pronunciation dictionary records each text and its corresponding correct pinyin;
[0104] The new weights of each text are recalculated using the text corresponding to the voice commands collected by the vehicle's infotainment system at different time periods.
[0105] If the weight of each text in the cache corresponds to the voice command collected by the vehicle system in time period A, then the new weight can be calculated using the text corresponding to the voice command collected by the vehicle system in time period B. The method for calculating the new weight is the same as the method for calculating the weight of each text in the cache.
[0106] If any text does not match the corresponding pinyin, then the pinyin corresponding to any text is updated to the correct pinyin corresponding to any text recorded in the preset pronunciation dictionary;
[0107] If the difference between the new weight of any text and the weight in the cache is greater than a preset threshold, then the weight of any text will be updated to the new weight.
[0108] Since the preset pronunciation dictionary records each text and the corresponding pinyin of each text, therefore, the preset pronunciation dictionary can be used to automatically determine whether each text and the corresponding pinyin match. If any text does not match the corresponding pinyin, it means that the pinyin of the text is not accurate enough. Therefore, the text and the corresponding pinyin can be automatically updated to the correct pinyin of the text recorded in the preset pronunciation dictionary. In this way, the correctness of the pinyin corresponding to each text can be ensured. At the same time, the new weights of each text can be recalculated using the texts corresponding to the voice commands collected by the vehicle-mounted computer at different time periods. If the difference between the new weight of any text and the weight in the cache is greater than the preset threshold, it means that the difference between the new weight of the text and the weight in the cache is too large. Therefore, the weight of the text can be automatically updated to the new weight to ensure the correctness of the weight of the text.
[0109] The following will combine Figure 2 to further elaborate on the technical solution of the present disclosure in detail:
[0110] The overall structure of the present disclosure adds a pinyin cache mechanism on the basis of the existing acoustic model, language model, and decoder, as follows Figure 2 As shown, when the audio is input into the recognition system, first, the acoustic model outputs the pinyin result and score of the audio recognition. When the score exceeds a certain threshold and the corresponding text result is found in the pinyin cache, the calculation of the decoder and language model is skipped, and the recognition result is directly output.
[0111] The composition of the pinyin cache is similar to that of the dictionary, both are in a one-to-one correspondence relationship. For example, the text corresponding to 'wo3 yao2 kan4dian4shi4' is '我要看电视', and each pinyin with tone corresponds to a character.
[0112] Count the sentences frequently used by users online. For example, the command sentence '我要听歌' appears more frequently in the online recognition results. Then, add the pinyin and text of '我要听歌' to the pinyin cache. At the same time, the proportion will also be calculated based on the number of occurrences and all sentences, and weights will be assigned. The composition form is as follows:
[0113] wo3 yao4 ting1 ge1我要听歌0.56
[0114] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present disclosure is not limited by the described action sequence, because according to the present disclosure, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present disclosure.
[0115] The above is an introduction to the method embodiments. The following describes the solution described in this disclosure further through device embodiments.
[0116] Figure 4 A block diagram of a speech recognition device 300 according to an embodiment of the present disclosure is shown. As shown in FIG3, the device 300 includes:
[0117] Acquisition module 410 is used to acquire voice commands;
[0118] The recognition module 420 is used to recognize the voice command through a preset acoustic model to obtain the corresponding pinyin and the score of the pinyin;
[0119] The first judgment module 430 is used to determine whether the score of the pinyin is greater than a preset score threshold;
[0120] The second judgment module 440 is used to determine whether the text corresponding to the pinyin is found in the cache if the score of the pinyin is greater than the preset score threshold.
[0121] The output module 450 is used to output the text corresponding to the pinyin if the text corresponding to the pinyin is found in the cache.
[0122] In addition to the aspects described above and any possible implementations, a further implementation is provided in which the apparatus further includes:
[0123] The first processing module is used to call a preset decoder to correct the pinyin and / or the pinyin score if the score of the pinyin is less than or equal to the preset score threshold, or if the text corresponding to the pinyin is not found in the cache, and to identify the final text, wherein the final text is the text corresponding to the pinyin with the highest score;
[0124] The output module is used to output the final text.
[0125] In addition to the aspects described above and any possible implementations, a further implementation is provided in which the apparatus further includes:
[0126] The first statistics module is used to count the text corresponding to the voice commands collected by each vehicle's infotainment system;
[0127] The first selection module is used to select texts that appear more frequently than a preset frequency from the texts corresponding to the voice commands collected by each vehicle unit;
[0128] The first determining module is used to determine the pinyin corresponding to the text whose frequency of occurrence is higher than a preset frequency;
[0129] The first storage module is used to store the texts that appear more frequently than a preset frequency and their corresponding pinyin in the cache.
[0130] In addition to the aspects described above and any possible implementations, a further implementation is provided in which the apparatus further includes:
[0131] The second statistics module is used to count the text corresponding to the voice commands collected by each vehicle's infotainment system;
[0132] The second determining module is used to determine the number of times each text appears and the total number of times the text corresponding to the voice commands collected by each vehicle system appears.
[0133] The first calculation module is used to calculate the ratio of the occurrence count of each text to the total occurrence count;
[0134] The second calculation module is used to calculate the weight of each text based on the proportion of each text.
[0135] The second selection module is used to select target text with a higher preset weight from the texts;
[0136] The second storage module is used to store the target text, the weight of the target text, and the corresponding pinyin of the target text in the cache.
[0137] As described above, and in any possible implementation, a further implementation is provided, wherein the second computing module is specifically used for:
[0138] Obtain the correspondence between text proportion and text weight;
[0139] The weight of each text is determined by matching the proportion of each text with the corresponding relationship.
[0140] In addition to the aspects described above and any possible implementations, a further implementation is provided in which the apparatus further includes:
[0141] The third determining module is used to determine the polyphonic characters in the cache and the corresponding pinyin of the polyphonic characters;
[0142] The judgment module is used to determine whether the polyphonic character and its corresponding pinyin match using a preset pronunciation dictionary; wherein, the preset pronunciation dictionary records the polyphonic character and its corresponding correct pinyin;
[0143] The first update module is used to update the pinyin corresponding to the polyphonic character to the correct pinyin recorded in the preset pronunciation dictionary if there is a mismatch.
[0144] In addition to the aspects described above and any possible implementations, a further implementation is provided in which the apparatus further includes:
[0145] The fourth determining module is used to determine each text in the cache, the pinyin corresponding to each text, and the weight of each text;
[0146] The second processing module is used to determine whether each text and its corresponding pinyin match using a preset pronunciation dictionary, and to recalculate the new weight of each text using the text corresponding to the voice commands collected by the vehicle system at different time periods; wherein, the preset pronunciation dictionary records each text and its corresponding correct pinyin;
[0147] The second update module is used to update the pinyin corresponding to any text to the correct pinyin recorded in the preset pronunciation dictionary if any text does not match the corresponding pinyin.
[0148] The third update module is used to update the weight of any text to the new weight if the difference between the new weight of any text and the weight in the cache is greater than a preset threshold.
[0149] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0150] According to embodiments of this disclosure, this disclosure also provides an electronic device, including:
[0151] At least one processor; and
[0152] A memory communicatively connected to the at least one processor; wherein,
[0153] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the above method embodiments.
[0154] According to embodiments of this disclosure, this disclosure also provides a vehicle, including: a voice recognition device as described in the above embodiments or an electronic device as described in the above embodiments.
[0155] According to embodiments of this disclosure, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform any of the method embodiments described above.
[0156] Figure 5A schematic block diagram of an electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0157] Device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded into random access memory (RAM) 503 from storage unit 508. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 505.
[0158] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0159] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as method 100. For example, in some embodiments, method 100 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform method 100 by any other suitable means (e.g., by means of firmware).
[0160] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0162] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0163] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0164] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0165] Computing systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0166] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0167] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A speech recognition method, characterized in that, include: Get voice commands; The voice command is recognized by a preset acoustic model to obtain the corresponding pinyin and the score of the pinyin; Determine whether the score of the pinyin is greater than a preset score threshold; wherein, the score is a probability; If the score of the pinyin is greater than the preset score threshold, then it is determined whether the text corresponding to the pinyin is found in the cache; If the text corresponding to the pinyin is found in the cache, then the text corresponding to the pinyin is output. The method further includes: If the score of the pinyin is less than or equal to the preset score threshold, or if the text corresponding to the pinyin is not found in the cache, a preset decoder is invoked to correct the pinyin and / or the score of the pinyin, and the final text is identified, wherein the final text is the text corresponding to the pinyin with the highest score; after the preset decoder is invoked, it can automatically call the associated or built-in language model, use the language model to correct the pinyin and the score of the pinyin, and generate the final text based on the pinyin; Output the final text.
2. The method according to claim 1, characterized in that, The method further includes: Analyze the text corresponding to the voice commands collected by each vehicle's infotainment system; Select texts that appear more frequently than a preset frequency from the texts corresponding to the voice commands collected by each vehicle system; Determine the pinyin corresponding to the text whose frequency of occurrence is higher than a preset frequency; The texts that appear more frequently than a preset frequency, along with their corresponding pinyin, are stored in the cache.
3. The method according to claim 1, characterized in that, The method further includes: Analyze the text corresponding to the voice commands collected by each vehicle's infotainment system; Determine the number of occurrences of each text and the total number of occurrences of the text corresponding to each voice command collected by the vehicle system; Calculate the percentage of each text's occurrence count relative to the total number of occurrences; Calculate the weight of each text based on its proportion; Select target texts from the given texts that have a weight higher than a preset weight; The target text, the weight of the target text, and the corresponding pinyin of the target text are stored in the cache.
4. The method according to claim 3, characterized in that, The step of calculating the weight of each text based on its proportion includes: Obtain the correspondence between text proportion and text weight; The weight of each text is determined by matching the proportion of each text with the corresponding relationship.
5. The method according to claim 1, characterized in that, The method further includes: Identify the polyphonic characters in the cache and their corresponding pinyin; A preset pronunciation dictionary is used to determine whether the polyphonic character and its corresponding pinyin match; wherein, the preset pronunciation dictionary records the polyphonic character and its corresponding correct pinyin; If there is a mismatch, the pinyin corresponding to the polyphonic character will be updated to the correct pinyin recorded in the preset pronunciation dictionary.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Determine each text in the cache, the corresponding pinyin for each text, and the weight of each text; The system uses a preset pronunciation dictionary to determine whether each text and its corresponding pinyin match, and recalculates the new weights of each text using the texts corresponding to voice commands collected by the vehicle system at different time periods; wherein, the preset pronunciation dictionary records each text and its corresponding correct pinyin; If any text does not match the corresponding pinyin, then the pinyin corresponding to any text is updated to the correct pinyin corresponding to any text recorded in the preset pronunciation dictionary; If the difference between the new weight of any text and the weight in the cache is greater than a preset threshold, then the weight of any text will be updated to the new weight.
7. A voice recognition device, characterized in that, include: The acquisition module is used to acquire voice commands; The recognition module is used to recognize the voice command through a preset acoustic model to obtain the corresponding pinyin and the score of the pinyin; The first judgment module is used to determine whether the score of the pinyin is greater than a preset score threshold; wherein the score is a probability. The second judgment module is used to determine whether the text corresponding to the pinyin is found in the cache if the score of the pinyin is greater than the preset score threshold. An output module is used to output the text corresponding to the pinyin if the text corresponding to the pinyin is found in the cache. The device is also used for: If the score of the pinyin is less than or equal to the preset score threshold, or if the text corresponding to the pinyin is not found in the cache, a preset decoder is invoked to correct the pinyin and / or the score of the pinyin, and the final text is identified, wherein the final text is the text corresponding to the pinyin with the highest score; after the preset decoder is invoked, it can automatically call the associated or built-in language model, use the language model to correct the pinyin and the score of the pinyin, and generate the final text based on the pinyin; Output the final text.
8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
10. A vehicle, characterized in that, include: The apparatus of claim 7, and / or the electronic device of claim 8, and / or the readable storage medium of claim 9.
Citation Information
Patent Citations
Voice recognition method, device and equipment, and computer readable storage medium
CN110164435A
Text error correction method and device
CN114154485A