Multi-task voice recovery method based on ResUNet

Through the multi-task speech recovery method based on ResUNet, combining the advantages of UNet and ResNet, improving the bottleneck layer and adding a mask self-attention mechanism, it solves the problem of poor speech recovery effect in the existing technology when faced with multiple distortions in complex environments. problem, achieving high-quality recovery and model performance improvement for a variety of speech distortions.

CN118737178APending Publication Date: 2024-10-01CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410898854.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing speech restoration methods are ineffective when facing various types of distortion in complex environments. Network structure problems lead to high training difficulty and poor performance, and cannot extract deep features, resulting in poor speech restoration effects.

Method used

Adopt a multi-task speech recovery method based on ResUNet, combine the advantages of UNet and ResNet, improve the bottleneck layer and add a mask self-attention mechanism, use a multi-resolution short-time Fourier transform loss function, and build up-sampling and down-sampling modules Model that handles various speech distortions, such as noise, reverberation, clipping, packet loss, etc.

Benefits of technology

It achieves high-quality recovery of multiple speech distortions in complex environments, improves the training efficiency and performance of the model, can handle multiple distortion types at the same time, and improves the speech recovery effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118737178A_ABST
    Figure CN118737178A_ABST
Patent Text Reader

Abstract

The invention relates to the field of audio data processing, in particular to a ResUNet-based multi-task voice recovery method, which comprises the following steps of: mixing collected clean voice data and noise data to obtain noisy voice data; carrying out distortion processing on the noisy voice data to obtain degraded voice data; constructing a ResUNet-based multi-task voice recovery model, wherein the ResUNet-based multi-task voice recovery model comprises an up-sampling module, a bottleneck layer and a down-sampling module; training a multi-task voice recovery model by using the degraded voice data, and calculating loss by using a multi-resolution short-time Fourier transform loss function; and sending to-be-processed low-quality voice into the trained multi-task voice recovery model to generate high-quality voice.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of audio data processing, and in particular to a multi-task speech recovery method based on ResUNet. Background Art

[0002] Speech signals are acoustic waveforms generated by humans during communication. The sounds emitted by human vocal organs with certain information are an indispensable means of obtaining and transmitting information in our lives. In recent years, with the explosive growth of data in the information age, humans have entered the era of data-driven intelligent voice. Nowadays, voice technology plays an important role in online audio and video conferencing, voice assistants, real-time translation, smart speakers, security monitoring, and intelligent customer service. With the widespread application of audio technology, such as voice communication, music playback, and speech recognition, the quality requirements for audio signals are getting higher and higher. However, audio signals are often affected by factors such as noise, compression, and various other distortions, which lead to a decrease in sound quality and increase the difficulty of speech understanding. In order to improve the quality of speech, improve speech comprehension, and deal with various speech distortions, speech restoration methods based on deep learning have become the focus of research.

[0003] Speech restoration is the process of restoring degraded speech signals to high-quality speech signals. In the past, speech restoration usually dealt with noise and reverberation, but rarely dealt with distortions such as reverberation, clipping, bandwidth reduction, packet loss, etc. Traditional speech restoration methods usually need to assume that the noise is stable, linear, additive Gaussian noise, and reduce the interference of stable noise by processing the signal in the frequency domain or time domain, such as using Wiener filtering, spectral subtraction, or other digital signal processing techniques. With the development of deep learning, speech enhancement methods based on DNN, UNet, and GAN have achieved advanced results. These methods can automatically learn complex noise models and adapt to non-stationary noise environments. However, in the past few years, speech restoration methods based on deep learning have mainly focused on single-task restoration, such as speech denoising, speech dereverberation, and speech super-resolution. The disadvantage of these methods is that they only focus on the restoration of the effects of individual distortions. In reality, it is very likely that multiple distortions will interfere with speech at the same time. In this case, it is difficult for the past speech restoration methods to restore high-quality clean speech. Therefore, scholars have conducted more in-depth research and tried to solve multiple types of distortions at the same time, but the current methods still have the following problems:

[0004] 1) Few types of distortion: The currently designed model can only solve two or three types of distortion at the same time. The distortion types are not covered very much, and it cannot adapt to the complex real environment and has poor versatility.

[0005] 2) The network structure is not advanced, resulting in high training difficulty and poor model performance: In the past, models often had problems with gradient vanishing and gradient exploding when extracting features due to problems with the network structure. This resulted in insufficient network depth and the inability to extract deeper features of the speech signal, resulting in the inability to further improve the final speech restoration effect. Summary of the invention

[0006] To solve the above problems, the present invention provides a multi-task speech restoration method based on ResUNet, which can achieve high-quality restoration for different speech distortion situations in a variety of complex environments.

[0007] Specific solutions include:

[0008] S1. Mixing the collected clean speech data and noise data to obtain noisy speech data;

[0009] S2. The noisy speech data is distorted to obtain degraded speech data; the degraded speech data includes low-quality speech data of different distortion types;

[0010] S3. Build a multi-task speech recovery model based on ResUNet, which includes an upsampling module, a bottleneck layer, and a downsampling module;

[0011] S4. Use degraded speech data to train a multi-task speech restoration model and use a multi-resolution short-time Fourier transform loss function to calculate the loss;

[0012] S5. Send the low-quality speech to be processed into the trained multi-task speech restoration model to generate high-quality speech.

[0013] Beneficial effects of the present invention:

[0014] The method proposed in the present invention can not only restore speech with noise and reverberation, but also restore speech with other distortions, including distortion caused by factors such as clipping, packet loss, low resolution, and codec, so as to perform general speech restoration on distorted speech in complex environments. In addition, when extracting features, previous models often may cause problems such as gradient vanishing and gradient explosion due to network structure problems, making training difficult, and also resulting in insufficient network depth, making it impossible to extract deeper features of speech signals, resulting in the final speech restoration effect unable to be further improved. In this regard, we combined the advantages of the two models of UNet and ResNet, improved the bottleneck layer, added a masked self-attention mechanism, and improved the training efficiency and performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flow chart of the method of the present invention;

[0016] Figure 2 This is a structural diagram of the multi-task speech recovery model of the present invention;

[0017] Figure 3 The structure diagram of the coding layer and the decoding layer of the present invention;

[0018] Figure 4 This is the structure diagram of the self-attention module of the present invention;

[0019] Figure 5 It is a schematic diagram of the speech distortion simulation process of the present invention;

[0020] Figure 6 Schematic diagram of the speech recovery process in the test result stage of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] The present invention provides a multi-task speech restoration method based on ResUNet. Figure 1 As shown, the following steps are included:

[0023] S1. Mix the collected clean speech data and noise data to obtain noisy speech data.

[0024] Specifically, the clean speech data and the noise data are mixed according to the probability that may exist in reality, and the mixed noisy speech data can be expressed as their linear sum:

[0025] t(n)=s(n)+v(n)

[0026] Among them, t(n) represents noisy speech, s(n) represents clean speech, and v(n) represents noise.

[0027] S2. Perform distortion processing on the noisy speech data to obtain degraded speech data; the degraded speech data includes low-quality speech data of different distortion types.

[0028] Specifically, this embodiment will perform distortion modeling on several types of distortion, such as reverberation, clipping, low resolution, packet loss, automatic gain control (AGC) and global system for mobile communications (GSM), to reduce voice quality, increase the difficulty of voice understanding, and thus simulate the complex and changeable voice distortion conditions in life.

[0029] Step S2 performs distortion processing on the noisy speech data to obtain degraded speech data, including:

[0030] S21. Perform reverberation distortion processing on noisy speech data; Reverberation is caused by the reflection of the signal in the room. Reverberation makes the speech signal sound distant and fuzzy. It can be modeled by convolving the speech signal with the room impulse response (RIR), expressed as:

[0031] d rev (t) = t*r

[0032] Among them, d rev (t) represents low-quality speech data of reverberation distortion type, t represents noisy speech data, r represents room impulse response, and * represents convolution operation;

[0033] S22. Low-resolution distortion processing is performed on the noisy speech data; low-resolution distortion refers to audio records recorded at a low sampling rate or limited bandwidth, which may cause high-frequency information to be missing due to compression, low sampling rate, low-pass filtering, etc. In this embodiment, a low-pass filter h is used to simulate low-resolution distortion. h can be one of various filters such as Butterworth filter, Chebyshev filter and Bessel filter. First, the filter h is convolved with t, and then the filtered result is resampled from the original sampling rate o to a lower sampling rate u, which is expressed as:

[0034] d low_res (t)=Resample(t*h,o,u)

[0035] Among them, d low_res (t) represents low-quality speech data of low-resolution distortion type, h represents the filter, o represents the original sampling rate of noisy speech data, and u represents the low sampling rate after low-resolution distortion processing;

[0036] Resample(·) means resampling;

[0037] S23. Perform clipping distortion processing on the noisy speech data; Clipping distortion refers to the clipping amplitude of the audio signal, which is usually caused by a low-quality microphone. Clipping can be modeled by limiting the signal amplitude to [-η, +η], expressed as:

[0038] d clip (t)=max(min(t,η),-η),η∈[0,1]

[0039] Among them, d clip (t) represents low-quality speech data of clipping distortion type, and η represents the signal amplitude;

[0040] S24. Packet loss and distortion processing is performed on the noisy voice data; packet loss usually occurs in the case of network congestion. Voice packets in packet switching networks will cause packet loss problems during transmission due to delays and jitters. Therefore, this embodiment simulates packet loss and distortion by randomly selecting a portion of the audio of the noisy voice data for mute settings;

[0041] S25. Perform noise gate and random gain distortion processing on the noisy speech data, expressed as:

[0042]

[0043] Among them, d thr (t) represents low-quality speech data of noise gate distortion type, and threshold represents the noise gate threshold;

[0044] S26. Perform GSM transmission distortion processing on the noisy speech data. The GSM transmission distortion simulation mainly applies the GSM "full rate" compression algorithm to simulate the sound of a 2G cellular phone connection and resamples it to a fixed 8kHz, expressed as:

[0045] d GSM (t)=GSMFullRateCompressor(Resample(t,o,8kHz))

[0046] Among them, d GSM (t) represents the low-quality speech data of GSM transmission distortion type, o represents the original sampling rate of noisy speech data, and GSMFullRateCompressor (·) represents the GSM full-rate compression algorithm.

[0047] S3. Build a multi-task speech recovery model based on ResUNet, which includes an upsampling module, a bottleneck layer, and a downsampling module.

[0048] Specifically, the basic structure of ResUNet is an encoder-decoder structure. On the basis of ResUNet, the present invention constructs an encoder-decoder structure with an eight-layer symmetrical structure, such as Figure 2 As shown, it is used for downsampling and upsampling of speech features; in particular, the layers in the encoder and decoder have residual connections, and there is also a skip connection structure between the corresponding encoding layer and the decoding layer.

[0049] Specifically, Figure 2 , Figure 3 As shown in the figure, the upsampling module includes 8 cascaded encoding layers, all of which have the same structure; each encoding layer includes the first main branch and the first residual branch, the first main branch includes the cascaded strided one-dimensional convolution layer (Conv1d), the rectified linear unit (ReLU) layer, the 1×1 convolution layer (1×1Conv) and the gated linear unit (GLU) layer; the first residual branch includes the cascaded strided one-dimensional convolution layer and the gated linear unit layer; wherein the strided one-dimensional convolution layer downsamples the length of the input. The kernel size of the strided one-dimensional convolution layer of each encoder layer is K=4, the stride of the strided convolution is S=2, and the number of output channels of the strided one-dimensional convolution layer is H, where H controls the capacity of the model, the kernel size of the 1×1 convolution layer is 1, and since the GLU layer halves the channels, the number of output channels of the 1×1 convolution layer doubles to 2H. In particular, the number of output channels of the strided one-dimensional convolutional layers belonging to the same coding layer is the same, the number of output channels of the strided one-dimensional convolutional layers in different coding layers is different, the number of output channels of the strided one-dimensional convolutional layer in the next coding layer is twice that of the previous coding layer, and the maximum number of output channels of the strided one-dimensional convolutional layer is 768.

[0050] The downsampling module includes 8 cascaded decoding layers, which are paired with the corresponding encoder layers in reverse order, and all decoding layers have the same structure; each decoding layer includes a second main branch and a second residual branch, and the second main branch includes a cascaded one-dimensional transposed convolution layer (ConvTranspose1d), a rectified linear unit layer, a 1×1 convolution layer, and a gated linear unit layer; the second residual branch includes a cascaded one-dimensional transposed convolution layer and a rectified linear unit layer; wherein the one-dimensional transposed convolution layer upsamples the length of the input.

[0051] like Figure 2 As shown, 8 encoding layers and 8 decoding layers are jump-connected one by one.

[0052] Specifically, the bottleneck layer consists of 5 self-attention modules, such as Figure 4As shown in the figure, each self-attention module consists of a multi-head self-attention layer and a positional fully connected layer (feedforward); the multi-head self-attention layer uses a mask operation. For a sequence, at time t, the output should only depend on the output before time t, and cannot depend on the output after time t. The specific operation is to generate an upper triangular matrix with all upper triangular values ​​1, all lower triangular values ​​0, and the diagonal 0, and then apply this matrix to each sequence. Here, an eight-head self-attention layer is used. The input is multiplied by the eight matrices to obtain the query / key / value (Q / K / V). The attention is calculated by the output query / key / value matrix, and all attention heads are spliced ​​together and multiplied by the additional weight matrix to obtain the result. The attention calculation is as follows:

[0053]

[0054] where d k is the scaling factor, the default is 64.

[0055] The main purpose of the positional fully connected layer is to apply a fully connected feed-forward network separately at each position of the sequence, which contains two linear transformations and a nonlinear function, expressed as:

[0056] feedforward=max(0,x'W1+b1)W2+b2

[0057] Among them, x' represents the input, W1 and W2 represent the weight matrices, and b1 and b2 represent the bias matrices.

[0058] like Figure 4 As shown, both the multi-head self-attention layer and the position fully connected layer have a skip connection and layer normalization. In this embodiment, the number of heads of the multi-head self-attention layer is 8, and the model dimension is 512; the input channel size of the position fully connected layer is 512, and the output channel size is 2048.

[0059] S4. The multi-task speech restoration model is trained using degraded speech data, and the loss is calculated using a multi-resolution short-time Fourier transform loss function.

[0060] Specifically, the multi-resolution short-time Fourier transform loss function consists of two parts:

[0061]

[0062] i from 1 to 3 corresponds to the parameters of short-time Fourier transform (stft) of three resolutions, where and Respectively expressed as:

[0063]

[0064] Among them, stftm(x;θ i ) represents the amplitude of the clean speech x after being transformed under the short-time Fourier transform corresponding to the i-th resolution parameter, Indicates recovery of voice The amplitude obtained after transformation under the short-time Fourier transform corresponding to the i-th resolution parameter, ||·|| F and ||·||1 are the Frobenius norm loss and L1 norm loss respectively, which can be expressed as:

[0065]

[0066] Among them, A represents the matrix representation of the input speech data, a i,j represents each element in the matrix, X and x represent the matrix and its elements of the clean speech data, and represents a matrix of predicted speech data and its elements, and N represents the number of elements.

[0067] stftm(x;θ i ) is calculated as follows:

[0068]

[0069] in, represents the short-time Fourier transform under the i-th resolution parameter, |·| is the modulus of the input complex signal, and the short-time Fourier transform and modulus can be expressed as:

[0070] stft(x)=X(t,f)=∫x(τ)ω(τ-t)e -j2 π fτ dτ

[0071]

[0072] Among them, ω represents the window function under the corresponding parameters, x real and x imag are represented as the real and imaginary parts of x respectively.

[0073] S5. Send the low-quality speech to be processed into the trained multi-task speech restoration model to generate high-quality speech.

[0074] In this embodiment, in the speech distortion simulation stage before training, the speech spectrogram changes during speech processing are as follows: Figure 5As shown in the figure, the sampling rate of the training data set is 48kHz. Clean speech is mixed into noisy speech according to a certain probability. The noisy speech is processed by the distortion simulation module and packet loss processing to obtain distorted low-quality speech. The changes in the speech spectrogram in the test result stage are shown in the figure. Figure 6 As shown, the low-quality speech to be restored is sent to the trained model to be restored to high-quality speech.

[0075] In the present invention, unless otherwise clearly stipulated and limited, the terms such as "installation", "setting", "connection", "fixation" and "rotation" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. Unless otherwise clearly defined, ordinary technicians in this field can understand the specific meanings of the above terms in the present invention according to the specific circumstances.

[0076] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A multi-task speech restoration method based on ResUNet, characterized in that: The following steps are involved: S1. Mixing the collected clean speech data and noise data to obtain noisy speech data; S2. The noisy speech data is distorted to obtain degraded speech data; the degraded speech data includes low-quality speech data of different distortion types; S3. Build a multi-task speech recovery model based on ResUNet, which includes an upsampling module, a bottleneck layer, and a downsampling module; S4. Use degraded speech data to train a multi-task speech restoration model and use a multi-resolution short-time Fourier transform loss function to calculate the loss; S5. Send the low-quality speech to be processed into the trained multi-task speech restoration model to generate high-quality speech.

2. According to the multi-task speech restoration method based on ResUNet in claim 1, it is characterized in that: Step S2 performs distortion processing on the noisy speech data to obtain degraded speech data, including: S21. Perform reverberation distortion processing on the noisy speech data, expressed as: d rev (t)=t*r Among them, d rev (t) represents low-quality speech data of reverberation distortion type, t represents noisy speech data, r represents room impulse response, and * represents convolution operation; S22. Perform low-resolution distortion processing on the noisy speech data, expressed as: d low_res (t)=Resample(t*h,o,u) Among them, d low_res (t) represents low-quality speech data of low-resolution distortion type, h represents the filter, o represents the original sampling rate of the noisy speech data, and u represents the low sampling rate after low-resolution distortion processing; Resample(·) means resampling; S23. Perform clipping distortion processing on the noisy speech data, expressed as: d clip (t)=max(min(t,η),-η),η∈[0,1] Among them, d clip (t) represents low-quality speech data of clipping distortion type, and η represents the signal amplitude; S24. Perform packet loss and distortion processing on the noisy voice data, that is, randomly select a portion of the audio of the noisy voice data for mute setting; S25. Perform noise gate distortion processing on the noisy speech data, expressed as: Among them, d thr (t) represents low-quality speech data of noise gate distortion type, and threshold represents the noise gate threshold; S26. Perform GSM transmission distortion processing on the noisy speech data, expressed as: d GSM (t)=GSMFullRateCompressor(Resample(t,o,8kHz)) Among them, d GSM (t) represents the low-quality speech data of GSM transmission distortion type, o represents the original sampling rate of noisy speech data, and GSMFullRateCompressor (·) represents the GSM full-rate compression algorithm.

3. According to a multi-task speech restoration method based on ResUNet according to claim 1, it is characterized in that: The upsampling module includes 8 cascaded coding layers, all of which have the same structure; each coding layer includes a first main branch and a first residual branch, the first main branch includes a cascaded strided one-dimensional convolution layer, a rectified linear unit layer, a 1×1 convolution layer, and a gated linear unit layer; the first residual branch includes a cascaded strided one-dimensional convolution layer and a rectified linear unit layer; The downsampling module includes 8 cascaded decoding layers, all of which have the same structure; each decoding layer includes a second main branch and a second residual branch, the second main branch includes a cascaded one-dimensional transposed convolution layer, a rectified linear unit layer, a 1×1 convolution layer, and a gated linear unit layer; the second residual branch includes a cascaded one-dimensional transposed convolution layer and a rectified linear unit layer; Among them, the 8 encoding layers and the 8 decoding layers have one-to-one corresponding jump connections.

4. According to claim 3, a multi-task speech restoration method based on ResUNet is characterized in that: The kernel size of each strided one-dimensional convolution layer is 4 and the strided convolution step is 2; In the first main branch, the number of output channels of the 1×1 convolutional layer is twice the number of output channels of the strided 1D convolutional layer; The kernel size of each one-dimensional transposed convolution layer is 4 and the stride is 2; In the second main branch, the number of output channels of the 1×1 convolutional layer is twice that of the 1D transposed convolutional layer.

5. According to a multi-task speech restoration method based on ResUNet according to claim 1, it is characterized in that: The bottleneck layer consists of 5 self-attention modules, each of which consists of a multi-head self-attention layer and a positional fully connected layer; the number of heads of the multi-head self-attention layer is 8; the input channel size of the positional fully connected layer is 512, and the output channel size is 2048.

6. A multi-task speech restoration method based on ResUNet according to claim 1, characterized in that: The multi-resolution short-time Fourier transform loss function is expressed as: Among them, stftm(x;θ i ) represents the amplitude of the clean speech x after being transformed under the short-time Fourier transform corresponding to the i-th resolution parameter, Indicates recovery of voice The amplitude obtained after transformation under the short-time Fourier transform corresponding to the i-th resolution parameter, ||·|| F and ||·||1 are the Frobenius norm loss and L1 norm loss respectively.

7. A multi-task speech restoration method based on ResUNet according to claim 6, characterized in that: stftm(x;θ i ) is calculated as follows: in, represents the short-time Fourier transform under the i-th resolution parameter, and |·| is the modulus of the input complex signal.

Citation Information

Cited By

  • Ultrahigh-definition image restoration method based on grouped Chebyshev spectral filtering

    CN120876274A