Two-stage human voice accompaniment separation method based on first separation and second compensation
By improving the two-stage vocal accompaniment separation method, and utilizing a stacked hourglass architecture and signal compensation module, the problems of low and incomplete vocal accompaniment separation quality in existing technologies are solved, achieving a higher quality separation effect.
Patent Information
- Application Number
- CN202411250579.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Existing vocal accompaniment separation technologies have shortcomings in terms of separation quality and incompleteness, especially neural network-based methods, which have problems with low quality and incompleteness of the separated audio signal.
A two-stage approach based on separation followed by compensation is adopted. In the first stage, an improved stacked hourglass architecture model and an optimized constraint loss function are used for initial separation. In the second stage, a signal compensation module of gated TCN and asymmetric convolutional network is used for further signal compensation to improve the separation quality.
The improved two-stage method alleviates the problem of incomplete signal separation, improves the quality of the separated audio signal, and makes the vocal and accompaniment signals purer.
Smart Images

Figure CN118969006A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of audio processing, relates to the direction of sound signal separation, and particularly to a two-stage vocal accompaniment separation method based on first separation and then compensation. Background Art
[0002] Vocal accompaniment separation technology is an audio processing technology used to separate the vocals and accompaniment parts of a mixed audio track. This process usually involves complex algorithms and machine learning techniques to ensure that the separated audio tracks maintain high quality. This technology has many important applications in virtual music education, which can significantly improve students' learning experience and teaching effects. It not only improves the flexibility and convenience of education, but also enriches teaching content and resources, and enhances interactivity and personalized experience.
[0003] Early vocal accompaniment separation technology mainly relied on signal processing methods and basic mathematical models. Although these methods can achieve certain results in specific situations, they have many limitations overall. In recent years, neural network-based methods have made significant progress and development in this field, especially U-Net and stacked hourglass architecture models, which are very competitive in this regard. However, there are also shortcomings, such as the quality of the separated audio signal is not as good as the original audio signal. At the same time, there is also the problem of incomplete separation, which causes the separated audio track to contain sound components that do not belong to the track, affecting the separation quality. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a two-stage vocal and accompaniment separation method based on separation followed by compensation. In the first stage, an improved stacked hourglass architecture model and an optimized constraint loss function are used to perform preliminary separation on the mixed audio signal to obtain separated vocal and accompaniment signals; in the second stage, the separated signals are further compensated to obtain purer vocal and accompaniment audio tracks, so as to improve the quality of the separated signals and alleviate the problem of incomplete signal separation.
[0005] A two-stage vocal accompaniment separation method based on separation first and then compensation comprises the following steps: Step 1: Preprocess the audio signal to obtain the amplitude spectrum characteristics and phase characteristics of the mixed audio signal, as well as the amplitude spectrum characteristics S1 of the human voice and the amplitude spectrum characteristics S2 of the accompaniment.
[0006] Step 1.1: Sample the original audio and convert it into a discrete digital signal that can be processed by the computer system. The original audio sampling rate is usually 44.1kHz or 48kHz, which can be downsampled to 22.05kHz or 16kHz. Audio downsampling will lose high-frequency information, but in many vocal accompaniment separation tasks, the audio information of the human voice and accompaniment is mainly concentrated in the lower frequency range, so downsampling can be performed without significantly affecting the separation effect, so as to reduce the amount of data and reduce the computational complexity. In addition, the anti-aliasing filter in the downsampling process can remove high-frequency noise in the original signal, which helps to improve the quality of the audio signal.
[0007] Step 1.2: Process the audio signal x[n] Perform STFT transformation to obtain complex spectrum characteristics , represents the spectral information of the audio signal at different time points and frequency components, and then the complex spectrum features Take the absolute value to get the amplitude spectrum characteristics : X t ,f = ∑ n=0 N−1 x[n]∙ω[n−t]∙ e −j2πfn (1) in, is a window function, is the timeframe index, is the frequency bin index, is the length of each frame of the signal, is the sample index of the audio signal.
[0008] Step 2: Use the amplitude spectrum features of the mixed signal as the input of the first-stage stacked hourglass architecture model to obtain the mask estimate of the human voice and accompaniment separated in the first stage. and .
[0009] Step 2.1: Construct a stacked hourglass network model framework, including 4 cascaded hourglass modules. In order to alleviate the problem of diminishing marginal utility caused by stacking too many identical modules, the odd-sequence hourglass module is followed by a real fast Fourier transform (Real Fast Fourier Transform), and the even-sequence hourglass module is followed by an inverse real fast Fourier transform (Inverse Real Fast Fourier Transform). The output features are mapped to a new feature space to improve the performance of the model. Among them, RFFT and IRFFT are two variants of discrete Fourier transform DFT, which are specifically used to process real signals. RFFT is used to convert real signals in the time domain into frequency domain signals. Since the input signal is a real number, the result of RFFT is symmetrical, so only half of the frequency components need to be calculated, which reduces the amount of calculation. IRFFT is the inverse transform of RFFT, which is used to restore the frequency domain signal to a real signal in the time domain. Their formulas are as follows:
[0010] X k =RFFT(x[n])= ∑ n=0 N−1 x[n]∙ e −j2πkn / N (3) x n =IRFFT(X k )= 1 N ∑ k=0 N 2 X[k]∙ e j2πkn / N (4) in, X[k] is the kth component of the frequency domain signal, x[n] is the nth component of the real signal in the time domain, N is the total number of samples of the real signal in the time domain, k is the frequency index, and n is the time index.
[0011] Step 2.2: To alleviate the problem of incomplete signal separation, set the loss function for: in, An index indicating the number of separation sources, An index indicating the number of hourglass modules, Indicates The separation source is The time-frequency mask output by the hourglass module, represents element-wise product, express norm, represents the mean square error, and is the adaptively adjusted loss function weight, is a hyperparameter.
[0012] Improved loss function By adding To constrain the separation source, the predicted vocal signal contains as little accompaniment signal as possible, and the predicted accompaniment signal contains as little vocal signal as possible. In addition, the weights are adjusted adaptively. and To deal with unbalanced sound sources and optimize the quality of sound source separation.
[0013] Step 3: Mask the human voice estimated in the first stage and accompaniment mask Perform element-by-element product with the amplitude spectrum features of the mixed signal to obtain the preliminary estimated amplitude spectrum features of the human voice and accompaniment and .
[0014] Step 4: Combine the amplitude spectrum features of the human voice and accompaniment estimated in the first stage and After processing and transformation, it is input into the signal compensation module in the second stage to obtain the final predicted amplitude spectrum characteristics of the human voice and accompaniment and . In the second stage, a signal compensation model based on the series connection of gated TCN and asymmetric convolutional network is selected. The gated TCN network effectively expands the receptive field through dilated convolution and can capture long-term dependencies in music signals. At the same time, its gating mechanism can selectively transmit information, so that the model can better capture complex time dependencies and effectively filter out irrelevant information, enhance the expressive ability of the model, and more accurately separate the sound of the voice and accompaniment, making the separated signal clearer and purer. The parallel structure network based on asymmetric convolution can extract fine-grained features and can also capture the correlation between time and frequency. Similarly, in order to suppress the problem of diminishing marginal utility, RFFT and IRFFT transformations are introduced between models.
[0015] Step 4.1: First, the amplitude spectrum characteristics of the mixed signal The amplitude spectrum features of the vocals and accompaniment predicted in the first stage respectively and Subtract, and the residual signal is , , and are input into the vocal signal compensation module and the accompaniment signal compensation module respectively: Step 4.2: The residual signal is first input into a single information compensation module, which is composed of a gated TCN and an asymmetric convolutional network in series. It is first processed by a gated linear unit GLU, then processed by a one-dimensional convolution and GRU module, and then added to the original residual signal, and then input into the asymmetric convolutional network. After passing through the SE block and PreLu, it passes through 1 3 and 3 1 The two parallel branches of the asymmetric convolution are then added together, and the output result is obtained after a series of regularization methods and convolution operations.
[0016] The gated linear unit GLU first performs one-dimensional convolution on the input data to extract features, calculates the extracted features in parallel, and inputs them into two parallel branches for convolution, normalization and activation operations respectively. One of the branches is also subjected to sigmoid processing, and the output results of the two branches are multiplied. Through this gating mechanism, the information flow can be flexibly controlled, important information can be selectively transmitted, and irrelevant or noise information can be suppressed, thereby enhancing the expressiveness and generalization ability of the model.
[0017] Step 4.3: Input the output result into the next information compensation module, repeat the operation, and pass through n information compensation modules in total. The odd-numbered sequence information compensation module is followed by RFFT transformation, and the even-numbered sequence information compensation module is followed by IRFFT transformation. Where n is an even number.
[0018] Step 4.4: The residual signal of the human voice and accompaniment predicted in step 4.3 and The amplitude spectrum features of the vocals and accompaniment predicted in the first stage respectively and Add together to get the final predicted amplitude spectrum characteristics of the human voice and accompaniment and : Step 5: Transform the amplitude spectrum into and Phase characteristics of mixed audio signals The vocal and accompaniment signals are combined and reconstructed through inverse short-time Fourier transform.
[0019] The present invention has the following beneficial effects: The stacked hourglass model is improved through RFFT and IRFFT transformations to alleviate the problem of diminishing marginal utility. The improved loss function in the first stage and the signal compensation module in the second stage are used to obtain purer vocals and accompaniment tracks, thereby alleviating the problem of incomplete signal separation and improving the separated audio quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of a two-stage vocal accompaniment separation model based on separation first and then compensation; Figure 2 It is a schematic diagram of the vocal / accompaniment signal compensation module; Figure 3 It is a structural diagram of a single information compensation module. DETAILED DESCRIPTION
[0021] The present invention will be further explained below with reference to the accompanying drawings; like Figure 1 As shown, a two-stage vocal accompaniment separation method based on separation first and compensation later specifically includes the following steps: Step 1: Preprocess the audio signal to obtain the amplitude spectrum characteristics and phase characteristics of the mixed audio signal, as well as the amplitude spectrum characteristics S1 of the human voice and the amplitude spectrum characteristics S2 of the accompaniment.
[0022] Step 1.1: First, split the audio file. Here, librosa library is used as a tool to read the audio signal file and downsample it.
[0023] Step 1.2: Transform the sampled audio signal through STFT to obtain the complex spectrum characteristics , respectively taking the absolute value and calculating the radian of the complex matrix to obtain the amplitude spectrum characteristics of the audio signal and phase characteristics .
[0024] Step 1.3: Segment the amplitude spectrum features of the audio signal along the time dimension to obtain a size of 512 Amplitude spectrum characteristics of 64.
[0025] Step 2: Obtain mask estimates of the vocals and accompaniment separated in the first stage and .
[0026] Step 2.1: Construct a stacked hourglass network model framework, which includes 4 hourglass modules consisting of several convolutional layers, pooling layers and upsampling layers. RFFT transform is introduced after the 1st and 3rd hourglass modules, and IRFFT transform is introduced in the 2nd and 4th hourglass modules.
[0027] Step 2.2: In an hourglass module, a series of downsampling operations are first performed to condense information and retain key features. Then, the feature map is gradually refined and reconstructed through upsampling operations, and jump connections are introduced in the middle to help restore spatial details. The human voice signal mask is obtained in the bth hourglass module and accompaniment signal mask .
[0028] Step 2.3: To alleviate the problem of incomplete signal separation, set the loss function for: in, represents the amplitude spectrum characteristics of the mixed signal, An index indicating the number of separation sources, An index indicating the number of hourglass modules, Indicates The separation source is The time-frequency mask output by the hourglass module, represents element-wise product, express norm, represents the mean square error, and is the adaptively adjusted loss function weight, is a hyperparameter.
[0029] Step 3: Use the estimated time-frequency mask to obtain the amplitude spectrum features of the predicted vocals and accompaniment.
[0030] The first stage estimated voice mask and accompaniment mask The amplitude spectrum characteristics of the mixed signal Perform element-by-element multiplication to obtain the amplitude spectrum characteristics of the human voice and accompaniment. and : Step 4: Figure 2 As shown, a signal compensation module based on the series connection of gated TCN architecture and asymmetric convolutional network architecture is constructed.
[0031] Step 4.1: First, the amplitude spectrum characteristics of the mixed signal The amplitude spectrum features of the vocals and accompaniment predicted in the first stage respectively and Subtract, the size is 512 64 residual signal , , and are input into the vocal signal compensation module and the accompaniment signal compensation module respectively.
[0032] Step 4.2: If Figure 3 As shown in Figure 1, the residual signal is first input into a single information compensation module, which is composed of a gated TCN and an asymmetric convolutional network in series. It is first processed by a gated linear unit GLU, then processed by a one-dimensional convolution and GRU module, and then added to the original residual signal, and then input into the asymmetric convolutional network. After passing through the SE block and PreLu, it passes through 1 3 and 3 1 The two parallel branches of the asymmetric convolution are then added together, and the output result is obtained after a series of regularization methods and convolution operations.
[0033] Step 4.3: Input the output result into the next information compensation module, repeat the operation, and go through 16 information compensation modules in total. The odd sequence information compensation module is followed by RFFT transformation, and the even sequence information compensation module is followed by IRFFT transformation.
[0034] Step 4.4: The residual signal of the human voice and accompaniment predicted in step 4.3 and The amplitude spectrum features of the vocals and accompaniment predicted in the first stage respectively and Add together to get the final predicted amplitude spectrum characteristics of the human voice and accompaniment and .
[0035] Step 5: Reconstruct the vocal and accompaniment signals.
[0036] Step 5.1: The amplitude spectrum features predicted in the second stage and Phase characteristics of mixed audio signals Combined, the vocal and accompaniment signals are reconstructed through inverse short-time Fourier transform.
[0037] Step 5.2: Splice the segmented reconstructed signals along the time dimension to finally obtain a complete reconstructed audio signal.
Claims
1. A two-stage vocal accompaniment separation method based on separation first and then compensation, characterized in that: The specific steps include: Step 1: pre-process the audio signal to obtain the amplitude spectrum characteristics and phase characteristics of the mixed audio signal, as well as the corresponding amplitude spectrum characteristics S1 of the human voice and the amplitude spectrum characteristics S2 of the accompaniment; Step 2: Use the amplitude spectrum features of the mixed signal as the input of the first-stage stacked hourglass architecture model to obtain the mask estimate of the human voice and accompaniment separated in the first stage. and ; Step 3: Mask the human voice estimated in the first stage and accompaniment mask Perform element-by-element product with the amplitude spectrum features of the mixed signal to obtain the preliminary estimated amplitude spectrum features of the human voice and accompaniment and ; Step 4: Combine the amplitude spectrum features of the human voice and accompaniment estimated in the first stage and After processing and transformation, it is input into the signal compensation module in the second stage to obtain the final predicted amplitude spectrum characteristics of the human voice and accompaniment and , the specific steps are: Step 4.1: The amplitude spectrum characteristics of the mixed signal The amplitude spectrum features of the vocals and accompaniment predicted in the first stage respectively and Subtract, and the residual signal is , , and input them into the vocal signal compensation module and the accompaniment signal compensation module respectively; Step 4.2: The residual signal is first input into a model of a single gated TCN and an asymmetric convolutional network in series, first passes through a gated linear unit GLU, then passes through a one-dimensional convolution and GRU module, and then is added to the original residual signal, and then input into the asymmetric convolutional network, and then passes through 1 after SE block and PreLu. 3 and 3 1. The two parallel branches of the asymmetric convolution are then added together, and the output result is obtained after a series of regularization methods and convolution operations; Step 4.3: Repeat step 4.2 to perform multiple signal compensation operations; Step 4.4: The residual signal of the human voice and accompaniment predicted in step 4.3 and The amplitude spectrum features of the vocals and accompaniment predicted in the first stage respectively and Add together to get the final predicted amplitude spectrum characteristics of the human voice and accompaniment and ; Step 5: Transform the amplitude spectrum into and Phase characteristics of mixed audio signals Combined, the vocal and accompaniment signals are reconstructed through short-time Fourier inverse transform.
2. A two-stage vocal accompaniment separation method based on separation first and compensation later as claimed in claim 1, characterized in that: The step 1 is specifically as follows: Step 1.1: Sample the original audio, convert it into discrete digital signals, and then perform downsampling operations; Step 1.2: Process the audio signal Perform STFT transformation to obtain complex spectrum characteristics , and then take the absolute value to get the amplitude spectrum characteristics : in, is a window function, is the timeframe index, is the frequency bin index, is the length of each frame of the signal, is the sample index of the audio signal.
3. A two-stage vocal accompaniment separation method based on separation first and compensation later as claimed in claim 1, characterized in that: The stacked hourglass architecture model includes four cascaded hourglass modules, and the odd-numbered hourglass modules are followed by RFFT transformation, and the even-numbered hourglass modules are followed by IRFFT transformation: in, is the kth component of the frequency domain signal, is the nth component of the real signal in the time domain, N is the total number of samples of the real signal in the time domain, k is the frequency index, and n is the time index.
4. A two-stage vocal accompaniment separation method based on separation first and compensation later as claimed in claim 1, characterized in that: Setting the loss function for the stacked hourglass architecture model for: in, An index indicating the number of separation sources, An index indicating the number of hourglass modules, Indicates The separation source is The time-frequency mask output by the hourglass module, represents element-wise product, express norm, represents the mean square error, and is the adaptively adjusted loss function weight, is a hyperparameter.
5. A two-stage vocal accompaniment separation method based on separation first and compensation later as claimed in claim 1, characterized in that: The gated linear unit GLU first performs one-dimensional convolution on the input data to extract features, performs parallel calculation on the extracted features, and inputs them into two parallel branches to perform convolution, normalization and activation operations respectively. One of the branches also undergoes sigmoid processing, and the output results of the two branches are multiplied.
6. A two-stage vocal accompaniment separation method based on separation first and compensation later as claimed in claim 1, characterized in that: An even-numbered signal compensation operation is performed, and an RFFT transformation is performed after the odd-numbered signal compensation operation, and an IRFFT transformation is performed after the even-numbered signal compensation operation.
7. A two-stage vocal accompaniment separation method based on separation first and compensation later as claimed in claim 1, characterized in that: Perform 16 signal compensation operations.
8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Language recognition method and device, model training method and device, and facility
CN110853618A
Music source separation method based on stacked hourglass network
CN112259119A
Music and human voice separation method based on U-shaped network and audio fingerprints
CN113129920A
Lightweight convolutional network and Transform combined human body key point detection method
CN115222959A
Human voice accompaniment separation model training method and device and electronic equipment
CN116259329A
Cited By
Accompaniment extraction method and system based on modal decomposition
CN119479591A
Deep neural network assisted mechanical sound source real-time separation method and system
CN119559961A
