Label text processing method and device, equipment, medium and product
Through the method of end-to-end speech recognition and backfilling target symbols, target annotation text is generated, which solves the problem that the output of the speech recognition model does not contain target symbols, and improves the efficiency and accuracy of speech recognition.
Patent Information
- Application Number
- CN202410673070.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-28
AI Technical Summary
The recognition text output by the existing speech recognition model does not contain the target symbol and requires a post-processing module to be added, resulting in low speech recognition efficiency.
By obtaining the original annotated text and audio data, perform end-to-end speech recognition, obtain the recognition result with the target symbol, and backfill the target symbol based on this result to generate the target annotated text for training the speech recognition model, saving post-processing steps.
It improves the speech recognition efficiency, directly obtains the recognition results with target symbols, reduces the punctuation and number regularization tasks of the post-processing module, and improves the recognition accuracy and efficiency.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment, medium and product for processing annotated text. Background Art
[0002] Speech recognition is the process of converting speech signals into text or commands using computer technology. It involves analyzing and understanding the sound input of human language through a speech recognition model and converting it into a text form that can be used in various applications.
[0003] At present, the recognized text output by the speech recognition model usually does not contain target symbols, such as punctuation marks and Arabic numerals. The target symbols need to be added to the recognized text through a post-processing module to obtain the final recognized text, which results in low speech recognition efficiency. Summary of the invention
[0004] Based on the above technical status, the present application proposes a method, device, equipment, medium and product for processing annotated text, which can improve the efficiency of speech recognition.
[0005] In order to achieve the above technical objectives, this application specifically proposes the following technical solutions:
[0006] The first aspect of the present application proposes a model training method, including: obtaining original annotated text and audio data corresponding to the original annotated text, the original annotated text not including a target symbol; performing end-to-end speech recognition on the audio data to obtain a first audio recognition result corresponding to the audio data, the first audio recognition result including a target symbol; based on the first audio recognition result, backfilling the original annotated text with target symbols to obtain a target annotated text, the target annotated text being used for end-to-end training of a speech recognition model.
[0007] In some embodiments, the method of backfilling the original annotated text with target symbols based on the first audio recognition result to obtain target annotated text includes: based on the first audio recognition result, backfilling the original annotated text with target symbols to obtain first candidate annotated text; and obtaining the target annotated text based on the first candidate annotated text.
[0008] In some embodiments, the method of backfilling the target symbol into the original annotated text based on the first audio recognition result to obtain a first candidate annotated text includes: aligning the first audio recognition result and the original annotated text to obtain a first aligned text; and backfilling the target symbol into the original annotated text based on the first aligned text to obtain a first candidate annotated text.
[0009] In some embodiments, the first aligned text includes alignment results corresponding to a plurality of statistical units, and the alignment result of each statistical unit includes original annotation data, alignment type and recognition result data corresponding to the statistical unit, and the alignment type represents the consistency between the original annotation data and the recognition result data; wherein, based on the first aligned text, backfilling the original annotation text with target symbols to obtain a first candidate annotation text comprises: for each alignment result in the plurality of alignment results, when the recognition result data in the alignment result is Arabic numerals or punctuation marks, determining that the statistical unit corresponding to the previous first target alignment type of the statistical unit to the statistical unit corresponding to the next first target alignment type is a statistical period; if the statistical period is consistent with the statistical period, If the statistical results adjacent to the alignment result are non-Arabic numerals or non-mathematical symbols, and the alignment types of the remaining alignment results except the current alignment result within the statistical period are the second target alignment type, the recognition result data in the alignment result is backfilled to the position of the original annotation text in the statistical unit to obtain the backfill result of the statistical unit; if the statistical results adjacent to the alignment result within the statistical period are Arabic numerals or mathematical symbols, and the alignment types of the remaining alignment results except the current alignment result within the statistical period are the third target alignment type, the recognition result data in the alignment result is backfilled to the position of the original annotation text in the statistical unit to obtain the backfill result of the statistical unit; based on the backfill results corresponding to multiple statistical units, the first candidate annotation text is obtained.
[0010] In some embodiments, obtaining the target annotation text based on the first candidate annotation text includes: acquiring a second candidate annotation text corresponding to the original annotation text; and determining the target annotation text based on the first candidate annotation text and the second candidate annotation text.
[0011] In some embodiments, the first audio recognition result is obtained using a first model, and the first model is a model capable of end-to-end speech recognition; wherein, obtaining the second candidate annotated text corresponding to the original annotated text includes: using a second model to perform end-to-end speech recognition on the audio data to obtain a second audio recognition result corresponding to the audio data, the second audio recognition result includes a target symbol, the second model is a model capable of end-to-end speech recognition, and the first model is different from the second model; based on the second audio recognition result, backfilling the original annotated text with punctuation marks and Arabic numerals to obtain the second candidate annotated text; or, using a dictionary library to fill the original annotated text with target symbols to obtain the second candidate annotated text.
[0012] In some embodiments, determining the target annotation text based on the first candidate annotation text and the second candidate annotation text includes: aligning the first candidate annotation text and the second candidate annotation text to obtain a third aligned text between the first candidate annotation text and the second candidate annotation text; and based on the third aligned text, backfilling punctuation marks and Arabic numerals into the original annotation text to obtain the target annotation text.
[0013] In some embodiments, obtaining the target annotated text based on the first candidate annotated text includes: determining the first candidate annotated text as the target annotated text.
[0014] In some embodiments, the target symbol includes Arabic numerals and / or punctuation marks.
[0015] The second aspect of the present application proposes a device for processing annotated text, comprising: an acquisition unit, used to acquire original annotated text and audio data corresponding to the original annotated text, wherein the original annotated text does not include a target symbol; a speech recognition unit, used to perform end-to-end speech recognition on the audio data to obtain a first audio recognition result corresponding to the audio data, wherein the first audio recognition result includes a target symbol; a backfill unit, used to backfill the original annotated text with target symbols based on the first audio recognition result to obtain a target annotated text, wherein the target annotated text is used for end-to-end training of a speech recognition model.
[0016] The third aspect of the present application proposes an electronic device, comprising a memory and a processor; the memory is connected to the processor and is used to store programs; the processor is used to implement the method for processing annotated text described in the first aspect and any one of the implementation methods of the first aspect by running the program in the memory.
[0017] A sixth aspect of the present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for processing annotated text described in the first aspect and any one of the implementation methods of the first aspect is implemented.
[0018] In a seventh aspect, the present application proposes a computer program product, comprising computer program instructions, which, when executed by a processor, enable the processor to implement the method for processing annotated text as described in the first aspect and any one of the implementation methods of the first aspect.
[0019] The processing method, device, equipment, medium and product of the annotated text proposed in the present application can obtain a first audio recognition result with a target symbol by performing end-to-end speech recognition on the audio data corresponding to the original annotated text, and then backfill the target symbol into the original annotated text based on the first audio recognition result to obtain the target annotated text. The target annotated text can be used as an end-to-end training corpus to train the speech recognition model for end-to-end speech recognition tasks, thereby obtaining a speech recognition model with end-to-end speech recognition capabilities. Furthermore, when the speech recognition model is applied for speech recognition, an end-to-end speech recognition result can be directly obtained, which saves the steps of the punctuation task and the number regularization task of the post-processing module and improves the speech recognition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0021] Figure 1 A flowchart of a method for processing annotated text provided in an embodiment of the present application;
[0022] Figure 2 An example diagram of an alignment type provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of a backfilling process provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of another backfilling process provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of another backfilling process provided in an embodiment of the present application;
[0026] Figure 6 A schematic diagram of another backfilling process provided in an embodiment of the present application;
[0027] Figure 7 A schematic diagram of another backfilling process provided in an embodiment of the present application;
[0028] Figure 8 A flowchart of the implementation process of determining the target annotation text provided in the embodiment of the present application;
[0029] Fig. 9 A schematic diagram of the structure of a device for processing annotated text provided in an embodiment of the present application;
[0030] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solution proposed in the embodiment of the present application is suitable for speech recognition application scenarios. By adopting the technical solution of the embodiment of the present application, end-to-end corpus can be constructed and applied to the training of end-to-end speech recognition models, thereby obtaining end-to-end speech recognition results.
[0032] The annotated text used by the traditional multilingual speech recognition system during the training phase does not contain punctuation marks and Arabic numerals, and then the output recognition text is filled with punctuation marks and numerals through text annotation technology. This method has the problem of low speech recognition efficiency.
[0033] In addition, text annotation technology mainly includes punctuation tasks and digital tasks. For punctuation tasks, text with punctuation can be crawled from the Internet, and then the punctuation can be removed according to certain rules to obtain text without punctuation. Then, the punctuation model can be trained using parallel data with and without punctuation to achieve punctuation filling of the recognized text.
[0034] For digital tasks, it is difficult to obtain the text before and after the numbers are regularized, so they usually need to be processed based on set rules. This leads to the problem of low recall rate in this method.
[0035] In addition, since there is less training data for rare languages, the post-processing module has lower accuracy when handling punctuation and number labeling tasks in these languages.
[0036] In view of the above-mentioned technical status, an embodiment of the present application proposes a method for processing annotated text. By adding target symbols to the annotated text, the standard accuracy and recall rate of the annotated text can be improved.
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] The present application embodiment first proposes a method for processing annotated text, see Figure 1 As shown, the method includes steps S101 to S103:
[0039] S101: Acquire original annotated text and audio data corresponding to the original annotated text.
[0040] The original annotation text refers to the annotation text that does not include the target symbol. The target symbol includes Arabic numerals and / or punctuation marks. The original annotation text does not include the target symbol, which may include the following situations: for example, the original annotation text may not include Arabic numerals, may not include punctuation marks, or may not include both Arabic numerals and punctuation marks.
[0041] The audio data corresponds to the original annotated text. Compared with the original annotated text, the audio data contains richer annotation information. By performing end-to-end speech recognition on the audio data, the target symbols missing in the original annotated text can be obtained.
[0042] There are many ways to obtain audio data, which can be specifically as follows: In some embodiments, audio data can be obtained through open data sets. For example, publicly available audio data sets can be obtained through some open data set platforms, such as Kaggle, UCI, etc. These data sets usually contain audio files of different language types.
[0043] In addition to obtaining audio data through open data sets, in some embodiments, audio data can also be obtained by building a self-built data set, for example, by using a recording device to record a large amount of audio data.
[0044] After obtaining the audio data, the speech recognition model can also be used to obtain the original annotated text. For example, by inputting the audio data into the speech recognition model, the audio data can be automatically converted into the original annotated text.
[0045] S102: Perform end-to-end speech recognition on the audio data to obtain a first audio recognition result corresponding to the audio data.
[0046] In this embodiment, end-to-end speech recognition means that the speech recognition result of the audio data includes the target symbol. That is to say, by performing end-to-end speech recognition on the audio data, not only the recognized text can be obtained, but also the target symbol in the recognized text can be obtained. The recognized text with the target symbol can be called the first audio recognition result.
[0047] Among them, the end-to-end speech recognition method can be implemented using some existing open source large models. These large models have high speech recognition accuracy. By using them to perform speech recognition on audio data, a first audio recognition result with high accuracy can be obtained, and then when the target symbols are backfilled in the original annotated text based on the first audio recognition result, the accuracy of the backfill result can also be improved. Furthermore, when the backfill result is used to perform end-to-end speech recognition task training, the recognition accuracy of the end-to-end speech recognition model can be improved, thereby improving the recognition accuracy of the end-to-end speech recognition task.
[0048] In some embodiments, the first model can be used to perform end-to-end speech recognition on the audio data, thereby obtaining a first audio recognition result corresponding to the audio data. The first model is a model capable of end-to-end speech recognition, such as an open source multi-language recognition large model, an open source language large model, and the like.
[0049] In the case where the first model is an open source multilingual recognition large model, such as the whisper model, by inputting audio data into the multilingual recognition large model, the end-to-end first audio recognition result outputted by it can be obtained. The whisper model is trained on a large dataset of various audio data, and it performs well in speech recognition, tone recognition, and automatic sentence segmentation. In multilingual speech recognition tasks, it shows robustness and accuracy close to human levels. Therefore, the first model can be used to obtain a first audio recognition result with higher accuracy.
[0050] In the case where the first model is an open source language model, such as a generative pre-trained model (GPT). By inputting the prompt word prompt corresponding to the language category of the audio data while inputting the audio data, the first audio recognition result can be obtained. The prompt word can describe and give examples of the task, and specify the form and requirements of the returned results to ensure that the returned digital regularized text has the same pronunciation as the original annotated text. For example, the prompt word can be "perform speech recognition on the audio data, and include the target symbol in the obtained speech recognition result". The GPT model learns the grammar, semantics and other knowledge of natural language by performing unsupervised pre-training on a large-scale text corpus, and it performs well in natural language processing tasks such as text generation. Using the GPT model to perform end-to-end speech recognition on audio data can obtain a first audio recognition result with high accuracy.
[0051] S103: Based on the first audio recognition result, backfill the target symbol into the original annotated text to obtain a target annotated text, where the target annotated text is used for end-to-end training of the speech recognition model.
[0052] The first audio recognition result is a recognized text with a target symbol corresponding to the original annotated text. Compared with the original annotated text, the first audio recognition result adds a target symbol. Therefore, based on the first audio recognition result, the target symbol missing in the original annotated text can be supplemented to obtain the target annotated text. The target annotated text is the annotated text with the target symbol. By using it for end-to-end speech recognition task training, an end-to-end speech recognition model can be obtained. Then, the end-to-end speech recognition model can be applied to achieve end-to-end speech recognition, saving post-processing steps, thereby improving speech recognition efficiency.
[0053] Specifically, step S103 includes: based on the first audio recognition result, backfilling the original annotated text with the target symbol to obtain a first candidate annotated text; based on the first candidate annotated text, obtaining a target annotated text.
[0054] In some embodiments, based on the first audio recognition result, the original annotated text is backfilled with target symbols to obtain a first candidate annotated text, including: aligning the first audio recognition result and the original annotated text to obtain a first aligned text; based on the first aligned text, the original annotated text is backfilled with target symbols to obtain a first candidate annotated text.
[0055] Among them, the first aligned text represents the correspondence between the content in the original annotated text and the content in the first audio recognition result. The content here can be words, punctuation marks, Arabic numerals, etc. For example, the corresponding position of the target symbol in the first audio recognition result in the original annotated text, and the corresponding position of the words in the first audio recognition result in the original annotated text. The purpose of the alignment process is to find the correspondence between each recognition position in the first audio recognition result and each annotation position in the original annotated text.
[0056] In some embodiments, the first audio recognition result and the original annotated text may be aligned using a text alignment method. The text alignment method is mainly implemented by measuring the difference between the content at the same position in the first audio recognition result and the original annotated text. In simple terms, it is the minimum step of single-character editing (such as insertion, deletion, or replacement) required to change the content in the first audio recognition result to the content in the original annotated text. The specific implementation method of the text alignment method can refer to the alignment rules of the edit distance algorithm, which will not be described in detail here.
[0057] The first aligned text includes alignment results corresponding to multiple statistical units. The statistical unit here can be understood as the smallest processing unit for text alignment, and the statistical unit here includes the correspondence between the content at the recognition position and the annotation position. That is, the alignment result of each statistical unit includes the original annotation data, alignment type and recognition result data corresponding to the statistical unit. It should be noted that the original annotation data and recognition result data here may be empty. The alignment type characterizes the consistency between the original annotation data and the recognition result data. The following introduces the alignment type with examples:
[0058] Each of the multiple statistical units can be expressed in the format of L / T / R. Each statistical unit may include the annotation position in the original annotation text and the recognition position in the first audio recognition result. Among them, L represents the content of the original annotation text at the statistical unit position, R represents the content of the first audio recognition result at the current statistical unit position, and T represents the alignment type of L and R. The alignment type may include four types: H, S, I, and D. H means that both L and R are not empty and consistent; S means that both L and R are not empty and inconsistent; I means that L is empty and R is not empty; D means that L is not empty and R is empty. The above alignment types are described in detail below with reference to the accompanying drawings and examples:
[0059] Figure 2 This is an example diagram of an alignment type provided in an embodiment of the present application. Figure 2 As shown, for "citai / H / citai", "citai" at the L position represents the content at the annotation position corresponding to the current statistical unit position in the original annotation text; "citai" at the R position represents the content at the recognition position corresponding to the current statistical unit position in the first audio recognition result. Since the content at the L position and the content at the R position are both not empty and the two are the same, the alignment type of the two is "H".
[0060] Continue reading Figure 2 , for "tuvojas / S / ojas", "tuvojas" at the L position represents the content at the annotation position corresponding to the current statistical unit position in the original annotation text; "ojas" at the R position represents the content at the recognition position corresponding to the current statistical unit position in the first audio recognition result. Since the content at the L position is different from the content at the R position, and both are not empty, the alignment type of the two is "S".
[0061] Continue reading Figure 2 , for " / I / 100", it can be seen that the L position is empty; the "100" at the R position represents the content at the recognition position corresponding to the current statistical unit position in the first audio recognition result. Since the content at the L position is empty, and the content at the R position is not empty, the alignment type of the two is "I".
[0062] Continue reading Figure 2 ,For ", / I / ", it can be seen that the R position is empty; the "100" at the L position represents the content at the recognition position corresponding to the current statistical unit position in the first audio recognition result. Since the content at the R position is empty, and the content at the L position is not empty, the alignment type of the two is "D".
[0063] Based on the above embodiment, the correspondence between each annotation position in the original annotation text and the content at each recognition position in the first audio recognition result can be obtained, that is, the first aligned text is obtained. After obtaining the first aligned text, the target symbol can be backfilled into the original annotation text based on the first aligned text to obtain the first candidate annotation text, which specifically includes: for each alignment result in multiple alignment results, when the recognition result data in the alignment result is Arabic numerals or punctuation marks, determine that the statistical unit corresponding to the previous first target alignment type of the statistical unit to the statistical unit corresponding to the next first target alignment type is the statistical period; if the statistical results adjacent to the alignment result within the statistical period are non-Arabic numerals or non-mathematical symbols, and the remaining alignment results within the statistical period except the current alignment result If the alignment type is the second target alignment type, the recognition result data in the alignment result is backfilled to the position of the original annotated text in the statistical unit to obtain the backfill result of the statistical unit; if the statistical results adjacent to the alignment result within the statistical period are Arabic numerals or mathematical symbols, and the alignment types of the remaining alignment results except the current alignment result within the statistical period are the third target alignment type, the recognition result data in the alignment result is backfilled to the position of the original annotated text in the statistical unit to obtain the backfill result of the statistical unit; based on the backfill results corresponding to multiple statistical units, the first candidate annotated text is obtained.
[0064] The first target alignment type refers to an alignment type of T=H, the second target alignment type refers to an alignment type of T=H or T=D, and the third target alignment type refers to an alignment type of T=H, T=I or T=D.
[0065] For example, each of the multiple alignment results is taken as the current alignment result in turn, and the current alignment result position is used as the starting point to traverse forward to find the previous T=H. Assuming that the previous alignment result at the current alignment result position is T=H, the alignment result from the previous T=H to the current alignment result position is determined as the forward traversal result, and the forward traversal ends; and the current alignment result position is used as the starting point to traverse backward to find the next T=H. Assuming that the next alignment result at the current alignment result position is T=H, the next alignment result from T=H to the current alignment result position is determined as the backward traversal result, and the backward traversal ends.
[0066] In the above forward traversal process, assuming that T=H is not found even after traversing to the beginning of the sentence, the current alignment result position to the beginning of the sentence is taken as the forward traversal result, and the forward traversal ends.
[0067] Similarly, during the backward traversal process, assuming that T=H is not found after traversing to the end of the sentence, the current alignment result position to the end of the sentence is taken as the backward traversal result, and the backward traversal ends.
[0068] Next, the results of the forward and backward traversal and the backward traversal are combined to form a statistical cycle. It is determined whether the alignment result adjacent to the current alignment result is an Arabic numeral or a mathematical symbol. If not, it is determined whether the alignment type of the remaining alignment results except the current alignment result in the statistical cycle is the second target alignment type. If so, the recognition result data in the alignment result is backfilled to the position of the original annotated text in the statistical unit to obtain the backfill result of the statistical unit.
[0069] Furthermore, if the alignment result adjacent to the current alignment result is an Arabic numeral or a mathematical symbol, determine whether the alignment type of the remaining alignment results except the current alignment result within the statistical period is the third target alignment type; if so, backfill the alignment result and at least one adjacent and continuous Arabic numeral or mathematical symbol to the position of the original annotated text in each statistical unit to obtain the backfill result of each statistical unit.
[0070] When the plurality of statistical units have completed the above steps, the first candidate annotation text can be obtained.
[0071] The first target alignment type includes T=H; the second target alignment type includes T=H and T=D; the third target alignment type includes T=I, T=D and T=H, that is, T is not S. The mathematical symbol here refers to a symbol that can represent a number at the current position or a position adjacent to the current position, such as a percentage sign.
[0072] The following is a detailed description of the above traversal process in conjunction with the accompanying drawings:
[0073] Figure 3 A schematic diagram of the backfilling process provided in the embodiment of the present application. Figure 3As shown, the row where LAB is located represents the original annotated text, and the row where REC is located represents the first audio recognition result. Assuming that the current alignment result is the 11th statistical result from left to right, that is, the recognition position corresponding to "133", then traverse forward and backward from the position of "133" respectively. In the forward traversal, it can be seen that the contents of L and R at the position of "se" are the same, and both are not empty, so its alignment type is "H", so far, the forward traversal ends. In the backward traversal, the contents of L and R at the position of "vai" are the same, and both are not empty, so its alignment type is "H", therefore, the backward traversal ends. The content corresponding to the rectangular box in the figure is taken as a statistical period. Since the other statistical results in the statistical period other than the current statistical result are se / H / se, seta / D / , vai / H / vai, and their alignment types are all non-S, it indicates that the recognition result accuracy near the current statistical result is higher. Therefore, it indicates that the recognition result accuracy at the position 133 is also higher, so 133 can be backfilled into the original annotated text.
[0074] Figure 4 Schematic diagram of another backfilling process provided in an embodiment of the present application. Figure 4 As shown, the row where LAB is located represents the original annotated text, and the row where REC is located represents the first audio recognition result. Assuming that the current alignment result is the fourth statistical result from left to right, that is, the recognition position corresponding to "40", then traverse forward and backward from the position of "40" respectively. In the forward traversal, it can be seen that the content of L and R at the position of "euroa" is the same, and both are not empty, so its alignment type is "H", so the forward traversal ends. In the backward traversal, the content of L and R at the position of "senttia" is the same, and both are not empty, so its alignment type is "H", and the backward traversal ends. The content corresponding to the rectangular box in the figure is taken as a statistical period. Since the statistical result before the number 40 between the two Hs in the statistical period is not an Arabic numeral or a mathematical symbol, and there is an insertion error, that is, it is empty in the original annotated text and "mika" in the first audio recognition result, that is, T=I, therefore, 40 is not backfilled into the original annotated text.
[0075] Figure 5 Schematic diagram of another backfilling process provided in an embodiment of the present application. Figure 5As shown, the row where LAB is located represents the original annotated text, and the row where REC is located represents the first audio recognition result. Assuming that the current alignment result is the second statistical result from left to right, that is, the position "2", then traverse forward and backward from the position "2" respectively. In the forward traversal, it can be seen that the content of L and R at the position "maksaa" is the same, and both are not empty, so its alignment type is "H", so the forward traversal ends. In the backward traversal, it can be seen that the content of L and R at the position "euroa" is the same, and both are not empty, so its alignment type is "H", and the backward traversal ends. The content corresponding to the rectangular box in the figure is taken as a statistical period. Since the statistical result after the number 2 between the two Hs in the statistical period is not an Arabic numeral or a mathematical symbol, and there is an insertion error, that is, it is empty in the original annotated text and "se" in the first audio recognition result, that is, T=I, therefore, 2 is not backfilled into the original annotated text.
[0076] Figure 6 Schematic diagram of another backfilling process provided in an embodiment of the present application. Figure 6 As shown, the row where LAB is located represents the original annotated text, and the row where REC is located represents the first audio recognition result. Assuming that the current alignment result is the fourth statistical result from left to right, that is, the position "40", then traverse forward and backward from the position "40" respectively. In the forward traversal, it can be seen that the content of L and R at the position "euroa" is the same, and both are not empty, so its alignment type is "H", so the forward traversal ends. In the backward traversal, it can be seen that the content of L and R at the position "senttia" is the same, and both are not empty, so its alignment type is "H", so the backward traversal ends. The content corresponding to the rectangular box in the figure is taken as a statistical period. Because there is a replacement error in the statistical results before "40" between the two Hs in this statistical period, that is, "mi" in the original annotated text and "mika" in the first audio recognition result, and the two are inconsistent, that is, T=S, therefore, 40 is not backfilled into the original annotated text.
[0077] Figure 7 Schematic diagram of another backfilling process provided in an embodiment of the present application. Figure 7As shown, the row where LAB is located represents the original annotated text, and the row where REC is located represents the first audio recognition result. Assuming that the current alignment result is the second statistical result from left to right, that is, the position "2", then traverse forward and backward from the position "2" respectively. In the forward traversal, it can be seen that the alignment type at the position "maksaa" is "H", so the forward traversal ends. In the backward traversal, it can be seen that the alignment type at the position "euroa" is "H", so the backward traversal ends. The content corresponding to the rectangular box in the figure is taken as a statistical period. Since between the two Hs in this statistical period, in the statistical results after 2, the original annotated text is "mika", and the first audio recognition result is "se", and the two are inconsistent, that is, T=S, therefore, 2 is not backfilled into the original annotated text.
[0078] The following example illustrates the situation where the statistical results adjacent to the alignment result in the statistical period are Arabic numerals or mathematical symbols, and the alignment types of the remaining alignment results except the current alignment result in the statistical period are the third target alignment type:
[0079] For example, for LAB of "Is this string of numbers one hundred and one hundred and ninety-nine?" and REC of "Is this string of numbers 101 99?", assuming that REC corresponding to the current statistical unit is "101", then traverse forward from the position of 101 to find the previous T=H, that is, "yes", and traverse backward from the position of 101 to find the next T=H, that is, "99". Therefore, the statistical period obtained by the current traversal is "yes 101 99". Since T is not S in this statistical period and there are numbers consecutive to it at the position 101, 101 and 99 can be backfilled together.
[0080] After obtaining the first candidate annotation text based on the above embodiment, the target annotation text can be determined based on the first candidate annotation text. Specifically, obtaining the target annotation text based on the first candidate annotation text includes: determining the first candidate annotation text as the target annotation text. This embodiment adopts a single backfilling method, and directly uses the first candidate annotation text as the target annotation text.
[0081] In order to further improve the recall rate of the backfill results, another backfill method can be used to backfill the original annotated text, and the two backfill results can be merged to obtain a more comprehensive target annotated text.
[0082] Figure 8 The following is a flow chart of the implementation process of determining the target annotation text provided in the embodiment of the present application. Figure 8 As shown, based on the first candidate annotation text, obtaining the target annotation text includes step S801 and step S802:
[0083] S801: Obtain a second candidate annotation text corresponding to the original annotation text.
[0084] There are multiple implementation methods for obtaining the second candidate annotation text corresponding to the original annotation text, which can be specifically as follows:
[0085] In some embodiments, obtaining a second candidate annotated text corresponding to the original annotated text includes: using a second model to perform end-to-end speech recognition on the audio data to obtain a second audio recognition result corresponding to the audio data, the second audio recognition result including a target symbol, the second model is a model capable of end-to-end speech recognition, and the first model is different from the second model; based on the second audio recognition result, backfilling punctuation marks and Arabic numerals into the original annotated text to obtain the second candidate annotated text.
[0086] The second model is a large model with end-to-end speech recognition capabilities, such as an open source multi-language recognition large model, an open source language large model, etc.
[0087] When the second model is an open source multilingual recognition large model, the audio data is input into the multilingual recognition large model to obtain the end-to-end second audio recognition result output by the large model.
[0088] When the second model is an open source language model, you can input the prompt word corresponding to the language category of the audio data while inputting the audio data to obtain the second audio recognition result. The prompt word can describe and give examples of the task, and specify the form and requirements of the returned results to ensure that the returned digital regularized text has the same pronunciation as the original annotated text. For example, the prompt word can be "perform speech recognition on the audio data, and include the target symbol in the obtained speech recognition results."
[0089] After obtaining the second audio recognition result, the original annotated text can be backfilled with punctuation marks and Arabic numerals based on the second audio recognition result to obtain the second candidate annotated text. The specific backfilling process can be referred to in the aforementioned embodiment, and the implementation method of backfilling punctuation marks and Arabic numerals based on the first audio recognition result to obtain the first candidate annotated text is not repeated here.
[0090] Since the above-mentioned large model is a commercial large model with a high cost, in order to save costs, in some embodiments, a dictionary library can also be used to fill the original annotated text with the target symbol to obtain a second candidate annotated text. In this embodiment, a dictionary library of each language can be pre-made, and the dictionary library contains all possible forms of numbers that may appear in all languages, as well as various punctuation marks. Specifically, it can be obtained by network collection or language large model, or artificial generation. Afterwards, the original annotated text is traversed based on the dictionary library, and the part that may contain the target symbol is extracted, and then the subsequent filling task is performed.
[0091] In some embodiments, a digital regularization tool may be used to fill the original annotation text with a target symbol to obtain a second candidate annotation text.
[0092] S802: Determine a target annotation text based on the first candidate annotation text and the second candidate annotation text.
[0093] After obtaining the second candidate annotation text, the target annotation text can be determined based on the first candidate annotation text and the second candidate annotation text. Specifically, the method includes: aligning the first candidate annotation text and the second candidate annotation text to obtain a third aligned text between the first candidate annotation text and the second candidate annotation text; and backfilling the original annotation text with punctuation marks and Arabic numerals based on the third aligned text to obtain the target annotation text.
[0094] In this embodiment, any one of the first candidate annotation text and the second candidate annotation text is used as L and the other as R for re-alignment, and the target symbol is backfilled again, thereby improving the recall rate of the target symbol. The specific implementation process of re-alignment and backfilling can refer to the detailed description of the embodiment of aligning the first audio recognition result and the original annotation text, and backfilling the original annotation text based on the first aligned text in the above embodiment, which will not be repeated here.
[0095] The method for processing annotated text proposed in the present application performs end-to-end speech recognition on the audio data corresponding to the original annotated text to obtain a first audio recognition result with a target symbol, and then backfills the target symbol into the original annotated text based on the first audio recognition result, thereby obtaining the target annotated text. The target annotated text can be used as an end-to-end training corpus to train the speech recognition model for an end-to-end speech recognition task, thereby obtaining a speech recognition model with end-to-end speech recognition capability. Furthermore, when the speech recognition model is applied for speech recognition, an end-to-end speech recognition result can be directly obtained, which saves the steps of the punctuation task and the number regularization task of the post-processing module and improves the speech recognition efficiency. In addition, a large amount of end-to-end training corpus can be obtained through the speech data and the corresponding original annotated text, and then the speech recognition model can be trained for an end-to-end speech recognition task to obtain a speech recognition model with end-to-end speech recognition capability. And when the speech recognition model is applied for speech recognition, the accuracy of speech recognition can be improved. In addition, this solution can also solve the problem of difficulty in obtaining training data for rare languages. Through the above solution, a large amount of end-to-end training data for rare languages can be obtained, and then the speech recognition model can be trained for end-to-end speech recognition tasks. The obtained speech recognition model can improve the accuracy of speech recognition for rare languages.
[0096] Corresponding to the above-mentioned method for processing annotated text, the present application embodiment also proposes a device for processing annotated text, such as Fig. 9 As shown, the device comprises:
[0097] An acquisition unit 901 is used to acquire an original annotated text and audio data corresponding to the original annotated text, wherein the original annotated text does not include a target symbol;
[0098] A speech recognition unit 902, configured to perform end-to-end speech recognition on the audio data to obtain a first audio recognition result corresponding to the audio data, wherein the first audio recognition result includes a target symbol;
[0099] The backfilling unit 903 is used to backfill the target symbols into the original annotated text based on the first audio recognition result to obtain a target annotated text, and the target annotated text is used for end-to-end training of the speech recognition model.
[0100] In some embodiments, the backfill unit 903 backfills the target symbols into the original annotated text based on the first audio recognition result to obtain the target annotated text, including: based on the first audio recognition result, backfilling the target symbols into the original annotated text to obtain the first candidate annotated text; based on the first candidate annotated text, obtaining the target annotated text.
[0101] In some embodiments, the backfill unit 903 backfills the target symbol for the original annotated text based on the first audio recognition result to obtain a first candidate annotated text, including: aligning the first audio recognition result and the original annotated text to obtain a first aligned text; based on the first aligned text, backfilling the target symbol for the original annotated text to obtain a first candidate annotated text.
[0102] In some embodiments, the first aligned text includes alignment results corresponding to a plurality of statistical units, and the alignment result of each statistical unit includes original annotation data, alignment type and recognition result data corresponding to the statistical unit, and the alignment type represents the consistency between the original annotation data and the recognition result data; wherein, based on the first aligned text, backfilling the original annotation text with target symbols to obtain a first candidate annotation text comprises: for each alignment result in the plurality of alignment results, when the recognition result data in the alignment result is Arabic numerals or punctuation marks, determining that the statistical unit corresponding to the previous first target alignment type of the statistical unit to the statistical unit corresponding to the next first target alignment type is a statistical period; if the statistical period is consistent with the statistical period, If the statistical results adjacent to the alignment result are non-Arabic numerals or non-mathematical symbols, and the alignment types of the remaining alignment results except the current alignment result within the statistical period are the second target alignment type, the recognition result data in the alignment result is backfilled to the position of the original annotation text in the statistical unit to obtain the backfill result of the statistical unit; if the statistical results adjacent to the alignment result within the statistical period are Arabic numerals or mathematical symbols, and the alignment types of the remaining alignment results except the current alignment result within the statistical period are the third target alignment type, the recognition result data in the alignment result is backfilled to the position of the original annotation text in the statistical unit to obtain the backfill result of the statistical unit; based on the backfill results corresponding to multiple statistical units, the first candidate annotation text is obtained.
[0103] In some embodiments, the backfill unit 903 obtains the target annotation text based on the first candidate annotation text, including: obtaining the second candidate annotation text corresponding to the original annotation text; and determining the target annotation text based on the first candidate annotation text and the second candidate annotation text.
[0104] In some embodiments, the first audio recognition result is obtained using a first model, and the first model is a model capable of end-to-end speech recognition; wherein the backfill unit 903 obtains a second candidate annotated text corresponding to the original annotated text, including: using a second model to perform end-to-end speech recognition on the audio data to obtain a second audio recognition result corresponding to the audio data, the second audio recognition result includes a target symbol, the second model is a model capable of end-to-end speech recognition, and the first model is different from the second model; based on the second audio recognition result, backfilling punctuation marks and Arabic numerals into the original annotated text to obtain the second candidate annotated text; or, using a dictionary library to fill the original annotated text with target symbols to obtain the second candidate annotated text.
[0105] In some embodiments, the backfill unit 903 determines the target annotation text based on the first candidate annotation text and the second candidate annotation text, including: aligning the first candidate annotation text and the second candidate annotation text to obtain a third aligned text between the first candidate annotation text and the second candidate annotation text; based on the third aligned text, backfilling punctuation marks and Arabic numerals on the original annotation text to obtain the target annotation text.
[0106] In some embodiments, the backfilling unit 903 obtains the target annotated text based on the first candidate annotated text, including: determining the first candidate annotated text as the target annotated text.
[0107] The device for processing annotated text provided in this embodiment belongs to the same application concept as the method for processing annotated text provided in the above embodiments of this application, and can execute the method for processing annotated text provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the method for processing annotated text. For technical details not fully described in this embodiment, please refer to the specific processing content of the method for processing annotated text provided in the above embodiments of this application, and will not be repeated here.
[0108] The functions implemented by the various units in the above-mentioned annotated text processing device may be implemented by the same or different processors, respectively, and the embodiments of the present application are not limited thereto.
[0109] It should be understood that the units in the processing device marked with the text above can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the unit in the device can be implemented in the form of a hardware circuit, and the functions of some or all units can be realized by designing the hardware circuit. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all units above are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by configuring the text, so as to realize the functions of some or all units above. All units of the above device can be implemented in the form of a processor calling software, or in the form of a hardware circuit, or in the form of a processor calling software, and the remaining part can be implemented in the form of a hardware circuit.
[0110] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.
[0111] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0112] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
[0113] An embodiment of the present application further provides a control device, which includes a processor and an interface circuit. The processor in the control device is connected to a data input component via the interface circuit of the control device.
[0114] The data input component specifically refers to a functional component capable of inputting or collecting voice data, such as a microphone, etc.
[0115] The above-mentioned interface circuit can be any interface circuit that can realize the data communication function, for example, it can be a USB interface circuit, a Type-C interface circuit, a serial port circuit, a PCIE circuit, etc.
[0116] The processor in the control device is also a circuit with signal processing capability, which executes the method for processing the annotated text introduced in the above embodiment. The specific implementation of the processor can refer to the above processor implementation, and the embodiment of the present application does not strictly limit it.
[0117] Another embodiment of the present application also provides an electronic device, see Fig.10 As shown, the device includes:
[0118] Memory 200 and processor 210;
[0119] The memory 200 is connected to the processor 210 and is used to store programs;
[0120] The processor 210 is used to implement the method for processing the annotated text disclosed in any of the above embodiments by running the program stored in the memory 200.
[0121] Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .
[0122] The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are connected to each other via a bus.
[0123] A bus may include a pathway that transfers information between components of a computer system.
[0124] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0125] The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.
[0126] The memory 200 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.
[0127] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
[0128] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0129] The communication interface 220 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0130] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement each step of the method for processing the annotated text provided in the above embodiment of the present application.
[0131] An embodiment of the present application also proposes a chip, which includes a processor and a data interface. The processor reads and runs a program stored in a memory through the data interface to execute the method for processing annotated text introduced in any of the above embodiments. The specific processing process and its beneficial effects can be found in the embodiment introduction of the method for processing annotated text.
[0132] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps in the method for processing annotated text described in any of the above-mentioned embodiments of this specification.
[0133] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0134] In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the method for processing annotated text described in any of the above embodiments of this specification.
[0135] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0136] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0137] The steps in the methods of each embodiment of the present application can be adjusted in sequence, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0138] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.
[0139] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0140] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0141] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
[0142] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0143] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0144] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0145] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing annotated text, characterized in that: include: Acquire original annotated text and audio data corresponding to the original annotated text, wherein the original annotated text does not include the target symbol; Performing end-to-end speech recognition on the audio data to obtain a first audio recognition result corresponding to the audio data, wherein the first audio recognition result includes a target symbol; Based on the first audio recognition result, the original annotated text is backfilled with target symbols to obtain a target annotated text, and the target annotated text is used for end-to-end training of a speech recognition model.
2. The method according to claim 1, characterized in that The step of backfilling the original annotated text with target symbols based on the first audio recognition result to obtain a target annotated text includes: Based on the first audio recognition result, backfilling the original annotated text with a target symbol to obtain a first candidate annotated text; The target annotated text is obtained based on the first candidate annotated text.
3. The method according to claim 2, characterized in that The step of backfilling the target symbol into the original annotated text based on the first audio recognition result to obtain a first candidate annotated text includes: Aligning the first audio recognition result and the original annotated text to obtain a first aligned text; Based on the first aligned text, the original annotated text is backfilled with target symbols to obtain a first candidate annotated text.
4. The method according to claim 3, characterized in that The first aligned text includes alignment results corresponding to a plurality of statistical units, and the alignment result of each statistical unit includes original annotation data, an alignment type, and recognition result data corresponding to the statistical unit, wherein the alignment type represents the consistency between the original annotation data and the recognition result data; The step of backfilling the original annotated text with a target symbol based on the first aligned text to obtain a first candidate annotated text includes: For each alignment result in the plurality of alignment results, when the recognition result data in the alignment result is Arabic numerals or punctuation marks, determining that a statistical unit corresponding to a previous first target alignment type of the statistical unit to a statistical unit corresponding to a next first target alignment type of the statistical unit is a statistical period; If the statistical result adjacent to the alignment result within the statistical period is non-Arabic numerals or non-mathematical symbols, and the alignment types of the remaining alignment results except the current alignment result within the statistical period are the second target alignment type, then the recognition result data in the alignment result is backfilled to the position of the original annotated text in the statistical unit to obtain the backfill result of the statistical unit; If the statistical result adjacent to the alignment result within the statistical period is an Arabic numeral or a mathematical symbol, and the alignment type of the remaining alignment results except the current alignment result within the statistical period is the third target alignment type, then the recognition result data in the alignment result is backfilled to the position of the original annotated text in the statistical unit to obtain the backfill result of the statistical unit; Based on the backfill results corresponding to the multiple statistical units, the first candidate annotation text is obtained.
5. The method according to claim 2, characterized in that: The step of obtaining the target annotated text based on the first candidate annotated text includes: Obtaining a second candidate annotation text corresponding to the original annotation text; The target annotated text is determined based on the first candidate annotated text and the second candidate annotated text.
6. The method according to claim 5, characterized in that The first audio recognition result is obtained by using a first model, where the first model is a model capable of performing end-to-end speech recognition; The step of obtaining a second candidate annotation text corresponding to the original annotation text includes: Using a second model to perform end-to-end speech recognition on the audio data, to obtain a second audio recognition result corresponding to the audio data, wherein the second audio recognition result includes a target symbol, the second model is a model capable of performing end-to-end speech recognition, and the first model is different from the second model; Based on the second audio recognition result, backfilling the original annotated text with punctuation marks and Arabic numerals to obtain the second candidate annotated text; or, The original annotated text is filled with target symbols using a dictionary library to obtain the second candidate annotated text.
7. The method according to claim 5, characterized in that The determining the target annotated text based on the first candidate annotated text and the second candidate annotated text includes: Performing alignment processing on the first candidate annotation text and the second candidate annotation text to obtain a third aligned text between the first candidate annotation text and the second candidate annotation text; Based on the third aligned text, the original annotated text is backfilled with punctuation marks and Arabic numerals to obtain the target annotated text.
8. The method according to claim 2, characterized in that: The step of obtaining the target annotated text based on the first candidate annotated text includes: The first candidate annotated text is determined as the target annotated text.
9. The method according to claim 1, characterized in that: The target symbols include Arabic numerals and / or punctuation marks.
10. A device for processing annotated text, characterized in that: include: An acquisition unit, used for acquiring an original annotated text and audio data corresponding to the original annotated text, wherein the original annotated text does not include the target symbol; a speech recognition unit, configured to perform end-to-end speech recognition on the audio data to obtain a first audio recognition result corresponding to the audio data, wherein the first audio recognition result includes a target symbol; A backfilling unit is used to backfill the target symbols into the original annotated text based on the first audio recognition result to obtain a target annotated text, wherein the target annotated text is used for end-to-end training of a speech recognition model.
11. An electronic device, characterized in that: including memory and processor; The memory is connected to the processor and is used to store programs; The processor is configured to implement the method according to any one of claims 1 to 9 by running the program in the memory.
12. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 8 is implemented.
13. A computer program product, characterized in that The method comprises computer program instructions, which, when executed by a processor, cause the processor to implement the method as claimed in any one of claims 1 to 9.
Citation Information
Patent Citations
Punctuation mark labeling method and device, computer equipment and storage medium
CN113449489A
Method and device for speech recognition punctuation recovery and storage medium
CN114120975A
Voice-to-word processing method and device, model training method and device, equipment and medium
CN117057321A
Audio text pair acquisition method and device, electronic equipment and storage medium
CN117975934A
Speech recognition text processing method and apparatus, device, storage medium, and program product
WO2023071562A1
