Audio generation method and device, equipment and storage medium

By introducing discrete audio features into the TTA model and combining a large language model and a latent diffusion model, the problem of low text-to-audio matching degree is solved, and higher audio generation accuracy is achieved.

CN118887940APending Publication Date: 2024-11-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411078762.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

Existing TTA models suffer from low matching between output audio and input text during text-to-audio conversion because text and audio belong to two different modalities.

Method used

Discrete audio features are introduced as intermediate feature representations between textual description information and audio data. By combining a large language model and a latent diffusion model, the gap between textual description information and audio data is bridged.

Benefits of technology

This improved the matching degree between the model's output audio and the input text, thereby enhancing the accuracy of audio generation from text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887940A_ABST
    Figure CN118887940A_ABST
Patent Text Reader

Abstract

The invention provides an audio generation method and device, equipment and a storage medium, and the method comprises the steps: inputting target text description information into a pre-trained large language model, and obtaining a target discrete audio feature which is outputted by the large language model and is matched with the target text description information; and inputting the target discrete audio feature into a pre-trained potential diffusion model to obtain a target audio output by the potential diffusion model and matched with the target discrete audio feature, and determining that the target audio belongs to audio data matched with the target text description information. Thus, the discrete audio features are introduced to serve as intermediate feature representation between the text description information and the audio data to bridge the gap between the text description information and the audio data, so that the matching degree between the model output audio and the input text is effectively improved, and the accuracy of generating the audio by the text is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to an audio generation method, apparatus, device and storage medium. Background Art

[0002] Generating sound effects, music or speech according to personalized needs is crucial for applications such as virtual reality, game development and video editing. In recent years, text-based audio generation has attracted much attention due to its ability to synthesize general audio based on text descriptions. This type of audio generation task is called TTA (Text-To-Audio), which aims to generate natural and accurate audio signals that match the text description information based on the text description information.

[0003] Existing TTA models (such as the AudioLDM model, Make-an-audio2 model, etc.) often use the CLAP (Contrastive Language-Audio Pre-training) model on the encoder side as a bridge between text and audio. The core idea of ​​the CLAP model is to use the contrastive learning paradigm to map audio and text into a shared latent space, and make related audio-text pairs closer in the space through training. However, since text and audio belong to two different modal data, the direct text-to-audio conversion process through the CLAP model in the above-mentioned existing TTA model is very complicated, resulting in a low degree of matching between the output audio and the input text of the TTA model. Summary of the invention

[0004] In view of this, the present application provides an audio generation method, apparatus, device and storage medium, which bridges the gap between text description information and audio data by introducing discrete audio features as intermediate feature representations between text description information and audio data, thereby effectively improving the matching degree between the model output audio and the input text, which is conducive to improving the accuracy of text-generated audio.

[0005] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings.

[0006] In a first aspect, an embodiment of the present application provides an audio generation method, the audio generation method comprising:

[0007] Inputting the target text description information into a pre-trained large language model to obtain a target discrete audio feature output by the large language model that matches the target text description information;

[0008] The target discrete audio features are input into a pre-trained latent diffusion model to obtain target audio output by the latent diffusion model that matches the target discrete audio features, and determine that the target audio belongs to audio data that matches the target text description information.

[0009] In a second aspect, an embodiment of the present application provides an audio generation device, the audio generation device comprising:

[0010] A first conversion module is used to input the target text description information into a pre-trained large language model to obtain a target discrete audio feature output by the large language model that matches the target text description information;

[0011] The second conversion module is used to input the target discrete audio features into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and determine that the target audio belongs to audio data that matches the target text description information.

[0012] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned audio generation method when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned audio generation method are executed.

[0014] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0015] The embodiments of the present application provide an audio generation method, device, equipment and storage medium, which inputs the target text description information into a pre-trained large language model to obtain the target discrete audio features output by the large language model that match the target text description information; inputs the target discrete audio features into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and determines that the target audio belongs to the audio data that matches the target text description information. In this way, the present application bridges the gap between the text description information and the audio data by introducing discrete audio features as the intermediate feature representation between the text description information and the audio data, thereby effectively improving the matching degree between the model output audio and the input text, which is conducive to improving the accuracy of the audio generated from the text. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A schematic diagram showing a flow chart of an audio generation method provided in an embodiment of the present application is shown;

[0018] Figure 2 A flow chart of a method for constructing training data sets for training a large language model and a potential diffusion model respectively according to a pre-trained audio subtitle model provided by an embodiment of the present application is shown;

[0019] Figure 3 A flow chart of a model training method for an audio subtitle model provided in an embodiment of the present application is shown;

[0020] Figure 4 A schematic diagram of the structure of an audio generating device provided in an embodiment of the present application is shown;

[0021] Figure 5 A schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0023] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0024] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0025] Existing TTA models often use the CLAP model as a bridge between text and audio on the encoder side. The core idea of ​​the CLAP model is to use the contrastive learning paradigm to map audio and text into a shared latent space, and make related audio-text pairs closer in the space through training. However, since text and audio belong to two different modal data, the direct text-to-audio conversion process through the CLAP model in the above-mentioned existing TTA model is very complicated, resulting in a low degree of matching between the output audio and the input text of the TTA model.

[0026] Based on this, the embodiments of the present application provide an audio generation method, apparatus, device and storage medium, which bridge the gap between text description information and audio data by introducing discrete audio features as intermediate feature representations between text description information and audio data, thereby effectively improving the matching degree between the model output audio and the input text, which is conducive to improving the accuracy of text-generated audio.

[0027] In one embodiment of the present application, an audio generation method can be run on a terminal device or a server. The terminal device can be a local terminal device. When the audio generation method is run on a server, the audio generation method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device (i.e., a terminal device).

[0028] To facilitate understanding of the embodiments of the present application, an audio generation method, apparatus, device and storage medium provided in the embodiments of the present application are introduced in detail below.

[0029] Reference Figure 1 As shown, Figure 1 A schematic flow chart of an audio generation method provided in an embodiment of the present application is shown, wherein the audio generation method comprises steps S101-S102; specifically:

[0030] S101, inputting target text description information into a pre-trained large language model to obtain target discrete audio features output by the large language model that match the target text description information.

[0031] S102, inputting the target discrete audio features into a pre-trained latent diffusion model, obtaining the target audio output by the latent diffusion model that matches the target discrete audio features, and determining that the target audio belongs to audio data that matches the target text description information.

[0032] The above-mentioned audio generation method provided in the embodiment of the present application inputs the target text description information into a pre-trained large language model to obtain the target discrete audio features output by the large language model that match the target text description information; inputs the target discrete audio features into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and determines that the target audio belongs to the audio data that matches the target text description information. In this way, the present application bridges the gap between the text description information and the audio data by introducing discrete audio features as the intermediate feature representation between the text description information and the audio data, thereby effectively improving the degree of matching between the model output audio and the input text, which is conducive to improving the accuracy of the audio generated from the text.

[0033] The following is an exemplary description of each step in the above audio generation method provided in the embodiment of the present application:

[0034] S101, inputting target text description information into a pre-trained large language model to obtain target discrete audio features output by the large language model that match the target text description information.

[0035] Here, the large language model can be a pre-trained LLM (Large Language Model) model, for example, a pre-trained GPT (Generative Pre-trained Transformer) model, or a LLaMA model (an artificial intelligence large language model). The embodiments of the present application do not impose any limitation on the specific model structure of the above-mentioned large language model.

[0036] Here, the target text description information represents text information used to describe one or more conditions that the target audio generated this time must meet; wherein, the specific information content of the target text description information can be determined based on the user's actual audio generation requirements. For example, if the target audio generated this time by the user is a piece of bird's singing information, then the above target text description information can specifically be "generate a piece of bird singing"; the specific information content of the above target text description information is not limited in any way in this embodiment of the present application.

[0037] Specifically, when training the above-mentioned large language model, the training data set may include: multiple text description information and discrete audio features matching each text description information, wherein, for each of the above-mentioned text description information, the text description information is input as a prompt word into an initial model of the above-mentioned large language model (for example, input into a pre-trained LLM model), and the discrete audio features matching the text description information are set as the generation target of the above-mentioned initial model. The discrete audio features generated by the above-mentioned initial model are trained to gradually tend to the above-mentioned generation target until the above-mentioned initial model reaches convergence, thereby obtaining a trained large language model.

[0038] It should be noted that, in the process of training the initial model of the above-mentioned large language model, as an optional embodiment, the LoRA method can also be used to add a low-rank matrix to the specific weights of the above-mentioned initial model to fine-tune the above-mentioned initial model so that it can generate high-quality discrete audio features.

[0039] It should be noted that when constructing the above-mentioned training data set, you can first obtain the audio data that matches each text description information, and then discretize the audio data to obtain the discrete audio features of the audio data as the discrete audio features that match the text description information that matches the audio data.

[0040] S102, inputting the target discrete audio features into a pre-trained latent diffusion model, obtaining the target audio output by the latent diffusion model that matches the target discrete audio features, and determining that the target audio belongs to audio data that matches the target text description information.

[0041] Here, the latent diffusion model may be a pre-trained LDM (Latent Diffusion Model) model. The embodiment of the present application also does not impose any limitation on the specific model structure of the latent diffusion model.

[0042] Specifically, when training the above-mentioned LDM model (i.e., latent diffusion model), the training data set may include: multiple audio data and discrete audio features corresponding to each audio data, wherein, for each discrete audio feature, the discrete audio feature is input into the initial model of the above-mentioned LDM model, and the audio data prediction result corresponding to the discrete audio feature output by the above-mentioned initial model can be obtained. According to the loss between the audio data prediction result and the audio data corresponding to the discrete audio feature, the above-mentioned initial model can be trained until the above-mentioned initial model reaches convergence to obtain the trained above-mentioned LDM model.

[0043] It should be noted that, in the process of training the initial model of the above-mentioned LDM model, the initial model of the LDM model can learn the inverse diffusion process in the latent space compressed based on the variational autoencoder VAE (which is part of the model structure of the initial model of the LDM model) (in the initial model of the LDM model, the variational autoencoder VAE is used to compress the audio data into the latent space and reconstruct the audio from the latent space); wherein, in the initial model of the above-mentioned LDM model, using the (T-UNet, Transformer-UNet) architecture, multiple transformer modules can be added after the convolution operation in the encoder and decoder (i.e., the encoder and decoder in the initial model of the above-mentioned LDM model) to enhance the modeling ability of the initial model of the above-mentioned LDM model for global information, and CFG (Classifier-free Guidance) is simultaneously used in the inverse diffusion process, and classifier-free guidance is introduced in the sampling process to achieve controllable generation of audio data.

[0044] It should be noted that when constructing a training data set used for the initial model for training the above-mentioned LDM model, the discrete audio features corresponding to each audio data can also be obtained by discretizing each audio data.

[0045] The specific implementation process of each of the above steps in the embodiment of the present application is described in detail below:

[0046] For the large language model and the latent diffusion model in the above steps S101-S102, when constructing the training data sets for training the above large language model and the above latent diffusion model (that is, the initial model for training the above large language model and the initial model for training the above latent diffusion model), in addition to constructing the training data sets according to the construction method shown in the above steps S101-S102 using paired text description information and audio data (that is, it is necessary to first obtain audio data matching the text description information, and then obtain discrete audio features of the audio data as intermediate feature representations between the text description information and the audio data through discretization processing), as another optional embodiment, under the condition that only audio data can be obtained, the training data sets for training the above large language model and the above latent diffusion model can also be constructed respectively according to the pre-trained Audio caption model (that is, the audio caption model) by pre-training the Audio caption model.

[0047] Reference Figure 2 As shown, Figure 2 A flow chart of a method for constructing training data sets for training a large language model and a potential diffusion model respectively according to a pre-trained audio subtitle model provided by an embodiment of the present application is shown, wherein the method comprises steps S201-S204; specifically:

[0048] S201, inputting a plurality of original audio data into a pre-trained audio subtitle model, performing vector quantization processing on each of the original audio data through the audio subtitle model, and obtaining a discrete audio feature corresponding to each of the original audio data.

[0049] Here, the audio caption model may be an Audio caption model (i.e., an audio caption model) based on an Encoder-Decoder framework; wherein the audio caption model may specifically include: an encoder, a vector quantizer VQ (Vector Quantization) and a decoder.

[0050] In the embodiment of the present application, as an optional embodiment, the above step S201 can be performed according to the method shown in the following steps a1-a2, specifically:

[0051] Step a1: input a plurality of original audio data into the encoder to obtain continuous audio features corresponding to each of the original audio data output by the encoder.

[0052] Here, when executing the above step a1, for each original audio data, as an optional embodiment, the original audio data can be directly input into a pre-trained encoder (that is, the encoder in the pre-trained Audio caption model) to obtain the continuous audio features corresponding to the original audio data output by the encoder.

[0053] Here, when executing the above step a1, for each original audio data, as another optional embodiment, the original audio data can be first converted from an audio signal into a frequency domain signal to obtain a Mel spectrum of the original audio data, and then the Mel spectrum of the original audio data is input into a pre-trained encoder to obtain continuous audio features corresponding to the original audio data output by the encoder.

[0054] Step a2: input the continuous audio features corresponding to each of the original audio data into the vector quantizer, quantize each of the continuous audio features through the vector quantizer, and obtain the discrete audio features corresponding to each of the original audio data output by the vector quantizer.

[0055] Here, the continuous audio features corresponding to each original audio data can be represented as an audio sequence composed of multiple audio clips of unit time length; for example, the continuous audio features corresponding to an original audio data can be split and represented as multiple audio clips of 10 milliseconds / frame (that is, the above unit time length can be 10 milliseconds / frame); the embodiment of the present application does not impose any limitation on the specific value of the above unit time length.

[0056] Specifically, for each continuous audio feature corresponding to the original audio data, the continuous audio feature corresponding to the original audio data is input into a pre-trained vector quantizer VQ (that is, the vector quantizer in the pre-trained Audio caption model). The vector quantizer VQ contains a pre-trained codebook. The vector quantizer VQ can retrieve from the above codebook the codewords that are most similar to the audio segments of each unit length in the above continuous audio features that are input (that is, the codewords that are closest to the feature distance between the audio segments), and use the retrieved codewords to replace the audio segments of each unit length in the above continuous audio features (that is, quantize each input continuous audio feature through the vector quantizer) to obtain the discrete audio features corresponding to the original audio data (equivalent to the discrete audio features being the replacement results obtained after the vector quantizer VQ replaces the audio segments in the continuous audio features with the most similar codewords).

[0057] S202: Outputting text description information matched by each discrete audio feature through the audio subtitle model as text description information matched by original audio data corresponding to the discrete audio feature.

[0058] Here, the audio caption model may specifically include: an encoder, a vector quantizer VQ and a decoder; wherein, referring to the method described in the above steps a1-a2, after obtaining the above discrete audio features corresponding to each original audio data through the above encoder and the above vector quantizer VQ, the discrete audio features corresponding to each original audio data may be input into the pre-trained decoder (that is, the decoder in the pre-trained Audio caption model) to obtain text description information matching each discrete audio feature output by the decoder. At this time, for each discrete audio feature, the text description information matching the discrete audio feature is the text description information matching the original audio data corresponding to the discrete audio feature.

[0059] S203: Training the initial model of the large language model according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features to obtain the trained large language model.

[0060] Here, by executing the above steps S201-S202, after obtaining the discrete audio features corresponding to each original audio data and the text description information matched by each discrete audio feature, the above step S203 can be performed according to the method described in the following steps b1-b2, specifically:

[0061] Step b1: input the text description information matched by each discrete audio feature into the initial model of the large language model, predict the discrete audio features matched by each text description information through the initial model of the large language model, and output the discrete audio feature prediction results of each text description information.

[0062] Here, the initial model of the large language model can be a GPT model or an LLaMA model. The embodiment of the present application does not impose any limitation on the specific model structure of the above initial model.

[0063] Specifically, for each of the above text description information, the text description information is input into the initial model of the large language model, and the discrete audio features matching the text description information are predicted by the initial model of the large language model, and the discrete audio feature prediction results of the text description information can be output.

[0064] Step b2: adjusting the model parameters of the initial model of the large language model according to the loss between the discrete audio feature prediction result of each of the text description information and the discrete audio feature matching the text description information, to obtain the large language model including the adjusted model parameters.

[0065] Here, for each of the above-mentioned text description information, the discrete audio features matching the text description information can be set as the generation target of the above-mentioned initial model, and the discrete audio features generated by the above-mentioned initial model are trained to gradually tend to the above-mentioned generation target until the above-mentioned initial model reaches convergence (that is, the model parameters of the initial model of the large language model are adjusted according to the loss between the discrete audio feature prediction results of each text description information and the discrete audio features matching the text description information), and the above-mentioned initial model after convergence is used as the trained large language model.

[0066] It should be noted that when calculating the loss between the discrete audio feature prediction results of each of the text description information and the discrete audio features matching the text description information, the cross entropy loss function can be used, or other types of loss functions can be used for calculation. The embodiment of the present application does not impose any limitation on the specific type of loss function used to calculate the above losses.

[0067] S204: Train the initial model of the latent diffusion model according to the multiple original audio data and the discrete audio features corresponding to each of the original audio data to obtain the trained latent diffusion model.

[0068] Here, by executing the above step S201, after obtaining the discrete audio features corresponding to each original audio data, the above step S204 can be executed according to the method described in the following steps c1-c2, specifically:

[0069] Step c1: input each of the discrete audio features into the initial model of the latent diffusion model, predict the audio data matched by each of the discrete audio features through the initial model of the latent diffusion model, and output the audio prediction result of each of the discrete audio features.

[0070] Here, the initial model of the latent diffusion model can be an untrained LDM model.

[0071] Specifically, for each discrete audio feature, the discrete audio feature is input into the initial model of the above-mentioned LDM model (i.e., the latent diffusion model), and an audio prediction result corresponding to the discrete audio feature output by the above-mentioned initial model can be obtained. According to the loss between the audio prediction result and the original audio data corresponding to the discrete audio feature, the above-mentioned initial model can be trained (i.e., the model parameters of the initial model of the latent diffusion model are adjusted) until the above-mentioned initial model converges, and the converged initial model is obtained as the trained above-mentioned LDM model.

[0072] Step c2: adjusting the model parameters of the initial model of the latent diffusion model according to the loss between the audio prediction result of each discrete audio feature and the original audio data matched with the discrete audio feature, to obtain the latent diffusion model including the adjusted model parameters.

[0073] It should be noted that when calculating the loss between the audio prediction result of each discrete audio feature and the original audio data matching the discrete audio feature, the cross entropy loss function can be used, or other types of loss functions can be used for calculation. The embodiment of the present application does not impose any limitation on the specific type of loss function used to calculate the above losses.

[0074] For the Audio caption model in the above steps S201-S202, refer to Figure 3 As shown, Figure 3 A flow chart of a model training method for an audio subtitle model provided in an embodiment of the present application is shown, wherein the model training method includes steps S301-S307; specifically:

[0075] S301, input a plurality of sample audio data into an encoder, and obtain continuous audio features of each of the sample audio data through the encoder output.

[0076] Here, the encoder in step S301 is an untrained encoder, that is, an encoder in an Audiocaption model (audio subtitle model) that has not yet completed training.

[0077] Specifically, the specific implementation of step S301 is the same as that of the aforementioned step a1, and it is only necessary to replace the "original audio data" in the aforementioned step a1 with the "sample audio data" in step S301, and the repeated parts will not be repeated here.

[0078] S302: Input each of the continuous audio features into a vector quantizer, and quantize each of the continuous audio features through the vector quantizer to obtain a sample discrete audio feature corresponding to each of the continuous audio features output by the vector quantizer.

[0079] Here, the vector quantizer in step S302 is an untrained vector quantizer VQ, that is, a vector quantizer VQ in an Audio caption model (audio subtitle model) that has not yet completed training.

[0080] Specifically, the specific implementation of step S302 is the same as the aforementioned step a2, and the repeated parts are not repeated here.

[0081] S303: Input each of the sample discrete audio features into the decoder to obtain a text description information prediction result of each of the sample discrete audio features output by the decoder.

[0082] Here, the decoder in step S302 is an untrained decoder, that is, a decoder in an Audiocaption model (audio subtitle model) that has not yet completed training.

[0083] Specifically, the specific implementation of step S303 is the same as that of the aforementioned step S202. It is only necessary to replace the "discrete audio features" in the aforementioned step S202 with the "sample discrete audio features" in step S303. The repeated parts will not be repeated here.

[0084] S304: Input each of the continuous audio features into the decoder to obtain a text description information prediction result of each of the continuous audio features output by the decoder.

[0085] Specifically, the specific implementation of step S304 is the same as that of the aforementioned step S303. It is only necessary to replace the quantized "sample discrete audio features" in the aforementioned step S303 with the "continuous audio features" that have not been quantized by the vector quantizer VQ in step S301. The repeated parts will not be repeated here.

[0086] S305: Determine, according to each of the continuous audio features and the sample discrete audio features corresponding to the continuous audio features, a quantization loss generated by the audio subtitle model due to vector quantization of each of the sample audio data.

[0087] Here, the quantization loss is used to measure the model loss caused by the encoder-vector quantizer performing vector quantization processing on the input sample audio data in the Audio caption model.

[0088] Specifically, in the Audio caption model, the quantization loss L can be calculated according to the following formula: VQ :

[0089]

[0090] Where T represents the number of continuous audio features, which is equivalent to the number of sample audio data;

[0091] z i represents the i-th continuous audio feature;

[0092] Represents the vector quantizer VQ output and the continuous audio feature z i The corresponding sample discrete audio features;

[0093] is the coding loss of the encoder, which is used to encourage the continuous audio feature z output by the encoder i Closer to the discrete audio characteristics of samples quantized by vector quantizer VQ

[0094] is the commitment loss of the vector quantizer VQ, which is used to encourage the discrete audio features of the samples quantized by the vector quantizer VQ Closer to the continuous audio feature z output by the encoder i ;

[0095] α represents the impact parameter used to control the above commitment loss;

[0096] sg means gradient cutoff.

[0097] S306: Determine the cross entropy loss of the audio subtitle model according to the text description information prediction result of each of the continuous audio features and the text description information prediction result of the sample discrete audio feature corresponding to the continuous audio feature.

[0098] Here, the cross entropy loss is used on the decoder side of the Audio caption model to measure the difference between the text description information prediction results generated by the decoder based on the quantized discrete audio features of the samples and the text description information prediction results generated based on the unquantized continuous audio features.

[0099] Specifically, in the Audio caption model, the cross entropy loss L can be calculated according to the following formula: CE :

[0100]

[0101] Where T represents the number of continuous audio features, which is equivalent to the number of sample audio data;

[0102] y i Represents the discrete audio features of the i-th sample output by the decoder The prediction result of the text description information;

[0103] represents the i-th continuous audio feature z output by the decoder i The text description information prediction results.

[0104] S307: Training the audio subtitle model according to the quantization loss and the cross entropy loss until the audio subtitle model reaches convergence.

[0105] Here, for the Audio caption model as a whole, the overall loss of the model is mainly composed of the above-mentioned quantization loss and the above-mentioned cross entropy loss. That is, the total model loss L of the Audio caption model = the above-mentioned quantization loss L VQ + the above cross entropy loss L CE .

[0106] Specifically, according to the above quantified loss L VQ And the above cross entropy loss L CE After calculating the total loss L of the above model, backpropagation can be performed according to the total loss L of the model to calculate the gradient, and the optimizer (such as Adam and SGD) can be used to update the parameters of the above encoder, vector quantizer VQ, and decoder (that is, adjust the model parameters of the audio subtitle model). Repeat the above steps until the audio caption model converges to obtain a trained audio caption model (that is, audio subtitle model).

[0107] Through the above-mentioned audio generation method provided by the embodiment of the present application, the target text description information is input into a pre-trained large language model to obtain the target discrete audio features output by the large language model that match the target text description information; the target discrete audio features are input into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and it is determined that the target audio belongs to the audio data that matches the target text description information. In this way, the present application bridges the gap between text description information and audio data by introducing discrete audio features as an intermediate feature representation between text description information and audio data, thereby effectively improving the degree of matching between the model output audio and the input text, which is conducive to improving the accuracy of text-generated audio.

[0108] Based on the same inventive concept, the present application also provides an audio generating device corresponding to the above-mentioned audio generating method. Since the principle of solving the problem by the audio generating device in the embodiment of the present application is similar to the above-mentioned audio generating method in the embodiment of the present application, the implementation of the audio generating device can refer to the implementation of the above-mentioned audio generating method, and the repeated parts will not be repeated.

[0109] Reference Figure 4 As shown, Figure 4 A schematic diagram of the structure of an audio generating device provided in an embodiment of the present application is shown, wherein the audio generating device comprises:

[0110] The first conversion module 401 is used to input the target text description information into a pre-trained large language model to obtain the target discrete audio features output by the large language model and matching the target text description information;

[0111] The second conversion module 402 is used to input the target discrete audio features into a pre-trained latent diffusion model, obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and determine that the target audio belongs to audio data that matches the target text description information.

[0112] In an optional implementation, the audio generation device further includes: a data construction module, wherein the data construction module is used to:

[0113] Inputting a plurality of original audio data into a pre-trained audio subtitle model, performing vector quantization processing on each of the original audio data through the audio subtitle model to obtain a discrete audio feature corresponding to each of the original audio data;

[0114] Outputting the text description information matched by each discrete audio feature through the audio subtitle model as the text description information matched by the original audio data corresponding to the discrete audio feature;

[0115] Training the initial model of the large language model according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features to obtain the trained large language model;

[0116] The initial model of the latent diffusion model is trained according to the multiple original audio data and the discrete audio features corresponding to each of the original audio data to obtain the trained latent diffusion model.

[0117] In an optional implementation, the audio subtitle model includes: an encoder, a vector quantizer, and a decoder. When the plurality of original audio data are input into the pre-trained audio subtitle model, the audio subtitle model is used to perform vector quantization processing on each of the original audio data to obtain a discrete audio feature corresponding to each of the original audio data, and the data construction module is used to:

[0118] Inputting a plurality of original audio data into the encoder, and obtaining a continuous audio feature corresponding to each of the original audio data output by the encoder;

[0119] The continuous audio feature corresponding to each of the original audio data is input into the vector quantizer, and each of the continuous audio features is quantized by the vector quantizer to obtain the discrete audio feature corresponding to each of the original audio data output by the vector quantizer.

[0120] In an optional implementation, when outputting text description information matched by each discrete audio feature through the audio subtitle model, the data construction module is used to:

[0121] The discrete audio features corresponding to each of the original audio data are input into the decoder to obtain text description information matched by each of the discrete audio features output by the decoder.

[0122] In an optional implementation, when the initial model of the large language model is trained according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features, the data construction module is used to:

[0123] Inputting the text description information matched by each discrete audio feature into the initial model of the large language model, predicting the discrete audio feature matched by each text description information through the initial model of the large language model, and outputting the discrete audio feature prediction result of each text description information;

[0124] According to the loss between the discrete audio feature prediction result of each of the text description information and the discrete audio feature matching the text description information, the model parameters of the initial model of the large language model are adjusted to obtain the large language model including the adjusted model parameters.

[0125] In an optional implementation, when the initial model of the latent diffusion model is trained according to the plurality of original audio data and the discrete audio features corresponding to each of the original audio data, the data construction module is used to:

[0126] Inputting each of the discrete audio features into the initial model of the latent diffusion model, predicting the audio data matched by each of the discrete audio features through the initial model of the latent diffusion model, and outputting an audio prediction result for each of the discrete audio features;

[0127] According to the loss between the audio prediction result of each discrete audio feature and the original audio data matching the discrete audio feature, the model parameters of the initial model of the latent diffusion model are adjusted to obtain the latent diffusion model including the adjusted model parameters.

[0128] In an optional implementation, the audio subtitle model includes: an encoder, a vector quantizer, and a decoder, and the audio generation device further includes a training module, wherein the training module is used to train the audio subtitle model by the following method:

[0129] Inputting a plurality of sample audio data into an encoder, and obtaining continuous audio features of each of the sample audio data through the encoder output;

[0130] Inputting each of the continuous audio features into a vector quantizer, quantizing each of the continuous audio features through the vector quantizer, and obtaining a sample discrete audio feature corresponding to each of the continuous audio features output by the vector quantizer;

[0131] Inputting each of the sample discrete audio features into the decoder, and obtaining a text description information prediction result of each of the sample discrete audio features output by the decoder;

[0132] Inputting each of the continuous audio features into the decoder, and obtaining a text description information prediction result of each of the continuous audio features output by the decoder;

[0133] Determining, according to each of the continuous audio features and the sample discrete audio features corresponding to the continuous audio features, a quantization loss generated by the audio subtitle model due to vector quantization of each of the sample audio data;

[0134] Determining the cross entropy loss of the audio subtitle model according to the text description information prediction result of each of the continuous audio features and the text description information prediction result of the sample discrete audio feature corresponding to the continuous audio feature;

[0135] The audio subtitle model is trained according to the quantization loss and the cross entropy loss until the audio subtitle model reaches convergence.

[0136] Based on the above-mentioned audio generation device provided by the embodiment of the present application, the target text description information is input into a pre-trained large language model to obtain the target discrete audio features output by the large language model that match the target text description information; the target discrete audio features are input into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and it is determined that the target audio belongs to the audio data that matches the target text description information. In this way, the present application bridges the gap between text description information and audio data by introducing discrete audio features as an intermediate feature representation between text description information and audio data, thereby effectively improving the degree of matching between the model output audio and the input text, which is conducive to improving the accuracy of text-generated audio.

[0137] Based on the same inventive concept, the present application also provides an electronic device corresponding to the above-mentioned audio generation method. Since the principle of solving the problem by the electronic device in the embodiment of the present application is similar to the above-mentioned audio generation method in the embodiment of the present application, the implementation of the electronic device can refer to the implementation of the above-mentioned audio generation method, and the repeated parts will not be repeated.

[0138] Figure 5A structural diagram of an electronic device 500 provided in an embodiment of the present application includes: a processor 501, a memory 502 and a bus 503, wherein the memory 502 stores machine-readable instructions executable by the processor 501. When the electronic device runs an audio generation method as in the embodiment, the processor 501 communicates with the memory 502 via the bus 503, and the processor 501 executes the machine-readable instructions. When the processor 501 executes the machine-readable instructions, the following steps are implemented, specifically:

[0139] Inputting the target text description information into a pre-trained large language model to obtain a target discrete audio feature output by the large language model that matches the target text description information;

[0140] The target discrete audio features are input into a pre-trained latent diffusion model to obtain target audio output by the latent diffusion model that matches the target discrete audio features, and determine that the target audio belongs to audio data that matches the target text description information.

[0141] In an optional implementation, the processor 501 is configured to:

[0142] Inputting a plurality of original audio data into a pre-trained audio subtitle model, performing vector quantization processing on each of the original audio data through the audio subtitle model to obtain a discrete audio feature corresponding to each of the original audio data;

[0143] Outputting the text description information matched by each discrete audio feature through the audio subtitle model as the text description information matched by the original audio data corresponding to the discrete audio feature;

[0144] Training the initial model of the large language model according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features to obtain the trained large language model;

[0145] The initial model of the latent diffusion model is trained according to the multiple original audio data and the discrete audio features corresponding to each of the original audio data to obtain the trained latent diffusion model.

[0146] In an optional implementation, the audio subtitle model includes: an encoder, a vector quantizer, and a decoder. When the plurality of original audio data are input into the pre-trained audio subtitle model, the audio subtitle model is used to perform vector quantization processing on each of the original audio data to obtain a discrete audio feature corresponding to each of the original audio data, the processor 501 is used to:

[0147] Inputting a plurality of original audio data into the encoder, and obtaining a continuous audio feature corresponding to each of the original audio data output by the encoder;

[0148] The continuous audio feature corresponding to each of the original audio data is input into the vector quantizer, and each of the continuous audio features is quantized by the vector quantizer to obtain the discrete audio feature corresponding to each of the original audio data output by the vector quantizer.

[0149] In an optional implementation, when outputting text description information matched by each discrete audio feature through the audio subtitle model, the processor 501 is configured to:

[0150] The discrete audio features corresponding to each of the original audio data are input into the decoder to obtain text description information matched by each of the discrete audio features output by the decoder.

[0151] In an optional implementation, when the initial model of the large language model is trained according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features, the processor 501 is used to:

[0152] Inputting the text description information matched by each discrete audio feature into the initial model of the large language model, predicting the discrete audio feature matched by each text description information through the initial model of the large language model, and outputting the discrete audio feature prediction result of each text description information;

[0153] According to the loss between the discrete audio feature prediction result of each of the text description information and the discrete audio feature matching the text description information, the model parameters of the initial model of the large language model are adjusted to obtain the large language model including the adjusted model parameters.

[0154] In an optional implementation, when the initial model of the latent diffusion model is trained according to the plurality of original audio data and the discrete audio features corresponding to each of the original audio data, the processor 501 is configured to:

[0155] Inputting each of the discrete audio features into the initial model of the latent diffusion model, predicting the audio data matched by each of the discrete audio features through the initial model of the latent diffusion model, and outputting an audio prediction result for each of the discrete audio features;

[0156] According to the loss between the audio prediction result of each discrete audio feature and the original audio data matching the discrete audio feature, the model parameters of the initial model of the latent diffusion model are adjusted to obtain the latent diffusion model including the adjusted model parameters.

[0157] In an optional implementation, the audio subtitle model includes: an encoder, a vector quantizer, and a decoder, and the processor 501 is used to train the audio subtitle model by the following method:

[0158] Inputting a plurality of sample audio data into an encoder, and obtaining continuous audio features of each of the sample audio data through the encoder output;

[0159] Inputting each of the continuous audio features into a vector quantizer, quantizing each of the continuous audio features through the vector quantizer, and obtaining a sample discrete audio feature corresponding to each of the continuous audio features output by the vector quantizer;

[0160] Inputting each of the sample discrete audio features into the decoder, and obtaining a text description information prediction result of each of the sample discrete audio features output by the decoder;

[0161] Inputting each of the continuous audio features into the decoder, and obtaining a text description information prediction result of each of the continuous audio features output by the decoder;

[0162] Determining, according to each of the continuous audio features and the sample discrete audio features corresponding to the continuous audio features, a quantization loss generated by the audio subtitle model due to vector quantization of each of the sample audio data;

[0163] Determining the cross entropy loss of the audio subtitle model according to the text description information prediction result of each of the continuous audio features and the text description information prediction result of the sample discrete audio feature corresponding to the continuous audio feature;

[0164] The audio subtitle model is trained according to the quantization loss and the cross entropy loss until the audio subtitle model reaches convergence.

[0165] Through the electronic device provided by the embodiment of the present application, the target text description information is input into a pre-trained large language model to obtain the target discrete audio features output by the large language model that match the target text description information; the target discrete audio features are input into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and it is determined that the target audio belongs to the audio data that matches the target text description information. In this way, the present application bridges the gap between text description information and audio data by introducing discrete audio features as an intermediate feature representation between text description information and audio data, thereby effectively improving the degree of matching between the model output audio and the input text, which is conducive to improving the accuracy of text-generated audio.

[0166] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed when a processor is running, and the processor performs the following steps:

[0167] Inputting the target text description information into a pre-trained large language model to obtain a target discrete audio feature output by the large language model that matches the target text description information;

[0168] The target discrete audio features are input into a pre-trained latent diffusion model to obtain target audio output by the latent diffusion model that matches the target discrete audio features, and determine that the target audio belongs to audio data that matches the target text description information.

[0169] In an optional implementation, the processor is configured to:

[0170] Inputting a plurality of original audio data into a pre-trained audio subtitle model, performing vector quantization processing on each of the original audio data through the audio subtitle model to obtain a discrete audio feature corresponding to each of the original audio data;

[0171] Outputting the text description information matched by each discrete audio feature through the audio subtitle model as the text description information matched by the original audio data corresponding to the discrete audio feature;

[0172] Training the initial model of the large language model according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features to obtain the trained large language model;

[0173] The initial model of the latent diffusion model is trained according to the multiple original audio data and the discrete audio features corresponding to each of the original audio data to obtain the trained latent diffusion model.

[0174] In an optional implementation, the audio subtitle model includes: an encoder, a vector quantizer, and a decoder. When the plurality of original audio data are input into the pre-trained audio subtitle model, the audio subtitle model is used to perform vector quantization processing on each of the original audio data to obtain a discrete audio feature corresponding to each of the original audio data, and the processor is used to:

[0175] Inputting a plurality of original audio data into the encoder, and obtaining a continuous audio feature corresponding to each of the original audio data output by the encoder;

[0176] The continuous audio feature corresponding to each of the original audio data is input into the vector quantizer, and each of the continuous audio features is quantized by the vector quantizer to obtain the discrete audio feature corresponding to each of the original audio data output by the vector quantizer.

[0177] In an optional implementation, when outputting text description information matched by each discrete audio feature through the audio subtitle model, the processor is configured to:

[0178] The discrete audio features corresponding to each of the original audio data are input into the decoder to obtain text description information matched by each of the discrete audio features output by the decoder.

[0179] In an optional implementation, when the initial model of the large language model is trained according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features, the processor is used to:

[0180] Inputting the text description information matched by each discrete audio feature into the initial model of the large language model, predicting the discrete audio feature matched by each text description information through the initial model of the large language model, and outputting the discrete audio feature prediction result of each text description information;

[0181] According to the loss between the discrete audio feature prediction result of each of the text description information and the discrete audio feature matching the text description information, the model parameters of the initial model of the large language model are adjusted to obtain the large language model including the adjusted model parameters.

[0182] In an optional implementation, when the initial model of the latent diffusion model is trained according to the plurality of original audio data and the discrete audio features corresponding to each of the original audio data, the processor is configured to:

[0183] Inputting each of the discrete audio features into the initial model of the latent diffusion model, predicting the audio data matched by each of the discrete audio features through the initial model of the latent diffusion model, and outputting an audio prediction result for each of the discrete audio features;

[0184] According to the loss between the audio prediction result of each discrete audio feature and the original audio data matching the discrete audio feature, the model parameters of the initial model of the latent diffusion model are adjusted to obtain the latent diffusion model including the adjusted model parameters.

[0185] In an optional implementation, the audio subtitle model includes: an encoder, a vector quantizer, and a decoder, and the processor is used to train the audio subtitle model by the following method:

[0186] Inputting a plurality of sample audio data into an encoder, and obtaining continuous audio features of each of the sample audio data through the encoder output;

[0187] Inputting each of the continuous audio features into a vector quantizer, quantizing each of the continuous audio features through the vector quantizer, and obtaining a sample discrete audio feature corresponding to each of the continuous audio features output by the vector quantizer;

[0188] Inputting each of the sample discrete audio features into the decoder, and obtaining a text description information prediction result of each of the sample discrete audio features output by the decoder;

[0189] Inputting each of the continuous audio features into the decoder, and obtaining a text description information prediction result of each of the continuous audio features output by the decoder;

[0190] Determining, according to each of the continuous audio features and the sample discrete audio features corresponding to the continuous audio features, a quantization loss generated by the audio subtitle model due to vector quantization of each of the sample audio data;

[0191] Determining the cross entropy loss of the audio subtitle model according to the text description information prediction result of each of the continuous audio features and the text description information prediction result of the sample discrete audio feature corresponding to the continuous audio feature;

[0192] The audio subtitle model is trained according to the quantization loss and the cross entropy loss until the audio subtitle model reaches convergence.

[0193] Through the above-mentioned computer-readable storage medium provided by the embodiment of the present application, the target text description information is input into a pre-trained large language model to obtain the target discrete audio features output by the large language model that match the target text description information; the target discrete audio features are input into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and it is determined that the target audio belongs to the audio data that matches the target text description information. In this way, the present application bridges the gap between text description information and audio data by introducing discrete audio features as an intermediate feature representation between text description information and audio data, thereby effectively improving the degree of matching between the model output audio and the input text, which is conducive to improving the accuracy of text-generated audio.

[0194] In an embodiment of the present application, the computer-readable storage medium can also execute other machine-readable instructions when run by the processor to execute the audio generation method as described in other embodiments. For the specific steps and principles of the audio generation method, please refer to the description of the method side embodiment, which will not be repeated here.

[0195] In the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0196] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0198] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0199] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0200] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An audio generation method, characterized in that: The audio generation method comprises: Inputting the target text description information into a pre-trained large language model to obtain a target discrete audio feature output by the large language model that matches the target text description information; The target discrete audio features are input into a pre-trained latent diffusion model to obtain target audio output by the latent diffusion model that matches the target discrete audio features, and determine that the target audio belongs to audio data that matches the target text description information.

2. The audio generation method according to claim 1, characterized in that: The audio generation method further comprises: Inputting a plurality of original audio data into a pre-trained audio subtitle model, performing vector quantization processing on each of the original audio data through the audio subtitle model to obtain a discrete audio feature corresponding to each of the original audio data; Outputting the text description information matched by each discrete audio feature through the audio subtitle model as the text description information matched by the original audio data corresponding to the discrete audio feature; Training the initial model of the large language model according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features to obtain the trained large language model; The initial model of the latent diffusion model is trained according to the multiple original audio data and the discrete audio features corresponding to each of the original audio data to obtain the trained latent diffusion model.

3. The audio generation method according to claim 2, characterized in that: The audio subtitle model includes: an encoder, a vector quantizer and a decoder. The multiple original audio data are input into the pre-trained audio subtitle model, and each of the original audio data is vector quantized by the audio subtitle model to obtain a discrete audio feature corresponding to each of the original audio data, including: Inputting a plurality of original audio data into the encoder, and obtaining a continuous audio feature corresponding to each of the original audio data output by the encoder; The continuous audio feature corresponding to each of the original audio data is input into the vector quantizer, and each of the continuous audio features is quantized by the vector quantizer to obtain the discrete audio feature corresponding to each of the original audio data output by the vector quantizer.

4. The audio generation method according to claim 3, characterized in that: Outputting text description information matched by each discrete audio feature through the audio subtitle model includes: The discrete audio features corresponding to each of the original audio data are input into the decoder to obtain text description information matched by each of the discrete audio features output by the decoder.

5. The audio generation method according to claim 2, characterized in that: The training of the initial model of the large language model according to the discrete audio features corresponding to each of the original audio data and the text description information matched by each of the discrete audio features comprises: Inputting the text description information matched by each discrete audio feature into the initial model of the large language model, predicting the discrete audio feature matched by each text description information through the initial model of the large language model, and outputting the discrete audio feature prediction result of each text description information; According to the loss between the discrete audio feature prediction result of each of the text description information and the discrete audio feature matching the text description information, the model parameters of the initial model of the large language model are adjusted to obtain the large language model including the adjusted model parameters.

6. The audio generation method according to claim 2, characterized in that: The step of training the initial model of the latent diffusion model according to the plurality of original audio data and the discrete audio features corresponding to each of the original audio data comprises: Inputting each of the discrete audio features into the initial model of the latent diffusion model, predicting the audio data matched by each of the discrete audio features through the initial model of the latent diffusion model, and outputting an audio prediction result for each of the discrete audio features; According to the loss between the audio prediction result of each discrete audio feature and the original audio data matching the discrete audio feature, the model parameters of the initial model of the latent diffusion model are adjusted to obtain the latent diffusion model including the adjusted model parameters.

7. The audio generation method according to claim 2, characterized in that: The audio subtitle model includes: an encoder, a vector quantizer and a decoder, and the audio subtitle model is trained by the following method: Inputting a plurality of sample audio data into an encoder, and obtaining continuous audio features of each of the sample audio data through the encoder output; Inputting each of the continuous audio features into a vector quantizer, quantizing each of the continuous audio features through the vector quantizer, and obtaining a sample discrete audio feature corresponding to each of the continuous audio features output by the vector quantizer; Inputting each of the sample discrete audio features into the decoder, and obtaining a text description information prediction result of each of the sample discrete audio features output by the decoder; Inputting each of the continuous audio features into the decoder, and obtaining a text description information prediction result of each of the continuous audio features output by the decoder; Determining, according to each of the continuous audio features and the sample discrete audio features corresponding to the continuous audio features, a quantization loss generated by the audio subtitle model due to vector quantization of each of the sample audio data; Determining the cross entropy loss of the audio subtitle model according to the text description information prediction result of each of the continuous audio features and the text description information prediction result of the sample discrete audio feature corresponding to the continuous audio feature; The audio subtitle model is trained according to the quantization loss and the cross entropy loss until the audio subtitle model reaches convergence.

8. An audio generating device, characterized in that: The audio generating device comprises: A first conversion module is used to input the target text description information into a pre-trained large language model to obtain a target discrete audio feature output by the large language model that matches the target text description information; The second conversion module is used to input the target discrete audio features into a pre-trained latent diffusion model to obtain the target audio output by the latent diffusion model that matches the target discrete audio features, and determine that the target audio belongs to audio data that matches the target text description information.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the audio generation method as described in any one of claims 1 to 7 are performed.

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

Citation Information

Cited By

  • Audio generation method and device, equipment, storage medium and program product

    CN120998175A