Pia drama script timeline generation method, device, equipment and storage medium
By using deductive audio recognition and matching technology, the timeline of Pia scripts is automatically generated, which solves the problem of low timeline generation efficiency in the existing technology, and achieves more efficient automated generation.
Patent Information
- Application Number
- CN202410994269.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-07-23
AI Technical Summary
In the prior art, the timeline generation of Pia scripts is less efficient, and usually requires three or four hours or more to manually produce it for three or four hours.
By obtaining the deductive audio of the Pia script, identifying and splitting, filtering out the deductive text matching the main paragraph, and generating a timeline based on its starting time.
The timeline of Pia scripts is realized automatically generated through deductive audio, which significantly improves the efficiency of timeline generation.
Smart Images

Figure CN119202277B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for generating a timeline of a Pia drama script. Background Art
[0002] Pia drama is a new form of entertainment. It uses voice-connected microphones to perform role-playing, and interprets one's own dramatic life according to fixed script text. The Pia drama script in the present disclosure is the fixed script provided in the Pia drama. Among them, the timeline is the key to realizing the automatic positioning of the Pia drama script. After the timeline is embedded in the Pia drama script, the script will automatically locate the content that needs to be displayed according to the embedded timeline, without the need for manual specification by the user, so that the user can immerse himself in the game and enhance the user's gaming experience. However, the timeline of the script is usually manually produced at present. For a complex Pia drama script, it usually takes three to four hours or even longer for the technician, and the timeline generation efficiency is low. Therefore, how to improve the timeline generation efficiency of the Pia drama script is a technical problem that needs to be solved urgently by technicians in this field. Summary of the invention
[0003] In view of this, the present disclosure proposes a method, device, equipment and storage medium for generating a timeline of a Pia drama script, which can improve the efficiency of generating a timeline of a Pia drama script.
[0004] According to a first aspect of the present disclosure, a method for generating a timeline of a Pia drama script is provided, comprising:
[0005] Obtaining a Pia drama script to be processed, splitting the Pia drama script according to paragraphs, and obtaining a plurality of body paragraphs of the Pia drama script;
[0006] Obtaining the interpretation audio of the Pia drama script, identifying and splitting the interpretation audio, and obtaining a plurality of interpretation texts corresponding to the interpretation audio and a start time corresponding to each of the interpretation texts;
[0007] Screening out the derived texts matching each of the main text paragraphs from the plurality of derived texts, and determining the start time of each of the main text paragraphs based on the start time of the derived texts matching each of the main text paragraphs;
[0008] Based on the start time of each of the body text paragraphs, a timeline of the Pia drama script is generated.
[0009] In a possible implementation, after obtaining a plurality of text paragraphs of the Pia drama script, the method further includes: removing non-dialogue information in each of the text paragraphs.
[0010] In a possible implementation, when the interpretation audio is identified and split to obtain a plurality of interpretation texts corresponding to the interpretation audio, the process includes:
[0011] Recognize the interpretation audio to obtain the interpretation script corresponding to the interpretation audio;
[0012] Splitting the interpretation script according to paragraphs to obtain multiple interpretation paragraphs corresponding to the interpretation script;
[0013] The interpretation paragraphs are sequentially split according to the pause marks to obtain a plurality of interpretation texts corresponding to the interpretation audio.
[0014] In a possible implementation, the start time corresponding to the deductive text is determined based on the appearance time of each character in the deductive text in the deductive audio.
[0015] In a possible implementation, when selecting a derived text matching the main text paragraph from a plurality of derived texts, the following steps are included:
[0016] Traversing each of the deductive texts in order;
[0017] For the traversed current deductive text, a first similarity between the current deductive text and the main text paragraph is calculated, and when the first similarity is greater than or equal to a preset first similarity threshold, the current deductive text is selected as a deductive text matching the main text paragraph.
[0018] In a possible implementation, when the first similarity is less than a preset first similarity threshold, a second similarity between the current deductive text and a subsequent body text paragraph is calculated;
[0019] When the second similarity is less than the first similarity threshold, extracting a first number of deductive texts in order from the current deductive text as fuzzy matching texts of the body paragraph, and selecting deductive texts matching the body paragraph from the fuzzy matching texts;
[0020] When the second similarity is greater than or equal to the first similarity threshold, the deductive text matching the next body text paragraph is screened out from the unmatched deductive texts.
[0021] In a possible implementation, when the derived text that matches the main text paragraph cannot be screened out from the fuzzy matching text, a second number of derived texts adjacent to and before the current derived text are extracted as forced matching texts of the main text paragraph, and the derived text that matches the main text paragraph is screened out from the forced matching text.
[0022] According to a second aspect of the present disclosure, a timeline generation device for a Pia drama script is provided, comprising:
[0023] A Pia script processing module is used to obtain a Pia script to be processed, split the Pia script according to paragraphs, and obtain multiple text paragraphs of the Pia script;
[0024] An interpretation audio processing module is used to obtain the interpretation audio of the Pia drama script, identify and split the interpretation audio, and obtain multiple interpretation texts corresponding to the interpretation audio and the start time corresponding to each of the interpretation texts;
[0025] A data matching module, used to select a deductive text matching each of the body paragraphs from a plurality of deductive texts, and determine the start time of each of the body paragraphs based on the start time of the deductive text matching each of the body paragraphs;
[0026] The result output module is used to generate the timeline of the Pia drama script based on the start time of each of the body paragraphs.
[0027] According to a third aspect of the present disclosure, a timeline generation device for a Pia drama script is provided, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute the method described in the first aspect of the present disclosure.
[0028] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the method described in the first aspect of the present disclosure.
[0029] In the present disclosure, a method, device, equipment and storage medium for generating a timeline of a Pia drama script are provided. The method includes: obtaining a Pia drama script to be processed, splitting the Pia drama script according to paragraphs, and obtaining multiple text paragraphs of the Pia drama script; obtaining the interpretation audio of the Pia drama script, identifying and splitting the interpretation audio, and obtaining multiple interpretation texts corresponding to the interpretation audio and the start time corresponding to each interpretation text; selecting the interpretation text matching each text paragraph from the multiple interpretation texts, and determining the start time of each text paragraph based on the start time of the interpretation text matching each text paragraph; generating the timeline of the Pia drama script based on the start time of each text paragraph. The method disclosed in the present disclosure can automatically generate the timeline of the Pia drama script through the interpretation audio of the Pia drama script, thereby improving the generation efficiency of the timeline of the Pia drama script.
[0030] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0032] Figure 1 A flowchart of a method for generating a timeline of a Pia drama script according to an embodiment of the present disclosure is shown.
[0033] Figure 2 A schematic diagram of a Pia drama script according to an embodiment of the present disclosure is shown.
[0034] Figure 3 A schematic block diagram of a timeline generating device for a Pia drama script according to an embodiment of the present disclosure is shown.
[0035] Figure 4 A schematic block diagram of a device for generating a timeline of a Pia drama script according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0036] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0037] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0038] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0039] <Method Example>
[0040] Figure 1 FIG. 1 is a flowchart showing a method for generating a timeline of a Pia drama script according to an embodiment of the present disclosure. Figure 1 As shown, the method includes steps S1100-S1400.
[0041] S1100, obtaining a Pia drama script to be processed, splitting the Pia drama script according to paragraphs, and obtaining a plurality of body paragraphs of the Pia drama script. The Pia drama script to be processed in the present disclosure is a Pia drama script without a timeline. The process of splitting the Pia drama script is described in detail below with reference to a specific example.
[0042] For example, in the Pia play script Figure 2 In the illustrated embodiment, the first data segment "{inside the car}" is split in sequence as the first text paragraph, the second data segment "[the sound of a car approaching from far away, 0:09 normal driving sound enters, no hurry, take your time]" is split as the second text paragraph, the third data segment "Gu Lei: (worried) Master, how long will it take to get to City A?" is split as the third text paragraph, the fourth data segment "Driver: (slowly) No hurry, we'll be there in half an hour, are you going there to find your girlfriend?" is split as the fourth text paragraph, and so on, eventually obtaining 14 text paragraphs of the Pia drama script.
[0043] It should be noted here that, in addition to the dialogue information that needs to be interpreted by the user, each split text paragraph also includes non-dialogue information such as role names, scene descriptions, and punctuation marks that do not require user interpretation. These non-dialogue information does not involve speech recognition. Therefore, in order to improve the efficiency of subsequent data matching, after obtaining multiple text paragraphs of the Pia drama script, it also includes: removing non-dialogue information in each text paragraph. Specifically, for each text paragraph, the Chinese and English parentheses are identified by regular expressions, and the identified parentheses and the contents in the parentheses are removed. This is because the content recorded in the parentheses is generally a scene description, which is non-dialogue information. The colon is identified by regular expressions, and the identified colon and the content before the colon are removed. This is because the content recorded before the colon is generally a role name, which is non-dialogue information. Finally, the remaining punctuation marks are identified by regular expressions, and all the remaining punctuation marks are removed. After the above three operations, the non-dialogue information in each text paragraph can be removed.
[0044] It should be noted here that when non-dialogue information in a body paragraph is removed, if all the processed body paragraphs contain non-dialogue information, the entire body paragraph will be removed.
[0045] In order to facilitate subsequent matching calculations, the multiple text paragraphs of the Pia drama script finally obtained will be sorted in the order from first to last appearance in the Pia drama script, and the sorted multiple text paragraphs will be identified as the first text paragraph D1, the second text paragraph D2, the third text paragraph D3, and so on.
[0046] In some scenarios, Arabic numerals may exist in the main text paragraphs. In order to unify the format with the subsequent derivative text, when removing non-dialogue information in each main text paragraph, Arabic numerals in each main text paragraph will also be identified and replaced with corresponding Chinese numerals.
[0047] S1200, obtaining the interpretation audio of the Pia drama script, identifying and splitting the interpretation audio, and obtaining multiple interpretation texts corresponding to the interpretation audio and the start time corresponding to each interpretation text.
[0048] Specifically, before executing the method disclosed herein, it is necessary to first invite any user to perform a script without a timeline and record the performance audio during the script performance process. After completing the recording of the performance audio, upload the performance audio to the designated server. In this way, when executing the method disclosed herein, the performance audio of the Pia drama script to be processed can be obtained from the designated server.
[0049] After obtaining the interpretation audio, the interpretation audio can be identified and split to obtain multiple interpretation texts corresponding to the interpretation audio. The specific steps can be as follows:
[0050] First, the interpretation audio is identified to obtain the interpretation script corresponding to the interpretation audio. Specifically, how to identify the interpretation audio to obtain the interpretation script is common knowledge in the art and will not be repeated here.
[0051] Second, the interpretation script is split according to paragraphs to obtain multiple interpretation paragraphs corresponding to the interpretation script. Specifically, the process of splitting the interpretation script refers to the process of splitting the Pia drama script, which will not be repeated here.
[0052] Third, each interpretation paragraph is sequentially split according to the pause markers to obtain multiple interpretation texts corresponding to the interpretation audio. First of all, it should be noted that the interpretation paragraph includes punctuation marks, which are generated according to the pauses in the interpretation audio. Therefore, these punctuation marks are pause markers. Since the splitting steps of each interpretation paragraph are the same, the splitting process of the interpretation paragraph is described in detail below using a interpretation paragraph as an example.
[0053] Specifically, when the deductive paragraph is sequentially split according to the pause marks, the following steps may be included: sequentially search for the pause marks in the deductive paragraph, and after finding the current pause mark Pt, extract the content between the current pause mark Pt and the previous pause mark Pt-1 as a deductive text. Repeat the first step until the search process of all pause marks in the deductive paragraph is completed, and the deductive text corresponding to the deductive paragraph can be obtained.
[0054] It should be noted that when the user records the interpretation audio, some slips of the tongue such as "hmm", "en", and "ah" may be recorded, and the corresponding split interpretation paragraphs will also contain invalid interpretation content corresponding to these slips of the tongue. In order to avoid splitting these invalid interpretation contents in the interpretation paragraphs into an independent interpretation text, after finding the current pause mark Pt, first determine whether the characters between the current pause mark Pt and the previous pause mark Pt-1 are greater than or equal to the specified number: if it is greater than or equal to the specified number, then extract the content between the current pause mark Pt and the previous pause mark Pt-1 as a interpretation text; if it is less than the specified number, continue to search for the subsequent pause marks until the characters between the latest pause mark Pt+n and the previous pause mark Pt-1 found are greater than or equal to the specified number, and extract the content between the latest pause mark Pt+n and the previous pause mark Pt-1 as a interpretation text. Among them, the specified number is determined according to the number of characters included in the slip of the tongue. When the slip of the tongue is "hmm", "en", and "ah", the specified number can be set to 2. In this way, invalid deductive text can be avoided from being split, thereby improving the efficiency and accuracy of subsequent matching.
[0055] In some embodiments, the deductive paragraph may contain less than 2 characters, that is, the deductive paragraph contains only 1 character. In this case, the deductive paragraph is no longer split, but the unique character is directly extracted as a deductive text. That is to say, when splitting the deductive paragraph, first determine whether the characters in the deductive paragraph are greater than or equal to 2. If the characters are greater than or equal to 2, split the deductive paragraph according to the above method. If the characters are less than 2, directly extract the unique character as a deductive text.
[0056] By referring to the above steps, all interpretation paragraphs are split, so as to obtain the interpretation texts corresponding to each interpretation paragraph, and the interpretation texts corresponding to each interpretation paragraph constitute multiple interpretation texts corresponding to the interpretation audio. Similarly, in order to facilitate the subsequent matching calculation, the multiple interpretation texts will be sorted according to the order from the first to the last appearance in the Pia drama script, and the sorted multiple interpretation texts will be marked as the first interpretation text Y1, the second interpretation text Y2, the third interpretation text Y3, and so on.
[0057] It should be noted here that when the interpretation audio is recognized and the interpretation script corresponding to the interpretation audio is obtained, not only the interpretation script corresponding to the interpretation audio can be obtained, but also the appearance time of each character in the interpretation script in the interpretation audio can be obtained. In this way, after obtaining the interpretation text, the corresponding start time of the interpretation text can be determined based on the appearance time of each character in the interpretation text in the interpretation audio. Specifically, the appearance time corresponding to each character constituting the interpretation text is obtained, and then the appearance time corresponding to the first character in the interpretation text is used as the start time of the interpretation text, and the appearance time corresponding to the last character in the interpretation text is used as the end time of the interpretation text. The start time and end time of the interpretation text constitute the corresponding start time of the interpretation text. Referring to the above method, the corresponding start time of each interpretation text can be obtained.
[0058] S1300 , selecting a derivative text matching each main text paragraph from a plurality of derivative texts, and determining a start time of each main text paragraph based on the start time of the derivative text matching each main text paragraph.
[0059] It should be noted here that when executing step S1300, the deductive texts matching each text paragraph are obtained in sequence. Specifically, the first text paragraph is read first, and then the deductive text matching the first text paragraph is screened out from multiple deductive texts. After completing the data matching of the first text paragraph, the second text paragraph is read in sequence, and then the deductive text matching the second text paragraph is continuously screened out from the unmatched deductive texts. After completing the data matching of the second text paragraph, the third text paragraph is read in sequence, and then the deductive text matching the third text paragraph is continuously screened out from the unmatched deductive texts. And so on, until the data matching of all text paragraphs is complete.
[0060] Since the steps of selecting the deductive texts matching each body paragraph are the same, the following takes a body paragraph as an example to illustrate the process of selecting the deductive texts matching the body paragraph. Specifically, when selecting the deductive text matching the body paragraph Dt from multiple deductive texts, the following steps may be included:
[0061] First, traverse each deductive text in order.
[0062] Second, for the traversed current interpretation text Yt, the first similarity between the current interpretation text Yt and the body paragraph Dt is calculated. When the first similarity is greater than or equal to a preset first similarity threshold, it can be considered that the body paragraph Dt contains the current interpretation text Yt. At this time, the current interpretation text Yt is selected as the interpretation text that matches the body paragraph Dt. The first similarity threshold can be set according to the specific application scenario. Preferably, the first similarity threshold can be set to 80%.
[0063] It should be noted here that when the number of characters in the main text paragraph Dt is less than 2, that is, when the main text paragraph includes only 1 character, after calculating the first similarity, it is necessary to continue to determine whether the first similarity is 100%. Only when the first similarity is 100%, the current derived text Yt can be selected as the derived text that matches the main text paragraph Dt.
[0064] When the first similarity is less than a preset first similarity threshold, it can be considered that the main text paragraph Dt does not contain the current derived text Yt. In this case, the following operations are performed:
[0065] First, the second similarity between the current deductive text Yt and the next main text paragraph Dt+1 is calculated.
[0066] Second, when the second similarity is also less than the first similarity threshold, it means that the text paragraph Dt and the text paragraph Dt+1 do not contain the current interpretation text Yt. This may be caused by the user's excessive or insufficient speech, added drama, and the background music being loud when performing audio interpretation, and the background music being recognized as the interpretation script. Therefore, in order to find the interpretation text matching the text paragraph Dt, a fuzzy matching operation will be performed. Specifically, the first number of interpretation texts will be extracted in sequence from the current interpretation text Yt as the fuzzy matching text of the text paragraph Dt, and the interpretation text matching the text paragraph Dt will be screened out from the fuzzy matching text. The first number can be determined according to the number of characters included in the text paragraph Dt. For example, when the text paragraph Dt includes 4 characters, the first number can be set to 4. In the embodiment where the first number is 4, the four interpretation texts, namely, interpretation text Yt+1, interpretation text Yt+2, interpretation text Yt+3, and interpretation text Yt+4, will be extracted in sequence from the current interpretation text Yt as the fuzzy matching text with the text paragraph Dt.
[0067] After obtaining the fuzzy matching text of the body paragraph Dt, the deductive text matching the body paragraph Dt will be screened out from the fuzzy matching text. The specific steps include: traversing each fuzzy matching text in order; for the current fuzzy matching text Yt+1 traversed, calculating the third similarity between the current fuzzy matching text Yt+1 and the body paragraph Dt, and when the third similarity is greater than or equal to the preset second similarity threshold, screening the fuzzy matching text Yt+1 as the deductive text matching the body paragraph Dt. After screening the fuzzy matching text Yt+1 as the deductive text matching the body paragraph Dt, the operation of traversing the deductive text Yt+2 and calculating the first similarity between the deductive text Yt+2 and the body paragraph Dt will be returned to execute until all matching deductive texts of the body paragraph Dt are searched, the body paragraph Dt+1 is read, and the operation of screening the deductive text matching the body paragraph Dt+1 is executed. Among them, the second similarity threshold is less than the first similarity threshold, and preferably, the second similarity threshold can be set to 50%. When the third similarity between the current fuzzy matching text Yt+1 and the text paragraph Dt is less than the second similarity threshold, the current fuzzy matching text Yt+1 is discarded, and the next fuzzy matching text Yt+2 is traversed until the calculation of all fuzzy matching texts is completed, and the fuzzy matching operation is ended.
[0068] Third, when the second similarity is greater than or equal to the first similarity threshold, it means that the current derived text Yt is included in the next main text paragraph Dt+1. At this time, the data matching process of the main text paragraph Dt is completed, the next main text paragraph Dt+1 is read, and the operation of filtering out the derived text matching the next main text paragraph Dt+1 from the unmatched derived texts is performed.
[0069] It should be noted here that after the fuzzy matching is completed, it is first determined whether an interpreted text matching the main text paragraph Dt is found. After the interpreted text matching the main text paragraph Dt has been found, the next reading of the main text paragraph Dt+1 will be executed, and the operation of screening the interpreted text matching the main text paragraph Dt+1 will be performed until the interpreted text matching all the main text paragraphs is found. If the interpreted text matching the main text paragraph Dt is still not found after the fuzzy matching is completed, the following forced matching operation will be performed. Specifically, the second number of interpreted texts adjacent to the front and back of the current interpreted text Yt are extracted as the forced matching texts of the main text paragraph Dt, and the interpreted text matching the main text paragraph Dt is screened out from the forced matching text. Among them, the second number can be set according to the specific scenario. Preferably, the second number can be set to 5. When the second number is set to 5, two interpreted texts Yt-2 and interpreted text Yt-1 are obtained from the current interpreted text Yt, and two interpreted texts Yt+1 and interpreted text Yt+2 are obtained from the current interpreted text Yt. Then, the interpreted text Yt-2, the interpreted text Yt-1, the interpreted text Yt, the interpreted text Yt+1 and the interpreted text Yt+2 constitute the mandatory matching text of the main text paragraph Dt.
[0070] After obtaining the forced matching text of the main text paragraph Dt, the main text paragraph Dt will be forcedly matched through the forced matching text. Specifically, the fourth similarity between the main text paragraph Dt and each forced matching text is calculated respectively, and the forced matching text with the fourth similarity greater than the preset second similarity threshold is screened out as the target forced matching text of the main text paragraph Dt. Further, the forced matching text with the largest fourth similarity is screened out from the target forced matching text as the deductive text that finally matches the main text paragraph Dt. After the forced matching is completed, the next main text paragraph Dt+1 will be read, and the operation of screening out the deductive text that matches the next main text paragraph Dt+1 from the unmatched deductive text will be performed until the matching operation of all main text paragraphs is completed.
[0071] After obtaining the deductive text matching the body paragraph Dt, the start time of the body paragraph Dt can be determined based on the deductive text matching the body paragraph Dt. Specifically, the deductive text matching the body paragraph Dt is traversed, and for the current matching text traversed, it is determined whether the start time of the body paragraph Dt has been marked. If not, the start time corresponding to the current matching text is read, and the start time is extracted from the start time as the start time of the body paragraph Dt, and the end time is extracted from the start time as the end time of the body paragraph Dt, and then the next matching text is traversed; if the body paragraph Dt has been marked with a start time, the start time corresponding to the current matching text is read, and the end time is extracted from the start time, and the end time in the body paragraph Dt is updated based on the newly extracted end time, and then the next matching text is traversed. Until the traversal is completed, the marked start time and the final updated end time are used as the start time of the body paragraph Dt.
[0072] It should be noted here that the above calculation of the start time of the body paragraph is performed after all the interpreted texts matching the body paragraph are obtained. In another possible implementation method, each time a interpreted text matching the body paragraph is obtained, the start and end times of the body paragraph are marked based on the currently matched interpreted text, that is, the matching operation is performed while the start time of the body paragraph is marked. In this way, after the matching is completed, the start time of the body paragraph can be obtained, thereby improving the calculation efficiency of the start time of the body paragraph.
[0073] You can refer to the above method to determine the starting time of all text paragraphs.
[0074] After completing the matching operation of all the body paragraphs, the successful matching paragraphs and the unmatched matching paragraphs will be counted, and the matching success rate will be calculated. If the matching success rate exceeds 95%, it means that the intelligent matching of the script is successful. If the matching success rate is less than 95%, it means that the intelligent matching of the script has failed. In the case of a matching failure, the problem in the matching algorithm will be detected and repaired, and the matching operation will be performed again based on the repaired matching algorithm until the matching success rate exceeds 95%. In the case of a successful match, it means that the Pia script has marked more than 95% of the body paragraphs on the timeline. At this time, it can be handed over to manual re-inspection, and the unmatched paragraphs can be manually marked on the timeline. At this point, the generation of the entire Pia script timeline can be completed.
[0075] S1400: Generate a timeline of the Pia drama script based on the start time of each text paragraph. Specifically, the start time of each text paragraph is combined in sequence to form the timeline of the Pia drama script.
[0076] The present disclosure provides a method for generating a timeline of a Pia drama script, including: obtaining a Pia drama script to be processed, splitting the Pia drama script according to paragraphs, and obtaining multiple text paragraphs of the Pia drama script; obtaining the interpretation audio of the Pia drama script, identifying and splitting the interpretation audio, and obtaining multiple interpretation texts corresponding to the interpretation audio and the start time corresponding to each interpretation text; screening out the interpretation texts matching each text paragraph from the multiple interpretation texts, and determining the start time of each text paragraph based on the start time of the interpretation texts matching each text paragraph; generating the timeline of the Pia drama script based on the start time of each text paragraph. The method disclosed in the present disclosure can automatically generate the timeline of the Pia drama script through the interpretation audio of the Pia drama script, thereby improving the generation efficiency of the timeline of the Pia drama script.
[0077] <Device Example>
[0078] Figure 3 FIG. 2 is a schematic block diagram of a timeline generation device for a Pia drama script according to an embodiment of the present disclosure. Figure 3 As shown, the timeline generating device 100 of the Pia drama script includes:
[0079] The Pia script processing module 110 is used to obtain the Pia script to be processed, split the Pia script according to paragraphs, and obtain multiple text paragraphs of the Pia script;
[0080] The interpretation audio processing module 120 is used to obtain the interpretation audio of the Pia drama script, identify and split the interpretation audio, and obtain multiple interpretation texts corresponding to the interpretation audio and the start time corresponding to each interpretation text;
[0081] The data matching module 130 is used to select the deductive texts matching each body paragraph from the multiple deductive texts, and determine the start time of each body paragraph based on the start time of the deductive texts matching each body paragraph;
[0082] The result output module 140 is used to generate a timeline of the Pia drama script based on the start time of each text paragraph.
[0083] <Equipment Embodiment>
[0084] Figure 4 FIG. 2 is a schematic block diagram of a device for generating a timeline of a Pia drama script according to an embodiment of the present disclosure. Figure 4 As shown, the timeline generation device 200 of a Pia drama script includes: a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the above-mentioned timeline generation methods of a Pia drama script when executing the executable instructions.
[0085] Here, it should be noted that the number of processors 210 can be one or more. At the same time, in the timeline generation device 200 of the Pia drama script of the embodiment of the present disclosure, an input device 230 and an output device 240 may also be included. Among them, the processor 210, the memory 220, the input device 230 and the output device 240 may be connected through a bus or in other ways, which are not specifically limited here.
[0086] The memory 220 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the timeline generation method of the Pia drama script of the embodiment of the present disclosure. The processor 210 executes various functional applications and data processing of the Pia drama script timeline generation device 200 by running the software program or module stored in the memory 220.
[0087] The input device 230 may be used to receive input numbers or signals. The signals may be key signals related to user settings and function control of the device / terminal / server. The output device 240 may include display devices such as display screens.
[0088] <Storage Medium Embodiment>
[0089] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is also provided, on which computer program instructions are stored. When the computer program instructions are executed by the processor 210, any of the above-mentioned methods for generating the timeline of the Pia drama script is implemented.
[0090] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for generating a timeline of a Pia drama script, characterized in that: include: Obtaining a Pia drama script to be processed, splitting the Pia drama script according to paragraphs, and obtaining a plurality of body paragraphs of the Pia drama script; Obtaining the interpretation audio of the Pia drama script, identifying and splitting the interpretation audio, and obtaining a plurality of interpretation texts corresponding to the interpretation audio and a start time corresponding to each of the interpretation texts; Screening out the derived texts matching each of the main text paragraphs from the plurality of derived texts, and determining the start time of each of the main text paragraphs based on the start time of the derived texts matching each of the main text paragraphs; Generating a timeline of the Pia drama script based on the start time of each of the body paragraphs; When selecting a deductive text matching the main text paragraph from multiple deductive texts, it includes: Traversing each of the deductive texts in order; For the traversed current deductive text, a first similarity between the current deductive text and the body paragraph is calculated, and when the first similarity is greater than or equal to a preset first similarity threshold, the current deductive text is selected as a deductive text matching the body paragraph; When the first similarity is less than a preset first similarity threshold, a second similarity between the current deductive text and the next body paragraph is calculated; when the second similarity is less than the first similarity threshold, a first number of deductive texts are extracted in sequence from the current deductive text as fuzzy matching texts of the body paragraph, and deductive texts matching the body paragraph are screened out from the fuzzy matching texts; when the second similarity is greater than or equal to the first similarity threshold, a deductive text matching the next body paragraph is screened out from the unmatched deductive texts.
2. The method according to claim 1, characterized in that After obtaining a plurality of text paragraphs of the Pia drama script, the method further includes: removing non-dialogue information in each of the text paragraphs.
3. The method according to claim 1, characterized in that When the interpretation audio is identified and split to obtain a plurality of interpretation texts corresponding to the interpretation audio, the method includes: Recognize the interpretation audio to obtain the interpretation script corresponding to the interpretation audio; Splitting the interpretation script according to paragraphs to obtain multiple interpretation paragraphs corresponding to the interpretation script; The interpretation paragraphs are sequentially split according to the pause marks to obtain a plurality of interpretation texts corresponding to the interpretation audio.
4. The method according to claim 3, characterized in that The start time corresponding to the deductive text is determined based on the appearance time of each character in the deductive text in the deductive audio.
5. The method according to claim 1, characterized in that When the deductive text that matches the main text paragraph cannot be screened out from the fuzzy matching text, a second number of deductive texts adjacent to and before the current deductive text are extracted as forced matching texts of the main text paragraph, and the deductive text that matches the main text paragraph is screened out from the forced matching text.
6. A timeline generation device for a Pia drama script, characterized in that: include: A Pia script processing module is used to obtain a Pia script to be processed, split the Pia script according to paragraphs, and obtain multiple text paragraphs of the Pia script; An interpretation audio processing module is used to obtain the interpretation audio of the Pia drama script, identify and split the interpretation audio, and obtain multiple interpretation texts corresponding to the interpretation audio and the start time corresponding to each of the interpretation texts; A data matching module, used to select a deductive text matching each of the body paragraphs from a plurality of deductive texts, and determine the start time of each of the body paragraphs based on the start time of the deductive text matching each of the body paragraphs; A result output module, for generating a timeline of the Pia drama script based on the start time of each of the body paragraphs; The data matching module, when screening out a deductive text matching the main text paragraph from a plurality of deductive texts, is specifically used to: Traversing each of the deductive texts in order; For the traversed current deductive text, a first similarity between the current deductive text and the body paragraph is calculated, and when the first similarity is greater than or equal to a preset first similarity threshold, the current deductive text is selected as a deductive text matching the body paragraph; When the first similarity is less than a preset first similarity threshold, a second similarity between the current deductive text and the next body paragraph is calculated; when the second similarity is less than the first similarity threshold, a first number of deductive texts are extracted in sequence from the current deductive text as fuzzy matching texts of the body paragraph, and deductive texts matching the body paragraph are screened out from the fuzzy matching texts; when the second similarity is greater than or equal to the first similarity threshold, a deductive text matching the next body paragraph is screened out from the unmatched deductive texts.
7. A timeline generation device for a Pia drama script, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 5 when executing the executable instructions.
8. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Bullet screen message calibration method and device, electronic equipment and storage medium
CN117979106A