A method, device, storage medium, equipment and product for speech recognition post-processing
By building a voice command structure tree and using the decoding network to verify the speech recognition results, the problem of typos and missing words in the speech recognition model is solved, and more efficient and accurate voice interaction is achieved.
Patent Information
- Application Number
- CN202510495996.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-04-21
AI Technical Summary
Existing voice recognition models are prone to typos and missing words when identifying user voice, resulting in low voice interaction efficiency and poor user experience.
Build a voice command structure tree, match the voice coded data by decoding the network, determine the target path and splicing word segmentation, obtain accurate voice command text, and verify or correct the voice recognition results.
It improves the accuracy and efficiency of voice recognition and improves the user's voice interaction experience.
Smart Images

Figure CN120071935B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech recognition technology, and more specifically, to a method, apparatus, storage medium, device, and product for speech recognition post-processing. Background Art
[0002] With the rapid development of big model technology, more and more devices or software products are connected to voice recognition models, so that users can perform corresponding operations through voice interaction with devices or software.
[0003] Currently, existing technologies all use voice recognition models to identify the user's voice content and use this voice content to control the corresponding device or software to perform the corresponding operation. If the voice recognition model makes a mistake in recognizing individual words in the user's voice, the voice recognition model will remind the user that it cannot be recognized and needs to speak again or will not perform any operation. Due to the inaccurate voice recognition of the voice recognition model, the user cannot accurately control the relevant device or software product through voice.
[0004] Therefore, how to provide a technical solution for a speech recognition post-processing method with higher accuracy has become a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The purpose of some embodiments of the present application is to provide a method, device, storage medium, equipment and product for post-processing of speech recognition. Through the technical solutions of the embodiments of the present application, accurate verification and processing of speech recognition results can be achieved, the efficiency of speech recognition can be guaranteed, the accuracy and efficiency of voice interaction can be improved, and the user's voice interaction experience can be enhanced.
[0006] In the first aspect, some embodiments of the present application provide a method for post-processing of speech recognition, including: obtaining speech coding data corresponding to a speech recognition result output by a speech recognition model; determining a target path that matches the speech coding data from a pre-constructed speech instruction structure tree; wherein the speech instruction structure tree is constructed based on speech interaction instruction text; the word segmentation of each node on the speech instruction structure tree represents different instruction texts; the word segmentations corresponding to each node in the target path are spliced and decoded to obtain the speech instruction text corresponding to the speech recognition result.
[0007] Some embodiments of the present application determine the target path by matching the voice coding data corresponding to the voice recognition results output by the voice recognition model with the voice command structure tree, and obtain the voice command text by splicing and decoding the word segments corresponding to the target path. This can effectively verify the voice recognition results, ensure the efficiency of voice recognition, improve the accuracy and efficiency of voice interaction, and enhance the user's voice interaction experience.
[0008] In some embodiments, determining a target path that matches the voice coding data from a pre-constructed voice command structure tree includes: obtaining data to be decoded, wherein the decoded data includes: the voice coding data and node integration data corresponding to each batch of node data in multiple batches of node data pre-divided in the voice command structure tree; inputting the data to be decoded into a decoding network, and outputting a node score for each node in each batch of node data; and determining the target path based on the node score of each node.
[0009] Some embodiments of the present application input the data to be decoded into the decoding network, determine the node score of each node, and then obtain the target path, so as to obtain the voice instruction text that best matches the voice recognition result.
[0010] In some embodiments, the node integration data includes: batch node data and parent node data; the node integration data is obtained by the following method: splicing the segmentation of each node in the batch node data to obtain the batch node data; splicing the segmentation corresponding to the parent node of each node in the batch node data to obtain the parent node data.
[0011] Some embodiments of the present application obtain node integration data by concatenating the word segmentation of each node in each batch of node data and the word segmentation of the corresponding parent node, thereby providing data support for subsequent effective decoding.
[0012] In some embodiments, determining the target path based on the node score of each node includes: obtaining the path score of each path among multiple paths on the voice command structure tree through the node score of each node; and taking the path corresponding to the maximum value of the path score of each path as the target path.
[0013] Some embodiments of the present application calculate the path score of each path and use the path corresponding to the maximum value as the target path, so as to accurately determine the voice instruction text under the target path that best matches the voice recognition result.
[0014] In some embodiments, before determining the target path that matches the voice coding data from the pre-constructed voice instruction structure tree, the method also includes: obtaining the voice interaction instruction text acting on the product object, wherein the voice interaction instruction text includes multiple texts; converting each instruction text in the voice interaction instruction text to obtain the word segmentation corresponding to each instruction text; and constructing the voice instruction structure tree according to the word segmentation corresponding to each instruction text.
[0015] Some embodiments of the present application construct a voice instruction structure tree based on the voice interaction instruction text, providing rich and effective data support for the verification and matching of subsequent voice recognition results.
[0016] In some embodiments, the method further includes: traversing the nodes in the voice command structure tree, and dividing the voice command structure tree into multiple batches of node data, wherein each batch of node data in the multiple batches of node data includes a set number of nodes, and there is no parent-child relationship between the nodes.
[0017] Some embodiments of the present application divide the voice command structure tree into multiple batches of node data to facilitate subsequent batch matching of voice recognition results, thereby improving processing efficiency and accuracy.
[0018] On the second aspect, some embodiments of the present application provide a device for post-processing speech recognition, including: an encoding module for obtaining speech encoding data corresponding to the speech recognition result output by a speech recognition model; a decoding module for determining a target path that matches the speech encoding data from a pre-constructed speech instruction structure tree; wherein the speech instruction structure tree is constructed based on speech interaction instruction text; the word segmentation of each node on the speech instruction structure tree represents different instruction text; a text output module for splicing and decoding the word segmentations corresponding to each node in the target path to obtain the speech instruction text corresponding to the speech recognition result.
[0019] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.
[0020] In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor can implement a method as described in any embodiment of the first aspect when executing the program.
[0021] In a fifth aspect, some embodiments of the present application provide a computer program product, comprising a computer program, wherein the computer program, when executed by a processor, can implement the method described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the following is a brief introduction to the drawings required for use in some embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1A system diagram of speech recognition post-processing provided for some embodiments of the present application;
[0024] Figure 2 A flow chart of a method for constructing a voice command structure tree provided in some embodiments of the present application;
[0025] Figure 3 A schematic diagram of a voice command structure tree provided for some embodiments of the present application;
[0026] Figure 4 One of the flow charts of the method for post-processing of speech recognition provided in some embodiments of the present application;
[0027] Figure 5 Flowchart 2 of the method for post-processing speech recognition provided in some embodiments of the present application;
[0028] Figure 6 A block diagram of a device for speech recognition post-processing provided in some embodiments of the present application;
[0029] Figure 7 A schematic diagram of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0031] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0032] In related technologies, with the emergence of AI interactive functions, many electronic devices and applications have introduced voice recognition models to facilitate the interaction between users and electronic products. When users interact with related electronic devices or applications through voice, due to the characteristics of each person's accent, the voice recognition model whisper sometimes makes mistakes in recognition or misses words when recognizing the voice. For example, if the voice command is "open a certain video, play the previous song, and increase the volume by 20%", the voice recognition model whisper may recognize it as "a certain video, avoid a certain video, play the previous song, and increase the volume by 20%". In this case, the voice recognition model whisper will usually remind the user to speak again until the correct voice command is recognized; or, the voice recognition model whisper will recommend relevant content to the user for selection based on the recognition results.
[0033] It can be seen from the above-mentioned related technologies that in the existing technology, there are speech recognition errors and word omissions in the speech recognition model whisper, which cannot be corrected, reducing the efficiency of voice interaction between users and electronic products and affecting user experience.
[0034] In view of this, some embodiments of the present application provide a method for post-processing of speech recognition, which can encode and decode the speech recognition results after recognition by the speech recognition model, and select the speech command text that matches the speech recognition results from a pre-constructed speech command structure tree; wherein, the speech command structure tree is constructed by different command texts, so the speech command text corresponding to the obtained speech recognition result belongs to the standard voice command, which realizes timely verification or correction of the speech recognition results, so that electronic products can accurately serve users and provide users with a good voice interaction experience.
[0035] The following is combined with Figure 1 The overall structure of the speech recognition post-processing system provided by some embodiments of the present application is exemplified.
[0036] like Figure 1 As shown, some embodiments of the present application provide a system diagram for speech recognition post-processing. The speech recognition post-processing system includes a terminal 100 and a speech recognition server 200. The user can perform voice interaction with the terminal 100 itself or an application software on the terminal 100. After receiving the user's voice, the terminal 100 sends the voice to the speech recognition server 200. The speech recognition server 200 first recognizes the voice through the deployed speech recognition model to obtain a speech recognition result; then, the speech recognition server 200 verifies or corrects the speech recognition result based on the deployed voice command structure tree to obtain the final voice command text, and then sends it to the terminal 100. The terminal 100 can perform related operations based on the voice command text.
[0037] In other embodiments of the present application, if the terminal 100 can deploy a speech recognition model and a speech command structure tree to perform operations such as speech recognition, verification, and correction, the speech recognition server 200 may not be provided. The specific configuration can be determined based on actual circumstances and is not specifically limited in this embodiment of the present application. Furthermore, the terminal 100 can be a mobile terminal or a non-portable computer terminal, which is not specifically limited in this embodiment of the present application.
[0038] In order to accurately verify or correct the speech recognition results output by the speech recognition model, it is necessary to first construct a speech instruction structure tree and deploy it in the speech recognition server 200. Figure 2 The implementation process of constructing a voice command structure tree provided by some embodiments of the present application is exemplified.
[0039] Please see the attached Figure 2 , Figure 2 A flowchart of a method for constructing a voice command structure tree is provided for some embodiments of the present application. The method for constructing a voice command structure tree may include:
[0040] S210: Obtain the voice interaction instruction text acting on the product object, wherein the voice interaction instruction text includes multiple texts.
[0041] For example, in some embodiments of the present application, a set of key voice commands is set for the characteristics of a product object (e.g., an electronic device or an application program, etc.) for operating the product object. Taking a certain video software (as a specific example of a product object) as an example, the voice commands may include: opening a certain video, closing a certain video, turning up the volume, turning down the volume, previous video, next video, etc. Taking a certain music player software (as another specific example of a product object) as an example, the voice commands may include: opening the music software, closing the music software, turning up, down or turning off the volume, playing the previous song, looping a song, etc. The voice commands corresponding to different product objects are organized into an instruction set list (as a specific example of a voice interaction instruction text). Among them, one product object corresponds to its specific instruction set list.
[0042] S220: Convert each instruction text in the voice interaction instruction text to obtain a word segment corresponding to each instruction text.
[0043] For example, in some embodiments of the present application, each instruction text is converted into an integer token (as a specific example of word segmentation) using the tokenizer of the whisper speech recognition model. The Chinese word for token is "token," which in the information technology field is a digital identifier used for identity authentication, secure access control, or data integrity protection. The Chinese word for tokenizer is "word segmenter."
[0044] S230: Construct the voice command structure tree according to the word segments corresponding to each command text.
[0045] For example, in some embodiments of the present application, a prefix tree is formed according to the tokens of each instruction text. For example, if "open Tencent Video" and "open iQiyi" have the same prefix "open", then the tokens corresponding to "Tencent Video" and "iQiyi" have the same parent node, and the tree depth value of the node is saved; in this way, a voice instruction structure tree is constructed. For example, Figure 3 The figure shows the voice command structure tree corresponding to a certain video software, where nodes A to M represent different command texts.
[0046] In some embodiments of the present application, the method of constructing a voice command structure tree also includes: traversing the nodes in the voice command structure tree, dividing the voice command structure tree into multiple batches of node data, wherein each batch of node data in the multiple batches of node data includes a set number of nodes, and there is no parent-child relationship between the nodes.
[0047] For example, in some embodiments of the present application, the nodes in the voice command structure tree are organized into batches of data (i.e., batch node data) to facilitate subsequent verification or correction of the voice recognition results. For example, starting from the root node of the tree, N nodes are taken as a batch each time, and there is no parent-child dependency relationship within the nodes of the same batch, thereby obtaining multiple batches of data. When traversing to node i, first take from i's sibling nodes of the same level. If i has less than N sibling nodes, in order to ensure that the token prefix lengths in the same batch are consistent, other nodes are not taken; if i has N sibling nodes, then N nodes are taken as a batch; the next time, take from the lower-level child nodes; perform the above operations on each node in turn until all the nodes on the tree are taken, that is, each node belongs to a batch of data.
[0048] Specifically, to obtain multiple batches of node data, you can first set up a first-in-first-out queue structure and define the write queue operation and the take queue operation. Starting from the root node, loop through the write queue and take queue operations until all nodes in the tree are added to the queue and all nodes in the queue are included in the batch data. First, write the node to the queue, and then loop through the following operations:
[0049] Take out the queue: Take out nodes from the queue one by one until the number of nodes reaches the batch size (i.e. N), or when the depth of the node is inconsistent with the depth of the node that has been taken out, get the nodes of the current batch, that is, get a batch data containing N nodes or the node depth meets the requirements.
[0050] Write Queue: By setting the maximum depth and minimum score thresholds, the total computational scale is controlled. For each node in the current batch, if the node's depth is less than the preset maximum depth or the node's score is greater than the preset minimum score threshold, the node's children are added to the array to be written. The nodes in the array to be written are then sorted by depth value from smallest to largest and written to the queue. That is, if the node's depth is greater than the preset maximum depth and the node's score is less than the preset minimum score threshold, no further comparisons are performed on the node, and a batch of data is obtained.
[0051] by Figure 3 Take the voice command structure tree shown as an example, the token content in the node is: A: empty node; B: open, C: close, D: volume; E: QQ, F: photo album, G: photo album, H: increase, I: decrease, J: close; K: music, L: email, M: 15%. Figure 3 During the traversal of the voice command structure tree shown, when there is no common parent node, an empty character node can be added as the root node, that is, the empty node A. Assuming that the batch size N is 2, according to the above rules, starting from the child node of the root node, that is, the BCD node, the batch data obtained in sequence are: BC, D, EF, GH, IJ, KL, M. It should be understood that in actual applications, the number of tree nodes may be very complex and large. Therefore, in addition to N, it is also necessary to set a preset maximum depth and minimum score threshold to limit the number of nodes in the batch data. That is, under the two conditions of the preset maximum depth and minimum score threshold, the batch size of the batch data may not be N, so as to facilitate the subsequent use of the batch data.
[0052] Specifically, in addition to the above rules, the batch arrangement method of the voice command structure tree can also be adjusted accordingly according to actual conditions, and the embodiments of the present application are not limited to this.
[0053] The following is combined with Figure 4 The specific process of the speech recognition post-processing method provided in some embodiments of the present application is exemplified.
[0054] Please see the attached Figure 4 , Figure 4 A method flow for post-processing speech recognition provided in some embodiments of the present application may include:
[0055] S410, obtaining speech coding data corresponding to the speech recognition result output by the speech recognition model.
[0056] For example, in some embodiments of the present application, after obtaining the speech recognition results output by the speech recognition model for the user's speech, a blank data segment of a preset length (e.g., 10,000) is added to the front to avoid missing the initial word. The speech recognition results are converted into mel-spectrogram data, and then encoded using a coding network consisting of one-dimensional convolution and residual attention layers (the number of residual attention layers can be set as needed) to obtain speech encoded data.
[0057] S420, determining a target path that matches the voice coding data from a pre-constructed voice command structure tree; wherein the voice command structure tree is constructed based on the voice interaction command text; and the word segmentation of each node on the voice command structure tree represents different command texts.
[0058] For example, in some embodiments of the present application, after decoding the speech coding data, a decoding network consisting of an embedding layer and several residual attention layers is used, and the target path in the speech command structure tree that is closest to the speech coding data is determined in combination with the historical attention value on the speech command structure tree. The speech command text corresponding to this target path is the speech command text that matches the speech recognition result. In order to reduce the number of decoding calculations, make full use of the results that have been calculated, and reduce repeated calculations, the current kvcache (full name Key-Value Cache) historical attention value (used in the residual attention layer) is saved for each node of the prefix tree (that is, the speech command structure tree), and the node's kv cache is initially empty.
[0059] It is understood that in the embodiment of the present application, the speech coding data is compared and analyzed with the above-mentioned divided batches of data to obtain accurate speech instruction text corresponding to the speech recognition result so that the terminal 100 can perform the corresponding operation. Therefore, in some embodiments of the present application, S420 may include:
[0060] S421: Obtain data to be decoded, wherein the decoded data includes the speech encoding data and node integration data corresponding to each batch of node data from multiple batches of node data pre-divided in the speech command structure tree. The node integration data includes batch node data and parent node data. The node integration data is obtained by concatenating the segmented words of each node in each batch of node data to obtain the batch node data; and concatenating the segmented words corresponding to the parent node of each node in each batch of node data to obtain the parent node data.
[0061] For example, in some embodiments of the present application, any batch of data from multiple batches of data is used as an example to illustrate the implementation process of S421. In addition to using the speech coding data as the decoding input, for any batch of data, all tokens on the node path are found through the parent node of the node in the batch of data, so as to obtain the node integration data used for decoding input. That is, the tokens of all nodes in any batch of data are spliced together to obtain batch node data, which is used as the decoding input; at the same time, the parent node data obtained by splicing the kv cache of the parent node of a batch of nodes is also used as the decoding input. For example, for node M (15%), the parent nodes H (increase) and D (volume) are found in turn, and the parent node data obtained by splicing the tokens corresponding to "volume increase 15%" is used as the decoding input.
[0062] S422: Input the data to be decoded into a decoding network, and output the node score of each node in each batch of node data.
[0063] For example, in some embodiments of the present application, when the decoding network decodes the data to be decoded, the speech decoding data and the token of each node in the data to be decoded are calculated by the embedding layer. The KV network of the residual attention layer is used to obtain a new KV value, which is then concatenated with the historical attention value in the KV cache. The attention value is calculated in the residual attention layer, and then the decoding result is obtained by the linear layer. After decoding, the updated KV value in any batch of data is assigned to each corresponding node, and the decoding score (as a specific example of a node score) is assigned to each node. That is, the node score of each node can be obtained through the decoding network.
[0064] S423: Determine the target path based on the node score of each node.
[0065] For example, in some embodiments of the present application, after obtaining the decoding score of each node in the prefix tree, the comprehensive score of each path in the prefix tree may be calculated to determine the target path.
[0066] In some embodiments of the present application, S423 may include: obtaining the path score of each path in the multiple paths on the voice command structure tree through the node score of each node; and taking the path corresponding to the maximum value of the path score of each path as the target path.
[0067] For example, in some embodiments of the present application, the decoding scores of each node on each path are weighted and averaged to obtain a comprehensive score for each path (as a specific example of a path score). The path with the largest comprehensive score among all paths is used as the target path. Figure 3 The voice command structure tree shown contains multiple paths, namely: ABEK, ABEL, ACG, etc. Each path is scored to select the optimal target path. This composite score indirectly reflects the similarity between the voice recognition result and the voice interaction command text. Furthermore, in some embodiments, additional conditions can be set, such that when the composite score is greater than a set threshold (e.g., 0.1), the result is adopted; otherwise, the speech recognition ASR (Automatic Speech Recognition) result is obtained through the normal decoding process.
[0068] S430: Concatenate and decode the segmented words corresponding to the nodes in the target path to obtain a voice instruction text corresponding to the voice recognition result.
[0069] For example, in some embodiments of the present application, the tokens of each node in the target path are concatenated, decoded by a tokenizer to obtain the original text (as a specific example of voice instruction text), and then output.
[0070] The following is combined with Figure 5 The specific process of the speech recognition post-processing method provided in some embodiments of the present application is exemplified.
[0071] Please see the attached Figure 5 , Figure 5 A method flow for speech recognition post-processing is provided for some embodiments of the present application.
[0072] The above implementation process is described below by way of example.
[0073] S510: construct a voice instruction structure tree based on the token corresponding to the voice interaction instruction text acting on the product object, and divide the nodes in the voice instruction structure tree into batches.
[0074] S520, obtaining speech coding data corresponding to the speech recognition result output by the speech recognition model, and obtaining node integration data.
[0075] S530: Input the speech coding data and the node integration data into the decoding network to determine the decoding score of each node in the speech command structure tree.
[0076] S540: Calculate a path score for each path in the voice command structure tree based on the decoding score of each node.
[0077] S550: The path corresponding to the maximum value among all path scores is taken as the target path.
[0078] S560: Concatenate and decode the tokens corresponding to the nodes in the target path to obtain the voice command text corresponding to the voice recognition result.
[0079] It should be noted that the specific implementation process of S510 to S560 can refer to the method embodiment provided above, and in order to avoid repetition, the detailed description is appropriately omitted here.
[0080] It can be seen from some of the above embodiments of the present application that the present application reduces the number of decoding times by constructing a prefix tree structure, accelerates the comparison and verification of decoding scores of large quantities of data, realizes the correction of speech recognition results of a fixed voice interaction instruction set, and improves the accuracy of speech recognition.
[0081] Please refer to Figure 6 , Figure 6 The following is a block diagram illustrating the composition of a speech recognition post-processing apparatus provided in some embodiments of the present application. It should be understood that the speech recognition post-processing apparatus corresponds to the aforementioned method embodiments and is capable of executing each step involved in the aforementioned method embodiments. The specific functions of the speech recognition post-processing apparatus can be found in the description above, and a detailed description is omitted here to avoid repetition.
[0082] Figure 6 The speech recognition post-processing device includes at least one software functional module that can be stored in a memory in the form of software or firmware or solidified in the speech recognition post-processing device, and the speech recognition post-processing device includes: an encoding module 610, used to obtain speech encoding data corresponding to the speech recognition result output by the speech recognition model; a decoding module 620, used to determine a target path matching the speech encoding data from a pre-constructed speech instruction structure tree; wherein the speech instruction structure tree is constructed based on the speech interaction instruction text; the word segmentation of each node on the speech instruction structure tree represents a different instruction text; a text output module 630, used to splice and decode the word segmentations corresponding to each node in the target path to obtain the speech instruction text corresponding to the speech recognition result.
[0083] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.
[0084] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the operations corresponding to any of the above methods provided in the above embodiments.
[0085] Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations corresponding to any of the above methods provided in the above embodiments.
[0086] like Figure 7 As shown, some embodiments of the present application provide an electronic device 700, which includes: a memory 710, a processor 720, and a computer program stored in the memory 710 and executable on the processor 720, wherein the processor 720 can implement a method as described in any of the above embodiments when reading the program from the memory 710 through the bus 730 and executing the program.
[0087] Processor 720 can process digital signals and can include various computing architectures, such as a complex instruction set computer architecture, a reduced instruction set computer architecture, or an architecture that implements a combination of multiple instruction sets. In some examples, processor 720 can be a microprocessor.
[0088] The memory 710 can be used to store instructions executed by the processor 720 or data related to the execution of instructions. These instructions and / or data may include code for implementing some or all functions of one or more modules described in the embodiments of this application. The processor 720 of the embodiment of the present disclosure can be used to execute the instructions in the memory 710 to implement the method shown above. The memory 710 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memory known to those skilled in the art.
[0089] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.
[0090] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0091] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
Claims
1. A method for post-processing of speech recognition, characterized in that: include: Obtain the speech coding data corresponding to the speech recognition result output by the speech recognition model; Determining a target path that matches the speech coding data from a pre-constructed speech command structure tree; wherein the speech command structure tree is constructed based on speech interaction command text; the word segmentation of each node in the speech command structure tree represents a different command text; the nodes in the speech command structure tree are organized into multiple batches of node data, and nodes within the same batch of node data do not have parent-child dependencies; splicing and decoding the segmented words corresponding to each node in the target path to obtain the voice instruction text corresponding to the voice recognition result; The method of determining a target path that matches the voice coding data from a pre-constructed voice command structure tree includes: obtaining data to be decoded, wherein the decoded data includes: the voice coding data and node integration data corresponding to each batch of node data in multiple batches of node data pre-divided in the voice command structure tree; inputting the data to be decoded into a decoding network and outputting a node score for each node in each batch of node data; determining the target path based on the node score of each node; the node integration data includes: each batch of node data and parent node data corresponding to each batch of node data.
2. The method according to claim 1, wherein The node integration data is obtained by the following method: splicing the word segmentation of each node in each batch of node data to obtain the batch of node data; The word segments corresponding to the parent node of each node in each batch of node data are concatenated to obtain the parent node data.
3. The method according to claim 1 or 2, wherein: The determining the target path based on the node score of each node includes: Obtaining a path score of each of the multiple paths on the voice command structure tree through the node score of each node; The path corresponding to the maximum value of the path scores of each path is used as the target path.
4. The method according to any one of claims 1 to 2, wherein Before determining the target path matching the speech coding data from the pre-built speech instruction structure tree, the method further includes: Acquire the voice interaction instruction text acting on the product object, wherein the voice interaction instruction text includes multiple pieces of text; Convert each instruction text in the voice interaction instruction text to obtain a word segment corresponding to each instruction text; The voice command structure tree is constructed according to the word segmentation corresponding to each command text.
5. The method according to claim 4, wherein The method further comprises: The nodes in the voice command structure tree are traversed, and the voice command structure tree is divided into multiple batches of node data, wherein each batch of node data in the multiple batches of node data includes a set number of nodes, and there is no parent-child relationship between the nodes.
6. A device for post-processing speech recognition, characterized in that: The apparatus is configured to execute the method according to claim 1, comprising: The encoding module is used to obtain the speech encoding data corresponding to the speech recognition result output by the speech recognition model; A decoding module is configured to determine a target path that matches the speech coding data from a pre-constructed speech command structure tree; wherein the speech command structure tree is constructed based on the speech interaction command text; and the word segmentation of each node in the speech command structure tree represents a different command text; The text output module is used to concatenate and decode the word segments corresponding to each node in the target path to obtain the voice instruction text corresponding to the voice recognition result.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is executed by a processor to perform the method according to any one of claims 1 to 5.
8. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program executes the method according to any one of claims 1 to 5 when run by the processor.
9. A computer program product, characterized in that The computer program product comprises a computer program, wherein the computer program is executed by a processor to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Speech recognition method, speech recognition device, electronic equipment and storage medium
CN116543753A
Policy interpretation method, device, equipment, medium and product
CN119066177A