Audio generation method and device, computer device, storage medium and program product

By generating a spectral mask using a neural network model, mono audio is automatically converted into stereo audio, solving the problem of high complexity in traditional technologies and realizing a simplified binaural audio rendering process.

CN117676449BActive Publication Date: 2026-11-20SHANGHAI BILIBILI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311748809.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2026-11-20
Estimated Expiration
2043-12-18

AI Technical Summary

Technical Problem

Traditional binaural audio rendering technology is highly complex and struggles to effectively handle audio reproduction in multi-scene videos, resulting in significant rendering difficulties.

Method used

By acquiring the image and audio features of video frames, a spectral mask is generated using a pre-trained neural network model to automatically convert mono audio into stereo audio.

Benefits of technology

It reduces the difficulty and complexity of binaural audio rendering, realizes automatic conversion from mono audio to binaural audio, and simplifies the audio restoration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117676449B_ABST
    Figure CN117676449B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an audio generation method, the method comprises the following steps: obtaining a first image feature of a video frame in a target video file, and obtaining a first audio feature of audio in the target video file, the audio is a single-channel audio; generating a frequency spectrum mask according to the first image feature and the first audio feature by using a pre-trained neural network model; determining left-channel audio and right-channel audio of the target video file according to the frequency spectrum mask. The audio generation method provided by the embodiment of the present application can reduce the rendering difficulty and complexity of binaural audio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning, and in particular to an audio generation method, apparatus, computer device, and storage medium. Background Technology

[0002] Stereo sound can provide people with an immersive sound experience, enhancing their viewing experience. However, due to limitations in video recording equipment, many videos can only record mono audio. To provide stereo sound, a mono-to-stereo technology is needed to convert the original mono audio into stereo audio (binaural audio) that includes left and right channels, thus achieving spatial stereo audio.

[0003] For binaural audio rendering, the traditional restoration process generally involves predicting the binaural room impulse response (BRIR) using various environmental parameters such as sound source, sound direction, air attenuation, room geometry, and wall material information. The ideal room effect is then restored by convolving the BRIR with the speaker signal.

[0004] However, while traditional binaural audio rendering techniques can achieve high-quality results, this requires detailed analysis based on the characteristics of the recording scene. The process of calculating these parameters is extremely complex, indirectly increasing the complexity of the audio reconstruction process itself. Furthermore, when a video contains multiple complex scenes, separate calculations are needed for different spatial distributions, further increasing the complexity of binaural audio rendering. The sheer volume of video information and the variable recording environment typically make binaural audio rendering using traditional methods difficult and highly complex. Summary of the Invention

[0005] The purpose of this application is to provide an audio generation method, apparatus, computer device, and storage medium to solve the technical problems of the high difficulty and complexity of binaural audio rendering in related technologies.

[0006] One aspect of this application provides an audio generation method, comprising: acquiring first image features of video frames in a target video file, and acquiring first audio features of audio in the target video file, wherein the audio is mono audio; generating a spectral mask based on the first image features and the first audio features using a pre-trained neural network model; and determining the left channel audio and right channel audio of the target video file based on the spectral mask.

[0007] Optionally, the method further includes: acquiring a training dataset, the training dataset including multiple videos, the audio corresponding to the videos being stereo audio; acquiring second image features of video frames in each of the videos, and synthesizing the stereo audio in the videos into mono audio, acquiring second audio features of the mono audio; training a pre-constructed neural network model based on the second image features and the second audio features to obtain the pre-trained neural network model.

[0008] Optionally, the pre-built neural network model includes a U-net model, which includes N downsampling layers and N upsampling layers, where N is a positive integer greater than 1; training the pre-built neural network model based on the second image features and the second audio features includes: extracting N image sub-features of the second image features; mapping the second audio features to N layers of audio sub-features through the downsampling layers, and fusing the audio sub-features of the current layer with one of the image sub-features in each downsampling layer.

[0009] Optionally, the pre-built neural network model further includes a feature adaptation network, which includes several stacked integrated residual connections and 2D convolutional modules. The step of extracting N image sub-features of the second image features includes: using the feature adaptation network to extract N image sub-features of the second image features.

[0010] Optionally, mapping the second audio feature to N layers of audio sub-features through the downsampling layer includes: mapping the second audio feature to N layers of audio sub-features through the downsampling layer using average pooling.

[0011] Optionally, the U-net model processes the second audio feature through modules that alternately stack convolution and self-attention mechanisms.

[0012] Optionally, determining the left and right channel audio of the target video file based on the spectral mask includes: determining a channel difference based on the spectral mask and the audio of the target video file, wherein the channel difference is the difference between the left and right channel audio; and determining the left and right channel audio based on the channel difference and the audio of the target video file, respectively.

[0013] One aspect of this application provides an audio generation apparatus, comprising: an acquisition module, configured to acquire first image features of video frames in a target video file and acquire first audio features of audio in the target video file, wherein the audio is mono audio; a mask generation module, configured to generate a spectral mask based on the first image features and the first audio features using a pre-trained neural network model; and a determination module, configured to determine the left channel audio and right channel audio of the target video file based on the spectral mask.

[0014] One aspect of this application provides a computer device, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described audio generation method.

[0015] Another aspect of this application provides a computer-readable storage medium storing a computer program that can be executed by at least one processor to perform the steps of the audio generation method described above.

[0016] The audio generation method, apparatus, computer device, and storage medium provided in this application have the following advantages: By acquiring the first image features of the video frames in the target video file and the first audio features of the audio in the target video file, a spectral mask is generated based on the first image features and the first audio features using a pre-trained neural network model. The left and right audio channels of the target video file are determined based on the spectral mask. The video with mono audio can be automatically converted into stereo audio through the neural network without the need for complex calculations to restore it, thereby reducing the difficulty and complexity of rendering binaural audio. Attached Figure Description

[0017] Figure 1 The flowchart of the audio generation method according to Embodiment 1 of this application is illustrated schematically; Figure 2 for Figure 1 Flowchart of the new step; Figure 3 for Figure 1 A flowchart of the sub-steps of step S130; Figure 4 This is a schematic diagram illustrating the principle of the audio generation method. Figure 5 for Figure 2 A flowchart of the sub-steps of step S230; Figure 6 This is a schematic diagram of a neural network model; Figure 7 A block diagram of the audio generation apparatus according to Embodiment 2 of this application is shown schematically; Figure 8 The schematic diagram illustrates the hardware architecture of the computer device according to Embodiment 3 of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0019] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0020] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order of the steps, but are only used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation of this application.

[0021] The following is an explanation of the terms used in this application: Stereo: This uses two or more independent audio channels, presented on a pair of symmetrically arranged speakers. The sound produced in this way remains natural and pleasant from different directions. This is in contrast to mono.

[0022] Binaural audio: This includes audio from both the left and right channels, allowing listeners to locate sound sources by listening through headphones, thus experiencing a realistic sound field.

[0023] Short-time Fourier Transform (STFT): A variation of the Fourier Transform, also known as windowed Fourier Transform, used to determine the sinusoidal frequency and phase of a local portion of a signal that varies over time.

[0024] FAIR-Play is an audio-visual dataset consisting of 1871 video clips and their corresponding binaural audio clips recorded in a music room. This dataset is the first stereo-visual aligned dataset captured using professional 3Dio Binaural Mic and GoPro.

[0025] In related technologies, the rendering of binaural audio requires detailed analysis based on the characteristics of the recording scene, and the parameter calculation is relatively complex. The audio restoration process itself is also highly complex. Furthermore, typical videos often present multiple different complex scenes, making the rendering of binaural audio more difficult and complex.

[0026] The audio generation method of this application embodiment can reduce the difficulty and complexity of rendering binaural audio.

[0027] It should be noted that the execution entity of the audio generation method provided in this application embodiment can be a client or a server. Specifically, the client can be, but is not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices, and the server can be implemented using an independent server or a server cluster composed of multiple servers.

[0028] The following will introduce the audio generation scheme through several embodiments. For ease of understanding, the following will use the server as the execution subject for exemplary description.

[0029] Example 1 Figure 1 The flowchart of the audio generation method according to Embodiment 1 of this application is illustrated, including steps S110 to S140, which are described in detail below: Step S110: Obtain the first image features of the video frame in the target video file, and obtain the first audio features of the audio in the target video file, wherein the audio is mono audio.

[0030] Specifically, video frames from the target video file can be extracted first, followed by the extraction of the first image features from each video frame. When extracting the first image features of the video frames, an image feature extractor (such as the image pre-trained model detectron2) can be used. Additionally, the number of video frames extracted per second can be set to ensure both the quality and speed of inference; for example, five video frames can be extracted per second.

[0031] It should be understood that, because the left and right ears are located on opposite sides of the head, there may be a time difference and an intensity difference between the sound emitted from a sound source and the left and right ears. This time and intensity difference is determined by the distance between the sound source and the left and right ears. Since the content of a video frame can reflect the location information of the sound source (e.g., objects, animals, people), the extracted image features can help obtain information about the time and intensity differences between the left and right ears, thus facilitating the extraction of the left and right channel audio based on this information.

[0032] The first audio feature can be converted into a spectrogram by short-time Fourier transform, and then feature extraction can be performed on the converted spectrogram to obtain the first audio feature.

[0033] Step S120: Generate a spectral mask based on the first image features and the first audio features using a pre-trained neural network model.

[0034] When training a neural network model, a video containing two channels can be used for training. After the neural network model reaches the desired accuracy, a pre-trained neural network model is obtained.

[0035] In an exemplary embodiment, such as Figure 2 As shown, the audio generation method may further include steps S210 to S230: Step S210: Obtain the training dataset, which includes multiple videos, and the audio corresponding to each video is stereo audio.

[0036] To improve training effectiveness, the videos can be recorded using professional audio equipment, thus highlighting the location and spatial changes of sound sources within the video content. For example, FAIR-Play can be used as the training dataset. When using FAIR-Play as the training dataset, some of its format can be Ambisonic (surround sound), and it can be batch-processed into Binaural format using a downsampling algorithm to facilitate the corresponding training.

[0037] Step S220: Obtain the second image features of each video frame, and synthesize the two-channel audio in the video into mono audio, and obtain the second audio features of the mono audio.

[0038] Step S230: Train a pre-built neural network model based on the second image features and the second audio features to obtain a pre-trained neural network model.

[0039] In the embodiments corresponding to steps S210 to S230, by acquiring a training dataset containing two channels, the second image features of video frames in each video are obtained, and the two-channel audio in the video is synthesized into mono audio. The second audio features of the mono audio are obtained, and a pre-built neural network model is trained based on the second image features and the second audio features to obtain a pre-trained neural network. Since the audio corresponding to the training dataset is two-channel audio, by comparing the two-channel audio obtained based on the neural network model with the two-channel audio in the original training dataset, the neural network model can effectively learn mono to two-channel information based on the image features of the video.

[0040] Step S130: Determine the left and right channel audio of the target video file based on the spectral mask.

[0041] In an exemplary embodiment, such as Figure 3 As shown, step S130 may include steps S131 to S132: Step S131: Determine the channel difference based on the spectral mask and the audio of the target video file. The channel difference is the difference between the left channel audio and the right channel audio.

[0042] Specifically, the vocal tract difference can be calculated using the following formula: L D =istft(S I M); Among them, L D S is the channel difference. I is the input mono audio spectrum, M is the spectral mask, and istft is the short-time inverse Fourier transform.

[0043] Step S132: Determine the left channel audio and right channel audio based on the channel difference and the audio of the target video file, respectively.

[0044] The left and right channel audio can be calculated using the following formulas: L L =(L I +L D ) / 2; L R =(L I -L D ) / 2; Among them, L L Indicates the left channel audio, L R Indicates the right channel audio, L I This indicates the input mono audio.

[0045] In the embodiments corresponding to steps S131 to S132, the channel difference is determined based on the spectral mask and the audio of the target video file. The left channel audio and the right channel audio are determined based on the channel difference and the audio of the target video file, respectively. This makes it easy to obtain the dual-channel audio of the target video file and realize the conversion from mono to dual-channel.

[0046] In practical applications, the left and right channel audio can be combined into a stereo format using the following formula: L B =cat(L L ,L R ); Among them, L B This indicates stereo sound, and "cat" indicates a splicing operation.

[0047] Please refer to Figure 4 This diagram illustrates the principle of the audio generation method. As shown, for video frame information, image features are extracted using an image feature extractor; for mono audio, it can be considered as the sum of the left and right channels with spatial characteristics, which is converted into a spectrogram using a short-time Fourier transform. Audio features are obtained from the converted spectrogram; a neural network model is used to calculate a spectral mask of the same size as the spectrogram based on the image and audio features. By combining the initial mono audio and the mask, the difference between the left and right channels can be obtained, and then the audio of the left and right channels can be reconstructed based on the difference between the left and right channels.

[0048] The audio generation method provided in this application obtains the first image features of the video frame in the target video file and the first audio features of the audio in the target video file. It then uses a pre-trained neural network model to generate a spectral mask based on the first image features and the first audio features. Based on the spectral mask, it determines the left and right channel audio of the target video file. The neural network can automatically convert mono audio video into stereo audio without performing complex calculations for restoration, thereby reducing the rendering difficulty and complexity of binaural audio.

[0049] In an exemplary embodiment, the pre-built neural network includes a U-net model, which comprises N downsampling layers and N upsampling layers, where N is a positive integer greater than 1. In step S230, the pre-built neural network model is trained based on the second image features and the second audio features, as follows: Figure 5 As shown, it may include steps S231 to S232: Step S231: Extract N image sub-features of the second image features.

[0050] In an exemplary embodiment, the pre-built neural network further includes a Feature Adapter Network, which comprises several stacked integrated residual connections and 2D convolutional modules. Step S231 can specifically be: using the Feature Adapter Network to extract N image sub-features of the second image features. That is, extracting N features of different granularities of the second image features through the Feature Adapter Network.

[0051] Step S232: The second audio feature is mapped to N layers of audio sub-features through the downsampling layer, and the audio sub-features of the current layer are fused with an image sub-feature in each downsampling layer.

[0052] In an exemplary embodiment, step S232, mapping the second audio feature to N layers of audio sub-features through the downsampling layer, may include: mapping the second audio feature to N layers of audio sub-features through the downsampling layer using average pooling.

[0053] In an exemplary embodiment, the U-net model processes the second audio feature through modules that are stacked alternately using convolution and self-attention mechanisms.

[0054] It should be understood that this embodiment is based on a condition concept in the latent diffusion-based generation task (T2I-Adapter), which maps features to different levels and fuses them in a corresponding way based on upsampling and downsampling in the U-net architecture.

[0055] Please refer to Figure 6 This is a schematic diagram of a neural network model. As shown in the figure, N=4, and the U-net model has 4 layers. To the left of the dashed line is the Feature Adapter Network, which extracts four different granularities of image features. Each layer in the Feature Adapter Network includes a 2D convolutional module, an average pooling module, and an activation function (ReLU). The entire Feature Adapter Network includes residual connections. To the right of the dashed line is the U-net architecture model, which maps audio features to four levels of features through four downsampling layers. In each downsampling layer, the image sub-features of the current level are fused with the audio sub-features of the corresponding level. In the downsampling and upsampling layers of the U-net structure, each layer includes a 2D convolutional layer (Conv2d) and a self-attention mechanism (Self-attn). In the downsampling layer, average pooling (Avg Pool) is used to map the audio features. In the upsampling layer, an interpolation module is also included.

[0056] In addition, during training, the loss function is calculated by comparing the dual-channel audio predicted by the neural network model with the dual-channel audio in the training dataset to optimize the neural network model. Optionally, a combination of L1 loss and MSE loss can be used to calculate the loss function. ; ; Where L1 loss and MSE loss both represent the similarity between the generated two-channel audio and the audio in the training dataset, and y represents the Mel spectrum of the audio in the training dataset. The value represents the Mel spectrum of the generated audio, and N represents the number of predicted and actual spectra.

[0057] In this embodiment, N image sub-features of the second image feature are extracted, and the second audio feature is mapped to N layers of audio sub-features through a downsampling layer. In each downsampling layer, the audio sub-feature of the current layer is fused with an image sub-feature. Since features of different layers can obtain different levels of detail information, by fusing audio features and image features of different levels, image features and audio features can be weighted at different scales, which effectively helps the neural network model learn the relationship between the orientation information in the video frame and the left and right channels, thereby improving the accuracy of the generated stereo audio.

[0058] Example 2 Figure 7 The diagram schematically illustrates an audio generation apparatus 300 according to Embodiment 2 of this application. This audio generation apparatus 300 can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiments of this application. The program modules referred to in the embodiments of this application are a series of computer program instruction segments capable of performing specific functions. The following description will specifically introduce the functions of each program module in this embodiment.

[0059] like Figure 7 As shown, the audio generation device 300 may include an acquisition module 310, a mask generation module 320, and a determination module 330.

[0060] The acquisition module 310 is used to acquire the first image features of the video frame in the target video file and the first audio features of the audio in the target video file, wherein the audio is mono audio. The mask generation module 320 is used to generate a spectral mask based on the first image features and the first audio features using a pre-trained neural network model. The determination module 330 is used to determine the left and right channel audio of the target video file based on the spectral mask.

[0061] In an exemplary embodiment, the audio generation device 300 is further configured to: acquire a training dataset, the training dataset including multiple videos, the audio corresponding to the videos being stereo audio; acquire the second image features of video frames in each video, and synthesize the stereo audio in the video into mono audio, acquiring the second audio features of the mono audio; and train a pre-built neural network model based on the second image features and the second audio features to obtain a pre-trained neural network model.

[0062] In an exemplary embodiment, the pre-built neural network model includes a U-net model, which includes N downsampling layers and N upsampling layers, where N is a positive integer greater than 1; the audio generation device 300 is further configured to: extract N image sub-features of the second image features; map the second audio features to N audio sub-features through the downsampling layers, and fuse the audio sub-features of the current layer with an image sub-feature in each downsampling layer.

[0063] In an exemplary embodiment, the pre-built neural network model further includes a feature adaptation network, which includes several stacked integrated residual connections and 2D convolutional modules. The audio generation device 300 is also used to: extract N image sub-features of the second image features using the feature adaptation network.

[0064] In an exemplary embodiment, the audio generation apparatus 300 is further configured to: map the second audio feature into N layers of audio sub-features by means of average pooling through the downsampling layer.

[0065] In an exemplary embodiment, the U-net model processes the second audio feature through modules that are stacked alternately using convolution and self-attention mechanisms.

[0066] In an exemplary embodiment, the determining module 330 is further configured to: determine the channel difference based on the spectral mask and the audio of the target video file, wherein the channel difference is the difference between the left channel audio and the right channel audio; and determine the left channel audio and the right channel audio based on the channel difference and the audio of the target video file, respectively.

[0067] Example 3 Figure 8 The diagram schematically illustrates the hardware architecture of a computer device 400 suitable for an audio generation method according to Embodiment 3 of this application. The computer device 400 can be a device capable of automatically performing numerical calculations and / or data processing according to pre-set or stored instructions. For example, it can be a rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters composed of multiple servers), gateway, etc. Figure 8As shown, the computer device 400 includes, but is not limited to, a memory 410, a processor 420, and a network interface 430 that can communicate with each other via a system bus. Wherein: The memory 410 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 410 may be an internal storage module of the computer device 400, such as the hard disk or memory of the computer device 400. In other embodiments, the memory 410 may also be an external storage device of the computer device 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Of course, the memory 410 may include both the internal storage module and the external storage device of the computer device 400. In this embodiment, the memory 410 is typically used to store the operating system and various application software installed on the computer device 400, such as program code for audio generation methods. In addition, the memory 410 can also be used to temporarily store various types of data that have been output or will be output.

[0068] In some embodiments, processor 420 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 420 is typically used to control the overall operation of computer device 400, such as performing control and processing related to data interaction or communication with computer device 400. In this embodiment, processor 420 is used to run program code stored in memory 410 or process data.

[0069] Network interface 430 may include a wireless network interface or a wired network interface, which is typically used to establish a communication link between computer device 400 and other computer devices. For example, network interface 430 is used to connect computer device 400 to an external terminal via a network, establishing a data transmission channel and communication link between computer device 400 and the external terminal. The network may be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.

[0070] It should be pointed out that, Figure 8 Only a computer device with components 410-430 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0071] In this embodiment, the audio generation method stored in memory 410 can be further divided into one or more program modules and executed by one or more processors (processor 420 in this embodiment) to complete the embodiment of this application.

[0072] Example 4 This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the audio generation method in the embodiments.

[0073] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the audio generation method in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.

[0074] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.

[0075] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An audio generation method, characterized in that, include: Obtain the first image features of the video frame in the target video file, and obtain the first audio features of the audio in the target video file, wherein the audio is mono audio; A spectral mask is generated based on the first image features and the first audio features using a pre-trained neural network model; The left and right channel audio of the target video file are determined based on the spectral mask. This also includes: Obtain a training dataset, which includes multiple videos, and the audio corresponding to the multiple videos is dual-channel audio; The second image features of each video frame in the video are obtained, and the stereo audio in the video is synthesized into mono audio, and the second audio features of the mono audio are obtained. A pre-built neural network model is trained based on the second image features and the second audio features to obtain the pre-trained neural network model; The pre-built neural network model includes the U-net model, which includes N downsampling layers and N upsampling layers, where N is a positive integer greater than 1. The step of training a pre-constructed neural network model based on the second image features and the second audio features includes: Extract N image sub-features from the second image features; The second audio feature is mapped to N layers of audio sub-features through the downsampling layer, and the audio sub-features of the current layer are fused with one of the image sub-features in each downsampling layer.

2. The audio generation method according to claim 1, characterized in that, The pre-built neural network model further includes a feature adaptation network, which comprises several stacked integrated residual connections and 2D convolutional modules. The extraction of N image sub-features from the second image features includes: The feature adaptation network is used to extract N image sub-features of the second image features.

3. The audio generation method according to claim 2, characterized in that, The step of mapping the second audio feature to N layers of audio sub-features through the downsampling layer includes: The second audio feature is mapped to N layers of audio sub-features by using average pooling in the downsampling layer.

4. The audio generation method according to claim 3, characterized in that, The U-net model processes the second audio feature through modules that are stacked alternately using convolution and self-attention mechanisms.

5. The audio generation method according to any one of claims 1-4, characterized in that, The step of determining the left and right channel audio of the target video file based on the spectral mask includes: The channel difference is determined based on the spectral mask and the audio of the target video file, wherein the channel difference is the difference between the left channel audio and the right channel audio; The left channel audio and the right channel audio are determined based on the channel difference and the audio of the target video file, respectively.

6. An audio generation apparatus, characterized in that, The apparatus for performing the audio generation method according to any one of claims 1 to 5, the apparatus comprising: The acquisition module is used to acquire the first image features of the video frame in the target video file and the first audio features of the audio in the target video file, wherein the audio is mono audio. A mask generation module is used to generate a spectral mask based on the first image features and the first audio features using a pre-trained neural network model. The determination module is used to determine the left and right channel audio of the target video file based on the spectral mask.

7. A computer device, the computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the audio generation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by at least one processor to cause the at least one processor to perform the steps of the audio generation method according to any one of claims 1 to 5.

9. A computer program product comprising computer instructions, characterized in that, When executed by a processor, the computer instructions implement the steps of the audio generation method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Dual-channel audio generation method based on multi-modal perception

    CN116456262A