Subtitle processing method and device
The subtitle processing method automates subtitle generation and editing by matching audio clips with multimedia material units, creating an animation effect where subtitles appear one character at a time, addressing inefficiencies in current editing methods and improving user experience.
Patent Information
- Application Number
- JP2023577874
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-09-14
- Filing Date
- 2023-09-14
- Publication Date
- 2024-10-28
- Estimated Expiration
- 2043-09-14
AI Technical Summary
Current subtitle editing methods are inefficient and inconvenient, particularly for mobile devices, as they require manual adjustment and repeated listening to audio to achieve desired subtitle effects, especially in batch text scenes.
A subtitle processing method that performs speech recognition on multimedia audio to generate subtitle text and timestamp information, matching audio clips with multimedia material units, and composites text elements with material clips to create an animation effect where subtitles appear one character at a time, allowing for automatic generation and editing of dynamic subtitles.
This method simplifies subtitle editing, enhances user experience by reducing manual operations, and enables efficient addition of specified subtitle effects on various devices, including mobile devices, with improved usability and applicability to batch text scenes.
Smart Images

Figure 2024538910000001_ABST
Abstract
Description
[Technical field]
[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application claims priority to Chinese Patent Application No. 202211117721.1 filed on September 14, 2022, and the contents disclosed in the above Chinese patent application are hereby incorporated by reference in their entirety as part of this application.
[0002] SUMMARY OF THE DISCLOSURE The embodiments of the present disclosure relate to a subtitle processing method and apparatus. [Background technology]
[0003] Subtitles in videos serve as an aid to understanding the content of the video, and so subtitles are often added when the video is edited.
[0004] Currently, it is common to manually input subtitle text or use a subtitle recognition tool to recognize the corresponding audio to obtain the subtitle text, then adjust and divide the subtitle text by repeatedly listening to the audio to obtain a large number of text clips, and synthesize these text clips with the video to add subtitles to the video. For batch text scenes such as subtitles, if a user wants to achieve the intended subtitle effect, he or she needs to repeatedly adjust the division result of the subtitle text, synthesize, and preview the subtitle effect, which makes subtitle editing inefficient. Summary of the Invention [Problem to be solved by the invention]
[0005] To solve the above technical problems, the present disclosure provides a subtitle processing method and device. [Means for solving the problem]
[0006] In a first aspect, an embodiment of the present disclosure comprises: during editing of the multimedia material, performing speech recognition on an audio corresponding to the multimedia material to obtain subtitle text corresponding to the audio and time stamp information of audio clips respectively corresponding to each text element contained in the subtitle text; a step of matching each material unit in the multimedia material based on time stamp information of an audio clip corresponding to each of the text elements, and determining a material clip in the multimedia material that matches each of the text elements, wherein a time in an editing timeline of the material clip that matches the text element and a time in an editing timeline of the audio clip that corresponds to the text element are the same; and synthesizing each of the text elements with a material clip within a time range that matches the text elements to obtain a target multimedia material having an animation effect in which the subtitle text pops out character by character.
[0007] In a second aspect, an embodiment of the present disclosure comprises: a speech recognition module for performing speech recognition on an audio corresponding to the multimedia material during editing of the multimedia material to obtain subtitle text corresponding to the audio and time stamp information of audio clips respectively corresponding to each text element included in the subtitle text; a matching module that matches each material unit in the multimedia material based on time stamp information of an audio clip corresponding to each of the text elements, and determines a material clip in the multimedia material that matches each of the text elements, wherein a time in an editing timeline of the material clip that matches the text element and a time in an editing timeline of the audio clip that corresponds to the text element are the same; and a subtitle synthesis module for synthesizing each of the text elements with a material clip within a matching time range to obtain a target multimedia material having an animation effect in which the subtitle text pops out character by character.
[0008] In a third aspect, embodiments of the present disclosure include Provided is an electronic device including a memory and a processor, the memory configured to store computer program instructions, and the processor configured to execute the computer program instructions to cause the electronic device to realize the subtitle processing method described in the first aspect.
[0009] In a fourth aspect, embodiments of the present disclosure include There is provided a readable storage medium including computer program instructions, the computer program instructions being executed by at least one processor of an electronic device to cause the electronic device to implement the subtitling method according to the first aspect.
[0010] In a fifth aspect, an embodiment of the present disclosure comprises: An electronic device provides a computer program product that executes the computer program product to cause the electronic device to realize the subtitle processing method described in the first aspect. [Brief description of the drawings]
[0011] The drawings herein, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure. In order to more clearly explain the technical solutions of the embodiments of the present disclosure, the drawings that need to be used for the embodiments are briefly described below, but it is obvious that those skilled in the art can obtain other drawings from these drawings without exerting creative efforts. [Figure 1] FIG. 1 is a flowchart of a subtitle processing method according to an embodiment of the present disclosure. [Diagram 2]FIG. 2 is a flowchart of a subtitle processing method according to another embodiment of the present disclosure. [Diagram 3] FIG. 3 is a flowchart of a subtitle processing method according to another embodiment of the present disclosure. [Figure 4A] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4B] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4C] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4D] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4E] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4F] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4G] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4H] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Figure 4I] 4A-4I are schematic diagrams of a human-computer interaction interface according to the present disclosure. [Diagram 5] FIG. 5 is a structural schematic diagram of a subtitle processing device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] In order to make the above objects, features, and advantages of the present disclosure more clearly understandable, the aspects of the present disclosure are further described below. Note that the embodiments and features in the embodiments of the present disclosure may be combined with each other without contradiction.
[0013] In order to facilitate a thorough understanding of the present disclosure, numerous specific details are set forth in the following description, but the present disclosure may be implemented in other ways different from those described herein. Apparently, the embodiments in the specification are merely some embodiments of the present disclosure, but not all of the embodiments.
[0014] Subtitles help users understand the content of a video, and different subtitle effects can express more multi-dimensional content. For example, a subtitle effect in which a corresponding text appears when a word is spoken in the audio of a video is often used to express narration in a drama-like expression, and confidence and elation of the speaker in a talking-like expression. To achieve such a specific subtitle effect, users often manually input the subtitles, dividing the subtitle text into individual characters, and then repeatedly listening to the audio to adjust it. In addition, a user can input a complete sentence to achieve the effect of text appearing one by one using keyframe masks. Subtitle editing is not only inefficient, but also extremely inconvenient to operate on mobile devices.
[0015] Based on the above, an embodiment of the present disclosure provides a subtitle processing method and device, which includes the steps of: performing speech recognition on the audio corresponding to the multimedia material during editing of the multimedia material to obtain subtitle text corresponding to the audio and time stamp information of audio clips corresponding to each text element in the subtitle text; determining a material clip among the multimedia material clips that matches the text element according to the time stamp information of the audio clip corresponding to each text element; and synthesizing each text element with the material clip within the corresponding time to obtain a target multimedia material with an animation effect of the subtitle text popping out one character at a time. In the present disclosure, the start time of the time range of the video frame image that matches the text element and the start time of the audio clip corresponding to the text element are consistent, thereby realizing the subtitle animation effect of the corresponding text subtitle appearing when a useful word is uttered; and further, dynamic automatic generation of subtitles can be realized by the user's input of instructions, which is simple for the user to operate and favorable to improving the user experience; and the method of the present disclosure can be applied to various types of devices and has a wide range of application.
[0016] The methods according to the present disclosure may be performed by electronic devices, which may be, but are not limited to, tablets, mobile phones (e.g., flip phones, large screen phones, etc.), wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc., and the present disclosure does not impose any limitations on the specific type of electronic device.
[0017] 1 is a schematic flow diagram of a subtitle processing method according to an embodiment of the present disclosure. The method of the present embodiment is described by taking an electronic device as an example, in which an editing application is installed, and a user can edit multimedia materials through the application. As shown in FIG. 1, the method of the present embodiment includes S101 to S103.
[0018] S101: During editing of multimedia material, speech recognition is performed on audio corresponding to the multimedia material to obtain subtitle text corresponding to the audio and time stamp information of audio clips respectively corresponding to each text element included in the subtitle text.
[0019] The multimedia material may be a video material recorded by a user in real time, a video material previously edited, or a video material stored in an electronic device, and the present disclosure is not limited thereto, and may be audio material, image material, etc., and the present disclosure is not limited as to the type of multimedia material. In addition, the present disclosure is not limited as to the number of multimedia materials, and when there are multiple multimedia materials, the multiple multimedia materials may be arranged according to the order of introduction and regarded as one whole.
[0020] Editing of multimedia material can be understood as pre-recording or introducing audio material or audio material, or adding background music to multimedia material (e.g. video material or image material), but is not limited to these editing methods.
[0021] The subtitle text is obtained by recognizing text against audio corresponding to the multimedia material currently being edited, where the audio corresponding to the multimedia material may be the original audio contained in the multimedia material or background music added to the multimedia material by a user, and the background music may be audio within the application, such as a complete song, or a segment of a song, or a cut audio clip, etc., and this disclosure is not limited in this respect. If the multimedia material is audio material, the multimedia material itself may be speech recognized.
[0022] In some examples, the application can send audio via an electronic device to a middle office service, which invokes a subtitle recognition tool to perform text recognition on the audio and obtain timestamp information for the corresponding subtitle text and audio clips corresponding to each text element in the subtitle text, where the timestamp information may include a start time and an end time of the audio clip.
[0023] For example, the total audio duration of a multimedia clip is 7 seconds. The subtitle text obtained by speech recognition of the audio is:
number
[0024] [Table 1]
[0025] In the above example, if the language type used in the audio is Chinese, the corresponding text element is a word unit. If the audio is in another language, the text element will be the corresponding word unit, for example, if the audio is in English, the text element will be an English word unit.
[0026] In some examples, an application may perform speech recognition in response to a command entered by a user. This disclosure does not limit the implementation of the command that triggers speech recognition. In some examples, the command for speech recognition may include, but is not limited to, a type of action such as a click, double click, long press, swipe, etc. For example, if a corresponding area / control for adding recognition subtitles to multimedia material is located on one page of the application, the command for speech recognition may be an action received on that area / control.
[0027] S102: Based on the timestamp information of the audio clips corresponding to each text element, matching is performed with each material unit in the multimedia material, and a material clip that matches each text element in the multimedia material is determined, and the time on the editing timeline of the material clip that matches the text element and the time on the editing timeline of the audio clip corresponding to the text element are consistent.
[0028] If the multimedia material is an image / video material, the material clips that match the text elements of the multimedia material can be considered as image clips / video clips, and the material clips include image / video frames combined with the text elements. If the multimedia material is an audio material, the material clips that match the text of the multimedia material can be considered as audio clips, and the material clips include one or more phonetic pronunciation units combined with the text elements.
[0029] The subtitle processing method of the present disclosure aims to achieve a subtitle effect in which a corresponding text subtitle appears when a certain word is spoken, so that when a matching material clip is determined based on the timestamp information of the audio clip corresponding to each text element, the time on the editing timeline of the audio clip corresponding to the text element matches the time on the editing timeline of the material clip.
[0030] Here, matching on the editing timeline means that the start time on the editing timeline of a material clip that matches a text element matches the start time on the editing timeline of an audio clip that corresponds to the text element.
[0031] On the other hand, the time at which a text element in a subtitle disappears is flexible and may disappear at the end of its corresponding audio clip, or when the sentence to which it belongs (or a text clip of a specified length) reaches its end position, or may disappear a preset time after the end of its corresponding audio clip, but this disclosure is not limited thereto.
[0032] Thus, in the editing timeline, the end time of the time corresponding to a material clip that matches a text element may be the same as the end time of the audio clip that corresponds to that text element, thereby creating an animation effect in which the subtitle text pops out character by character, and the previously occurring text element disappears when the corresponding audio clip reaches its end time.
[0033] The end time of the time range to which the video frame image matching a text element belongs may be later than the end time of the audio clip corresponding to this text element, so that the text elements are displayed one by one, and the previously displayed text element is retained for a predetermined time after the corresponding audio clip ends and then disappears.
[0034] Here, the speed at which the text elements switch depends on the speaking rate of the target in the audio.
[0035] S103: Each text element is composited with a material clip within a corresponding time range to obtain a target multimedia material having an animation effect in which the subtitle text pops out character by character.
[0036] In this case, when the text element is composited with a material clip that matches it, a first subtitle animation style preset for the text element can be used, and the subtitles automatically added to the multimedia material automatically retain the subtitle effect corresponding to the first subtitle animation style when generated, so as to meet the user's requirements for subtitle effects and reduce the user's subsequent operations. The first subtitle animation style may include one or more of a start style, an end style, and a loop style of the text element.
[0037] Steps S102 and S103 may be performed automatically by calling a dynamic subtitle resource package (also called a subtitle animation resource package), in which the subtitle text and timestamp information of each text element contained in the subtitle text are transmitted to the dynamic subtitle resource package, which collectively applies a preset subtitle animation style to each text element, and superimposes the text elements having the preset subtitle animation style on matching material clips, thereby adding subtitles with subtitle text using an animation effect in which each character pops out using a first subtitle animation style to the multimedia material.
[0038] The method of the present embodiment can realize a subtitle animation effect in which a corresponding text subtitle appears when a certain word is spoken, and furthermore, dynamic subtitles can be automatically generated through user input, which is simple for user operation and favorable for improving user experience. Furthermore, the method of the present embodiment can be applied to various types of devices and has a wide range of application, and in batch text scenes, subtitles with specified effects can be quickly added to multimedia material clips even for mobile devices with small screens.
[0039] After adding subtitles to a multimedia material clip by the method of the embodiment shown in Fig. 1, a user may also re-edit the content of the subtitle text, including but not limited to deleting text elements, inserting new text elements, and replacing text elements. Fig. 2 is a flowchart of a subtitle processing method according to another embodiment of the present disclosure. As shown in Fig. 2, the method of this embodiment further includes S104-S108 in addition to the embodiment shown in Fig. 1.
[0040] S104: In response to a text deletion command, the corresponding text element is deleted from the subtitle text to obtain an updated subtitle text.
[0041] Here, by deleting the text elements in the subtitle text and retaining the remaining text elements and the time stamp information of the remaining text elements, the updated subtitle text and the time stamp information of each text element in the updated subtitle text can be obtained.
[0042]
number
[0043]
number
[0044] Removing text elements in other positions can be done in a similar manner.
[0045] S105: In response to a text insertion command, a new text element is inserted into the subtitle text to obtain an updated subtitle text.
[0046] The text insertion performed in this step does not remove existing text elements in the subtitle text, but inserts a new text element. In some embodiments, different processing may be configured depending on the insertion location of the new text element. In some embodiments, if the new text element is inserted in the middle of the subtitle text or at the end of the text, the new text element is merged with the previous adjacent text element and shares the timestamp of the audio clip corresponding to the previous adjacent text element. If the new text element is inserted at the beginning of the subtitle text, the new text element is merged with the first text element in the subtitle text and shares the timestamp of the audio clip corresponding to the first text element.
[0047]
number
[0048]
number
[0049]
number
[0050]
number
[0051]
number
[0052] S106: In response to a text replacement command, one or more text elements in the subtitle text are replaced with replacement text to obtain an updated subtitle text.
[0053] During replacement, the timestamp information corresponding to the replacement text is equivalent to the timestamp information of the audio clip corresponding to the replaced text element. In one replacement, the replacement text may include one or more text elements, the replacement text may be understood as a whole, and the number of replaced text elements may be one or more text elements in consecutive positions.
[0054]
number
[0055]
number
[0056]
number
[0057] To edit the subtitle text, select one or more of the above editing methods according to your needs.
[0058] S107: Based on time stamp information of audio clips corresponding to each text element in the updated subtitle text, material clips that match each of the text elements in the multimedia material are determined.
[0059] S108: Composite each of the text elements with a corresponding in-time material clip to re-subtitle the multimedia material.
[0060] Steps S107 to S108 are the same as steps S102 and S103 in the embodiment shown in FIG. 1, respectively, and the detailed description of the embodiment shown in FIG. 1 can be referred to.
[0061] When this is automatically achieved by invoking a dynamic subtitle resource package, the updated subtitle text and timestamp information of each text element contained in the updated subtitle text are retransmitted to the dynamic subtitle resource package, and the dynamic subtitle resource package collectively applies a preset subtitle animation style to each text element contained in the updated subtitle text, and re-adds the subtitles to the multimedia material by superimposing the text elements having the preset subtitle animation style on the matching material clips.
[0062] The method of this embodiment can meet the user's need for adjusting subtitle content when adding subtitles to multimedia materials, and can automatically generate subtitles with specified subtitle effects for updated subtitle text, which is convenient for users and favorable for improving user experience.
[0063] After adding subtitles to multimedia material by the method of the embodiment shown in Fig. 1, the user can also adjust the subtitle animation style used by the current subtitles to obtain the subtitle effect according to the user's expectation. Fig. 3 is a flowchart of a subtitle processing method according to another embodiment of the present disclosure. As shown in Fig. 3, the method of this embodiment includes S301 to S304.
[0064] S301: During editing of multimedia material, speech recognition is performed on audio corresponding to the multimedia material to obtain subtitle text corresponding to the audio and time stamp information of audio clips respectively corresponding to each text element included in the subtitle text.
[0065] S302: Based on the timestamp information of the audio clips corresponding to each text element, matching is performed with each material unit in the multimedia material, and a material clip that matches each text element in the multimedia material is determined, and the time on the editing timeline of the material clip that matches the text element and the time on the editing timeline of the audio clip corresponding to the text element are consistent.
[0066] S303: A specified first subtitle animation style is applied to each text element in a batch, and the text elements having the first subtitle animation style are composited with a material clip within a time period that matches the first subtitle animation style to obtain a target multimedia material having subtitle text using an animation effect in which each character pops out using the first subtitle animation style.
[0067] In this embodiment, steps S301 to S302 are respectively the same as steps S101 to S103 in the embodiment shown in Fig. 1, and the detailed description of the embodiment shown in Fig. 1 may be referred to, and will not be described in detail here. Note that the first subtitle animation style can be understood as the default subtitle animation style of the application.
[0068] S304: In response to a subtitle animation style switching command, the second subtitle animation style is applied to each text element in a batch, and the text elements having the second subtitle animation style are composited with a matching in-time material clip to obtain a target multimedia material having subtitle text using an animation effect in which each character pops out using the second subtitle animation style.
[0069] Here, the application may provide a subtitle animation style editing page to the user via the electronic device, and the page may display areas or controls corresponding to one or more subtitle animation styles that the user can select, and the user may input a subtitle animation style switching command by operating the area or control corresponding to the subtitle animation style.
[0070] When this is automatically achieved by invoking a dynamic subtitle resource package, the updated subtitle text and timestamp information of each text element included in the updated subtitle text are retransmitted to the dynamic subtitle resource package, and the dynamic subtitle resource package collectively reapplies the second subtitle animation style specified by the user to each text element included in the updated subtitle text, and re-adds the subtitles to the multimedia material by superimposing the text elements having the second subtitle animation style on the matching material clips.
[0071] The method of the embodiment can meet the user's need for adjusting the subtitle effect later, support the batch editing of subtitle animation style, and have high efficiency of subtitle processing.
[0072] Based on the above description, the subtitle processing method according to the present disclosure will be described with reference to drawings and application scenarios, taking an electronic device as an example of an embodiment of the present disclosure. For ease of explanation, in Fig. 4A to Fig. 4K, the electronic device is a mobile phone, and a video editing application (abbreviated as application 1) is installed on the mobile phone. Furthermore, the multimedia material that the user introduces into application 1 is a video material.
[0073] As shown in FIGS. 4A-4I, FIGS. 4A-4I are schematic diagrams of a human-computer interaction interface according to an embodiment of the present disclosure.
[0074] The application 1 can exemplarily display on the mobile phone a user interface 11 for displaying a multimedia material editing page (hereinafter abbreviated as editing page) as shown in FIG. 4A, and the application 1 can display the editing page that executes a set of functions such as preview playback of clip effects of the multimedia material, adding background music to the multimedia material, adding filters, stickers, and text to the multimedia material, etc.
[0075] As shown in Fig. 4A, the user interface 11 has an area a1 which is a preview area for clip effects of the multimedia material, and also includes an area a2 in which the multimedia material and other clip materials added during editing can be displayed along a time axis. The user interface 11 further includes an area a3 in which multiple types of clip function entries can be provided to the user. For example, the area a3 includes a control 101 for accessing a text function collection page of the application 1, which includes multiple controls each corresponding to a different text function.
[0076] For example, when the application 1 accepts a user's execution of an operation such as clicking on control 101 in the user interface 11 shown in FIG. 4A, the application 1 can exemplarily display on the mobile phone a user interface 12 shown in FIG. 4B, which shows a text function collection page provided by the application 1, in which entries of various different text functions are provided to the user, and the user can access a corresponding text function operation page via the entry to add text content to the multimedia material.
[0077] The user interface 12 includes an area a4 including entries corresponding to a new text creation function, a text template function, a subtitle recognition function, a lyrics recognition function, a sticker function, and a doodle pen function. Here, the control 102 shown on the user interface 12 is an entry corresponding to the subtitle recognition function.
[0078] When the application 1 accepts a user's execution of an operation such as clicking control 102 in the user interface 12 shown in FIG. 4B, the application 1 can exemplarily display on the mobile phone a user interface 13 shown in FIG. 4C showing a subtitle recognition panel provided by the application 1, in which the user can be provided with a recognition type option, a language type selection entry, a switch for marking invalid segments, a switch for dynamic subtitles, and a switch for simultaneously emptying existing subtitles.
[0079] Here, dynamic subtitles refers to the function of adding subtitles to multimedia material with an animation effect where the subtitle text pops out character by character. Specifically, when the dynamic subtitles are switched off, the subtitle effect presented by the added subtitles is that sentence segments appear as single subtitles, and when the dynamic subtitles are switched on, the added subtitles provide a character by character pop-out effect of the subtitle text, i.e., the text elements in the subtitle text are displayed one by one and the text elements are displayed at the start of the corresponding audio clip.
[0080] In some embodiments, the user's selection can be remembered, and the dynamic subtitle switch state when the user last finished subtitle recognition can be displayed when the subtitle recognition panel is opened, to better suit the user's usage habits. When the application 1 updates the dynamic subtitle function for the first time, the dynamic subtitle switch may be in the off state, as shown in the user interface 13.
[0081] When the user performs an operation such as clicking the dynamic subtitle switch button on the user interface 13 shown in FIG. 4C, the application 1 displays a user interface 14 in which the dynamic subtitle switch is in the ON state, as shown in FIG. 4D.
[0082] The user interface 14 also includes a control 103 for instructing the start of voice recognition and adding subtitles with an animation effect that pops out for each character. In response to the user performing an operation such as clicking the control 103 in the user interface 14, the application 1 exemplarily displays a user interface 15 on the mobile phone as shown in FIG. 4E, in which the subtitle recognition panel is turned off and hint contents such as animation and hint text are displayed in the area a4 to indicate that the user is currently creating a dynamic subtitle animation. In order to reduce the occlusion of the hint animation and hint text on the preview screen displayed in the area a1, the area a4 may be located above the area a1, and it should be understood that the area a4 may be located at another position, and the present disclosure is not limited thereto.
[0083] Here, as described above, when the user operates the dynamic subtitle switch and control 103, the application 1 performs speech recognition on the audio corresponding to the multimedia material and automatically adds dynamic subtitles with an animation effect in which each character pops out.
[0084] Once the creation of the dynamic subtitle animation is completed, the application 1 can exemplarily display the user interface 16 shown in FIG. 4F on the mobile phone, and in the user interface 16, hint content such as a message "Recognition successful. Subtitles have been automatically generated" can be displayed in area a4.
[0085] Then, the user can click the preview play button to preview the subtitle effect in area a1, and if it meets the user's expectations, he / she can export the edited multimedia material as a target video for distribution or storage.
[0086] In relation to the dialogue process shown in Figures 4A-4F, the present disclosure provides a dynamic subtitle switch to the user at a stage prior to the subtitle recognition, making it easier for the user to use. In addition, by storing the switch state of the dynamic subtitle switch when the user last exits the subtitle recognition panel, the user does not need to perform any operation when reusing the dynamic subtitle switch, so that the effect of reusing the dynamic subtitle switch is reused, and the user does not need to perform any extra operation.
[0087] To better meet the needs of users, the application 1 provides users with the ability to add dynamic subtitles or modify existing subtitle animation styles in subsequent steps.
[0088] Exemplarily, based on the user interface 16 shown in Fig. 4F, in the area a2, recognizers corresponding to the multimedia material and the subtitle text are displayed along the time axis, and re-editing of the subtitles can be triggered by operating (e.g., clicking) the recognizer of the subtitle text shown in the area a2. The application 1 can exemplarily display the user interface 17 shown in Fig. 4G on the mobile phone by accepting a user's click operation on a text clip included in any of the subtitles in the area a2 of the user interface 16.
[0089] In the user interface 17, the region a1 displays a text box 104 corresponding to the subtitle text, the text box 104 includes text content, which may be one or more sentences (i.e., text clips), corresponding to the current preview position, and the region a1 may also display controls for manipulating the text box, such as rotating, copying, and allowing the user to enlarge or reduce the size of the text box via a two-finger trigger, and the size of the text elements in the text box also changes with the change in the size of the text box. The user interface 17 also includes a region a5 displaying an area of a subtitle editing function set page that provides entries for various editing functions for editing the currently added subtitles, and may include entries corresponding to functions such as batch editing of subtitles, subtitle splitting, subtitle copy, subtitle editing, subtitle deletion, cursive writing, and subtitle animation style, respectively. Here, the user interface 17 includes a control 105 for accessing a subtitle animation panel to add subtitle effects (including dynamic subtitle effects) for the current subtitles or to change the subtitle animation style used in the current subtitles.
[0090] When the application 1 accepts that the user has performed an operation such as clicking on the control 105 in the user interface 17, the application 1 displays a user interface 18 including an area a6 shown in FIG. 4H.
[0091] Here, the user displays a subtitle animation panel in area a6, including a tag 106 for setting an animation style, a font tag, a style tag, a script tag, a text template tag, etc. In some embodiments, as shown in FIG. 4H, upon entering the subtitle animation style panel, the user may be navigated to tab 106 by default and related content of tab 106 may be displayed. In another embodiment, the user may be navigated to another tag, and application 1 may display related content of tag 106 upon receiving a click operation of tag 106 by the user.
[0092] As shown in FIG. 4H, the area a6 further includes a dynamic subtitle switch 107. By operating the dynamic subtitle switch 107, a subtitle effect in which text elements are displayed one by one can be added to the current subtitle.
[0093] In some embodiments, if the user added dynamic subtitles in the previous step, it may be displayed as an on state here, and if the user did not use dynamic subtitles in the previous step, it may be displayed as an off state here, and the user may switch the switch state of the dynamic subtitle switch 107 displayed in the user interface 18 to the on state. Here, in the embodiment shown in FIG. 4H, the dynamic subtitle switch 107 is in the off state.
[0094] Further, area a6 includes tag 108 for setting a subtitle start style, tag 109 for setting a subtitle end style, tag 110 for setting a subtitle loop style, tag 111 for setting a video subtitle animation style, and area a7 for displaying the content of a corresponding tag depending on the tag currently located in. In some cases, when dynamic subtitle switch 107 is in an off state, any tag-related content may be displayed by default, for example, user interface 17 shown in FIG. 4H may display the related content corresponding to tag 108 by default.
[0095] When the application 1 receives a user operation (such as a click operation) on the dynamic subtitle switch 107 of the user interface 18, and the dynamic subtitle switch 107 is switched from an off state to an on state, the application 1 can exemplarily display a user interface 19 as shown in FIG. 4I on the mobile phone. As shown in FIG. 4I, in the user interface 19, the dynamic subtitle switch 107 is in an on state, the tab 111 is in a selected state, and one or more dynamic subtitle animation styles that the user can select related to the dynamic subtitles are displayed in the area a7, and the display recognizers corresponding to the multiple dynamic subtitle animation styles are arranged in order from left to right, and the user can check them back and forth by sliding the screen left and right. Here, the default dynamic subtitle animation style of the application 1 is displayed in the first position from left to right, allowing the user to clearly understand what kind of dynamic subtitle animation style the application 1 uses by default.
[0096] The area a7 may further include a disable button 112, which may be located at the leftmost position of the area a7, or may of course be located at other positions, but the present disclosure is not limited thereto. When a user clicks the disable button 112 to turn off the corresponding dynamic subtitle effect, the dynamic subtitle switch 107 is switched to an off state.
[0097] If the user clicks on the second dynamic subtitle animation style from the left in area a7, this will result in a subtitle animation style switching instruction being input to application 1, and application 1 will apply the second dynamic subtitle style to each text element included in the subtitle text in response to the subtitle animation style switching instruction. The user can switch between dynamic subtitle animation styles multiple times until the subtitle effect that the user expects is achieved.
[0098] In addition to the user interface 18 shown in Fig. 4H and the user interface 19 shown in Fig. 4I, the area a5 includes an area a8 displaying a text editing box that allows the user to delete a text element in the subtitle text, insert new text, or replace the original text element, and the user's operation on the text editing box corresponds to inputting a delete instruction, an insert instruction, and a replace instruction to the application 1. When editing the text content in the text editing box of the area a8, the edited text content is displayed in synchronization with the text box 104 shown in the area a1, which is advantageous for the user to preview the edited subtitle content and the display effect of the subtitle content in the video frame image of the multimedia material clip.
[0099] In the embodiment shown in the above Figures 4F to 4I, by setting the dynamic subtitle switch and the dynamic subtitle animation style tag in the subtitle animation style panel at a later stage, the needs of the user to add dynamic subtitles and adjust the subtitle dynamic style used for the dynamic subtitles at a later stage are met.
[0100] It should be understood that the schematic diagrams of the interactive interfaces shown in the above Figures 4A to 4I do not limit the subtitle processing method according to the present disclosure, and some controls, panels, tag styles, trigger methods, etc. can be flexibly adjusted as necessary.
[0101] 5 is a structural schematic diagram of a subtitle processing device according to an embodiment of the present disclosure. As shown in FIG. 5, the device 500 according to the present embodiment includes: a speech recognition module 501 for performing speech recognition on an audio corresponding to the multimedia material during editing of the multimedia material to obtain a subtitle text corresponding to the audio and time stamp information of an audio clip corresponding to each text element included in the subtitle text; A matching module 502 that matches each material unit in the multimedia material based on time stamp information of an audio clip corresponding to each of the text elements, and determines a material clip in the multimedia material that matches each of the text elements, wherein the time on an editing timeline of the material clip that matches the text element and the time on an editing timeline of the audio clip that corresponds to the text element are the same; a subtitle synthesis module 503 for synthesizing each of the text elements with a material clip within a corresponding time range to obtain a target multimedia material having an animation effect in which the subtitle text pops out character by character.
[0102] In some embodiments, in the editing timeline, the start time of the time to which the material clip matching the text element belongs matches the start time of the audio clip corresponding to the text element, and the end time of the time to which the material clip matching the text element belongs matches the end time of the audio clip corresponding to the text element, or the end time of the time to which the material clip matching the text element belongs is later than the end time of the audio clip corresponding to the text element.
[0103] In some embodiments, the subtitle synthesis module 503 specifically applies a specified first subtitle animation style to each of the text elements collectively, and composites the text elements having the first subtitle animation style with matching in-time material clips to obtain the target multimedia material having subtitle text with a letter-by-letter pop-up animation effect using the first subtitle animation style 1.
[0104] Optionally, the apparatus 500 further includes a subtitle text update module 504 .
[0105] In some embodiments, the subtitle text update module 504 is responsive to a text deletion command to delete such text element from the subtitle text to obtain an updated subtitle text.
[0106] In such a case, the matching module 502 also determines material clips of the multimedia material that match each of the text elements based on timestamp information of audio clips that correspond to each of the text elements in the updated subtitle text.
[0107] The subtitle synthesis module 503 also synthesizes each of the text elements contained in the updated subtitle text with a matching in-time material clip so as to re-add the animation effect of the subtitle text popping out character by character to the multimedia material.
[0108] In some embodiments, the subtitle text update module 504 is also responsive to a text insertion command to insert a new text element into the subtitle text to obtain an updated subtitle text.
[0109] In such a case, the matching module 502 also matches each material unit in the multimedia material based on the timestamp information of the audio clip corresponding to each text element in the updated subtitle text, determines a material clip in the multimedia material that matches each of the text elements, and the new text element and its adjacent text elements are combined to share the timestamp information of the audio clip corresponding to the adjacent text elements.
[0110] The subtitle synthesis module 503 also combines each of the text elements contained in the updated subtitle text with a corresponding material clip within a time range so as to re-add the animation effect of the subtitle text popping out character by character to the multimedia material.
[0111] In some embodiments, if the insertion position of the new text element is at the beginning of the subtitle text, the new text element and a first text element in the subtitle text share the timestamp of an audio clip corresponding to the first text element, and if the insertion position of the new text element is in the middle or at the end of the subtitle text, the new text element and a previous adjacent text element share the timestamp of an audio clip corresponding to the previous text element.
[0112] In some embodiments, the subtitle text update module 504 is also responsive to a text replacement command to replace one or more text elements in the subtitle text with replacement text to obtain updated subtitle text.
[0113] In such a case, the matching module 502 also determines material clips of the multimedia material that match each of the text elements based on timestamp information of audio clips corresponding to each of the text elements in the updated subtitle text, and the replacement text corresponds to the timestamp information of the audio clips corresponding to the text elements to be replaced.
[0114] The subtitle synthesis module 503 also synthesizes each of the text elements contained in the updated subtitle text with a matching in-time material clip so as to re-add the animation effect of the subtitle text popping out character by character to the multimedia material.
[0115] In some embodiments, the subtitle synthesis module 503 is also responsive to the subtitle animation style switch command to apply a second subtitle animation style to each of the text elements collectively and composite the text elements having the second subtitle animation style with material clips within a matching time range to obtain the target multimedia material with subtitle text using a character-by-character pop-up animation effect using the second subtitle animation style.
[0116] In some embodiments, the audio corresponding to the multimedia material is the original audio included in the multimedia material or background music added to the multimedia material.
[0117] The subtitle processing device according to this embodiment may implement the technical solutions of any of the method embodiments described above, and their implementation principles and technical effects are similar, so reference may be made to the detailed descriptions of the method embodiments described above, and for the sake of brevity, they will not be described in detail here.
[0118] Illustratively, the present disclosure provides an electronic device including one or more processors, a memory, and one or more computer programs, the one or more computer programs being stored in the memory, and causing the electronic device to realize the subtitle processing method of the above embodiment when the one or more processors execute the one or more computer programs.
[0119] Illustratively, the present disclosure provides a chip system that is applied to an electronic device including a memory and a sensor, and includes a processor, the processor executing the subtitle processing method of the above embodiment.
[0120] Illustratively, the present disclosure provides a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, causes an electronic device to implement the subtitle processing method of the above embodiment. Illustratively, the present disclosure provides a computer program product that, when implemented in a computer, causes the computer to execute the subtitle processing method of the above embodiment.
[0121] It should be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that such an actual relationship or sequence exists between those entities or operations. Furthermore, the terms "comprise", "contain", or any other variation thereof are intended to cover a non-exclusive inclusion, whereby a process, method, article, or device that includes a set of elements includes not only those elements, but also other elements not expressly listed or that are inherent to such process, method, article, or device. In the absence of further limitations, an element limited by the phrase "comprises a ..." does not exclude the presence of further identical elements in the process, method, article, or device that includes the element.
[0122] The above are merely specific embodiments of the present disclosure that enable those skilled in the art to understand or practice the present disclosure. Various modifications to these examples will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other examples without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not limited to these examples described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A subtitle processing method, comprising: during editing of the multimedia material, performing speech recognition on an audio corresponding to the multimedia material to obtain subtitle text corresponding to the audio and time stamp information of audio clips respectively corresponding to each text element contained in the subtitle text; a step of matching each material unit in the multimedia material based on time stamp information of an audio clip corresponding to each of the text elements, and determining a material clip in the multimedia material that matches each of the text elements, wherein a time in an editing timeline of the material clip that matches the text element and a time in an editing timeline of the audio clip that corresponds to the text element are the same; and combining each of the text elements with a corresponding in-time material clip to obtain a target multimedia material having an animation effect in which the subtitle text pops out character by character.
2. The method of claim 1, wherein, in the editing timeline, a start time of a time to which a material clip matching the text element belongs matches a start time of an audio clip corresponding to the text element, and, in the editing timeline, an end time of a time to which a material clip matching the text element belongs matches an end time of an audio clip corresponding to the text element, or the end time of a time to which a material clip matching the text element belongs is later than the end time of an audio clip corresponding to the text element.
3. said step of synthesizing each of said text elements with a corresponding in-time material clip to obtain a target multimedia material having an animation effect in which the subtitle text pops out one character at a time; 3. The method of claim 1, further comprising applying a specified first subtitle animation style to each of the text elements collectively, and compositing the text elements having the first subtitle animation style with a matching in-time material clip to obtain the target multimedia material having subtitle text with a character-by-character pop-up animation effect using the first subtitle animation style.
4. in response to a text deletion command, deleting the text element from the subtitle text to obtain an updated subtitle text; determining a material clip that matches each of the text elements in the multimedia material based on time stamp information of an audio clip corresponding to each of the text elements in the updated subtitle text; The method according to any one of claims 1 to 3, further comprising the step of: combining each of the text elements included in the updated subtitle text with a corresponding in-time material clip so as to re-add an animation effect of subtitle text popping out character by character to the multimedia material.
5. in response to a text insertion command, inserting a new text element into the subtitle text to obtain an updated subtitle text; a step of matching each material unit in the multimedia material based on time stamp information of an audio clip corresponding to each text element in the updated subtitle text, and determining a material clip in the multimedia material that matches each of the text elements, wherein the new text element and its adjacent text elements are combined to share time stamp information of the audio clip corresponding to the adjacent text elements; The method according to any one of claims 1 to 4, further comprising the step of combining each of the text elements included in the updated subtitle text with a material clip within a matching time range, so as to re-add an animation effect of the subtitle text popping out character by character to the multimedia material.
6. If the insertion position of the new text element is at the beginning of the subtitle text, the new text element and a first text element in the subtitle text are combined to share a time stamp of an audio clip corresponding to the first text element; 6. The method of claim 5, wherein if the insertion position of the new text element is in the middle or at the end of the subtitle text, the new text element and the previous adjacent text element share a timestamp of an audio clip corresponding to the previous text element.
7. in response to a text replacement command, replacing one or more text elements in the subtitle text with replacement text to obtain an updated subtitle text; determining a material clip of the multimedia material that matches each of the text elements in the updated subtitle text based on time stamp information of an audio clip corresponding to each of the text elements, the replacement text corresponding to time stamp information of an audio clip corresponding to the text element to be replaced; The method according to any one of claims 1 to 6, further comprising the step of: combining each of the text elements included in the updated subtitle text with a corresponding in-time material clip so as to re-add an animation effect of subtitle text popping out character by character to the multimedia material.
8. 4. The method of claim 3, further comprising the step of: in response to a subtitle animation style switching command, applying a second subtitle animation style to each of the text elements collectively; and compositing the text elements having the second subtitle animation style with material clips within a matching time range to obtain a target multimedia material having subtitle text with a character-by-character pop-out animation effect using the second subtitle animation style.
9. The method according to any one of claims 1 to 8, wherein the audio corresponding to the multimedia material is original audio contained in the multimedia material or background music added to the multimedia material.
10. A subtitle processing device, a speech recognition module for performing speech recognition on an audio corresponding to the multimedia material during editing of the multimedia material to obtain subtitle text corresponding to the audio and time stamp information of audio clips respectively corresponding to each text element included in the subtitle text; a matching module that matches each material unit in the multimedia material based on time stamp information of an audio clip corresponding to each of the text elements, and determines a material clip in the multimedia material that matches each of the text elements, wherein a time in an editing timeline of the material clip that matches the text element and a time in an editing timeline of the audio clip that corresponds to the text element are the same; a subtitle synthesis module for synthesizing each of the text elements with a material clip within a corresponding time range to obtain a target multimedia material having an animation effect in which the subtitle text pops out character by character.
11. An electronic device, A memory and a processor, the memory is configured to store computer program instructions; The processor executes the computer program instructions to cause the electronic device to implement the subtitle processing method according to any one of claims 1 to 9.
12. A readable storage medium, Contains computer program instructions, A readable storage medium, by which at least one processor of an electronic device executes the computer program instructions to cause the electronic device to implement the subtitling method according to any one of claims 1 to 9.
13. 1. A computer program product comprising: A computer program product, comprising: an electronic device that executes the computer program product to cause the electronic device to implement the subtitle processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Mobile terminal and control method thereof
CN103139375A
Subtitle generation method and device and electronic equipment
CN110798636A
Method and device for adding subtitles in video
CN110996167A
Computer system, method for supporting correction work, and program
JP2006119534A
Apparatus and method, and program for generating caption from moving picture data, and storage medium
JP2007027990A
