Speech enhancement method and device
Through deep complex frequency encoders and decoders, combined with information prompt encoders, and using multi-head temporal shrinkage convolutional networks, the problems of poor noise processing capabilities and large computational load in the existing technology are solved, and more efficient speech enhancement effects and Lower computing requirements.
Patent Information
- Application Number
- CN202410933866.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-11
AI Technical Summary
Existing speech enhancement technology is overly dependent on specific noise types, has poor generalization capabilities, and the deep learning model is computationally intensive, making it difficult to deploy on end-side devices. The enhancement effect needs to be improved.
Using a deep complex frequency encoder, information prompt encoder and deep complex frequency decoder, through complex frequency encoding and decoding, combined with a multi-head temporal shrinkage convolution network, phase information and multi-scale intermediate information are used to reduce the amount of calculation and improve noise filtering. except accuracy.
It improves the speech enhancement effect, accurately filters out noise, reduces the amount of calculation, makes the model easier to deploy on end-side devices, and improves speech quality.
Smart Images

Figure CN118762706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to speech processing technology, and in particular to a speech enhancement method and device. Background Art
[0002] In daily life, voice is one of the most frequently used information. Due to the noisy environment or various factors during network transmission, voice signals will inevitably contain noise, such as the sound of car horns on the road or the sound of electricity caused by network signal problems during transmission.
[0003] The purpose of speech enhancement technology is to restore noisy speech to clean speech. Early speech enhancement technologies, such as filtering methods and statistical model-based methods, have defects such as over-reliance on specific noise types, poor generalization ability, and the possibility of introducing other noises during noise reduction, resulting in poor speech enhancement effects.
[0004] With the rapid development of deep learning theory, deep learning models have been widely used in speech enhancement. In a data-driven way, deep neural networks can directly learn the nonlinear mapping relationship from mixed speech to clean speech. In many scenarios, they have achieved performance far exceeding that of traditional methods. However, these models require large amounts of computation and require high amounts of memory and computing resources during operation, making them difficult to deploy on end devices. In addition, the effect of speech enhancement needs to be improved. Summary of the invention
[0005] The technical problem to be solved by the present invention is to propose a method and device for speech enhancement, improve the effect of speech enhancement, and reduce the calculation amount of the model.
[0006] The technical solution adopted by the present invention to solve the above technical problems is:
[0007] In one aspect, the present invention provides a method for speech enhancement, comprising the following steps:
[0008] A. Training the speech enhancement model:
[0009] The speech enhancement model includes a deep multi-frequency encoder, an information prompt encoder, and a deep multi-frequency decoder;
[0010] The training process includes:
[0011] A1. Acquire clean speech data samples, and obtain noisy speech data samples by simulation based on the clean speech data samples; construct a training data set according to the clean speech data samples and the noisy speech data samples;
[0012] A2, extracting complex spectrum features of clean speech data samples and noisy speech data samples in the training data set;
[0013] A3, taking the complex spectrum feature of the noisy speech data sample as input, obtaining the deep frequency complex coding result of the noisy speech data sample through the deep frequency complex coding encoder;
[0014] A4, using the real frequency part of the complex spectrum feature of the noisy speech data sample as input, and obtaining the information prompt prediction result of the noisy speech data sample through the information prompt encoder;
[0015] A5. Calculate the real prompt information based on the complex spectrum features of the clean speech data sample, and train the parameters of the information prompt encoder according to the information prompt prediction results and the real prompt information of the noisy speech data sample;
[0016] A6, using the deep frequency coding result of the noisy speech data sample and the information prompt prediction result as input, obtaining the complex frequency mask prediction result of the noise complex spectrum through the deep frequency decoder;
[0017] A7, performing an inner product operation on the complex frequency mask prediction result of the noise complex spectrum and the complex frequency spectrum feature of the noisy speech data sample to obtain an enhanced complex spectrum, and performing an inverse transformation on the enhanced complex spectrum to obtain enhanced speech;
[0018] A8. Training parameters of a deep multi-frequency encoder and a deep multi-frequency decoder according to the enhanced speech and clean speech data samples;
[0019] B. Perform speech enhancement tasks:
[0020] The noisy speech data to be processed is used as input, and the enhanced speech is obtained through the trained speech enhancement model.
[0021] Furthermore, the deep frequency-convolution encoder and the deep frequency-convolution decoder have the same structure, both comprising a plurality of blocks, each block being composed of a stack of multi-head time-contraction convolutional networks, and the multi-head time-contraction convolutional networks comprising a first dilated causal convolutional layer, a first batch of normalization layers, a ReLu activation function, a second dilated causal convolutional layer, a second batch of normalization layers and a soft thresholding processing layer connected in sequence.
[0022] Furthermore, the information prompt encoder includes but is not limited to using a multi-head time-shrinkage convolutional network.
[0023] Furthermore, in step A1, the source of the clean speech data sample includes but is not limited to an open source data set; the simulation method includes but is not limited to adding random reverberation to the clean speech data sample, and then adding environmental noise with a random signal-to-noise ratio.
[0024] Furthermore, in step A2, the method of extracting complex spectrum features of clean speech data samples and noisy speech data samples in the training data set includes but is not limited to extracting using Fourier transform.
[0025] Furthermore, in step A4, the information prompt prediction result of the obtained noisy speech data sample includes but is not limited to a local signal-to-noise ratio, a speaker's voiceprint or a noise category.
[0026] Furthermore, in step A5, the calculation of the real prompt information based on the complex spectrum features of the clean speech data sample includes but is not limited to inputting the complex spectrum features of the clean speech data sample into a pre-trained model to obtain voiceprint recognition features, noise category features, or directly calculating the local signal-to-noise ratio based on the complex spectrum of the clean speech data sample and the complex spectrum of the corresponding noisy speech data sample.
[0027] Furthermore, in step A5, the training of parameters of the information prompt encoder includes but is not limited to using mean square error loss (MSE) to perform gradient backpropagation.
[0028] Furthermore, in step A8, the parameters of the deep frequency multiplexing encoder and the deep frequency multiplexing decoder are trained according to the enhanced speech and clean speech data samples, including but not limited to using mean square error loss (MSE), signal-to-noise ratio loss (SI-SNR) or signal distortion loss (SI-SDR) for gradient feedback.
[0029] On the other hand, the present invention also provides a device for speech enhancement, comprising:
[0030] A feature extraction module, used to extract complex spectrum features from input speech data;
[0031] The complex frequency coding module is used to encode the complex frequency spectrum characteristics of the input voice data to obtain the complex frequency coding result;
[0032] An information prompt module, used to predict an information prompt prediction result according to the real frequency part of the complex spectrum characteristics of the input voice data;
[0033] A complex frequency decoding module is used to decode according to the complex frequency encoding result and the information prompt prediction result to obtain the complex frequency mask prediction result;
[0034] The inverse transformation module is used to perform an inner product operation on the complex frequency mask prediction result and the complex spectrum feature of the input speech data to obtain an enhanced complex spectrum, and perform an inverse transformation on the enhanced complex spectrum to obtain enhanced speech.
[0035] The beneficial effects of the present invention are:
[0036] The present invention introduces an information prompt encoder into the speech enhancement model, so as to obtain the information prompt of the input speech, and use the information prompt in the later decoding, which is conducive to filtering out noise more accurately; and the present invention adopts a complex frequency encoder and a complex frequency decoder in the encoding and decoding of speech, and makes full use of phase information to improve the quality of enhanced speech; in addition, the complex frequency encoder and the complex frequency decoder adopt a multi-head time contraction convolutional network (MTCSN) to perform sparse processing on redundant noise features, and make full use of multi-scale intermediate information, which can reduce the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a diagram of the training process of the speech enhancement model in an embodiment of the present invention;
[0038] Figure 2 Schematic diagram of a complex frequency encoder in an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of an information prompt encoder according to an embodiment of the present invention;
[0040] Figure 4 Schematic diagram of a complex frequency decoder in an embodiment of the present invention;
[0041] Figure 5 Schematic diagram of the structure of a multi-head time-shrinkage convolutional network in an embodiment of the present invention;
[0042] Figure 6 The figure is a structural block diagram of a speech enhancement device in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present invention aims to propose a method and device for speech enhancement, improve the effect of speech enhancement, and reduce the amount of model calculation. In the present invention, the speech enhancement model provided mainly includes a deep frequency complex encoder, an information prompt encoder, and a deep frequency complex decoder; wherein the deep frequency complex encoder takes the complex spectrum characteristics of the input speech data as input and outputs the complex frequency coding result; the information prompt encoder takes the real frequency part of the complex spectrum characteristics of the input speech data as input and outputs the information prompt prediction result; the deep frequency complex decoder takes the deep frequency complex coding result of the input speech data and the information prompt prediction result as input and outputs the complex frequency mask prediction result; finally, the complex frequency mask prediction result is inner-producted with the complex spectrum characteristics of the input speech data to obtain an enhanced complex spectrum, and the enhanced complex spectrum is inversely transformed to obtain enhanced speech.
[0044] Based on the above scheme, the present invention introduces an information prompt encoder into the speech enhancement model to obtain the information prompt of the input speech, and uses this information prompt in the later decoding, which is conducive to more accurate noise filtering; and the present invention adopts a complex frequency encoder and a complex frequency decoder in the encoding and decoding of speech, and makes full use of phase information to improve the quality of enhanced speech; in addition, the complex frequency encoder and the complex frequency decoder adopt a multi-head time-shrinkage convolutional network to perform sparse processing on redundant noise features, and make full use of multi-scale intermediate information, which can reduce the amount of calculation.
[0045] Example
[0046] In this embodiment, a method for speech enhancement is first provided. The method trains a speech enhancement model and uses the trained speech enhancement model to perform speech enhancement on the noisy speech data to be processed, thereby restoring the speech to clean.
[0047] The speech enhancement model mainly consists of three parts: deep frequency multiplexing encoder, information prompt encoder and deep frequency multiplexing decoder. The training process is as follows: Figure 1 As shown, the implementation steps include the following:
[0048] S1, build training data set;
[0049] In this step, firstly, a clean speech data sample is obtained, and then a noisy speech data sample is obtained by simulation based on the clean speech data sample; and a training data set is constructed according to the clean speech data sample and the noisy speech data sample.
[0050] In an exemplary embodiment, the source of clean speech data includes but is not limited to open source data sets; the simulation method includes but is not limited to adding random reverberation to the clean speech, and then adding environmental noise with a random signal-to-noise ratio, such as -5dB to 10dB, to obtain simulated noisy speech.
[0051] S2, extracting complex spectrum features of training data samples;
[0052] In this step, complex spectrum features of clean speech data samples and noisy speech data samples in the training data set are extracted; in an exemplary solution, the method of extracting complex spectrum features includes but is not limited to using Fourier transform.
[0053] S3, encoding the complex frequency spectrum features of the noisy speech data sample to obtain a deep complex frequency coding result;
[0054] In this step, the complex spectrum characteristics of the noisy speech data sample are used as input, and the deep complex frequency encoding result of the noisy speech data sample is obtained through the deep complex frequency encoder.
[0055] In an exemplary embodiment, Figure 2 As shown in , the deep multi-frequency encoder consists of multiple blocks, each of which is composed of a stack of multi-head temporal convolution shrinkage networks (MTCSN); Figure 5 As shown, the multi-head temporal contraction convolutional network includes a first dilated causal convolutional layer, a first batch of normalization layers, a ReLu activation function, a second dilated causal convolutional layer, a second batch of normalization layers and a soft thresholding processing layer connected in sequence; that is, the multi-head temporal contraction convolution in this embodiment adds a soft thresholding processing layer to the structure of the temporal convolution network for sparse processing of redundant noise features, and makes full use of multi-scale intermediate information; optionally, each layer of the multi-head temporal contraction convolutional network is provided with a cache area for realizing streaming coding.
[0056] The deep frequency multiplexing encoder is divided into two processing parts: the real part (r) and the imaginary part (i). The input features are also divided into two parts: the real part (r_in) and the imaginary part (i_in). r_in is input to r and i respectively (the output is expressed as Frr and Fri), and i_in is input to r and i respectively (the output is expressed as Fir and Fii). The output result of the deep frequency multiplexing encoder of each block is F = (Frr-Fri) + j(Fri+Fir).
[0057] S4, calculating the information prompt prediction result according to the real frequency part of the complex spectrum characteristics of the noisy speech data sample;
[0058] In this step, the real frequency part of the complex spectrum feature of the noisy speech data sample is used as input, and the information prompt prediction result of the noisy speech data sample is obtained through the information prompt encoder.
[0059] In an exemplary embodiment, Figure 3 As shown, the structure of the information prompt encoder includes but is not limited to the use of a multi-head time-shrinking convolutional network (MTCSN); optionally, each layer of the information encoder is provided with a buffer area for storing intermediate outputs. The prompt information generated according to the real frequency part of the complex spectrum characteristics of the noisy speech data sample includes but is not limited to the local signal-to-noise ratio of the noisy speech, the speaker's voiceprint, the noise category and other information.
[0060] S5, calculating the real prompt information of the clean speech data sample, and training the parameters of the information prompt encoder;
[0061] In this step, the real prompt information is calculated based on the complex spectrum features of the clean speech data sample, and the parameters of the information prompt encoder are trained according to the information prompt prediction results and the real prompt information of the noisy speech data sample.
[0062] In an exemplary embodiment, the use of clean speech complex spectrum features to calculate the real prompt information includes but is not limited to inputting the clean speech complex spectrum features into a pre-trained model to obtain voiceprint recognition features, noise category features, or directly calculating the local signal-to-noise ratio of the clean speech complex spectrum and the noisy speech complex spectrum; the loss function used to train the parameters of the information prompt encoder includes but is not limited to using the mean square error loss (MSE) for gradient backpropagation.
[0063] S6, decoding the deep frequency complex coding result of the noisy speech data sample in combination with the information prompt prediction result to obtain the frequency complex mask prediction result;
[0064] In this step, the deep frequency coding result and the information prompt prediction result of the noisy speech data sample are used as input, and the complex frequency mask prediction result of the noise complex spectrum is obtained through the deep frequency decoder.
[0065] In an exemplary embodiment, Figure 4 As shown in FIG. 1 , the structure of the deep frequency conversion decoder is consistent with that of the deep frequency conversion encoder, and is also composed of multiple blocks. Each block is composed of a stack of multi-head temporal convolution shrinkage networks (MTCSN).
[0066] The deep frequency multiplexing decoder is divided into two processing parts: the real part (r) and the imaginary part (i). The input features are also divided into two parts: the real part (r_in) and the imaginary part (i_in). r_in is input to r and i respectively (the output is expressed as Frr and Fri), and i_in is output to r and i respectively (the output is expressed as Fir and Fii). The output result of the deep frequency multiplexing decoder of each block is F = (Frr-Fri) + j(Fri+Fir).
[0067] S7, calculating an enhanced complex spectrum according to the complex frequency mask prediction result, and performing an inverse transformation on the enhanced complex spectrum to obtain enhanced speech;
[0068] In this step, an inner product operation is performed on the complex frequency mask prediction result of the noise complex spectrum and the complex frequency spectrum feature of the noisy speech data sample to obtain an enhanced complex spectrum, and the enhanced complex spectrum is inversely transformed to obtain enhanced speech.
[0069] In an exemplary embodiment, the transformation method of the enhanced complex spectrum includes but is not limited to using inverse Fourier transform to obtain enhanced speech.
[0070] S8, training parameters of the deep multi-frequency encoder and the deep multi-frequency decoder;
[0071] In this step, the parameters of the deep multi-frequency encoder and the deep multi-frequency decoder are trained according to the enhanced speech and clean speech data samples.
[0072] In an exemplary embodiment, the use of enhanced speech and corresponding clean speech data samples includes but is not limited to the use of single-resolution or multi-resolution complex frequency features of clean speech and enhanced speech for parameter training; the loss function used in training includes but is not limited to the use of mean square error loss (MSE), signal-to-noise ratio loss (SI-SNR), and signal distortion loss (SI-SDR) for gradient feedback.
[0073] This embodiment also provides a device for speech enhancement, see Figure 6 , which includes a feature extraction module, a complex frequency encoding module, an information prompt module, a complex frequency decoding module and an inverse transformation module;
[0074] A feature extraction module, used to extract complex spectrum features from input speech data;
[0075] The complex frequency coding module is used to encode the complex frequency spectrum characteristics of the input voice data to obtain the complex frequency coding result;
[0076] An information prompt module, used to predict an information prompt prediction result according to the real frequency part of the complex spectrum characteristics of the input voice data;
[0077] A complex frequency decoding module is used to decode according to the complex frequency encoding result and the information prompt prediction result to obtain the complex frequency mask prediction result;
[0078] The inverse transformation module is used to perform an inner product operation on the complex frequency mask prediction result and the complex spectrum feature of the input speech data to obtain an enhanced complex spectrum, and perform an inverse transformation on the enhanced complex spectrum to obtain enhanced speech.
[0079] Since the specific implementation means of each part of the above-mentioned speech enhancement device have been specifically explained in the introduction of the above-mentioned speech enhancement method, they will not be repeated here.
[0080] Finally, it should be noted that the above embodiments are only preferred implementations and are not intended to limit the present invention. It should be pointed out that for those skilled in the art, several modifications, equivalent replacements, improvements, etc. can be made without departing from the scope of the present invention and the scope of protection of the claims, and all of these should be included in the protection scope of the present invention.
Claims
1. A method for speech enhancement, It is characterized in that The following steps are involved: A. Training the speech enhancement model: The speech enhancement model includes a deep multi-frequency encoder, an information prompt encoder, and a deep multi-frequency decoder; The training process includes: A1. Acquire clean speech data samples, and obtain noisy speech data samples by simulation based on the clean speech data samples; construct a training data set according to the clean speech data samples and the noisy speech data samples; A2, extracting complex spectrum features of clean speech data samples and noisy speech data samples in the training data set; A3, taking the complex spectrum feature of the noisy speech data sample as input, obtaining the deep frequency complex coding result of the noisy speech data sample through the deep frequency complex coding encoder; A4, using the real frequency part of the complex spectrum feature of the noisy speech data sample as input, and obtaining the information prompt prediction result of the noisy speech data sample through the information prompt encoder; A5. Calculate the real prompt information based on the complex spectrum features of the clean speech data sample, and train the parameters of the information prompt encoder according to the information prompt prediction results and the real prompt information of the noisy speech data sample; A6, using the deep frequency coding result of the noisy speech data sample and the information prompt prediction result as input, obtaining the complex frequency mask prediction result of the noise complex spectrum through the deep frequency decoder; A7, performing an inner product operation on the complex frequency mask prediction result of the noise complex spectrum and the complex frequency spectrum feature of the noisy speech data sample to obtain an enhanced complex spectrum, and performing an inverse transformation on the enhanced complex spectrum to obtain enhanced speech; A8. Training parameters of a deep multi-frequency encoder and a deep multi-frequency decoder according to the enhanced speech and clean speech data samples; B. Perform speech enhancement tasks: The noisy speech data to be processed is used as input, and the enhanced speech is obtained through the trained speech enhancement model.
2. A method for speech enhancement as claimed in claim 1, It is characterized in that The deep frequency multiplexing encoder and the deep frequency multiplexing decoder have the same structure, both comprising a plurality of blocks; Each block consists of a stack of multi-head time-shrinking convolutional networks, which include a first dilated causal convolutional layer, a first batch of normalization layers, a ReLu activation function, a second dilated causal convolutional layer, a second batch of normalization layers, and a soft thresholding layer connected in sequence.
3. A method for speech enhancement as claimed in claim 2, It is characterized in that The information hint encoder package uses a multi-head temporal contractive convolutional network.
4. A method for speech enhancement as claimed in claim 1, It is characterized in that In step A1, the source of the clean speech data sample includes an open source data set; The simulation method includes: adding random reverberation to clean speech data samples, and then adding environmental noise with a random signal-to-noise ratio.
5. A method for speech enhancement as claimed in claim 1, It is characterized in that In step A2, the method for extracting complex spectrum features of clean speech data samples and noisy speech data samples in the training data set includes: extracting by Fourier transform.
6. A method for speech enhancement as claimed in claim 1, It is characterized in that In step A4, the information prompt prediction result of the obtained noisy speech data sample includes: local signal-to-noise ratio, speaker voiceprint or noise category.
7. A method for speech enhancement as claimed in claim 6, It is characterized in that In step A5, the calculation of the real prompt information based on the complex spectrum features of the clean speech data sample includes: inputting the complex spectrum features of the clean speech data sample into the pre-trained model to obtain voiceprint recognition features, noise category features, or directly calculating the local signal-to-noise ratio according to the complex spectrum of the clean speech data sample and the complex spectrum of the corresponding noisy speech data sample.
8. A method for speech enhancement according to any one of claims 1 to 7, It is characterized in that In step A5, the training of parameters of the information prompt encoder includes: using mean square error loss to perform gradient backpropagation.
9. A method for speech enhancement according to any one of claims 1 to 7, It is characterized in that In step A8, the parameters of the deep frequency multiplexing encoder and the deep frequency multiplexing decoder are trained according to the enhanced speech and clean speech data samples, including: using mean square error loss, signal-to-noise ratio loss or signal distortion loss for gradient feedback.
10. A device for speech enhancement, It is characterized in that include: A feature extraction module, used to extract complex spectrum features from input speech data; The complex frequency coding module is used to encode the complex frequency spectrum characteristics of the input voice data to obtain the complex frequency coding result; An information prompt module, used to predict an information prompt prediction result according to the real frequency part of the complex spectrum characteristics of the input voice data; A complex frequency decoding module is used to decode according to the complex frequency encoding result and the information prompt prediction result to obtain the complex frequency mask prediction result; The inverse transformation module is used to perform an inner product operation on the complex frequency mask prediction result and the complex spectrum feature of the input speech data to obtain an enhanced complex spectrum, and perform an inverse transformation on the enhanced complex spectrum to obtain enhanced speech.
