Audio file generation method and device, equipment, medium and program product
By selecting reference audio clips on the audio editing page and generating target audio clips of similar styles, the problem of expected deviations when users generate music through text input is solved, and a more efficient music creation experience is achieved.
Patent Information
- Application Number
- CN202411826761.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-11
AI Technical Summary
In the prior art, users need to generate music by inputting text, and the text is unclear or cannot accurately describe the music generation expectations, resulting in a deviation from the user's expectations and a poor user experience.
The editing control is displayed on the playback page. In response to the interactive operation of the editing control, the audio editing page is displayed. The audio editing page includes audio information and generation controls of the preset audio file. Generate the target audio file by selecting a reference audio clip in the preset audio file and generating a target audio clip of similar styles based on the clip.
By selecting reference audio clips to generate target audio clips of similar styles, it can meet users' expectations of music generation, reduce the difficulty of music creation, and improve user experience.
Smart Images

Figure CN119653174A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to computer technology, and more particularly to a method, apparatus, device, medium and program product for generating an audio file. Background Art
[0002] Computer technology has been widely used in music processing, and more and more users can create music through music clients. Currently, users can generate music by inputting text into the music client. However, this music generation method requires users to input text to prompt the model to generate music. If the text is not clear or the music generation expectations cannot be accurately described in words, the generated music may deviate from the user's expectations, resulting in a poor user experience. Summary of the invention
[0003] The embodiments of the present disclosure provide a method, apparatus, device, medium, and program product for generating an audio file, which can generate audio that meets user expectations and improve user experience.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating an audio file, comprising:
[0005] Displaying editing controls on a play page, wherein the play page is used to play a preset audio file;
[0006] In response to an interactive operation on the editing control, displaying an audio editing page, the audio editing page including audio information of the preset audio file and a generation control;
[0007] In response to a selection operation on the audio information, determining a reference audio segment in the preset audio file;
[0008] In response to an interactive operation on the generating control, a target audio segment is generated according to the reference audio segment, and a target audio file is determined according to the target audio segment.
[0009] In a second aspect, an embodiment of the present disclosure further provides a device for generating an audio file, the device comprising:
[0010] An editing control display module, used to display editing controls on a play page, wherein the play page is used to play a preset audio file;
[0011] An editing page display module, used for displaying an audio editing page in response to an interactive operation on the editing control, the audio editing page including audio information of the preset audio file and a generation control;
[0012] an audio segment selection module, configured to determine a reference audio segment in the preset audio file in response to a selection operation on the audio information;
[0013] The audio generation module is used to generate a target audio segment according to the reference audio segment in response to an interactive operation on the generation control, and determine a target audio file according to the target audio segment.
[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] a storage device for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating an audio file as described in any embodiment of the present disclosure.
[0018] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the method for generating an audio file as described in any embodiment of the present disclosure.
[0019] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the method for generating an audio file as described in any embodiment of the present disclosure.
[0020] The disclosed embodiment provides a method for generating an audio file, wherein an editing control is displayed on a playback page, and the playback page is used to play a preset audio file. In response to an interactive operation of the editing control, an audio editing page is displayed, and the audio editing page includes audio information of the preset audio file and a generation control. In response to a selection operation on the audio information, a reference audio segment in the preset audio file is determined, and in response to an interactive operation on the generation control, a target audio segment is generated based on the reference audio segment, and a target audio file is determined based on the target audio segment, and the target audio file is played. The technical solution of the disclosed embodiment is to select a reference audio segment from a preset audio file currently being played, and generate a target audio segment of a similar style based on the reference audio segment. Since audio contains richer knowledge than text, the target audio segment generated based on the reference audio segment selected by the user can meet the user's expectations for music generation, reduce the difficulty of music creation, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0022] Figure 1 A schematic diagram of a flow chart of a method for generating an audio file provided by an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of a playback page provided by an embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram of an audio editing page provided by an embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram of another audio editing page provided by an embodiment of the present disclosure;
[0026] Figure 5 A schematic diagram of another audio editing page provided by an embodiment of the present disclosure;
[0027] Figure 6 A flowchart of another method for generating an audio file provided by an embodiment of the present disclosure;
[0028] Figure 7 A schematic diagram of another audio editing page provided by an embodiment of the present disclosure;
[0029] Figure 8 A schematic diagram of the structure of a device for generating an audio file provided by an embodiment of the present disclosure;
[0030] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0038] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0039] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0040] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0041] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0042] Figure 1 A flowchart of a method for generating an audio file provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to the situation of music creation. The method can be executed by a device for generating an audio file, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.
[0043] like Figure 1 As shown, the method includes:
[0044] S110. Displaying an editing control on a play page, wherein the play page is used to play a preset audio file.
[0045] The preset audio files include historically generated audio files. For example, a user can create his own music works through a music client, and can also upload the music works to a server, or share the music works. For example, the preset audio files include music works created and uploaded by a user through a music client, etc.
[0046] The play page includes the music cover, lyrics, author and editing controls corresponding to the currently played preset audio file. The editing controls are used to trigger a music generation event for generating music of similar style. The music generation event is used to generate a new audio clip based on the selected audio clip. If the editing control is clicked, a music generation event for generating music of similar style is triggered. If the music generation event is triggered, the music editing page will be displayed. Exemplarily, the music cover corresponding to the preset audio file is displayed on the play page, and the editing controls are displayed at the corresponding position of the music cover. For example, the editing controls can be displayed at the bottom of the music cover. By displaying the editing controls at the corresponding position of the music cover, the entrance to the similar music generation service can be intuitively displayed, which is convenient for triggering a music generation event for the currently played audio file during the process of listening to music. There is no need to search and select audio files from the play list, and then trigger a similar music generation event for the selected audio file, which simplifies user operations.
[0047] Figure 2 Schematic diagram of a playback page provided by an embodiment of the present disclosure. Figure 2 As shown, the music cover is displayed on the play page 210 of the music client, and the lyrics are displayed at the corresponding position of the music cover, and the lyrics scroll synchronously according to the music play time, and the editing control 220 is also displayed at the bottom of the music cover.
[0048] S120. In response to an interactive operation on the editing control, display an audio editing page, wherein the audio editing page includes audio information of the preset audio file and a generation control.
[0049] In the embodiment of the present disclosure, the audio editing page represents a selection page of an audio clip. The audio editing page may include audio information and generation controls. The audio information may represent the audio duration of a preset audio file. For example, the audio information includes an audio bar, a progress bar, or a timestamp of lyrics. The audio bar may include an audio waveform. The audio waveform may represent the relationship between the volume and time of the preset audio file.
[0050] In the disclosed embodiment, the interactive operation is a click operation, voice command, visual gaze or gesture operation on the editing control.
[0051] Exemplarily, in response to a click operation of the editing control, the audio editing page is displayed, and the audio editing page also includes a lyrics panel and a text control, wherein the lyrics panel is used to display the lyrics of the preset audio file. The audio bar is located between the lyrics panel and the text control. Through the disclosed embodiment, the lyrics of the preset audio file can be intuitively displayed, which is convenient for users to explore creative inspiration from the lyrics of the preset audio file. In addition, the text control is displayed on the audio editing page, and through the text input operation on the text control, the prompt word of the music generation model is determined according to the input target text, so that the target audio segment generated by the music generation model is more in line with user expectations.
[0052] Optionally, the sub-segment corresponding to the audio bar is converted to a playing state according to the playing time of the preset audio file. The lyrics panel is displayed above the audio bar. The lyrics of the preset audio file are scrolled and displayed in the lyrics panel, and the corresponding lyrics are converted to a selected form according to the playing time of the preset audio file. Optionally, if the audio bar is an audio waveform, the sub-segment of the audio bar may include an audio waveform segment. For example, according to the playing time of the preset audio file, the audio waveform segment corresponding to the audio segment being played is adjusted to a target color. And, the display effect of the lyrics corresponding to the audio segment in the playing state is adjusted. Optionally, the lyrics corresponding to the audio segment in the playing state can be bolded or other text processing.
[0053] Figure 3 Schematic diagram of an audio editing page provided by an embodiment of the present disclosure. Figure 3 As shown, an audio editing page 310 is displayed on the upper layer of the play page 300. Optionally, the audio editing page 310 can be a floating window. The audio editing page 310 includes an audio bar 320, a lyrics panel 330, a text control 340, and a generation control 350. Among them, the lyrics in the lyrics panel 330 correspond to the sub-segments of the audio bar 320.
[0054] The generation control is used to trigger a music generation event. If a music generation event is detected, the reference audio clip is sent to the pre-trained generation model to generate a target audio clip of similar musical style based on the reference audio clip through the generation model. The pre-trained generation model may include a music generation model, which generates a new audio clip similar to the input audio clip by identifying musical features such as the timbre, style and arrangement of the input audio clip. Optionally, the diffusion model may be supervised and fine-tuned to obtain a music generation model.
[0055] S130: In response to a selection operation on the audio information, determine a reference audio segment in the preset audio file.
[0056] The reference audio segment represents the selected audio segment in the preset audio file. The reference audio segment can be used as a prompt word and input into the music generation model to generate the target audio segment through the music generation model.
[0057] Exemplarily, in response to a drag operation on the audio information, a reference audio segment in the preset audio file is determined according to the audio position corresponding to the drag operation. The reference audio segment is played in a loop, and the audio information corresponding to the reference audio segment is converted into a selected form. In the disclosed embodiment, a reference audio segment can be selected by dragging the audio information, so that the selection method of the audio segment is intuitively displayed, the interaction form is enriched, and the steps of selecting the audio segment are simplified.
[0058] Optionally, according to the duration requirement of the input audio segment of the music generation model, time prompt information can be displayed at the corresponding position of the audio information to prompt the user to select the duration range of the reference audio segment. The duration of the reference audio segment between the audio positions corresponding to the drag operation needs to be within the above duration range. If the duration of the reference audio segment between the audio positions corresponding to the drag operation exceeds the upper limit of the above duration range, the audio segment that meets the duration range is intercepted from the reference audio segment as the reference audio segment. If the duration of the reference audio segment between the audio positions corresponding to the drag operation is less than the lower limit of the duration range, the reference audio segment corresponding to the current drag operation is ignored, and a prompt message of insufficient duration is displayed. For example, if the duration range is greater than or equal to t1 and less than or equal to t2, if the duration of the reference audio segment is t2+a seconds, t2 seconds of audio data of the reference audio segment can be intercepted backward from the starting position of the reference audio segment as the final reference audio segment. Optionally, t2 seconds of audio data of the reference audio segment can also be intercepted forward from the end position of the reference audio segment as the final reference audio segment.
[0059] The audio position includes the audio time at the start of the drag operation and the audio time at the end of the drag operation. For example, if the duration of the preset audio file is 90 seconds, and the audio file is dragged from the 30th second to the 60th second through the drag operation, 30 seconds and 60 seconds are used as the start and end times of the reference audio segment, and the corresponding audio segment is intercepted from the preset audio file according to the start and end times. Optionally, the audio information corresponding to the reference audio segment is framed by a rectangular frame to indicate that the audio information corresponding to the reference audio segment is converted into a selected form. And / or, the rectangular frame can also be bolded. And / or, a background texture can also be added to the audio information in the rectangular frame. And / or, the color of the rectangular frame can also be adjusted. And / or, the color of the background texture can also be adjusted.
[0060] Figure 4 FIG. 1 is a schematic diagram of another audio editing page provided by an embodiment of the present disclosure. Figure 4 As shown, the audio information of the preset audio file included in the audio editing page 410 is an audio bar 420. Drag the audio bar 420 from the first audio position 430 to the second audio position 440, and use a rectangular box to select the sub-segment of the audio bar 420 between the first audio position 430 and the second audio position 440, so as to convert the selected sub-segment into a selected state. The lyrics corresponding to the selected sub-segment are played in a loop in the lyrics panel 450. The red area in the audio bar 420 represents the audio being played.
[0061] Optionally, if the audio information of the preset audio file includes a progress bar, the progress bar is used to represent the total duration and the played duration of the preset audio file. The reference audio segment in the preset audio file is selected by dragging the progress bar.
[0062] Optionally, the preset audio file is divided into at least two audio segments according to the lyrics of the preset audio file, and the audio information of the preset audio file includes the start and end time of each audio segment. In response to the input audio start time and audio end time, a reference audio segment in the preset audio file is determined.
[0063] Optionally, if the audio information of the preset audio file includes the total audio duration and the elapsed playing time, in response to the input audio segment duration, a reference audio segment in the preset audio file is determined according to the elapsed playing time and the audio segment duration of the preset audio file. If the total audio duration of the preset audio file is 120 seconds, the elapsed playing time is s seconds, the audio segment duration is n seconds, and s+n seconds is less than or equal to 120 seconds, an audio segment of n seconds in length is intercepted from the s+1 second of the preset audio file as the reference audio segment. If s+n exceeds 120 seconds, a prompt message indicating that the audio selection is wrong is displayed.
[0064] S140: In response to an interactive operation on the generation control, generate a target audio segment according to the reference audio segment, and determine a target audio file according to the target audio segment.
[0065] In the disclosed embodiment, after selecting a reference audio clip, if a click operation on a generation control is detected, the reference audio clip is input into a music generation model. The music generation model learns at least one of the musical attributes of the reference audio clip, including the timbre, style, arrangement, and lyrics, and generates a target audio clip with a similar musical style to the reference audio clip. The reference audio clip and the target audio clip are connected to obtain a target audio file, and the target audio file is played. In order to ensure a natural connection between the audio clips, the reference audio clip and the target audio clip can be cross-faded. The target audio file is played to verify whether the generated audio meets expectations.
[0066] Optionally, in response to a text input operation on the text control, the lyrics panel in the audio editing page is hidden, and the positions of the audio bar and the text control are adjusted, and the target text is determined according to the text input operation, wherein the target text includes the lyrics of the target audio segment and / or the lyrics description of the target audio segment.
[0067] The lyrics description of the target audio segment is used to describe the lyrics of the target audio segment. For example, the lyrics description of the target audio segment includes at least one of the description information of the lyrics structure, the description information of the lyrics content, and the description information of the lyrics style. Optionally, the lyrics description may include lyrics expressing a walk on the seaside, including a verse and two choruses. Optionally, the number of sentences included in the verse may be limited, and the number of sentences included in the chorus may be limited.
[0068] For example, in response to a click operation on a text control, the lyrics panel in the audio editing page is hidden, and the audio bar and text control are moved to the top of the audio editing page to display a keyboard at the bottom of the audio editing page, and text content is entered into the corresponding position of the text control through the keyboard.
[0069] The generating the target audio segment according to the reference audio segment in response to the interactive operation on the generating control includes: generating the target audio segment according to the reference audio segment and a target text in response to the interactive operation on the generating control.
[0070] If the target text includes a lyric description of the target audio segment, the target lyrics of the target audio segment are generated according to the lyric description. The target audio segment is generated according to at least one musical attribute of the timbre, style, and arrangement of the reference audio segment and the target lyrics.
[0071] For example, after selecting a reference audio clip and entering lyrics in the corresponding position of the text control, if a click operation of the generate control is detected, the reference audio clip and lyrics are input into the music generation model, and the target audio clip is generated by the music generation model based on the timbre, style, at least one musical attribute of the arrangement of the reference audio clip and the input lyrics.
[0072] Optionally, after selecting a reference audio clip and inputting a lyrics description in a corresponding position of the text control, if a click operation of the generate control is detected, the reference audio clip and the lyrics description are input into the music generation model, and the target lyrics of the target audio clip are generated based on the lyrics description by the music generation model. Then, the target audio clip is generated based on at least one of the musical attributes of the timbre, style, and arrangement of the reference audio clip and the target lyrics by the audio generation model.
[0073] Through the disclosed embodiments, music can be composed according to lyrics written by users, without the need for users to have the ability to compose music, thereby reducing the difficulty of music creation. Lyrics can also be generated by inputting lyrics descriptions into a music generation model, thereby reducing the difficulty of lyrics creation.
[0074] Optionally, if the target text is not entered and a click operation of the generate control is detected, the reference audio clip is input into the music generation model, and the music generation model generates a model audio clip based on at least one of the timbre, style, and arrangement of the reference audio clip and the lyrics of the reference audio clip.
[0075] Optionally, the audio editing page further includes a time option. In response to a selection operation on the time option, a target time is determined. In response to an interactive operation on the generation control, generating a target audio segment according to the reference audio segment includes: in response to an interactive operation on the generation control, generating the target audio segment according to the reference audio segment and the target time. By selecting the target time, the audio duration of the target audio segment generated by the music generation model can be constrained.
[0076] Figure 5 FIG. 1 is a schematic diagram of another audio editing page provided by an embodiment of the present disclosure. Figure 5 As shown, the audio editing page also includes a time option 510. The time option 510 is located between the generation control 520 and the text control 530. In response to the selection operation for the time option 510, the selected time option 510 is determined as the target time. Click the text control 530 to hide the lyrics panel 540 and the time option 510 in the audio editing page, and control the position of the audio bar 550, the text control 530 and the generation control 520 to move vertically up along the audio editing page. A keyboard 560 is displayed at the bottom of the audio editing page.
[0077] Optionally, the lyrics of the target audio segment are input in the text control, and after the target time is selected, the reference audio segment, the lyrics of the target audio segment and the target time are input into the music generation model, and the target audio segment is generated by the music generation model based on the reference audio segment, the lyrics of the target audio segment and the target time. The target time is used to constrain the duration of the target audio segment generated by the music generation model.
[0078] Optionally, if the duration corresponding to the lyrics of the target audio segment is shorter than the target time, the target audio segment includes at least two sections of lyrics, and the target audio segment corresponding to the target time is obtained by looping the lyrics.
[0079] The technical solution of the disclosed embodiment is to display an editing control on a playback page, the playback page is used to play a preset audio file, and in response to an interactive operation of the editing control, an audio editing page is displayed, the audio editing page includes audio information of the preset audio file and a generation control. In response to a selection operation on the audio information, a reference audio segment in the preset audio file is determined, in response to an interactive operation on the generation control, a target audio segment is generated based on the reference audio segment, a target audio file is determined based on the target audio segment, and the target audio file is played. The technical solution of the disclosed embodiment is to select a reference audio segment in the currently playing preset audio file, and generate a target audio segment of a similar style based on the reference audio segment. Since audio contains richer knowledge than text, the target audio segment generated based on the reference audio segment selected by the user can meet the user's expectations for music generation, reduce the difficulty of music creation, and improve the user experience.
[0080] Figure 6 A flow chart of another method for generating an audio file provided in an embodiment of the present disclosure. Based on the above embodiments, the embodiment of the present disclosure further defines an implementation method for dividing the audio information into at least two audio information segments based on the lyrics of the preset audio file, and in response to a drag operation on the audio information, determining a reference audio segment in the preset audio file according to the audio position corresponding to the drag operation.
[0081] like Figure 6 As shown, the method includes:
[0082] S610: Displaying an editing control on a play page, wherein the play page is used to play a preset audio file.
[0083] S620: In response to an interactive operation on the editing control, display an audio editing page, wherein the audio editing page includes audio information of the preset audio file and a generation control.
[0084] S630: In response to a selection operation on the audio information segment, determine a reference audio segment in the preset audio file according to the selected audio information segment.
[0085] In the disclosed embodiment, the audio information is divided into at least two audio information segments according to the lyrics structure of a preset audio file. At least two audio information segments are displayed on an audio editing page. The audio information segments can be represented as rectangular frames, and the audio waveforms of the corresponding audio segments are displayed in the rectangular frames. By selecting at least one audio information segment, a reference audio segment is determined according to the selected audio information segment.
[0086] In the disclosed embodiment, the selected audio information segment is a continuous audio information segment among at least two audio information segments, so as to ensure the content continuity of the generated target audio segment.
[0087] S640: Play the reference audio segment in a loop, and convert the audio information segment corresponding to the reference audio segment into a selected form.
[0088] Exemplarily, after the reference audio segment is selected, the reference audio segment is played in a loop to wait for the user to input the target text or target time. The properties of the rectangular box corresponding to the audio information segment corresponding to the reference audio segment are adjusted to indicate that the audio information segment is selected.
[0089] Figure 7 FIG. 1 is a schematic diagram of another audio editing page provided by an embodiment of the present disclosure. Figure 7 As shown, the audio editing page 710 includes at least two audio waveform segments 720. The audio waveform segments 720 correspond to the lyrics paragraphs. The audio waveform segments 720 are displayed between the lyrics panel 730 and the text control 740. The generation control 750 is displayed at the bottom of the audio editing page 710. A time option 760 is also displayed between the text control 740 and the generation control 750. In response to the selection operation for the audio waveform segment 720, the rectangular frame corresponding to the selected audio waveform segment 720 is bolded to indicate that the audio waveform segment 720 is selected.
[0090] S650: In response to an interactive operation on the generation control, generate a target audio segment according to the reference audio segment, and determine a target audio file according to the target audio segment.
[0091] The technical solution of the embodiment of the present disclosure divides the audio information into at least two audio information segments according to the lyrics structure of the preset audio file, determines the reference audio segment by selecting the audio information segment, and then generates the target audio segment according to the reference audio segment. Since the selected audio information frequency band is a continuous audio information segment, the continuity of the generated target audio segment can be ensured, thereby improving the audio generation quality.
[0092] Figure 8 This is a schematic diagram of the structure of an audio file generation device provided by an embodiment of the present disclosure. The device can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server. Figure 8 As shown, the device includes: an editing control display module 810, an editing page display module 820, an audio segment selection module 830 and an audio generation module 840.
[0093] An editing control display module 810, used to display editing controls on a play page, wherein the play page is used to play a preset audio file;
[0094] An editing page display module 820, for displaying an audio editing page in response to an interactive operation on the editing control, the audio editing page including the audio information of the preset audio file and a generation control;
[0095] An audio segment selection module 830, configured to determine a reference audio segment in the preset audio file in response to a selection operation on the audio information;
[0096] The audio generation module 840 is used to generate a target audio segment according to the reference audio segment in response to an interactive operation on the generation control, and determine a target audio file according to the target audio segment.
[0097] Optionally, the audio segment selection module 830 is specifically configured to:
[0098] In response to a drag operation on the audio information, determining a reference audio segment in the preset audio file according to an audio position corresponding to the drag operation;
[0099] The reference audio segment is played in a loop, and audio information corresponding to the reference audio segment is converted into a selected form.
[0100] Further, if the audio information is divided into at least two audio information segments based on the lyrics of the preset audio file, then in response to a drag operation on the audio information, determining a reference audio segment in the preset audio file according to an audio position corresponding to the drag operation includes:
[0101] In response to a selection operation on the audio information segment, a reference audio segment in the preset audio file is determined according to the selected audio information segment.
[0102] Optionally, the editing control display module 810 is specifically used for:
[0103] The music cover corresponding to the preset audio file is displayed on the playing page, and the editing control is displayed at a corresponding position of the music cover.
[0104] Optionally, the audio information includes an audio bar, and the editing page display module 820 is specifically used for:
[0105] In response to a click operation of the editing control, the audio editing page is displayed, and the audio editing page also includes a lyrics panel and a text control, wherein the lyrics panel is used to display the lyrics of the preset audio file, and the audio bar is located between the lyrics panel and the text control.
[0106] Optionally, it also includes:
[0107] In response to a text input operation on the text control, the lyrics panel in the audio editing page is hidden, and the positions of the audio bar and the text control are adjusted, and the target text is determined according to the text input operation, wherein the target text includes the lyrics of the target audio segment and / or the lyrics description of the target audio segment.
[0108] The audio generation module 840 is specifically used for:
[0109] In response to an interactive operation on the generating control, the target audio segment is generated according to the reference audio segment and the target text.
[0110] Furthermore, generating the target audio segment according to the reference audio segment and the target text includes:
[0111] If the target text includes a lyrics description of the target audio segment, generating target lyrics of the target audio segment according to the lyrics description;
[0112] The target audio segment is generated according to at least one musical attribute of the reference audio segment, including timbre, style, and arrangement, and the target lyrics.
[0113] Optionally, the audio editing page also includes a time option;
[0114] The device further comprises a time determination module, for determining a target time in response to a selection operation on the time option;
[0115] The audio generation module 840 is specifically used for:
[0116] In response to an interactive operation on the generation control, the target audio segment is generated according to the reference audio segment and the target time.
[0117] Optionally, the audio generation module 840 is further specifically configured to:
[0118] The reference audio segment and the target audio segment are connected to obtain the target audio file, and the target audio file is played.
[0119] The audio file generation device provided in the embodiments of the present disclosure can execute the audio file generation method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0120] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0121] Fig. 9 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig. 9 , which shows an electronic device (eg, Fig. 9 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0122] like Fig. 9 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An edit / output (I / O) interface 905 is also connected to the bus 904.
[0123] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0124] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0125] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0126] The electronic device provided by the embodiment of the present disclosure and the method for generating an audio file provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, reference can be made to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0127] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method for generating an audio file provided in the above embodiment is implemented.
[0128] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0129] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0130] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0131] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0132] Displaying editing controls on a play page, wherein the play page is used to play a preset audio file;
[0133] In response to an interactive operation on the editing control, displaying an audio editing page, the audio editing page including audio information of the preset audio file and a generation control;
[0134] In response to a selection operation on the audio information, determining a reference audio segment in the preset audio file;
[0135] In response to an interactive operation on the generating control, a target audio segment is generated according to the reference audio segment, and a target audio file is determined according to the target audio segment.
[0136] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0137] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0138] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0139] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0140] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0141] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0142] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0143] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for generating an audio file, characterized in that: include: Displaying editing controls on a play page, wherein the play page is used to play a preset audio file; In response to an interactive operation on the editing control, displaying an audio editing page, the audio editing page including audio information of the preset audio file and a generation control; In response to a selection operation on the audio information, determining a reference audio segment in the preset audio file; In response to an interactive operation on the generating control, a target audio segment is generated according to the reference audio segment, and a target audio file is determined according to the target audio segment.
2. The method according to claim 1, characterized in that The step of determining a reference audio segment in the preset audio file in response to a selection operation on the audio information includes: In response to a drag operation on the audio information, determining a reference audio segment in the preset audio file according to an audio position corresponding to the drag operation; The reference audio segment is played in a loop, and audio information corresponding to the reference audio segment is converted into a selected form.
3. The method according to claim 2, characterized in that If the audio information is divided into at least two audio information segments based on the lyrics of the preset audio file, then in response to a drag operation on the audio information, determining a reference audio segment in the preset audio file according to an audio position corresponding to the drag operation includes: In response to a selection operation on the audio information segment, a reference audio segment in the preset audio file is determined according to the selected audio information segment.
4. The method according to claim 1, characterized in that: The displaying of the editing controls on the playback page includes: The music cover corresponding to the preset audio file is displayed on the playing page, and the editing control is displayed at a corresponding position of the music cover.
5. The method according to claim 1, characterized in that The audio information includes an audio bar, and the displaying of an audio editing page in response to an interactive operation on the editing control includes: In response to a click operation of the editing control, the audio editing page is displayed, and the audio editing page also includes a lyrics panel and a text control, wherein the lyrics panel is used to display the lyrics of the preset audio file, and the audio bar is located between the lyrics panel and the text control.
6. The method according to claim 5, characterized in that Also includes: In response to a text input operation on the text control, hiding the lyrics panel in the audio editing page, adjusting the positions of the audio bar and the text control, and determining a target text according to the text input operation, wherein the target text includes the lyrics of the target audio segment and / or a lyrics description of the target audio segment; The step of generating a target audio segment according to the reference audio segment in response to an interactive operation on the generating control comprises: In response to an interactive operation on the generating control, the target audio segment is generated according to the reference audio segment and the target text.
7. The method according to claim 6, characterized in that The step of generating the target audio segment according to the reference audio segment and the target text comprises: If the target text includes a lyrics description of the target audio segment, generating target lyrics of the target audio segment according to the lyrics description; The target audio segment is generated according to at least one musical attribute of the reference audio segment, including timbre, style, and arrangement, and the target lyrics.
8. The method according to claim 1, characterized in that The audio editing page also includes time options; The method further comprises: in response to a selection operation on the time option, determining a target time; The step of generating a target audio segment according to the reference audio segment in response to an interactive operation on the generating control comprises: In response to an interactive operation on the generation control, the target audio segment is generated according to the reference audio segment and the target time.
9. The method according to claim 1, characterized in that: The step of determining a target audio file according to the target audio segment comprises: The reference audio segment and the target audio segment are connected to obtain the target audio file, and the target audio file is played.
10. A device for generating an audio file, characterized in that: include: An editing control display module, used to display editing controls on a play page, wherein the play page is used to play a preset audio file; An editing page display module, used for displaying an audio editing page in response to an interactive operation on the editing control, the audio editing page including audio information of the preset audio file and a generation control; an audio segment selection module, configured to determine a reference audio segment in the preset audio file in response to a selection operation on the audio information; The audio generation module is used to generate a target audio segment according to the reference audio segment in response to an interactive operation on the generation control, and determine a target audio file according to the target audio segment.
11. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating an audio file as described in any one of claims 1 to 9.
12. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the method for generating an audio file as described in any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method for generating an audio file according to any one of claims 1 to 9.
Citation Information
Patent Citations
Audio production method and device, equipment and storage medium
CN111899706A
Music work generation method and device thereof, music work synthesis method and device, equipment, medium and product
CN113611268A
Song creation method and related equipment
CN113838445A
Audio editing method, electronic equipment and storage medium
CN114023301A
Information processing method and device, electronic equipment and storage medium
CN115065840A