Sound effect processing method and device, electronic equipment, storage medium and program product
By language encoding and code conversion of the sound effect description text input by the user, the target sound effect is generated, which solves the problem of low retrieval efficiency of the existing sound effect library, realizes the rapid generation and efficient acquisition of sound effects, and expands the scope of application.
Patent Information
- Application Number
- CN202410802539.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-10-18
AI Technical Summary
In the production process of audio dramas, the sound effect retrieval method of the existing sound effects library is inefficient, making it difficult for users to accurately find suitable sound effects, resulting in high time costs and low efficiency.
By obtaining the sound effect description text input by the user, language encoding and encoding conversion are performed to generate the target sound effect, avoiding the complex conversion directly from text to audio, and using low-dimensional representation of language and sound for conversion and generation.
It realizes the simple and fast generation of sound effects, saves time costs, improves the efficiency of sound effect acquisition, expands the scope of application, and avoids the limitations caused by the lack of corresponding sound effects in the sound effects library.
Smart Images

Figure CN118797094A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of audio processing, and in particular to a sound effect processing method and device, electronic equipment, storage medium and program product. Background Art
[0002] Appropriate sound effects in audio dramas will enhance the sense of atmosphere. For example, when reading "thunder appeared in the sky", if there is thunder in the background sound, it will increase the user's sense of immersion and indirectly improve the quality of the audio drama. At present, the way to insert sound effects in the production process of audio dramas is relatively simple. Users can only purchase a sound effect library, search for sound effects in the sound effect library to select the appropriate sound effect, and then manually insert it at the appropriate location. However, the sound effect library generally describes the sound effects in textual form such as text and labels. It takes a lot of effort for users to search for sound effects in the sound effect library, and it is difficult to accurately find the appropriate sound effect. Repeated audition is required, which is time-consuming and inefficient. Summary of the invention
[0003] The present disclosure provides a sound effect processing method and device, electronic device, storage medium and program product, which are used to generate sound effects based on sound effect description text, circumvent the sound effect retrieval process and avoid the low efficiency caused by it.
[0004] In a first aspect, the present disclosure provides a sound effect processing method, comprising:
[0005] Get the sound effect description text entered by the user;
[0006] Encoding the sound effect description text to obtain language encoding data;
[0007] Performing code conversion on the language code data to obtain sound code data;
[0008] Decoding the sound coding data to obtain a target sound effect;
[0009] In response to receiving the audition request, the target sound effect is played.
[0010] In a second aspect, the present disclosure provides a sound effect processing device, comprising:
[0011] An acquisition unit, used to acquire a sound effect description text input by a user;
[0012] A language encoding unit, used for encoding the sound effect description text to obtain language encoding data;
[0013] A code conversion unit, used for performing code conversion on the language code data to obtain sound code data;
[0014] A sound decoding unit, used for decoding the sound coding data to obtain a target sound effect;
[0015] The output unit is used to play the target sound effect in response to receiving the audition request.
[0016] In a third aspect, the present disclosure provides an electronic device, comprising: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions so that the electronic device executes the method as described in any embodiment of the first aspect.
[0017] In a fourth aspect, the present disclosure provides a non-transitory computer-readable storage medium for storing computer-readable instructions, which, when executed by a processor, causes the processor to execute the method described in any embodiment of the first aspect.
[0018] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in any embodiment of the first aspect.
[0019] The present disclosure provides a sound effect processing method and device, electronic device, storage medium and program product. The present disclosure first obtains the sound effect description text input by the user, then performs language encoding on the sound effect description text, and then converts the language encoding data (i.e., the encoding data of the text data) into sound encoding (i.e., the encoding data of the audio data) through encoding conversion processing, and then decodes the sound encoding data to obtain the target sound effect. In this process, the text is not directly used to generate the audio, but a lower dimensional representation (encoding data) of the language (text) and the sound is used to realize the conversion and generation between the two, avoiding the problem that the audio data volume is too large to generate, and realizing the simple and fast generation of the target sound effect. Furthermore, if the user has an audition demand, the target sound effect can also be played in response to the received audition request. Furthermore, if the user is not satisfied with the generated target sound effect, the target sound effect can be regenerated until the sound effect that satisfies the user is obtained. On the whole, the present invention does not adopt the existing sound effect library retrieval method to obtain sound effects, but generates sound effects based on sound effect description text. Compared with the existing technology, the present invention avoids dependence on the existing sound effect library, and also avoids the complex sound effect retrieval process in the sound effect library. It can effectively save time cost, improve the efficiency of sound effect acquisition and subsequent application efficiency. Moreover, this method can generate any sound effect, avoiding the limitation of inability to apply due to the lack of corresponding sound effects in the sound effect library, and has a wider range of applications.
[0020] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0022] Figure 1 A flowchart of a sound effect processing method provided by an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of a sound effect generation interface provided by an embodiment of the present disclosure;
[0024] Figure 3 A model relationship diagram of the sound effect processing method provided in the embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram of an audition interface provided by an embodiment of the present disclosure;
[0026] Figure 5 A schematic diagram of a human-computer interaction process of a publicly provided sound effect processing method;
[0027] Figure 6 A structural block diagram of a signal transmission device provided in an embodiment of the present disclosure;
[0028] Figure 7 A hardware block diagram of an electronic device provided in an embodiment of the present disclosure;
[0029] Figure 8 A schematic diagram of a computer-readable storage medium provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0031] The present disclosure provides a sound effect processing solution, which can be applied to any application scenario that uses sound effects. Exemplarily, the present disclosure can be applied to an audio book production scenario, specifically, the present disclosure can be used to generate sound effects corresponding to the corresponding text, and then used in audio book production to generate an audio book file. Exemplarily, the present disclosure can also be specifically applied to game scenarios, specifically, background sound effects in specific game scenarios can be generated based on game scripts. Exemplarily, the present disclosure can also be applied to sound effect generation in performance scenarios such as dramas, stage plays, and theaters (such as 4D theaters). This list is not exhaustive.
[0032] In addition, the sound effect processing solution provided by the present disclosure can be applied as an application APP, or as a plug-in or applet in an application, and the present disclosure has no special restrictions on its form of expression. The execution subject of the sound effect processing solution provided by the present disclosure can be any electronic device, such as a terminal, a computer, a tablet computer, a smart home device, a smart wearable device, an audio and video playback device, etc., without exhaustive or redundant description.
[0033] Hereinafter, this scheme will be described in detail.
[0034] This disclosure provides a method for processing sound effects. Figure 1 , Figure 1 The following is a flow chart of a sound effect processing method provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes:
[0035] S102: Obtain the sound effect description text input by the user.
[0036] In this disclosure, the sound effect description text refers to the text that describes the semantic information of the sound effect, specifically used to describe what kind of sound effect the user wants to get. Figure 2 , Figure 2 A schematic diagram of a sound effect generation interface provided by an embodiment of the present disclosure, such as Figure 2 As shown, the sound effect description text may be: There is a breeze blowing over the hill. The present disclosure has no particular restrictions on the level of detail of the sound effect description text, nor on the number of words in the sound effect description text. In actual scenarios, the sound effect description text may be customized by the user, for example, it may be actively input by the user; or, the sound effect description text may be automatically identified from the sound effect description text in the target file input (for example, uploaded or selected) by the user, wherein the target file may include but is not limited to any form of file such as songs, videos, novels, poems, etc. Taking lyrics as an example, if "thunder appeared in the sky" appears in a certain line of lyrics, the user can directly specify the lyrics, for example, in the following example: Figure 2The lyrics can be input in the interactive interface shown; alternatively, the user can also input the lyrics of an entire paragraph or a whole song, and even in some possible embodiments, the user can input the song title, and the present solution can automatically retrieve the corresponding lyrics based on the song title, and further automatically recognize the sound effect description text of the lyrics to identify the lyrics.
[0037] S104, encoding the sound effect description text to obtain language encoding data.
[0038] In the present disclosure, a direct generation method from text to audio is not adopted, but the text is encoded with low-dimensional features, thereby generating sound encoding data based on language encoding data, and completing the generation and conversion of text to audio in the form of lower-dimensional encoding data. Therefore, after obtaining the sound effect description text, it is encoded (also referred to as text encoding processing, first encoding processing) to obtain a low-dimensional feature form of the sound effect description text: language encoding data (also referred to as language encoding features). In other words, language encoding data is a low-dimensional feature expression form of text data (such as sound effect description text), and the content it expresses is consistent with the content expressed by the text data.
[0039] In actual implementation scenarios, the present disclosure has no particular restrictions on the specific processing form of text encoding processing, and any form that can encode text can implement this solution.
[0040] In an exemplary implementation, this step can be implemented using a pre-trained language encoding model, the input of which is text data, and the output is encoding data corresponding to the text data, which is used to map the input text data to language encoding data, and further, to convert the text data into a low-dimensional feature expression. Therefore, in a specific implementation, it is only necessary to input the sound effect description text into the language encoding model to obtain the language encoding data output by the language encoding model. In addition, the model architecture of the language encoding model can be multiple, for example, the open source large language model Flan-T5 can be used.
[0041] In addition to these, in other embodiments, this step may also be implemented by some text encoding algorithms, which may include but are not limited to at least one of the following: One-Hot encoding, Bag of Words (BoW) encoding, Word Embeddings encoding, N-gram encoding, etc., without exhausting the list.
[0042] S106, performing code conversion on the language code data to obtain sound code data.
[0043] In the present disclosure, the sound coding data is a low-dimensional feature expression form of audio data. Based on the encoding and decoding process, the high-dimensional feature expression of audio data can be encoded into a low-dimensional feature expression form, and vice versa, the low-dimensional feature expression form can be decoded to obtain the corresponding audio data. In this step, the corresponding audio data (specifically sound effects in the present disclosure scenario) can be obtained by decoding the sound coding data.
[0044] It should be understood that the expression of audio in a computer is very complex. For example, the data volume of a 10-second audio data can be as high as 1M. Therefore, it is very difficult and complicated to directly generate audio data (i.e., target sound effect) using language coding data. Based on this, the present disclosure creatively uses lower-dimensional sound coding data for transition, first generates sound coding data, and then decodes it to achieve the effect of generating the target sound effect.
[0045] In actual implementation scenarios, due to the different data forms and encoding methods of the initial data (text, sound), the encoding data of the text data (i.e., language encoding data) and the encoding data of the audio data (i.e., sound encoding data) are also different. In actual scenarios, if you want to perform encoding conversion between the two, from text-form encoding data to audio-form encoding data, there are many ways to implement it. For example, you can analyze the encoding features of the two encoding data and establish a mapping relationship between the two, so as to convert the language encoding data into sound encoding data. This encoding conversion can be achieved through technologies such as neural network models.
[0046] In an exemplary embodiment, this step can also be implemented using a pre-trained sound generation model (there is no special restriction on the name, for example, it can also be called: language sound correspondence model, encoding conversion model, etc., not exhaustive). Specifically, the input of the sound generation model is language encoding data, and the output is sound encoding data. The sound generation model is used to implement the encoding conversion of language encoding data to sound encoding data. In other words, the sound generation model can be used to output matching sound encoding data based on the input language encoding data. When implementing this step specifically, the following steps may be included: inputting the language encoding data into a pre-trained sound generation model, and obtaining the sound encoding data output by the sound generation model. Before the sound generation model is specifically used to implement this step, it needs to be trained in advance, and the training method of the sound generation model will be described in detail later. Compared with the complex scheme of directly generating the target sound effect from the language encoding data, the output of the sound generation model is lower-dimensional sound encoding data, the amount of data to be generated is lower, the requirement for training data is relatively low, and the implementation is relatively simple.
[0047] It should be noted that the present disclosure has no special restrictions on the number of sound coding data generated. In actual scenarios, one sound coding data can be generated based on one language coding data, or multiple sound coding data can be generated based on one language coding data. In the present disclosure, the output of the aforementioned sound generation model can be one or more sound coding data. Therefore, for a scenario where one language coding data generates multiple sound coding data, if the sound generation model outputs one sound coding data at a time, S106 can be repeatedly executed multiple times to generate multiple sound coding data, thereby obtaining multiple target sound effects; or, if the sound generation model outputs multiple sound coding data at a time, S106 can be executed once to obtain multiple sound coding data, thereby obtaining multiple target sound effects.
[0048] S108, decoding the sound coding data to obtain the target sound effect.
[0049] In this step, the decoding is actually performed in a manner corresponding to the sound coding manner, so that the corresponding audio can be restored. There are also multiple ways to implement this step.
[0050] In an exemplary embodiment, this step can also be implemented using a pre-trained sound decoding model. Specifically, the input of the sound decoding model is sound coding data, and the output is audio data, which is used to map the input sound coding data to audio data. When implementing this step specifically, the following steps may be included: input the sound coding data into a pre-trained sound decoding model, and obtain the audio data output by the sound decoding model, that is, obtain the target sound effect. In addition, the model architecture of the sound decoding model can be multiple. For example, a variational autoencoder (VAE) architecture can be used. The VAE architecture can learn an effective low-dimensional representation of a complex input, can adapt to the encoding and decoding process of audio data, has high encoding and decoding accuracy, good data restoration, and good effect.
[0051] In addition, it should be understood that if S106 and S108 are both implemented in the form of models, the output of the sound generation model adopted by S106 is the input of the sound decoding model adopted by S108, and the two are consistent in form.
[0052] In addition to these embodiments, this step may also be implemented by some audio decoding algorithms, which may include but are not limited to at least one of the following: pulse code modulation (PCM) decoding, adaptive differential pulse (ADPCM) decoding, etc., which will not be elaborated herein.
[0053] It should be noted that decoding corresponds to encoding. In actual implementation scenarios, the sound generation model used in S106 also needs to encode the training samples (i.e., sound effect samples) during training. In this way, in specific implementation, the way of encoding the sound effect samples corresponds to the decoding method of this step, which will achieve better generation results. For example, if a sound decoding model is used for decoding, then the sound effect samples will be better decoded by using the corresponding sound encoding model; for another example, if PCM decoding is used, then the sound effect samples will be better decoded by using the corresponding PCM encoding method, and the examples are not exhaustive.
[0054] S110, in response to receiving the audition request, playing the target sound effect.
[0055] After the target sound effect is generated, the present disclosure further provides a function of auditioning the target sound effect. Figure 4 The audition control is triggered (e.g., clicked) on the audition interface to initiate an audition request. Thus, after receiving the audition request, the target sound effect can be directly played, allowing the user to quickly audition whether the currently generated target sound effect is the sound effect the user wants. Furthermore, if the user is not satisfied with the generated target sound effect, the target sound effect can be regenerated using this solution until a sound effect that satisfies the user is obtained.
[0056] In summary, the present disclosure first obtains the sound effect description text input by the user, then performs language encoding on the sound effect description text, and then converts the language encoding data (i.e., the encoding data of the text data) into sound encoding (i.e., the encoding data of the audio data) through encoding conversion processing, and then decodes the sound encoding data to obtain the target sound effect. In this process, the text is not directly used to generate the audio, but a lower dimensional representation (encoding data) of the language (text) and the sound is used to realize the conversion and generation between the two, avoiding the problem that the audio data volume is too large to generate, and realizing the simple and fast generation of the target sound effect. Furthermore, if the user has an audition demand, the target sound effect can also be played in response to the received audition request. Furthermore, if the user is not satisfied with the generated target sound effect, the target sound effect can be regenerated until the sound effect that satisfies the user is obtained. On the whole, the present invention does not adopt the existing sound effect library retrieval method to obtain sound effects, but generates sound effects based on sound effect description text. Compared with the existing technology, the present invention avoids dependence on the existing sound effect library, and also avoids the complex sound effect retrieval process in the sound effect library. It can effectively save time cost, improve the efficiency of sound effect acquisition and subsequent application efficiency. Moreover, this method can generate any sound effect, avoiding the limitation of inability to apply due to the lack of corresponding sound effects in the sound effect library, and has a wider range of applications.
[0057] The following is a detailed description of the training process of the sound generation model, which may include the following steps:
[0058] S2, obtain training samples.
[0059] The training samples of the sound generation model include: sound effect samples and description samples. The description samples can be specifically text data that describes the semantics of the sound effect samples. In the specific implementation scenario, the sound effect samples can be collected and obtained by the user, or they can come from a sound effect library, and the sound generation model can be trained using the existing sound effect library. The description samples can come from a custom description of the sound effect library or the sound effect source, or the sound effect samples can be described by listening to the sound effects, or the semantic model can be used to perform semantic analysis on the sound effect samples to obtain the description samples, without exhausting them.
[0060] In addition, the present disclosure has no particular restrictions on the number of sound effect samples, but it should be understood that the more sound effect samples there are, the better the training effect, the more the sound encoding data generated by the model matches the language encoding data, and the better the user experience. For example, the number of sound effect samples can be more than 10,000.
[0061] S4, encode the sound effect sample to obtain a sound encoding sample.
[0062] Before conducting specific model training, the sound effect samples need to be encoded (or called audio encoding) in advance to obtain the sound encoding samples corresponding to each sound effect sample. In the present disclosure, there are also multiple ways to encode the sound effect samples, which may include but are not limited to at least one of the following: sound coding model, PCM, ADPCM, etc., which are not exhaustive.
[0063] In addition, as mentioned above, if the encoding method corresponding to the decoding method described in S108 is used for encoding, it is more conducive to improving the matching degree between the sound effect and the description, and the effect is better. For example, if S108 uses the sound decoding model for decoding, this step can use the sound encoding model for encoding.
[0064] Specifically, the model architecture of the sound coding model and the sound decoding model involved in the present disclosure can be consistent (for example, both can adopt the VAE architecture), and the input and output of the two models are opposite and the format is consistent. Based on this, the input of the sound coding model used here is audio data (corresponding to the application here, it is the sound effect sample), and the output is sound coding data (corresponding to the application here, it is the sound coding sample). Exemplarily, if the sound coding model adopts the VAE architecture, the sound can be compressed into a low-dimensional data representation through the Transformer module.
[0065] S6, encode the description sample to obtain a language encoding sample.
[0066] In the specific implementation, the implementation method here is consistent with S104 and will not be described in detail.
[0067] S8, using the sound coding samples and the language coding samples, the initial model is trained to obtain a sound generation model.
[0068] It should be understood that the architecture of the initial model is consistent with that of the sound generation model, and the present disclosure has no particular limitation on its architecture. The parameters of the initial model can be arbitrarily customized or default parameters, and the parameters in the initial model are adjusted and corrected through the model training process to obtain the final sound generation model.
[0069] Specifically, the adjustment of the parameters of the initial model can be achieved based on a preset loss function, and the goal of the loss function is to make the model output data infinitely close to the sample data by adjusting the parameters. In other words, the sound generation model can be trained using the target loss function conditions and training samples, wherein the target loss function is used to constrain the predicted data output by the model to be as similar as possible to the actual sample.
[0070] In the specific implementation process, there may be multiple rounds of training processes until a preset training termination condition is reached. The following is an example of one round of training.
[0071] In any round of training, the language coding sample (for the sake of convenience, it is recorded as Feature L, and its corresponding sound coding sample is recorded as Feature A) is input into the current model (i.e., the language generation model of the current training round), and the sound coding data output by the current model is obtained (for the sake of convenience, it is recorded as Feature B). After that, the loss function is calculated based on Feature A and Feature B of each training sample. Therefore, if the loss function meets the aforementioned training termination condition, the training is terminated, and the model of the current round is the sound generation model obtained by training; conversely, if the loss function does not meet the aforementioned training termination condition, the parameters of the current model are adjusted, and the next round of training is entered.
[0072] In the training process, the target loss function is used to constrain the predicted data output by the model to be as similar as possible to the actual sample, that is, to make Feature A and Feature B as similar as possible. Therefore, the preset training termination condition can also be whether the value of the loss function reaches a preset range. In the actual implementation scenario, there are many ways to implement the loss function. For example, the present disclosure provides a possible implementation of the loss function. Please refer to the following formula:
[0073]
[0074] Among them, Loss represents the loss function, N represents the output dimension of the sound generation model, FeatureA represents the sound coding sample, and FeatureB represents the sound coding data output by the model.
[0075] Based on the above processing, the present disclosure provides a preferred embodiment of the present disclosure. At this time, you can refer to Figure 3 , Figure 3 A model relationship diagram of the sound effect processing method provided in the embodiment of the present disclosure, such as Figure 3 As shown, the language sound model is the sound generation model mentioned in the previous text of the present disclosure, and the language model is the language encoding model mentioned in the previous text.
[0076] like Figure 3 As shown, the sound effect processing method includes two stages, the first stage is: the training stage of the language sound corresponding model, and the second stage is: the application stage of the language sound model. It should be understood that the two stages are independent of each other and do not need to be used in combination.
[0077] In the first stage, you can refer to Figure 3 The blue arrow in the figure and the black arrow on the right side describe some steps, and the method includes steps 1) to 3), which are as follows:
[0078] Step 1) using a pre-trained sound coding model to encode the sound effect sample to obtain a sound coding sample;
[0079] Step 2) Use the pre-trained language encoding model (i.e. Figure 3 The language model in the above example is used to encode the sound effect description information corresponding to the sound effect sample to obtain a language encoding sample;
[0080] Step 3) Use the sound coding samples and language coding samples to train the initial model and obtain the sound generation model (i.e. Figure 3 The language sound correspondence model in .
[0081] In the second stage, you can refer to Figure 3 All the steps described by the black arrows in FIG. 4 , the method includes steps 4) to 6), which are specifically as follows:
[0082] Step 4) Use the pre-trained language encoding model (i.e. Figure 3 The language model in the above example is used to encode the sound effect description text to obtain language encoding data;
[0083] Step 5) Use the pre-trained sound generation model (i.e. Figure 3 The language coding data is converted and processed by the language sound corresponding model in the text file to obtain the sound coding data;
[0084] Step 6) Use the pre-trained sound decoding model to decode the sound encoding data to obtain the target sound effect.
[0085] In summary, the present disclosure can achieve the generation of target sound effects. Compared with the prior art, the present disclosure avoids the process of complex sound effect retrieval in the sound effect library, can effectively save time costs, and improve the efficiency of sound effect acquisition and subsequent application efficiency. Moreover, this method can generate any sound effect, avoiding the limitation of being unable to apply due to the lack of corresponding sound effects in the sound effect library, and has a wider range of applications.
[0086] The following briefly describes the application of the sound effect processing method provided by the present disclosure.
[0087] As mentioned above, the present disclosure can be implemented in the form of an application, a plug-in or a small program to generate a target sound effect that meets the user's needs. In this case, the present disclosure can also provide a specific human-computer interaction method for the user to conveniently operate to implement the present solution.
[0088] In an exemplary embodiment, before executing S104 of any of the above embodiments, that is, before encoding the sound effect description text, the method further includes:
[0089] Displaying a sound effect generation interface, which includes a sound effect description input interactive area and a sound effect generation control;
[0090] In response to the triggering operation of the sound effect generation control, the sound effect description text input by the user in the sound effect description input interaction area is obtained.
[0091] In the present disclosure, the input interaction area may include but is not limited to an input box, and the form in which the user inputs the sound effect description text in the input interaction area is not limited to the typing input method. For example, the user can also input the sound effect description text by taking a screenshot, taking a photo, or other image acquisition method. For another example, the user can also input the sound effect description text by selecting from the candidate items. The present disclosure has no special restrictions on the input interaction area and the input form, and the actual scene can be customized and the design is not exhaustive.
[0092] For example, you can return to the reference Figure 2 . In Figure 2 The sound effect generation interface shown includes a sound effect description input box 21 (i.e., a form of the input interaction area mentioned above), and the sound effect description input box 21 allows the user to input a sound effect description text, i.e., a description text of the sound effect. Figure 2 As shown, the interface also includes a sound effect generation control 22, Figure 2 It is represented by a "click to generate sound effect" button. In this way, the user can click the button after entering the sound effect description text. The triggering operation of the sound effect processing method of the present invention then obtains the sound effect description text entered by the user and starts executing the sound effect processing method shown in any of the aforementioned embodiments without repeating it.
[0093] In addition, as mentioned above, the present disclosure may further include the functions of obtaining lyrics and recognizing sound effect description texts. Figure 2 For example, a user can enter a song title in the sound effect description input box 21. Before executing the sound effect processing method shown in any of the foregoing embodiments of the present disclosure, it is necessary to obtain the corresponding lyrics text based on the song title, further identify the sound effect description text in the lyrics text, and execute this solution based on the identified sound effect description text.
[0094] In a possible embodiment of the present disclosure, after the user touches the sound effect generation control, the interface jump can be automatically completed to enter the display interface of the target sound effect, such as the audition interface.
[0095] Alternatively, in a further embodiment, a generation prompt control may be further displayed on the sound effect generation interface, and the generation prompt control is used to remind the user that the target sound effect has been generated. The user can touch the control to jump to the interface, so as to process the target sound effect on the audition interface after the jump, for example, audition, save, regenerate, etc. Figure 2 The generation prompt control 23 shown includes: a text prompt part (prompting the user "generation completed, click to confirm and experience the tone") and a touch part for user operation ("Confirm" button). If the user clicks the "Confirm" button, the audition interface can be entered.
[0096] In the embodiment of the present disclosure, the method may further include:
[0097] Outputting an audition interface, the audition interface including: at least one target sound effect, an audition control, a save control, and a regenerate control;
[0098] In response to the triggering operation of the audition control, the target sound effect is played (corresponding to S110 above);
[0099] In response to a triggering operation of the save control, saving the target sound effect;
[0100] In response to a triggering operation of the regeneration control, the target sound effect is regenerated based on the sound effect description text.
[0101] At this time, you can refer to Figure 4 , Figure 4 Schematic diagram of an audition interface provided by an embodiment of the present disclosure. Figure 4As shown, the interface displays three target sound effects 41, and displays the audition control 42, the save control 43, and the regeneration control 44 corresponding to each target sound effect. It should be understood that if the user clicks the audition control 42 corresponding to each sound effect, the sound effect can be played; if the user clicks the save control 43, the target sound effect can be saved in the default location or customized; if the user is not satisfied with the three target sound effects, the user can click the regeneration control 44, at which time, the related processing of the aforementioned sound effect generation can be re-executed, such as Figure 1 The method shown in the illustrated embodiment is used to regenerate the target sound effect and update the display interface.
[0102] It should be understood that the present disclosure can be repeatedly executed, and each time the sound effect processing method is executed, one or more target videos can be generated. In this way, only one target video can be displayed at a time on the audition interface, or multiple target videos can be displayed at a time. Figure 4 In the case shown, multiple target videos are displayed at one time. The multiple target videos can be generated by executing step S108 multiple times based on the same language encoding data.
[0103] In addition, it should be noted that Figure 2 , Figure 4 The layout and presentation of the human-computer interaction interface shown are schematic, and the present disclosure has no particular restrictions on these. The naming and layout can be customized in actual scenarios.
[0104] The following, combined Figure 5 To describe the human-computer interaction process of the entire sound processing process. Figure 5 A schematic diagram of a human-computer interaction process of a publicly available sound effect processing method. Figure 5 As shown, the specific implementation may include the following steps: First, the user can enter a text description of the required sound effect. Figure 2 In the display interface shown in FIG. 1 , input “There is a breeze blowing over the hill”. Based on the user operation, the sound effect description text can be obtained. Then, three different versions of the sound effect are generated according to the user's description. For specific implementation, please refer to the above text as Figure 1 The sound effect processing method is not described here. Afterwards, the sound effect is presented to the user through the page. Figure 4 The display interface shown. Afterwards, the user can audition the three versions of the sound effects displayed on the interface. By auditioning, the user can select the most suitable sound effect from the three versions and save it; if the sound effects of the three versions are not satisfactory, it is determined that adjustments are needed. At this time, the sound effects are regenerated until the user is satisfied.
[0105] In addition to the aforementioned method, the sound effect processing method provided by the present disclosure can be further directly used for video (e.g., audio drama) generation. In an exemplary embodiment, the method can also include: generating a sound effect video based on the target sound effect and the sound effect description text; or inserting the target sound effect into the candidate video to generate a sound effect video.
[0106] In one embodiment, generating a sound effect video based on a target sound effect and a sound effect description text means that the target sound effect and the sound effect description text (or the source text to which the sound effect description text belongs, such as the song text corresponding to a certain line of lyrics) can be combined to generate a sound effect video containing the target sound effect and the sound effect description text. The image in the video is generated based on the sound effect description text, and the audio in the video contains the target sound effect. The image of the video can be a direct visualization of the text, or an image that conforms to the semantics of the text can be generated using image generation technology.
[0107] In another embodiment, inserting the target sound effect into the candidate video to generate the sound effect video means inserting the target sound effect into any video that does not contain the target sound effect to obtain the sound effect video containing the target sound effect. This can be specifically a scene of audio drama production, where the background sound effect (such as thunder, rain, etc.) corresponding to a certain sentence of text is inserted into the production video of the audio drama, and finally the audio drama video containing the background sound effect is obtained.
[0108] In summary, the present invention conducts human-computer interaction with users through the front end, allowing users to freely input (input method is not limited) the sound effects they want, so that the back end can automatically generate sound effects of the corresponding effects. Moreover, the front end can further conduct human-computer interaction with users and provide audition and playback services to enhance the sound effect generation experience. It is user-friendly and easy to use for users, and the user experience is good.
[0109] The present disclosure also provides a sound effect processing device. Figure 6 A structural block diagram of a signal transmission device provided in an embodiment of the present disclosure, such as Figure 6 As shown, the sound effect processing device 600 includes:
[0110] The acquisition unit 610 is used to acquire the sound effect description text input by the user;
[0111] A language encoding unit 620, used to encode the sound effect description text to obtain language encoding data;
[0112] The code conversion unit 630 is used to perform code conversion on the language code data to obtain sound code data;
[0113] The sound decoding unit 640 is used to decode the sound coding data to obtain a target sound effect;
[0114] The output unit 650 is configured to play the target sound effect in response to receiving the audition request.
[0115] In an exemplary embodiment, the encoding conversion unit 630 is specifically used to: input the language encoding data into a pre-trained sound generation model, and obtain the sound encoding data output by the sound generation model; wherein the sound generation model is used to implement encoding conversion from language encoding data to sound encoding data.
[0116] In an exemplary embodiment, the sound effect processing device 600 further includes a training unit ( Figure 6 (not shown), the training unit is specifically used for:
[0117] Using a pre-trained sound coding model to encode the sound effect sample to obtain a sound coding sample;
[0118] Using a pre-trained language coding model to encode the sound effect description information corresponding to the sound effect sample to obtain a language coding sample;
[0119] The sound coding samples and the language coding samples are used to perform model training on the initial model to obtain the sound generation model.
[0120] In an exemplary embodiment, the training unit is specifically configured to:
[0121] The sound generation model is trained using a target loss function and training samples; wherein the target loss function is used to constrain the predicted data output by the model to be as similar as possible to the actual samples.
[0122] In an exemplary embodiment, the sound effect processing device 600 further includes a human-computer interaction unit ( Figure 6 (not shown), the human-computer interaction unit is specifically used for:
[0123] Before encoding the sound effect description text, displaying a sound effect generation interface, the sound effect generation interface including a sound effect description input interaction area and a sound effect generation control;
[0124] In response to the triggering operation of the sound effect generation control, the sound effect description text input by the user in the sound effect description input interaction area is obtained.
[0125] In an exemplary embodiment, the sound effect processing device 600 further includes a human-computer interaction unit ( Figure 6 (not shown), the human-computer interaction unit is specifically used for:
[0126] Outputting an audition interface, the audition interface comprising: at least one of the target sound effects, an audition control, a save control, and a regenerate control;
[0127] In response to a triggering operation of the audition control, playing the target sound effect;
[0128] In response to the triggering operation of the save control, saving the target sound effect;
[0129] In response to the triggering operation of the regeneration control, the target sound effect is regenerated based on the sound effect description text.
[0130] In an exemplary embodiment, the sound effect processing device 600 further includes a video generation unit ( Figure 6 (not shown), the video generation unit is specifically used for:
[0131] Generate a sound effect video based on the target sound effect and the sound effect description text; or,
[0132] Insert the target sound effect into the candidate video to generate the sound effect video.
[0133] Figure 7 A hardware block diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device 700 according to an embodiment of the present disclosure includes at least a processor; and a memory for storing computer-readable instructions. When the computer-readable instructions are loaded and executed by the processor, the processor executes the sound effect processing method described in any of the above embodiments of the present disclosure.
[0134] Figure 7 The electronic device 700 shown specifically includes: a central processing unit (CPU) 701, a graphics processing unit (GPU) 702 and a memory 703. These units are interconnected via a bus 704. The central processing unit (CPU) 701 and / or the graphics processing unit (GPU) 702 can be used as the above-mentioned processor, and the memory 703 can be used as the above-mentioned memory for storing computer-readable instructions. In addition, the electronic device 700 may also include a communication unit 705, a storage unit 706, an output unit 707, an input unit 708 and an external device 709, which are also connected to the bus 704.
[0135] Figure 8 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure. Figure 8As shown, a computer-readable storage medium 800 according to an embodiment of the present disclosure has computer-readable instructions 801 stored thereon. When the computer-readable instructions 801 are executed by the processor, the sound effect processing method described with reference to the above figures according to any of the foregoing embodiments of the present disclosure is executed. The computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may, for example, include random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.
[0136] The present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the sound effect processing method described in any of the foregoing embodiments of the present disclosure.
[0137] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0138] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0139] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0140] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0141] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0142] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0143] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0144] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A sound effect processing method, characterized in that: include: Get the sound effect description text entered by the user; Encoding the sound effect description text to obtain language encoding data; Performing code conversion on the language code data to obtain sound code data; Decoding the sound coding data to obtain a target sound effect; In response to receiving the audition request, the target sound effect is played.
2. The method according to claim 1, characterized in that The step of converting the language coding data to obtain the sound coding data comprises: The language coding data is input into a pre-trained sound generation model, and the sound coding data output by the sound generation model is obtained; wherein the sound generation model is used to implement coding conversion from language coding data to sound coding data.
3. The method according to claim 2, characterized in that The method further comprises: Using a pre-trained sound coding model to encode the sound effect sample to obtain a sound coding sample; Using a pre-trained language coding model to encode the sound effect description information corresponding to the sound effect sample to obtain a language coding sample; The sound coding samples and the language coding samples are used to perform model training on the initial model to obtain the sound generation model.
4. The method according to any one of claims 1 to 3, characterized in that: Before encoding the sound effect description text, the method further includes: Displaying a sound effect generation interface, the sound effect generation interface including a sound effect description input interaction area and a sound effect generation control; In response to a triggering operation of the sound effect generation control, obtaining the sound effect description text input by the user in the sound effect description input interaction area; Outputting an audition interface, the audition interface comprising: at least one of the target sound effects, an audition control, a save control, and a regenerate control; In response to a triggering operation of the audition control, playing the target sound effect; In response to the triggering operation of the save control, saving the target sound effect; In response to the triggering operation of the regeneration control, the target sound effect is regenerated based on the sound effect description text.
5. The method according to claim 2, characterized in that: The method further comprises: The sound generation model is trained using a target loss function and training samples; wherein the target loss function is used to constrain the predicted data output by the model to be as similar as possible to the actual samples.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Generate a sound effect video based on the target sound effect and the sound effect description text; or, Insert the target sound effect into the candidate video to generate the sound effect video.
7. A sound effect processing device, characterized in that: include: An acquisition unit, used to acquire a sound effect description text input by a user; A language encoding unit, used for encoding the sound effect description text to obtain language encoding data; A code conversion unit, used for performing code conversion on the language code data to obtain sound code data; A sound decoding unit, used for decoding the sound coding data to obtain a target sound effect; The output unit is used to play the target sound effect in response to receiving the audition request.
8. An electronic device, characterized in that: include: a memory for storing computer readable instructions; as well as A processor is used to run the computer-readable instructions so that the electronic device executes the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium for storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Speech generation method and device based on pre-training language model, equipment and medium
CN116364055A
Sound effect audio generation method and device of audio book and readable storage medium
CN117059106A
Cited By
Model generation method, sound effect description generation method, equipment, medium and product
CN119274588A
Model generation method, sound effect description generation method, device, medium and product
CN119274588B
Audio content generation method, related device, equipment and storage medium
CN119811357A
Music playing method and device, model training method and device, network equipment and medium
CN120673728A
Sound effect generation method and device and electronic equipment
CN120853546A
