A method, device, equipment and storage medium for character recognition in video subtitles

Through the text recognition and voiceprint segmentation and clustering technology in video subtitle recognition, the problem of difficult positioning of character information in the video and complex voiceprint recognition model training is solved, and the recognition accuracy and ease of operation are improved.

CN115914742BActive Publication Date: 2024-10-29BEIJING IQIYI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211582799.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2024-10-29
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

The existing technology cannot accurately locate the speaking character in video subtitle recognition, resulting in a lack of character information in video processing. Moreover, voiceprint recognition model training requires a large amount of label data, and different models need to be trained for different film and television dramas, making the operation difficult.

Method used

By performing text recognition on the video, the video frame set and character probability to which the subtitle text belongs is determined, and the voiceprint segmentation and clustering are performed on the audio to establish the corresponding relationship between the voiceprint cluster and the subtitle text, thereby simplifying the training process of the voiceprint recognition model.

Benefits of technology

It improves the recognition accuracy of characters corresponding to subtitle text, reduces the need for audio data labeling and the complexity of model training, enables convenient recognition operations in different movies and TV dramas, and saves manpower and workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914742B_ABST
    Figure CN115914742B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, equipment and storage medium for character recognition in video subtitles, which are applied to the field of video processing technology. The method comprises: performing text recognition on a video to be recognized to obtain multiple subtitle texts; for each subtitle text, determining the corresponding character contained in the set of video frames to which the subtitle text belongs, and determining the first probability that the subtitle text belongs to the corresponding character; performing voiceprint segmentation and clustering on the audio in the video to be recognized to obtain at least one voiceprint cluster; determining the temporal correspondence between each subtitle text and each voiceprint segment; regarding the voiceprint segments in the same voiceprint cluster as voiceprint segments of the same character, and determining the characters corresponding to each voiceprint cluster based on the first probability and the correspondence; and determining the characters corresponding to each subtitle text according to the characters corresponding to each voiceprint cluster and the correspondence. By applying the embodiment of the present invention, the characters corresponding to each subtitle text can be accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video processing, and in particular to a method, device, equipment and storage medium for character recognition in video subtitles. Background Art

[0002] Subtitles are non-image content such as dialogues in television, movies, and stage works that are displayed in text form. Usually, the subtitles in a video do not contain the name of the person speaking. When processing video data containing subtitles, such as intelligently titling edited TV series, the edited video data contains subtitle information. Based on this subtitle information, we can only know the events that occurred in the video data, but cannot accurately locate the person who occurred the event. The lack of person information in the video data has hindered the development of algorithms such as natural language processing (NLP) in this video processing scenario. Therefore, it is particularly important to identify the information of the person speaking that corresponds to the subtitles in the video.

[0003] In the existing method of identifying the speaker information corresponding to the subtitles in the video, the audio data in the video data is extracted, the audio data is divided into multiple audio segments, and the voiceprint recognition model is used to perform voiceprint recognition on each audio segment to obtain the character information of the voiceprint characteristics corresponding to each audio segment. The voiceprint recognition model is trained based on the sample audio data and the character information corresponding to the sample audio data. The training of the voiceprint recognition model requires the use of a large amount of labeled audio data, which makes the workload of voiceprint recognition model training large. In addition, the character information in different film and television dramas is different. To use the voiceprint recognition model to identify specific character information, different voiceprint recognition models need to be trained for different film and television dramas, which is difficult to operate and not easy to implement. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device, equipment and storage medium for character recognition in video subtitles, which can realize character recognition in video subtitles without the need to mark a large amount of audio data and without the need to train different voiceprint recognition models for different film and television dramas. The specific technical solution is as follows:

[0005] In a first aspect of the present invention, a method for character recognition in video subtitles is provided, comprising:

[0006] Performing text recognition on the video to be recognized to obtain a plurality of subtitle texts, wherein the subtitle texts correspond one-to-one to the subtitles in the video to be recognized;

[0007] For each subtitle text, determining a corresponding person included in the video frame set to which the subtitle text belongs, and determining a first probability that the subtitle text belongs to the corresponding person;

[0008] Perform voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster; wherein each voiceprint cluster contains at least one voiceprint segment, and the voiceprint segment is obtained by performing voiceprint segmentation on the audio;

[0009] Determining the corresponding relationship between each of the subtitle texts and each of the voiceprint segments in terms of time sequence;

[0010] The voiceprint segments in the same voiceprint cluster are regarded as the voiceprint segments of the same person, and based on the first probability and the corresponding relationship, the person corresponding to each voiceprint cluster is determined;

[0011] According to the characters corresponding to the voiceprint clusters and the corresponding relationship, the characters corresponding to the subtitle texts are determined respectively.

[0012] In a possible implementation manner, for each subtitle text, determining a corresponding character included in a set of video frames to which the subtitle text belongs, and determining a first probability that the subtitle text belongs to the corresponding character includes:

[0013] For each subtitle text, determine a set of video frames corresponding to a display time period of the subtitle text;

[0014] Determining the number of characters included in the video frame set and the number of times each character appears;

[0015] Based on the number of characters and the number of times each character appears, a first probability that the subtitle text belongs to the corresponding character is determined.

[0016] In a possible implementation, performing voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster includes:

[0017] Acquire audio data in the video to be identified;

[0018] Performing denoising on the audio data to obtain denoised audio data;

[0019] Performing voiceprint segmentation on the denoised audio data to obtain multiple voiceprint segments;

[0020] For each of the voiceprint segments, convert the voiceprint segment into an embedded voiceprint feature;

[0021] Clustering is performed on the embedded voiceprint features to obtain at least one voiceprint cluster.

[0022] In a possible implementation, regarding the voiceprint segments in the same voiceprint cluster as voiceprint segments of the same person, and determining the person corresponding to each voiceprint cluster based on the first probability and the corresponding relationship, includes:

[0023] For each voiceprint segment, based on the corresponding relationship, the first probability that the subtitle text corresponding to the voiceprint segment belongs to the corresponding person is used as the second probability that the voiceprint segment belongs to the corresponding person;

[0024] Taking the voiceprint segments in the same voiceprint cluster as the constraint condition that they are the voiceprint segments of the same person, the persons corresponding to the voiceprint clusters are matched according to the second probability to determine the persons corresponding to the voiceprint clusters.

[0025] In a possible implementation, determining the characters corresponding to the subtitle texts according to the characters corresponding to the voiceprint clusters and the corresponding relationships includes:

[0026] According to the characters corresponding to the voiceprint clusters and the voiceprint segments contained in the voiceprint clusters, determining the characters corresponding to the voiceprint segments;

[0027] According to the characters corresponding to the voiceprint segments and the corresponding relationship, the characters corresponding to the subtitle texts are determined.

[0028] In a second aspect of the present invention, a device for identifying characters in video subtitles is provided, comprising:

[0029] A text recognition module, used to perform text recognition on the video to be recognized to obtain a plurality of subtitle texts, wherein the subtitle texts correspond one-to-one to the subtitles in the video to be recognized;

[0030] A first determination module is used to determine, for each subtitle text, a corresponding person included in a set of video frames to which the subtitle text belongs, and determine a first probability that the subtitle text belongs to the corresponding person;

[0031] A segmentation and clustering module, configured to perform voiceprint segmentation and clustering on the audio in the video to be identified, and obtain at least one voiceprint cluster; wherein each voiceprint cluster contains at least one voiceprint segment, and the voiceprint segment is obtained by performing voiceprint segmentation on the audio;

[0032] A second determination module is used to determine the corresponding relationship between each of the subtitle texts and each of the voiceprint segments in terms of time sequence;

[0033] a third determining module, configured to regard the voiceprint segments in the same voiceprint cluster as voiceprint segments of the same person, and determine the person corresponding to each of the voiceprint clusters based on the first probability and the corresponding relationship;

[0034] The fourth determination module is used to determine the characters corresponding to the subtitle texts according to the characters corresponding to the voiceprint clusters and the corresponding relationships.

[0035] In a possible implementation manner, the first determining module includes:

[0036] A first determining unit is used to determine, for each subtitle text, a set of video frames corresponding to a display time period of the subtitle text;

[0037] A second determining unit, used to determine the number of characters included in the video frame set and the number of times each character appears;

[0038] The third determining unit is used to determine a first probability that the subtitle text belongs to a corresponding character based on the number of characters and the number of times each character appears.

[0039] In a possible implementation, the segmentation and clustering module includes:

[0040] An acquisition unit, used for acquiring audio data in the video to be identified;

[0041] A denoising unit, used to perform denoising on the audio data to obtain denoised audio data;

[0042] A segmentation unit, configured to perform voiceprint segmentation on the denoised audio data to obtain a plurality of voiceprint segments;

[0043] A conversion unit, configured to convert each voiceprint segment into an embedded voiceprint feature;

[0044] The clustering unit is used to cluster the embedded voiceprint features to obtain at least one voiceprint cluster.

[0045] In a possible implementation manner, the third determining module is specifically configured to:

[0046] For each voiceprint segment, based on the corresponding relationship, the first probability that the subtitle text corresponding to the voiceprint segment belongs to the corresponding person is used as the second probability that the voiceprint segment belongs to the corresponding person;

[0047] Taking the voiceprint segments in the same voiceprint cluster as the constraint condition that they are the voiceprint segments of the same person, the persons corresponding to the voiceprint clusters are matched according to the second probability to determine the persons corresponding to the voiceprint clusters.

[0048] In a possible implementation manner, the fourth determining module includes:

[0049] a fourth determining unit, configured to determine the person corresponding to each voiceprint segment according to the person corresponding to each voiceprint cluster and the voiceprint segment included in each voiceprint cluster;

[0050] The fifth determining unit is used to determine the character corresponding to each of the subtitle texts according to the characters corresponding to each of the voiceprint segments and the corresponding relationship.

[0051] In another aspect of the present invention, there is provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0052] Memory, used to store computer programs;

[0053] The processor is used to implement any of the above-mentioned methods for character recognition in video subtitles when executing the program stored in the memory.

[0054] In another aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned methods for character recognition in video subtitles is implemented.

[0055] In another aspect of the present invention, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is enabled to execute any of the above-mentioned methods for character recognition in video subtitles.

[0056] The character recognition method of video subtitles provided by the embodiment of the present invention accurately obtains multiple subtitle texts contained in the video to be recognized by performing text recognition on the video to be recognized. For each subtitle text, the corresponding character contained in the video frame set to which the subtitle text belongs is determined, and the first probability that the subtitle text belongs to the corresponding character is determined, and the audio in the video to be recognized is segmented and clustered to obtain at least one voiceprint cluster, each voiceprint cluster contains at least one voiceprint segment, and the corresponding relationship between each subtitle text and each voiceprint segment in time sequence is further determined, and the voiceprint segments in the same voiceprint cluster are regarded as voiceprint segments of the same character. Based on the first probability and the corresponding relationship, the characters corresponding to each voiceprint cluster are determined, and then according to the characters corresponding to each voiceprint cluster and the corresponding relationship, the characters corresponding to each subtitle text are respectively determined. In the embodiment of the present invention, the subtitle text in the video to be identified is identified by using text recognition, and the audio in the video to be identified is segmented and clustered by using voiceprint segmentation and clustering. The results of subtitle text recognition, the results of voiceprint segmentation and clustering, and the temporal correspondence between each subtitle text and each voiceprint segment are further combined to accurately identify the person corresponding to each subtitle text. Compared with the method of text recognition only, the accuracy of identifying the person corresponding to the subtitle text can be improved. Moreover, compared with large-scale labeling of audio data, different voiceprint recognition models are trained for different film and television dramas, which is convenient to implement, simple to operate, reduces workload, and saves manpower. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other embodiments can also be obtained based on these drawings.

[0058] Figure 1 Schematic diagram of the process of the method for character recognition in video subtitles according to an embodiment of the present invention;

[0059] Figure 2 A schematic diagram of a voiceprint cluster and character matching process in an embodiment of the present invention;

[0060] Figure 3 A schematic diagram of determining a first probability that a subtitle belongs to a corresponding character in an embodiment of the present invention;

[0061] Figure 4 It is a schematic diagram of the process of voiceprint segmentation and clustering in an embodiment of the present invention;

[0062] Figure 5 A schematic diagram of a process for determining a character corresponding to a subtitle in an embodiment of the present invention;

[0063] Figure 6 This is a schematic diagram of the first structure of a device for identifying people in video subtitles in an embodiment of the present application;

[0064] Figure 7 This is a second structural diagram of a device for identifying people in video subtitles in an embodiment of the present application;

[0065] Figure 8 This is a third structural schematic diagram of the device for identifying people in video subtitles in an embodiment of the present application;

[0066] Fig. 9 This is a fourth structural schematic diagram of the device for identifying people in video subtitles in an embodiment of the present application;

[0067] Fig.10 This is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0069] In order to realize the recognition of the character information corresponding to each subtitle in the video, the embodiment of the present invention provides a method, device, equipment and storage medium for character recognition of video subtitles. The embodiment of the present invention provides a method for character recognition of video subtitles, including:

[0070] Performing text recognition on the video to be recognized to obtain a plurality of subtitle texts, wherein the subtitle texts correspond one-to-one to the subtitles in the video to be recognized;

[0071] For each subtitle text, determining a corresponding person included in the video frame set to which the subtitle text belongs, and determining a first probability that the subtitle text belongs to the corresponding person;

[0072] Perform voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster; wherein each voiceprint cluster contains at least one voiceprint segment, and the voiceprint segment is obtained by performing voiceprint segmentation on the audio;

[0073] Determining the corresponding relationship between each of the subtitle texts and each of the voiceprint segments in terms of time sequence;

[0074] The voiceprint segments in the same voiceprint cluster are regarded as the voiceprint segments of the same person, and based on the first probability and the corresponding relationship, the person corresponding to each voiceprint cluster is determined;

[0075] According to the characters corresponding to the voiceprint clusters and the corresponding relationship, the characters corresponding to the subtitle texts are determined respectively.

[0076] The character recognition method of video subtitles provided by the embodiment of the present invention accurately obtains multiple subtitle texts contained in the video to be recognized by performing text recognition on the video to be recognized. For each subtitle text, the corresponding character contained in the video frame set to which the subtitle text belongs is determined, and the first probability that the subtitle text belongs to the corresponding character is determined, and the audio in the video to be recognized is segmented and clustered to obtain at least one voiceprint cluster, each voiceprint cluster contains at least one voiceprint segment, and the corresponding relationship between each subtitle text and each voiceprint segment in time sequence is further determined, and the voiceprint segments in the same voiceprint cluster are regarded as voiceprint segments of the same character. Based on the first probability and the corresponding relationship, the characters corresponding to each voiceprint cluster are determined, and then according to the characters corresponding to each voiceprint cluster and the corresponding relationship, the characters corresponding to each subtitle text are respectively determined. In the embodiment of the present invention, the subtitle text in the video to be identified is identified by using text recognition, and the audio in the video to be identified is segmented and clustered by using voiceprint segmentation and clustering. The results of subtitle text recognition, the results of voiceprint segmentation and clustering, and the temporal correspondence between each subtitle text and each voiceprint segment are further combined to accurately identify the person corresponding to each subtitle text. Compared with the method of text recognition only, the accuracy of identifying the person corresponding to the subtitle text can be improved. Moreover, compared with large-scale labeling of audio data, different voiceprint recognition models are trained for different film and television dramas, which is convenient to implement, simple to operate, reduces workload, and saves manpower.

[0077] The following is a detailed description of a method for character recognition in video subtitles provided by an embodiment of the present invention:

[0078] like Figure 1 As shown, Figure 1 The present invention is a flowchart of a method for character recognition in video subtitles according to an embodiment of the present invention. The method comprises the following steps:

[0079] Step S110, performing text recognition on the video to be recognized to obtain a plurality of subtitle texts.

[0080] In the embodiment of the present invention, the video to be identified may be a TV series, a popular video clip, etc. The language of the characters and the subtitle display language in the video to be identified are not specifically limited, and the storage format of the video to be identified is not specifically limited. The video to be identified can be obtained through a network platform, or through an electronic device with a recording function.

[0081] In one implementation, optical character recognition (OCR) technology may be used to scan each video frame of the video to be recognized, obtain text information contained in each video frame of the video to be recognized, and then obtain multiple subtitle texts.

[0082] Step S120 , for each subtitle text, determining a corresponding person included in the video frame set to which the subtitle text belongs, and determining a first probability that the subtitle text belongs to the corresponding person.

[0083] The video frame set to which the subtitle text belongs is the set of video frames played during the time period in which the subtitle text appears. The characters appearing in the video frame set corresponding to each subtitle text appearance time period can be detected by character recognition or target detection methods to determine the characters included in the video frame set to which each subtitle text belongs; further, the number of times each character appears in the video frame set corresponding to each subtitle text appearance time period is counted to determine the number of times each character appears in the video frame set to which each subtitle text belongs. For each subtitle text, after determining the characters included in the video frame set to which the subtitle text belongs and the number of times each character appears, exemplarily, the probability of each character appearing in the video frame set to which the subtitle text belongs can be determined as the first probability that the subtitle text belongs to the corresponding character.

[0084] Exemplarily, the methods used for person recognition or target detection may include, but are not limited to: face image acquisition, face location, eigenface, local feature analysis (Local Face Analysis, LFA) and neural network model, etc.

[0085] Step S130, performing voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster.

[0086] In one example, the voiceprint segmentation and clustering method is used to perform voiceprint segmentation and voiceprint clustering on the audio in the video to be identified, so as to obtain at least one voiceprint cluster. Each voiceprint cluster obtained contains at least one voiceprint segment, and each voiceprint segment is obtained by performing voiceprint segmentation on the audio.

[0087] Exemplarily, voiceprint segmentation clustering can be based on voiceprint features Agglomerative hierarchical clustering (AHC), Hidden Markov Model hierarchical clustering (VB-HMM on x-vectors, VBx), etc.

[0088] Step S140, determining the corresponding relationship between each subtitle text and each voiceprint segment in time sequence.

[0089] There is a certain temporal correlation between the subtitle text and the voiceprint segment in the video to be identified. For example, the timestamp at which a subtitle text begins to appear corresponds to the timestamp at which a voiceprint segment begins. Furthermore, by obtaining the timestamp corresponding to each subtitle text and the timestamp corresponding to each voiceprint segment, and then matching the timestamp corresponding to each subtitle text with the timestamp corresponding to each voiceprint segment, the temporal correspondence between each subtitle text and each voiceprint segment can be determined.

[0090] Step S150: The voiceprint segments in the same voiceprint cluster are regarded as the voiceprint segments of the same person, and the person corresponding to each voiceprint cluster is determined based on the first probability and the corresponding relationship.

[0091] By using the voiceprint segmentation and clustering method, the audio in the video to be identified is segmented and clustered. Each voiceprint cluster obtained should contain voiceprint segments under the voiceprint characteristics of the same speaker. However, in actual applications, the clustering results may have slight differences and are not 100% accurate. In the embodiment of the present invention, the slight differences in clustering results are ignored, and the voiceprint segments in the same voiceprint cluster are regarded as the voiceprint segments of the same person, that is, one voiceprint cluster corresponds to one person.

[0092] A voiceprint cluster corresponds to a character. A voiceprint cluster contains at least one voiceprint segment. Each subtitle text corresponds to each voiceprint segment in time sequence. The first probability that each subtitle text belongs to the corresponding character has been determined, and then the optimal matching relationship between each voiceprint cluster and the character can be determined.

[0093] In one implementation, the Hungarian algorithm can be used to optimally match the above-mentioned voiceprint segmentation and clustering results, the first probability that each subtitle text belongs to the corresponding character, and the temporal correspondence between each subtitle text and each voiceprint segment, so as to determine the optimal combination of the corresponding characters of each voiceprint cluster.

[0094] Through the corresponding relationship between each subtitle text and each voiceprint segment in time sequence, and the voiceprint cluster to which each voiceprint segment belongs, the corresponding relationship between each subtitle text and the voiceprint cluster can be determined. Figure 2 As shown, subtitle text 1 and subtitle text 2 correspond to voiceprint cluster 1, subtitle text 3, subtitle text 4 and subtitle text 5 correspond to voiceprint cluster 2, and the first probability that subtitle text 1 belongs to person A and the first probability that it belongs to person B are determined, the first probability that subtitle text 2 belongs to person A, the first probability that subtitle text 3 belongs to person A and the first probability that it belongs to person B, the first probability that subtitle text 4 belongs to person B and the first probability that it belongs to person C, and the first probability that subtitle text 5 belongs to person B and the first probability that it belongs to person C. The voiceprint segments in the same voiceprint cluster are regarded as voiceprint segments of the same person, and the Hungarian algorithm is used to optimally match the first probability that each subtitle text belongs to the corresponding person with each voiceprint cluster to obtain the optimal matching combination, that is, to determine the result of the person corresponding to each voiceprint cluster - voiceprint cluster 1 corresponds to person A, and voiceprint cluster 2 corresponds to person B.

[0095] Step S160, determining the characters corresponding to the subtitle texts according to the characters corresponding to the voiceprint clusters and the corresponding relationships.

[0096] The character information corresponding to each subtitle text can be determined through the characters corresponding to each voiceprint cluster, the voiceprint segments contained in each voiceprint cluster, and the corresponding relationship between each voiceprint segment and each subtitle text in time sequence.

[0097] The character recognition method of video subtitles provided by the embodiment of the present invention accurately obtains multiple subtitle texts contained in the video to be recognized by performing text recognition on the video to be recognized. For each subtitle text, the corresponding character contained in the video frame set to which the subtitle text belongs is determined, and the first probability that the subtitle text belongs to the corresponding character is determined, and the audio in the video to be recognized is segmented and clustered to obtain at least one voiceprint cluster, each voiceprint cluster contains at least one voiceprint segment, and the corresponding relationship between each subtitle text and each voiceprint segment in time sequence is further determined, and the voiceprint segments in the same voiceprint cluster are regarded as voiceprint segments of the same character. Based on the first probability and the corresponding relationship, the characters corresponding to each voiceprint cluster are determined, and then according to the characters corresponding to each voiceprint cluster and the corresponding relationship, the characters corresponding to each subtitle text are respectively determined. In the embodiment of the present invention, the subtitle text in the video to be identified is identified by using text recognition, and the audio in the video to be identified is segmented and clustered by using voiceprint segmentation and clustering. The results of subtitle text recognition, the results of voiceprint segmentation and clustering, and the temporal correspondence between each subtitle text and each voiceprint segment are further combined to accurately identify the person corresponding to each subtitle text. Compared with the method of text recognition only, the accuracy of identifying the person corresponding to the subtitle text can be improved. Moreover, compared with large-scale labeling of audio data, different voiceprint recognition models are trained for different film and television dramas, which is convenient to implement, simple to operate, reduces workload, and saves manpower.

[0098] In one possible implementation, based on Figure 1 The embodiment shown, such as Figure 3 As shown, Figure 3 Schematic diagram of a first probability implementation method for determining that a subtitle text belongs to a corresponding character in an embodiment of the present invention. The above step S120 may include the following steps:

[0099] Step S121: for each subtitle text, determine a set of video frames corresponding to the display time period of the subtitle text.

[0100] By means of target detection or video capture, target detection or capture is performed on the video corresponding to each subtitle text appearance time period to determine the video frame set corresponding to each subtitle text display time period. Exemplarily, a video frame set corresponding to a subtitle text may include one or more video frames.

[0101] In one example, the set of video frames corresponding to the subtitle text display time period can be detected or identified by fraps software.

[0102] Step S122, determining the number of characters included in the video frame set and the number of times each character appears.

[0103] The number of times a character appears in a video frame set, that is, the number of video frames in which the character appears in the video frame set, is equivalent to the duration of the character's appearance in the video frame set. In one possible implementation, the face included in the video frame set corresponding to the subtitle text display time period can be recognized by a face recognition model to obtain the characters included in the video frame set corresponding to the subtitle text display time period, and the number of times each character appears in the video frame set corresponding to the subtitle text display time period is further counted. When the characters included in the video frame set corresponding to the subtitle text display time period are obtained, the number of characters included in the video frame set corresponding to the subtitle text display time period is known.

[0104] For example, a video frame set corresponding to a subtitle text display time period includes 10 video frames, and the face included in the video frame set is recognized by the face recognition model, and the recognition result includes person A and person B, that is, in the video frame set corresponding to the subtitle text display time period, the number of persons is 2. Among them, person A appears in 7 video frames, and person B appears in 4 video frames, that is, it can be counted as: in the video frame set corresponding to the subtitle text display time period, the number of times person A appears is 7, and the number of times person B appears is 4.

[0105] Step S123: determining a first probability that the subtitle text belongs to a corresponding character based on the number of characters and the number of times each character appears.

[0106] In a possible implementation, the first probability that the subtitle text belongs to the corresponding character can be determined by the following expression:

[0107]

[0108] Where p represents the first probability that the subtitle text belongs to the i-th person, n represents the number of people contained in the video frame set corresponding to the subtitle text display time period, and x i Indicates the number of times the i-th person appears in the set of video frames corresponding to the subtitle text appearance period.

[0109] The number of characters contained in the video frame set corresponding to the subtitle text appearance time period and the number of times each character appears are determined, and the first probability that the subtitle text belongs to the corresponding character is accurately calculated by probability calculation.

[0110] In one possible implementation, based on Figure 1 The embodiment shown, such as Figure 4 As shown, Figure 4 The above step S130 may include the following steps:

[0111] Step S131, obtaining audio data in the video to be identified.

[0112] In a possible implementation, the video to be identified can be converted into audio using the video format conversion function of the ffmpeg software to obtain audio data corresponding to the video to be identified. ffmpeg is an open source computer program that can be used to record and convert digital audio and video and convert them into streams.

[0113] In a possible implementation, audio data in the video to be identified may also be extracted by video processing software such as Premiere.

[0114] Step S132, denoising the audio data to obtain denoised audio data.

[0115] A lot of noise may be mixed into the audio data, such as background music, wind and rain, etc. The video data captured by electronic devices may also include various sound information unrelated to human voice, such as car horns, signal noise, etc. Before performing voiceprint segmentation on the acquired audio data, the audio data is denoised to retain the audio information containing human voice, which can improve the accuracy of obtaining voiceprint features of audio data. Exemplarily, denoising can be achieved through deep learning networks, spectral subtraction, etc.

[0116] Step S133, performing voiceprint segmentation on the denoised audio data to obtain multiple voiceprint segments.

[0117] The audio data is subjected to voiceprint segmentation, and one or more sentences in the audio information containing human voice are cut out and divided into multiple voiceprint segments, each of which is a part of the audio data.

[0118] In one example, a fixed-length segmentation method can be used, for example, the audio data is segmented according to a set duration to obtain multiple voiceprint segments of equal duration, and the set duration can be set according to actual needs, such as 0.5 seconds, 1 second or 2 seconds. A speaker change detection model (SCD) compiled based on a voiceprint encoder can also be used to segment the denoised audio data, that is, to determine the transition point, and perform voiceprint segmentation from the transition point to obtain multiple voiceprint segments.

[0119] Step S134: for each voiceprint segment, convert the voiceprint segment into an embedded voiceprint feature.

[0120] In one example, each voiceprint segment can be given an embedding feature embedding, or each voiceprint segment can be encoded to obtain the corresponding embedded voiceprint feature. For example, the Gaussian Mixture Model-Universal Background Model (GMM-UBM) can be used to fit the embedding code of each speaker's voiceprint information; or models such as Convolutional Neural Networks (CNN) or Recurrent Neural Networks (RNN) can be used to obtain a fixed-length embedding vector d-vector for each audio. For example, the embedding code of each speaker can be the mean of all the audio embedding vectors of the speaker.

[0121] Step S135: clustering each embedded voiceprint feature to obtain at least one voiceprint cluster.

[0122] The embedded voiceprint features of each voiceprint segment are clustered, and the voiceprint segments with embedded voiceprint features of the same speaker are clustered into the same cluster as much as possible to obtain at least one voiceprint cluster. In an example, clustering of the embedded voiceprint features can be achieved by clustering methods such as K-means clustering, hierarchical clustering of Gaussian mixture models, and spectral clustering.

[0123] The audio data is denoised to avoid the influence of noise in the audio data on the target voiceprint, making the obtained voiceprint features more accurate. Furthermore, the embedded voiceprint features corresponding to each voiceprint segment are clustered to accurately obtain the voiceprint clusters corresponding to different characters.

[0124] In a possible implementation, the above step S150 regards the voiceprint segments in the same voiceprint cluster as the voiceprint segments of the same person, and determines the person corresponding to each voiceprint cluster based on the first probability and the corresponding relationship, including:

[0125] Step 1: for each voiceprint segment, based on the corresponding relationship, the first probability that the subtitle text corresponding to the voiceprint segment belongs to the corresponding person is used as the second probability that the voiceprint segment belongs to the corresponding person;

[0126] Step 2: Taking the voiceprint segments in the same voiceprint cluster as the constraint condition that they are the voiceprint segments of the same person, the persons corresponding to the voiceprint clusters are matched according to the second probability to determine the persons corresponding to each voiceprint cluster.

[0127] There is a temporal correspondence between each subtitle text and each voiceprint segment. The first probability that each subtitle text belongs to the corresponding person is calculated by the above method. Then, the first probability that the subtitle text corresponding to the voiceprint segment belongs to the corresponding person is used as the second probability that the voiceprint segment belongs to the corresponding person.

[0128] In one example, a brute force matching algorithm can be used, with the constraint that the voiceprint segments in the same voiceprint cluster are the voiceprint segments of the same person, to determine all possible matching results of the correspondence between the voiceprint cluster and the person, and then calculate the second probability and the highest matching result based on the second probability that each voiceprint segment belongs to the corresponding person, so as to obtain the person corresponding to each voiceprint cluster.

[0129] In one example, the Hungarian matching algorithm can be used, with the constraint that the voiceprint segments in the same voiceprint cluster are the voiceprint segments of the same person, and the corresponding relationship between the voiceprint clusters and the person is matched according to the second probability that each voiceprint segment belongs to the corresponding person. Through the Hungarian matching algorithm, the optimal matching result between the voiceprint clusters and the person can be obtained, thereby obtaining the person corresponding to each voiceprint cluster.

[0130] In one possible implementation, based on Figure 1 The embodiment shown, such as Figure 5 As shown, Figure 5 The above step S160 may include the following steps:

[0131] Step S161, determining the person corresponding to each voiceprint segment according to the person corresponding to each voiceprint cluster and the voiceprint segments contained in each voiceprint cluster.

[0132] Exemplarily, voiceprint cluster 1 corresponds to person A, and voiceprint cluster 2 corresponds to person B. Voiceprint cluster 1 contains voiceprint segment 1 and voiceprint segment 2, and voiceprint cluster 2 contains voiceprint segment 3, voiceprint segment 4, and voiceprint segment 5. Accordingly, voiceprint segment 1 and voiceprint segment 2 correspond to person A, and voiceprint segment 3, voiceprint segment 4, and voiceprint segment 5 correspond to person B.

[0133] Step S162, determining the characters corresponding to the subtitle texts according to the characters corresponding to the voiceprint segments and the corresponding relationships.

[0134] Exemplarily, character A corresponds to voiceprint segment 1 and voiceprint segment 2, character B corresponds to voiceprint segment 3, voiceprint segment 4 and voiceprint segment 5, and each voiceprint segment and the subtitle text have a one-to-one correspondence in time sequence. Accordingly, the correspondence between the characters and the subtitle texts can be determined as follows: character A corresponds to subtitle text 1 and subtitle text 2, and character B corresponds to subtitle text 3, subtitle text 4 and subtitle text 5.

[0135] The technical solution provided by the embodiment of the present invention determines the characters corresponding to each voiceprint segment through the characters corresponding to each voiceprint cluster and the voiceprint segments contained in each voiceprint cluster, and then accurately determines the characters corresponding to each subtitle text based on the characters corresponding to each voiceprint segment and the corresponding relationship.

[0136] In existing applications, since there are many people in the corresponding video frames when the subtitles of most TV dramas appear, the speakers in the TV dramas can only be identified through optical character recognition technology, which can identify the content of the subtitles in the video frames, but cannot determine which person is speaking. Using voiceprint recognition models to identify specific speakers in TV dramas requires a large number of labels, and the voiceprint recognition model needs to be retrained for each drama, making the overall operation process difficult to implement.

[0137] The technical solution provided by the embodiment of the present invention performs text recognition on the video to be identified to accurately obtain multiple subtitle texts contained in the video to be identified, and for each subtitle text, determines the corresponding person contained in the video frame set to which the subtitle text belongs, and determines the first probability that the subtitle text belongs to the corresponding person, and performs voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster, each voiceprint cluster contains at least one voiceprint segment, further determines the temporal correspondence between each subtitle text and each voiceprint segment, regards the voiceprint segments in the same voiceprint cluster as voiceprint segments of the same person, determines the person corresponding to each voiceprint cluster based on the first probability and the correspondence, and then determines the person corresponding to each subtitle text according to the person corresponding to each voiceprint cluster and the correspondence. The subtitle text in the video to be identified is recognized by using text recognition, and the audio in the video to be identified is segmented and clustered by using voiceprint segmentation and clustering. The results of subtitle text recognition, voiceprint segmentation and clustering, and the temporal correspondence between each subtitle text and each voiceprint segment are further combined to accurately identify the person corresponding to each subtitle text. Compared with the method of text recognition alone, the accuracy of identifying the person corresponding to the subtitle text can be improved. Moreover, compared with large-scale labeling of audio data, different voiceprint recognition models are trained for different film and television dramas, which is convenient to implement and simple to operate, reduces workload, and saves manpower.

[0138] Based on the same inventive concept, a device for identifying characters in video subtitles is provided corresponding to the above-mentioned method for identifying characters in video subtitles, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the first structure of a device for identifying people in video subtitles in an embodiment of the present application, and the device includes:

[0139] A text recognition module 610 is used to perform text recognition on the video to be recognized to obtain a plurality of subtitle texts, wherein the subtitle texts correspond one-to-one to the subtitles in the video to be recognized;

[0140] A first determination module 620 is used to determine, for each subtitle text, a corresponding person included in a set of video frames to which the subtitle text belongs, and determine a first probability that the subtitle text belongs to the corresponding person;

[0141] The segmentation and clustering module 630 is used to perform voiceprint segmentation and clustering on the audio in the video to be identified, and obtain at least one voiceprint cluster; wherein each voiceprint cluster contains at least one voiceprint segment, and the voiceprint segment is obtained by performing voiceprint segmentation on the audio;

[0142] The second determination module 640 is used to determine the corresponding relationship between each subtitle text and each voiceprint segment in time sequence;

[0143] A third determination module 650 is used to regard the voiceprint segments in the same voiceprint cluster as voiceprint segments of the same person, and determine the person corresponding to each voiceprint cluster based on the first probability and the corresponding relationship;

[0144] The fourth determination module 660 is used to determine the characters corresponding to the subtitle texts according to the characters corresponding to the voiceprint clusters and the corresponding relationships.

[0145] The character recognition device for video subtitles provided by the embodiment of the present invention accurately obtains multiple subtitle texts contained in the video to be recognized by performing text recognition on the video to be recognized. For each subtitle text, the corresponding character contained in the video frame set to which the subtitle text belongs is determined, and the first probability that the subtitle text belongs to the corresponding character is determined, and the audio in the video to be recognized is segmented and clustered to obtain at least one voiceprint cluster, each voiceprint cluster contains at least one voiceprint segment, and the corresponding relationship between each subtitle text and each voiceprint segment in time sequence is further determined, and the voiceprint segments in the same voiceprint cluster are regarded as voiceprint segments of the same character. Based on the first probability and the corresponding relationship, the characters corresponding to each voiceprint cluster are determined, and then according to the characters corresponding to each voiceprint cluster and the corresponding relationship, the characters corresponding to each subtitle text are respectively determined. In the embodiment of the present invention, the subtitle text in the video to be identified is identified by using text recognition, and the audio in the video to be identified is segmented and clustered by using voiceprint segmentation and clustering. The results of subtitle text recognition, the results of voiceprint segmentation and clustering, and the temporal correspondence between each subtitle text and each voiceprint segment are further combined to accurately identify the person corresponding to each subtitle text. Compared with the method of text recognition only, the accuracy of identifying the person corresponding to the subtitle text can be improved. Moreover, compared with large-scale labeling of audio data, different voiceprint recognition models are trained for different film and television dramas, which is convenient to implement, simple to operate, reduces workload, and saves manpower.

[0146] In one possible implementation, see Figure 7 , the first determination module 620 may include:

[0147] The first determining unit 621 is used to determine, for each subtitle text, a set of video frames corresponding to a display time period of the subtitle text;

[0148] A second determining unit 622 is used to determine the number of characters included in the video frame set and the number of times each character appears;

[0149] The third determining unit 623 is configured to determine a first probability that the subtitle text belongs to a corresponding character based on the number of characters and the number of times each character appears.

[0150] In a possible implementation, Figure 8 As shown, the segmentation clustering module 630 may include:

[0151] An acquisition unit 631 is used to acquire audio data in the video to be identified;

[0152] A denoising unit 632, configured to perform denoising on the audio data to obtain denoised audio data;

[0153] The segmentation unit 633 is used to perform voiceprint segmentation on the denoised audio data to obtain multiple voiceprint segments;

[0154] A conversion unit 634, configured to convert each voiceprint segment into an embedded voiceprint feature;

[0155] The clustering unit 635 is used to cluster the embedded voiceprint features to obtain at least one voiceprint cluster.

[0156] In a possible implementation manner, the third determining module 650 is specifically configured to:

[0157] For each voiceprint segment, based on the corresponding relationship, the first probability that the subtitle text corresponding to the voiceprint segment belongs to the corresponding person is used as the second probability that the voiceprint segment belongs to the corresponding person;

[0158] Taking the constraint that the voiceprint segments in the same voiceprint cluster are voiceprint segments of the same person as a constraint, the persons corresponding to the voiceprint clusters are matched according to the second probability to determine the persons corresponding to the voiceprint clusters.

[0159] In a possible implementation, Fig. 9 As shown, the fourth determination module 660 may include:

[0160] The fourth determining unit 661 is used to determine the person corresponding to each voiceprint segment according to the person corresponding to each voiceprint cluster and the voiceprint segment included in each voiceprint cluster;

[0161] The fifth determining unit 662 is used to determine the characters corresponding to the subtitle texts according to the characters corresponding to the voiceprint segments and the corresponding relationships.

[0162] The embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, it includes a processor 101, a communication interface 102, a memory 103 and a communication bus 104, wherein the processor 101, the communication interface 102, and the memory 103 communicate with each other through the communication bus 104.

[0163] Memory 103, used for storing computer programs;

[0164] The processor 101 is used to execute the program stored in the memory 103, and implements the following steps:

[0165] Performing text recognition on the video to be recognized to obtain a plurality of subtitle texts, wherein the subtitle texts correspond one-to-one to the subtitles in the video to be recognized;

[0166] For each subtitle text, determining a corresponding person included in the video frame set to which the subtitle text belongs, and determining a first probability that the subtitle text belongs to the corresponding person;

[0167] Perform voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster; wherein each voiceprint cluster contains at least one voiceprint segment, and the voiceprint segment is obtained by performing voiceprint segmentation on the audio;

[0168] Determining the corresponding relationship between each of the subtitle texts and each of the voiceprint segments in terms of time sequence;

[0169] The voiceprint segments in the same voiceprint cluster are regarded as the voiceprint segments of the same person, and based on the first probability and the corresponding relationship, the person corresponding to each voiceprint cluster is determined;

[0170] According to the characters corresponding to the voiceprint clusters and the corresponding relationship, the characters corresponding to the subtitle texts are determined respectively.

[0171] In the embodiment of the present invention, the subtitle text in the video to be identified is identified by using text recognition, and the audio in the video to be identified is segmented and clustered by using voiceprint segmentation and clustering. The results of subtitle text recognition, the results of voiceprint segmentation and clustering, and the temporal correspondence between each subtitle text and each voiceprint segment are further combined to accurately identify the person corresponding to each subtitle text. Compared with the method of text recognition only, the accuracy of identifying the person corresponding to the subtitle text can be improved. Moreover, compared with large-scale labeling of audio data, different voiceprint recognition models are trained for different film and television dramas, which is convenient to implement, simple to operate, reduces workload, and saves manpower.

[0172] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0173] The communication interface is used for communication between the above terminal and other devices.

[0174] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0175] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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.

[0176] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the method for character recognition in video subtitles described in any of the above embodiments is implemented.

[0177] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the method for character recognition in video subtitles described in any one of the above embodiments.

[0178] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0179] 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 existence of other identical elements in the process, method, article or device including the elements.

[0180] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device / electronic 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.

[0181] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for character recognition in video subtitles, characterized in that: The method comprises: Performing text recognition on the video to be recognized to obtain a plurality of subtitle texts, wherein the subtitle texts correspond one-to-one to the subtitles in the video to be recognized; For each subtitle text, determining a corresponding person included in the video frame set to which the subtitle text belongs, and determining a first probability that the subtitle text belongs to the corresponding person; Perform voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster; wherein each voiceprint cluster contains at least one voiceprint segment, and the voiceprint segment is obtained by performing voiceprint segmentation on the audio; Determining the corresponding relationship between each of the subtitle texts and each of the voiceprint segments in terms of time sequence; The voiceprint segments in the same voiceprint cluster are regarded as voiceprint segments of the same person, and based on the first probability and the corresponding relationship, the person corresponding to each voiceprint cluster is determined; According to the characters corresponding to the voiceprint clusters and the corresponding relationship, the characters corresponding to the subtitle texts are determined respectively.

2. The method according to claim 1, characterized in that The step of determining, for each subtitle text, a corresponding character included in a set of video frames to which the subtitle text belongs, and determining a first probability that the subtitle text belongs to the corresponding character includes: For each subtitle text, determine a set of video frames corresponding to a display time period of the subtitle text; Determining the number of characters included in the video frame set and the number of times each character appears; Based on the number of characters and the number of times each character appears, a first probability that the subtitle text belongs to the corresponding character is determined.

3. The method according to claim 1, characterized in that The performing voiceprint segmentation and clustering on the audio in the video to be identified to obtain at least one voiceprint cluster includes: Acquire audio data in the video to be identified; Performing denoising on the audio data to obtain denoised audio data; Performing voiceprint segmentation on the denoised audio data to obtain multiple voiceprint segments; For each of the voiceprint segments, convert the voiceprint segment into an embedded voiceprint feature; Clustering is performed on the embedded voiceprint features to obtain at least one voiceprint cluster.

4. The method according to claim 1, characterized in that The treating the voiceprint segments in the same voiceprint cluster as the voiceprint segments of the same person, and determining the person corresponding to each voiceprint cluster based on the first probability and the corresponding relationship, includes: For each voiceprint segment, based on the corresponding relationship, the first probability that the subtitle text corresponding to the voiceprint segment belongs to the corresponding person is used as the second probability that the voiceprint segment belongs to the corresponding person; Taking the voiceprint segments in the same voiceprint cluster as the constraint condition that they are the voiceprint segments of the same person, the persons corresponding to the voiceprint clusters are matched according to the second probability to determine the persons corresponding to the voiceprint clusters.

5. The method according to claim 1, characterized in that The determining the characters corresponding to the subtitle texts respectively according to the characters corresponding to the voiceprint clusters and the corresponding relationships includes: According to the characters corresponding to the voiceprint clusters and the voiceprint segments contained in the voiceprint clusters, determining the characters corresponding to the voiceprint segments; According to the characters corresponding to the voiceprint segments and the corresponding relationship, the characters corresponding to the subtitle texts are determined.

6. A device for identifying people in video subtitles, characterized in that: The device comprises: A text recognition module, used to perform text recognition on the video to be recognized to obtain a plurality of subtitle texts, wherein the subtitle texts correspond one-to-one to the subtitles in the video to be recognized; A first determination module is used to determine, for each subtitle text, a corresponding person included in a set of video frames to which the subtitle text belongs, and determine a first probability that the subtitle text belongs to the corresponding person; A segmentation and clustering module, configured to perform voiceprint segmentation and clustering on the audio in the video to be identified, and obtain at least one voiceprint cluster; wherein each voiceprint cluster contains at least one voiceprint segment, and the voiceprint segment is obtained by performing voiceprint segmentation on the audio; A second determination module is used to determine the corresponding relationship between each of the subtitle texts and each of the voiceprint segments in terms of time sequence; a third determining module, configured to regard the voiceprint segments in the same voiceprint cluster as voiceprint segments of the same person, and determine the person corresponding to each of the voiceprint clusters based on the first probability and the corresponding relationship; The fourth determination module is used to determine the characters corresponding to the subtitle texts according to the characters corresponding to the voiceprint clusters and the corresponding relationships.

7. The device according to claim 6, characterized in that The first determining module includes: A first determining unit is used to determine, for each subtitle text, a set of video frames corresponding to a display time period of the subtitle text; A second determining unit, used to determine the number of characters included in the video frame set and the number of times each character appears; The third determining unit is used to determine a first probability that the subtitle text belongs to a corresponding character based on the number of characters and the number of times each character appears.

8. The device according to claim 6, characterized in that The segmentation and clustering module comprises: An acquisition unit, used for acquiring audio data in the video to be identified; A denoising unit, used to perform denoising on the audio data to obtain denoised audio data; A segmentation unit, configured to perform voiceprint segmentation on the denoised audio data to obtain a plurality of voiceprint segments; A conversion unit, configured to convert each voiceprint segment into an embedded voiceprint feature; The clustering unit is used to cluster the embedded voiceprint features to obtain at least one voiceprint cluster.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method for segmenting and indexing scenes by combining captions and video image information

    CN101719144A

  • Speaker clustering method and device

    CN109686382A