Method, system, and electronic device for training data generation for speech recognition
By identifying the boundaries of video subtitle text and filtering pre-trained models, diverse and accurate speech recognition training data is generated, solving the problems of insufficient data diversity and reliance on pseudo-label accuracy in existing technologies, and improving speech recognition performance.
Patent Information
- Application Number
- CN202310271330.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2026-12-01
- Estimated Expiration
- 2043-03-20
AI Technical Summary
The existing technology generates audio data with insufficient diversity, which cannot effectively improve speech recognition performance, and the accuracy of pseudo-label data depends on the performance of the speech recognition model.
By performing text recognition on the video to determine the time boundaries of the subtitle text, audio segments are extracted from the video, and a pre-trained speech recognition model is used for speech recognition. The text recognition labels are then filtered to generate training data for speech recognition.
The diversity of the generated training data is guaranteed, the data quality and accuracy are improved, the dependence on the speech recognition model is reduced, and the speech recognition performance is improved.
Smart Images

Figure CN116524906B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent speech, and more particularly to a method, system, and electronic device for generating training data for speech recognition. Background Technology
[0002] With the continuous development of deep neural networks, end-to-end speech recognition frameworks have become dominant in speech recognition research and industrial applications due to their simplicity and compactness, and they offer excellent speech recognition performance. Despite these advancements, end-to-end speech recognition modeling frameworks still face many challenges. For example, data scarcity is a persistent problem in end-to-end modeling frameworks. This need becomes even more acute as the model depth increases. Without sufficient training data, it is difficult to achieve satisfactory performance. To obtain training data for speech recognition, the following methods are typically used:
[0003] 1. Extract audio features from the speech to build a feature library, and use the feature library to generate new speech training data; 2. Process the speech by adding noise, etc., to generate new speech training data; 3. Use a speech recognition model to label the collected speech with pseudo-labels, and use the pseudo-label data directly for training.
[0004] In the process of realizing this invention, the inventors discovered at least the following problems in the related technology:
[0005] 1. Constructing an audio feature library limits the diversity of the new data generated by this method, making it unable to produce new domain audio data. This method merely combines existing audio data, essentially expanding the existing domain data, and the speakers in the newly generated audio are also already present in the original data.
[0006] 2. Adding noise to the generated speech only increases the amount of data, but it cannot improve the diversity of data, so it does not significantly improve the performance of speech recognition training.
[0007] 3. Use a speech recognition model to generate pseudo-labels. The accuracy of the generated labels is strongly correlated with the performance of the speech recognition model. If the generated pseudo-label data is directly used for training, the improvement in performance will be very limited. Summary of the Invention
[0008] To address the problems in existing technologies where generated audio may already exist in the original data, resulting in a lack of diversity and limited training effectiveness for speech recognition, this invention provides a method for generating training data for speech recognition, comprising:
[0009] Perform text recognition on the video to determine subtitle text containing time boundaries within the video;
[0010] Based on the time boundary of the subtitle text, extract the audio segment corresponding to the time of the subtitle text from the video;
[0011] The subtitle text is identified as the text recognition tag of the audio segment;
[0012] The audio segment is subjected to speech recognition using a pre-trained speech recognition model, and the obtained speech recognition result is determined as the speech recognition label of the audio segment.
[0013] The erroneous caption text in the text recognition tags is filtered based on the speech recognition tags, and the filtered text recognition tags are determined as training data for speech recognition.
[0014] Secondly, embodiments of the present invention provide a training data generation system for speech recognition, comprising:
[0015] The subtitle text determination module is used to perform text recognition on the video and determine the subtitle text containing time boundaries within the video;
[0016] An audio segment extraction module is used to extract audio segments from the video that correspond to the time of the subtitle text based on the time boundary of the subtitle text;
[0017] A text recognition tag determination module is used to determine the subtitle text as a text recognition tag for the audio segment;
[0018] The speech recognition label determination program module is used to perform speech recognition on the audio segment using a pre-trained speech recognition model, and determine the obtained speech recognition result as the speech recognition label of the audio segment.
[0019] The training data determination module is used to filter erroneous subtitle text in the text recognition tags based on the speech recognition tags, and determine the filtered text recognition tags as training data for speech recognition.
[0020] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of a training data generation method for speech recognition according to any embodiment of the present invention.
[0021] Fourthly, embodiments of the present invention provide a storage medium storing a computer program thereon, characterized in that, when the program is executed by a processor, it implements the steps of the training data generation method for speech recognition according to any embodiment of the present invention.
[0022] The beneficial effects of this invention are as follows: On the one hand, it can generate effective training data for speech recognition based on videos of different languages. The newly generated data is not limited by the original data, thus ensuring data diversity. Furthermore, it can generate data for specific domains based on video type. On the other hand, the pre-trained speech recognition model further filters the labeled data. However, the filtering process does not rely entirely on the speech recognition model; that is, it does not require the speech recognition model to fully recognize the new data. It is only used to filter data with text annotation errors or silent areas (audio contains subtitles but no voice), further ensuring the effectiveness and accuracy of the filtered data. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a method for generating training data for speech recognition according to an embodiment of the present invention;
[0025] Figure 2 This is a schematic diagram of the overall process of a training data generation method for speech recognition provided in an embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a training data generation system for speech recognition provided in an embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of an embodiment of an electronic device for generating training data for speech recognition, provided by an embodiment of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] like Figure 1 The diagram shown is a flowchart of a method for generating training data for speech recognition according to an embodiment of the present invention, including the following steps:
[0030] S11: Perform text recognition on the video to determine the subtitle text containing time boundaries within the video;
[0031] S12: Extract an audio segment from the video that corresponds to the time of the subtitle text based on the time boundary of the subtitle text;
[0032] S13: Determine the subtitle text as the text recognition tag of the audio segment;
[0033] S14: Use a pre-trained speech recognition model to perform speech recognition on the audio segment, and determine the obtained speech recognition result as the speech recognition label of the audio segment;
[0034] S15: Based on the speech recognition tags, filter the erroneous subtitle text in the text recognition tags, and determine the filtered text recognition tags as training data for speech recognition.
[0035] In this embodiment, considering that existing data augmentation techniques may not effectively increase data diversity, and pseudo-label generation methods cannot guarantee data quality, the training data generated by this method for speech recognition must simultaneously ensure increased data diversity and richness, as well as data validity and accuracy. Only through the combined effect of these three aspects can effective performance improvements in speech recognition be achieved.
[0036] This method finds that the quality of widely collected audio is often difficult to control, while the audio quality of videos is relatively higher. Examples include videos from TV dramas, movies, or uploaded by popular content creators. Furthermore, different languages can be selected based on training needs. For instance, to train a Mandarin speech recognition model, Mandarin videos can be chosen; to train a Cantonese speech recognition model, Cantonese videos can be selected. The videos listed above also include subtitles, making it easier to generate training data for speech recognition. Therefore, this method can be tailored to specific domains, such as the Chinese language domain, the Cantonese language domain, or the foreign language domain. It allows for the selection of videos in different languages to meet the specific needs of different domains.
[0037] For step S11, for example, when training data for a Mandarin speech recognition model is needed, Chinese videos, such as TV series or movies, can be selected. Text recognition is performed on the video footage to identify all the text within the frame. For example, the subtitle "We'll leave now and come back in two days" could be identified between the 10th and 12th second of the video. However, the actual recognition process is not that simple.
[0038] As one implementation, the step of performing text recognition on the video to determine subtitle text containing time boundaries within the video includes:
[0039] Performing text detection on the video, specifically, performing text detection on each frame of the video, or performing skip-frame text detection on the video, to determine the text at each position in the image displayed by the video at different frame values;
[0040] Determining non-subtitle text and subtitle text in the text at least based on the position of the text;
[0041] Performing text clustering on the subtitle text of each frame value, and determining the start time and end time of the subtitle text appearing in the video after text clustering;
[0042] Determining the start time and the end time as the time boundaries of the subtitle text.
[0043] In this embodiment, the video is processed in the form of a video stream, text detection and text recognition are performed on each frame of image in the video stream, and the text contained in the image of all frames in the video is recognized. For example, in addition to recognizing the text "we leave first and come back in two days" in the subtitles, the text in the video itself will also be recognized, such as the text "skillful hand and rejuvenation" on the plaque in the video frame. However, in practical applications, considering that there are 24 frames of images per second of the video, if each frame is recognized, it will be too wasteful. Therefore, in order to save the amount of calculation and time, a skip-frame recognition operation is adopted. For example, detection and recognition are performed once every six frames (text detection and text recognition are performed on the first frame, the seventh frame, the thirteenth frame, the nineteenth frame, the twenty-fifth frame (the first frame of the next second), etc. in the video). For example, the text "we leave first and come back in two days" and "skillful hand and rejuvenation" are recognized in the first frame, the seventh frame, the thirteenth frame, the nineteenth frame, and the twenty-fifth frame of the tenth second, and the first frame, the seventh frame, the thirteenth frame, the nineteenth frame, and the twenty-fifth frame of the eleventh second, and the first frame, the seventh frame, the thirteenth frame, and the nineteenth frame of the twelfth second. During the recognition process, the results of all skip-frame recognition of this video are recorded, as well as the frame values corresponding to the results (the frame values are used to calculate the time boundaries later).
[0044] During the above recognition process, text in multiple regions will be detected in the image of each frame, for example, the text "we leave first and come back in two days" in the subtitle region at the bottom of the video, and the text "skillful hand and rejuvenation" on the upper right plaque in the video image. That is to say, we only need the text "we leave first and come back in two days" in the subtitle region, and the non-subtitle text such as "skillful hand and rejuvenation" in other regions cannot be in one-to-one correspondence with the audio, so these non-subtitle region texts need to be deleted.
[0045] Specifically, the determining non-subtitle text and subtitle text in the text at least based on the position of the text includes:
[0046] The non-subtitle text and subtitle text in the text are determined based on the position of the text and the frequency of the text appearing in the video.
[0047] In this embodiment, all detected text regions and the corresponding texts for each text region have been stored separately during the text recognition process. Therefore, in this step, the frequency of the text corresponding to each individual region will be counted. In general videos, if there is non-subtitle text (usually website or video names, logos, etc.), these tags usually appear more frequently. Therefore, a frequency threshold is set, and texts that appear more frequently than the threshold are directly removed (treated as non-subtitle text).
[0048] For example, the "Miraculous Healing" detected in the first, seventh, thirteenth, nineteenth, and twenty-fifth frames of the tenth second, the first, seventh, thirteenth, nineteenth, and twenty-fifth frames of the eleventh second, and the first, seventh, thirteenth, and nineteenth frames of the twelfth second were removed.
[0049] After removal, the phrase "We'll leave now and come back in two days" is sorted in ascending order of its corresponding frame number. For each frame, the recognition results are normalized to remove punctuation. If multiple recognition results exist for a single frame, they are converted into a single string based on their detection coordinates (multi-line subtitle phenomenon). Since each frame has been converted into a text string, these strings are then clustered. Multiple similar or identical strings in adjacent frames are grouped together. If multiple adjacent frames contain the same string, this identical string is used as the final annotation result for the subtitle. The frame number of the first occurrence of this identical string is used as the start time, and the frame number of the last occurrence is used as the end time. If multiple adjacent frames contain multiple different but similar results, a voting process is used, selecting the text with the most occurrences as the final result. Similarly, the first and last occurrences of these similar results are used as the start and end times, thus completing the annotation for the subtitle.
[0050] Furthermore, the start time of the subtitle "We'll leave first and come back in two days" was identified as the first frame at the tenth second, and the end time as the nineteenth frame at the twelfth second. This represents the time boundary of the subtitle "We'll leave first and come back in two days" within the video. By continuously identifying subtitles in this way, multiple subtitle texts containing these time boundaries were obtained. In summary, clustering can identify both subtitle and non-subtitle text, effectively filtering the non-subtitle text. The combination of time boundary annotation at the start and end frames of each subtitle segment makes the previously annotated data more effective and accurate.
[0051] For step S12, after text recognition in step S11, audio segments corresponding to the subtitle text are extracted from the video using the determined time boundaries. For example, based on the time boundary of the subtitle "We'll leave now and come back in two days," the audio segment from the first frame at the tenth second to the nineteenth frame at the twelfth second is extracted from the video. Audio segments corresponding to other subtitle texts are extracted in the same way.
[0052] For step S13, after the capture in step S12, “We’ll leave first and come back in two days” is used as the text recognition tag for the audio segment from the first frame of the tenth second to the nineteenth frame of the twelfth second. Similarly, other subtitle texts are used to determine the text recognition tags for audio segments at other times.
[0053] For step S14, the text recognition labels and audio segments determined in step S13 form a generation stage, which can already be used to train the speech recognition model. However, the labels still contain some errors, and directly using them to train the speech recognition model will still have a negative impact on the recognition effect. Therefore, further processing is needed to further improve the quality of the generated training data. The annotation results (text recognition labels) determined in step S13 may still contain some annotation errors (including text recognition errors, time boundary annotation errors, and text errors in non-subtitle areas (non-subtitle areas may not be completely removed)). Therefore, it is necessary to further filter and screen the recognition results of the first stage. Using manual verification and screening will undoubtedly consume a lot of manpower, and if they are not removed and directly used in training, it will affect the final model performance.
[0054] Therefore, using a pre-trained speech recognition model for filtering is undoubtedly the best choice. A good speech recognition system often includes both an acoustic model and a language model, both of which play important roles in the speech recognition system.
[0055] As one implementation, the pre-trained speech recognition model is obtained by training the audio segment, the text recognition tags, and training data in the same language as the video, including:
[0056] A first language model is trained using the audio clip and the text recognition tags.
[0057] The first language model is combined with the second language model of the preset target domain by using preset interpolation coefficients to obtain the final language model;
[0058] An acoustic model is trained based on training data in the same language as the video, and a pre-trained speech recognition model is generated using the acoustic model and the final language model.
[0059] In this embodiment, the annotation results (text recognition labels) determined in step S13 are first used to train a language model. This language model selects appropriate interpolation coefficients and interpolates with the language model trained on the original domain text to form the final language model. Different interpolation coefficients may result in different times for filtering out valid data; therefore, the most suitable interpolation coefficients can be selected through multiple experiments. By using the language model interpolation scheme, the language model trained on the text of the filtering dataset is interpolated with the original language model, further improving the data filtering effect and accuracy of this method.
[0060] Since the input video is in Chinese, the acoustic model prepared can be a model trained on data in the same language as the video (e.g., also using Chinese training data). This acoustic model is then combined with the language model trained in the previous step to obtain a pre-trained speech recognition model. The pre-trained speech recognition model obtained from the above steps is used to perform speech recognition on the audio segment, and the resulting speech recognition result is determined as the speech recognition label for that audio segment. In other words, for a segment of audio in the video, there is not only a text recognition label obtained from the subtitles in the video, but also a speech recognition label obtained from the audio itself.
[0061] For step S15, following step S14, each audio segment has both text recognition and speech recognition labels. Specifically, to filter out erroneous data in the annotation results, the text recognition labels of the audio segments are considered as the Ground Truth (reference standard). The WER (Word Error Rate) is calculated using the speech recognition labels of the audio segments. By setting a filtering threshold, if the WER is less than the set threshold, the text recognition label is used as the final annotation result; if it is greater than the set threshold, the text recognition label is identified as erroneous subtitle text and discarded. By filtering the text recognition labels of all audio segments in the above manner, training data for speech recognition in the Chinese domain is obtained. Similarly, if the input is a video in another language, training data for speech recognition in that language domain can be obtained. The overall process of this method is as follows: Figure 2 As shown.
[0062] This implementation demonstrates that, on the one hand, effective training data for speech recognition can be generated from videos of different languages. The newly generated data is not limited by the original data, ensuring data diversity. Furthermore, data for specific domains can be generated based on video type. On the other hand, the pre-trained speech recognition model further filters the labeled data. However, the filtering process does not rely entirely on the speech recognition model; it does not require the model to fully recognize the new data. Instead, it filters data with text annotation errors or silent regions (audio contains subtitles but no voice), further ensuring the effectiveness and accuracy of the filtered data.
[0063] like Figure 3 The diagram shown is a structural schematic of a training data generation system for speech recognition provided in an embodiment of the present invention. The system can execute the training data generation method for speech recognition described in any of the above embodiments and is configured in a terminal.
[0064] This embodiment provides a training data generation system 10 for speech recognition, which includes: a subtitle text determination program module 11, an audio segment extraction program module 12, a text recognition label determination program module 13, a speech recognition label determination program module 14, and a training data determination program module 15.
[0065] The subtitle text determination module 11 is used to perform text recognition on the video and determine the subtitle text containing time boundaries within the video; the audio segment extraction module 12 is used to extract the audio segment corresponding to the time of the subtitle text from the video based on the time boundaries of the subtitle text; the text recognition label determination module 13 is used to determine the subtitle text as the text recognition label of the audio segment; the speech recognition label determination module 14 is used to perform speech recognition on the audio segment using a pre-trained speech recognition model and determine the obtained speech recognition result as the speech recognition label of the audio segment; and the training data determination module 15.
[0066] This invention also provides a non-volatile computer storage medium storing computer-executable instructions that can execute the training data generation method for speech recognition in any of the above method embodiments.
[0067] In one embodiment, the non-volatile computer storage medium of the present invention stores computer-executable instructions, which are configured as follows:
[0068] Perform text recognition on the video to determine subtitle text containing time boundaries within the video;
[0069] Based on the time boundary of the subtitle text, extract the audio segment corresponding to the time of the subtitle text from the video;
[0070] The subtitle text is identified as the text recognition tag of the audio segment;
[0071] The audio segment is subjected to speech recognition using a pre-trained speech recognition model, and the obtained speech recognition result is determined as the speech recognition label of the audio segment.
[0072] The erroneous caption text in the text recognition tags is filtered based on the speech recognition tags, and the filtered text recognition tags are determined as training data for speech recognition.
[0073] As a non-volatile computer-readable storage medium, it can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of the present invention. One or more program instructions are stored in the non-volatile computer-readable storage medium, and when executed by a processor, they perform the training data generation method for speech recognition in any of the above method embodiments.
[0074] Figure 4 This is a schematic diagram of the hardware structure of an electronic device for a training data generation method for speech recognition, provided in another embodiment of this application. Figure 4 As shown, the device includes:
[0075] One or more processors 410 and memory 420, Figure 4 Taking a processor 410 as an example, the device for generating training data for speech recognition may further include an input device 430 and an output device 440.
[0076] The processor 410, memory 420, input device 430, and output device 440 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.
[0077] The memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the training data generation method for speech recognition in the embodiments of this application. The processor 410 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 420, thereby implementing the training data generation method for speech recognition in the above-described method embodiments.
[0078] The memory 420 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data, etc. Furthermore, the memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include memory remotely located relative to the processor 410, and these remote memories may be connected to the mobile device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0079] Input device 430 can receive input numerical or character information. Output device 440 may include display devices such as a display screen.
[0080] The one or more modules are stored in the memory 420, and when executed by the one or more processors 410, they execute the training data generation method for speech recognition in any of the above method embodiments.
[0081] The above-described product can perform the methods provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for performing the methods. Technical details not described in detail in this embodiment can be found in the methods provided in the embodiments of this application.
[0082] Non-volatile computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the device, etc. Furthermore, the non-volatile computer-readable storage medium may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the non-volatile computer-readable storage medium may optionally include memory remotely located relative to the processor, and these remote memories may be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0083] This invention also provides an electronic device comprising: at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the training data generation method for speech recognition according to any embodiment of this invention.
[0084] The electronic devices described in this application exist in various forms, including but not limited to:
[0085] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and primarily aim to provide voice and data communication. These terminals include smartphones, multimedia phones, feature phones, and low-end phones.
[0086] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as tablet computers.
[0087] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes audio and video players, handheld game consoles, e-book readers, as well as smart toys and portable car navigation devices.
[0088] (4) Other electronic devices with data processing functions.
[0089] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising" or "including" include not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0090] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0091] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating training data for speech recognition, comprising: Perform text recognition on the video to determine subtitle text containing time boundaries within the video; Based on the time boundary of the subtitle text, extract the audio segment corresponding to the time of the subtitle text from the video; The subtitle text is identified as the text recognition tag of the audio segment; The audio segment is subjected to speech recognition using a pre-trained speech recognition model, and the obtained speech recognition result is determined as the speech recognition label of the audio segment. Based on the speech recognition label, erroneous subtitle text in the text recognition label is filtered, and the filtered text recognition label is determined as training data for speech recognition. The filtering of erroneous subtitle text in the text recognition label based on the speech recognition label includes: using the text recognition label as a reference standard, calculating the word error rate using the speech recognition label, and if the word error rate is greater than a set threshold, the corresponding text recognition label is determined as erroneous subtitle text and discarded. The pre-trained speech recognition model is obtained by training the audio clip, the text recognition tags, and training data in the same language as the video. The process includes: training a first language model using the audio clip and the text recognition tags; combining the first language model with a second language model in a preset target domain using preset interpolation coefficients to obtain a final language model, wherein different interpolation coefficients result in different durations for selecting valid data, and the preset interpolation coefficients are selected through multiple experiments; training an acoustic model based on training data in the same language as the video; and generating a pre-trained speech recognition model using the acoustic model and the final language model.
2. The method according to claim 1, wherein, The step of performing text recognition on the video to determine subtitle text containing time boundaries within the video includes: Text detection is performed on the video to determine the text located at each position in the image displayed at different frame values. At least based on the position of the text, determine the non-subtitle text and the subtitle text within the text; Perform text clustering on the subtitle text of each frame value, and determine the start time and end time of the subtitle text appearing in the video after text clustering; The start time and end time are defined as the time boundaries of the subtitle text.
3. The method according to claim 2, wherein, The text detection of the video includes: performing text detection on each frame of the video, or performing text detection on the video with skipped frames.
4. The method according to claim 2, wherein, Determining the non-subtitle text and subtitle text in the text based at least on the position of the text includes: The non-subtitle text and subtitle text in the text are determined based on the position of the text and the frequency of the text appearing in the video.
5. A training data generation system for speech recognition, comprising: The subtitle text determination module is used to perform text recognition on the video and determine the subtitle text containing time boundaries within the video; An audio segment extraction module is used to extract audio segments from the video that correspond to the time of the subtitle text based on the time boundary of the subtitle text; A text recognition tag determination module is used to determine the subtitle text as a text recognition tag for the audio segment; A speech recognition label determination module is used to perform speech recognition on the audio segment using a pre-trained speech recognition model, and determine the obtained speech recognition result as the speech recognition label of the audio segment; wherein, the pre-trained speech recognition model is obtained by training the audio segment, the text recognition label, and training data in the same language as the video, including: training a first language model using the audio segment and the text recognition label; combining the first language model with a second language model in a preset target domain through preset interpolation coefficients to obtain a final language model; training an acoustic model based on training data in the same language as the video; and generating a pre-trained speech recognition model using the acoustic model and the final language model, wherein different interpolation coefficients result in different durations for finally selecting effective data, and the preset interpolation coefficients are selected through multiple experiments; The training data determination module is used to filter erroneous subtitle text in the text recognition tags based on the speech recognition tags, and determine the filtered text recognition tags as training data for speech recognition. The filtering of erroneous subtitle text in the text recognition tags based on the speech recognition tags includes: using the text recognition tags as a reference standard, calculating the word error rate using the speech recognition tags, and if the word error rate is greater than a set threshold, determining the corresponding text recognition tags as erroneous subtitle text and discarding them for filtering.
6. The system according to claim 5, wherein, The subtitle text determination module is used for: Text detection is performed on the video to determine the text located at each position in the image displayed at different frame values. At least based on the position of the text, determine the non-subtitle text and the subtitle text within the text; Perform text clustering on the subtitle text of each frame value, and determine the start time and end time of the subtitle text appearing in the video after text clustering; The start time and end time are defined as the time boundaries of the subtitle text.
7. The system according to claim 6, wherein, The text detection of the video includes: performing text detection on each frame of the video, or performing text detection on the video with skipped frames.
8. The system according to claim 6, wherein, Determining the non-subtitle text and subtitle text in the text based at least on the position of the text includes: The non-subtitle text and subtitle text in the text are determined based on the position of the text and the frequency of the text appearing in the video.
9. An electronic device comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1-4.
10. A storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-4.
Citation Information
Patent Citations
Method and device for embedding advertisement based on video embedded captions
CN106658196A
Tibetan Weizang dialect spoken language recognition method based on deep time delay neural network
CN112951206A
Speech recognition training set generation method and device
CN115312032A
Training speech recognition using captions
US20150088508A1
