Training method, device, equipment and storage medium for single-channel speech enhancement model
By adopting the amplitude-phase parallel dual-branch structure and differential square phase spectrum processing in the single-channel speech enhancement model, the problem of difficulty in capturing time-frequency distribution information in the existing technology is solved, and the enhancement effect and signal-to-noise ratio of the speech signal are significantly improved. .
Patent Information
- Application Number
- CN202311511028.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-11-13
AI Technical Summary
Existing single-channel speech enhancement models are difficult to capture the time-frequency distribution information of the speech spectrum, and the phase spectrum presents random and complex patterns, making it difficult to extract effective high-level features.
The amplitude-phase parallel double-branch structure is used to extract time-frequency distribution information through the amplitude branch, and the initial phase spectrum is converted into a differential squared phase spectrum. Combined with interactive calculations, the post-interaction time-frequency and phase characteristics are obtained, which is used to generate enhanced speech signals.
Significantly improves the enhancement effect of speech signals, improves the signal-to-noise ratio, improves speech quality evaluation and background noise related indicators, and enhances the capture effect of time-frequency distribution information.
Smart Images

Figure CN117558288B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of speech enhancement technology, and in particular to a training method, device, equipment and storage medium for a single-channel speech enhancement model. Background Art
[0002] In real-life scenarios, voice signals are often interfered by surrounding noise, which can affect devices such as hearing aids, mobile communications, and online video conferencing. Voice enhancement technology can alleviate the problem of voice signal contamination during the communication process.
[0003] Among the related technologies, the single-channel speech enhancement method based on deep learning model is the current mainstream method, which is mainly divided into two types of methods: enhancement in time-frequency domain and enhancement in time domain. Among them, the method of enhancement in time-frequency domain is more widely used due to its interpretability, but it still has the following defects: the phase spectrum presents a random and complex pattern, and it is difficult for the neural network model to extract effective high-level features from it; it focuses more on effectively capturing the long-distance contextual dependencies of the speech signal, while ignoring the time-frequency distribution information of the speech spectrum.
[0004] Based on the above analysis of the development status of this technical field, the existing technical solutions lack a single-channel speech enhancement model that can generate regular structures and texture phase maps and capture the time-frequency distribution information of the speech spectrum. Summary of the invention
[0005] The purpose of the present invention is to provide a training method, device, equipment and storage medium for a single-channel speech enhancement model, aiming to solve the above-mentioned problems in the prior art.
[0006] According to a first aspect of an embodiment of the present invention, a training method for a single-channel speech enhancement model is provided, comprising:
[0007] Step 1, generate a set of noisy spectra for training;
[0008] Step 2, obtaining a noisy spectrum, calculating an initial amplitude spectrum and an initial phase spectrum corresponding to the noisy spectrum, and converting the initial phase spectrum into a differential square phase spectrum;
[0009] Step 3, input the initial amplitude spectrum into the amplitude encoder and amplitude module corresponding to the amplitude branch in sequence to obtain the decomposed time-frequency attention feature, and input the differential square phase spectrum into the phase encoder and phase module corresponding to the phase branch to obtain the differential square phase feature;
[0010] Step 4, by decomposing the interaction between the time-frequency attention feature and the difference square phase feature, the interactive time-frequency feature and the interactive phase feature are obtained;
[0011] Step 5: Input the time-frequency features after interaction into the mask interpreter corresponding to the amplitude branch to obtain an enhanced amplitude spectrum, input the phase features after interaction into the phase decoder corresponding to the phase branch to obtain an enhanced phase spectrum, calculate the total loss based on the enhanced amplitude spectrum and the enhanced phase spectrum, and update the model parameters;
[0012] Step 6: Perform multiple rounds of iterations, repeat steps 2 to 5 in batches in each round of iterations to perform iterative training, and obtain a trained single-channel speech enhancement model after the round of iterations is completed.
[0013] According to a second aspect of an embodiment of the present invention, there is provided a training device for a single-channel speech enhancement model, comprising:
[0014] A training set generation module, used to generate a set of noisy spectra for training;
[0015] A phase spectrum generation module is used to obtain a noisy spectrum, calculate an initial amplitude spectrum and an initial phase spectrum corresponding to the noisy spectrum, and convert the initial phase spectrum into a differential square phase spectrum;
[0016] A dual-branch encoding module is used to input the initial amplitude spectrum into the amplitude encoder and amplitude module corresponding to the amplitude branch in sequence to obtain the decomposed time-frequency attention feature, and input the differential square phase spectrum into the phase encoder and phase module corresponding to the phase branch to obtain the differential square phase feature;
[0017] An interactive calculation module, used to obtain the post-interaction time-frequency feature and the post-interaction phase feature by decomposing the interactive calculation between the time-frequency attention feature and the difference square phase feature;
[0018] A dual-branch decoding module is used to input the time-frequency features after interaction into the mask interpreter corresponding to the amplitude branch to obtain an enhanced amplitude spectrum, and input the phase features after interaction into the phase decoder corresponding to the phase branch to obtain an enhanced phase spectrum, and calculate the total loss according to the enhanced amplitude spectrum and the enhanced phase spectrum to update the model parameters;
[0019] The training iteration module is used to perform multiple rounds of iterations. In each round of iteration, the steps in the phase spectrum generation module, the dual-branch encoding module, the interactive calculation module and the dual-branch decoding module are repeatedly called in batches for iterative training. After the round of iterations is completed, a trained single-channel speech enhancement model is obtained.
[0020] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the training method for a single-channel speech enhancement model as provided in the first aspect of the present disclosure are implemented.
[0021] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a program for implementing information transmission is stored, and when the program is executed by a processor, the steps of the training method of the single-channel speech enhancement model provided in the first aspect of the present disclosure are implemented.
[0022] The technical solution provided by the embodiment of the present invention includes the following beneficial effects: an amplitude-phase parallel dual-branch structure is used to process the single-channel speech enhancement problem, effective information of the time-frequency distribution is captured through the amplitude module in the amplitude branch processing, and the initial phase spectrum that presents random complexity is converted into a differential square phase spectrum before the phase branch processing, thereby obtaining phase information with more obvious structure and texture.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0025] Figure 1 is a flow chart of a training method for a single-channel speech enhancement model according to an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of a differential square phase spectrum according to an embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of a decomposed time-frequency attention block according to an embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of iterative changes in total loss according to an embodiment of the present invention;
[0029] Figure 5 is a schematic diagram of a dual-branch model structure according to an embodiment of the present invention;
[0030] Figure 6 is a schematic diagram of a training device for a single-channel speech enhancement model according to an embodiment of the present invention;
[0031] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0033] Method Embodiment
[0034] According to an embodiment of the present invention, a training method for a single-channel speech enhancement model is provided. Figure 1 is a flow chart of a training method for a single-channel speech enhancement model according to an embodiment of the present invention. Figure 1 As shown, the training method of the single-channel speech enhancement model according to an embodiment of the present invention specifically includes:
[0035] In step S110, a set of noisy spectrum for training is generated, which specifically includes:
[0036] In this embodiment, the Voice Bank-DEMAND data set is used, all audio in the data set is downsampled to 16 kHz noisy frequency, the 16 kHz noisy frequency is divided into a training set and a test set, and the 16 kHz noisy frequency in the training set is subjected to short-time Fourier transform to generate a set of noisy spectrum for training.
[0037] In step S120, a noisy spectrum is obtained, an initial amplitude spectrum and an initial phase spectrum corresponding to the noisy spectrum are calculated, and the initial phase spectrum is converted into a differential square phase spectrum. Specifically, the following steps are performed:
[0038] The initial amplitude spectrum is obtained by calculating the absolute value of the noisy spectrum signal, and the initial phase spectrum is obtained by calculating the arctan function value of the noisy spectrum signal;
[0039] Expand the initial phase spectrum along the frequency axis, perform differential calculations on the low-frequency points and high-frequency points of each adjacent time frame in the phase spectrum to obtain the differential phase, perform square calculations on the differential phase to obtain the differential square phase spectrum. Figure 2 is a schematic diagram of a differential square phase spectrum according to an embodiment of the present invention, such as Figure 2 As shown, the comparison between the differential square phase spectrum obtained by the present invention and the initial phase and the unfolded phase is demonstrated.
[0040] In step S130, the initial amplitude spectrum is sequentially input into the amplitude encoder and amplitude module corresponding to the amplitude branch to obtain the decomposed time-frequency attention feature, and the differential square phase spectrum is input into the phase encoder and phase module corresponding to the phase branch to obtain the differential square phase feature. Specifically including:
[0041] The initial amplitude spectrum is input into an amplitude encoder consisting of two convolutional layers, and high-level amplitude features are extracted through the amplitude encoder. The first convolutional layer includes a dilated convolution with a dilation rate of 1 and a convolution kernel of (7,1), a batch normalization function, and a ReLU function. The second convolutional layer includes a dilated convolution with a dilation rate of 2 and a convolution kernel of (1,7), a batch normalization function, and a ReLU function. The structure of the amplitude encoder setting is shown in Table 1:
[0042] Table 1. Amplitude encoder structure table
[0043] Network Layer Output feature map size Input Layer (1,F,T) Conv2D(1×7) (96,F,T) Conv2D(7×1) (96,F,T) Output Layer (96,F,T)
[0044] The high-level amplitude features are input into the amplitude module composed of two decomposed time-frequency attention blocks and three convolutional layers. The high-level amplitude features are decomposed into the time channel attention vector in the time axis direction and the frequency channel attention vector in the frequency axis direction through the amplitude module. The two decomposed time-frequency attention blocks are located at the front and back ends of the three convolutional layers respectively. The decomposed time-frequency attention block includes an average pooling layer, the expansion rates are 1 and 2 respectively, the convolution kernels are all 1, and the activation functions are two one-dimensional expansion convolution layers of Sigmoid function and ReLU function respectively. The time channel attention vector t and the frequency channel attention vector f are obtained through the output of the last decomposed time-frequency attention block. Figure 3 is a schematic diagram of the decomposition time-frequency attention block of an embodiment of the present invention, such as Figure 3 As shown, the structure of the decomposed time-frequency attention block is shown.
[0045] Take the outer product of the time channel attention vector t and the frequency channel attention vector f to obtain the time-frequency attention matrix TFA, calculate the mask corresponding to each interval of the time-frequency attention matrix through the mask partitioning method, that is, generate multiple masks according to TFA under different thresholds, multiply the mask with the value of the corresponding position of the time-frequency attention matrix TFA to obtain a higher-order decomposed time-frequency attention feature, and then obtain the decomposed time-frequency attention feature (DTFA, Decomposed Time-Frequency Attention) matrix through splicing and convolution;
[0046] Calculating the mask of each interval corresponding to the time-frequency attention matrix by the mask partitioning method specifically includes: setting the decomposition parameter c of the partition interval to be 1 / n, where n represents the total length of the partition, and in this embodiment, n is 500. Figure 3In the example where n is 20, the first interval divided is (0, c), and the subsequent i+1th interval is larger than the ith interval by c. According to the decomposition parameters, multiple intervals for dividing the time-frequency attention matrix are obtained, and the information value of each interval is calculated according to the decomposition parameters; if the information value is greater than the value of the corresponding interval of the time-frequency attention matrix, the mask value is set to 0, otherwise the mask value is set to 1, and the mask calculation is performed using Formula 1:
[0047]
[0048] Among them, m i represents the i-th mask, m i (j,k) represents the (j,k)th element of the i-th mask, TFA represents the original time-frequency attention matrix, and TFA(j,k) represents the (j,k)th element of the original time-frequency attention matrix.
[0049] The differential square phase spectrum is input into a phase encoder consisting of two convolutional layers, and high-level phase features are extracted through the phase encoder. The first convolutional layer includes a dilated convolution with a dilation rate of 1 and a convolution kernel of (5,3), a batch normalization function, and a ReLU function. The second convolutional layer includes a dilated convolution with a dilation rate of 2 and a convolution kernel of (25,1), a batch normalization function, and a ReLU function. The structure of the phase encoder setting is shown in Table 2:
[0050] Table 2. Phase encoder structure table
[0051] Network Layer Output feature map size Input Layer (1,F,T) Conv2D(5×3) (48,F,T) Conv2D(25×1) (48,F,T) Conv2D(3×5) (48,F,T) Output Layer (48,F,T)
[0052] The high-level phase feature is input into a phase module consisting of three convolutional layers to obtain the differential square phase feature. The phase module consists of three convolutions, and the convolution kernels are (5, 3), (25, 1), and (3, 5) respectively, without activation function.
[0053] In step S140, the interaction between the time-frequency attention feature and the differential square phase feature is decomposed to obtain the interaction time-frequency feature and the interaction phase feature. Specifically, it includes:
[0054] Use three groups of corresponding amplitude modules and phase modules to perform three interactive calculations, and use Formula 2 to perform interactive calculations on the decomposed time-frequency attention features of the differential square phase features to obtain three interactive time-frequency features; use Formula 3 to perform interactive calculations on the decomposed time-frequency attention features of the differential square phase features to obtain three interactive phase features:
[0055]
[0056]
[0057] in, represents the time-frequency characteristics after interaction, represents the phase characteristics after interaction, B m represents the decomposed time-frequency attention feature, i.e., the output of the amplitude module, B p represents the differential square phase feature, that is, the output of the phase module, δ() represents the Tanh activation function, Conv() represents the channel change using a two-dimensional convolution with a convolution kernel of (1,1), and ⊙ represents a dot product operation.
[0058] In step S150, the time-frequency features after interaction obtained by the interaction of each group of amplitude modules and phase modules are input into the mask decoder corresponding to the amplitude branch to obtain an enhanced amplitude spectrum, and the phase features after interaction are input into the phase decoder corresponding to the phase branch to obtain an enhanced phase spectrum. The total loss is calculated based on the enhanced amplitude spectrum and the enhanced phase spectrum, and the model parameters are updated. Specifically, it includes:
[0059] The interactive time-frequency features are input into the mask decoder composed of convolutional layer, bGRU layer and fully connected layer to obtain the estimated mask. The estimated mask and the noisy spectrum are Hadamard-producted to obtain the enhanced amplitude spectrum. The structure of the mask decoder is shown in Table 3:
[0060] Table 3. Mask decoder structure table
[0061]
[0062]
[0063] The phase features after interaction are input into the phase decoder composed of the convolution layer of the conversion channel. The phase decoder obtains the enhanced spectrum through the convolution layer of a conversion channel to obtain the enhanced phase spectrum. The structure of the phase decoder is shown in Table 4:
[0064] Table 4. Phase decoder structure table
[0065] Network Layer Output feature map size Input Layer (48,F,T) Conv2D(1×1) (1,F,T) Output Layer (1,F,T)
[0066] Combining the enhanced amplitude spectrum and the enhanced phase spectrum can form a complete spectrum, and performing an inverse short-time Fourier transform on the complete spectrum can obtain an enhanced speech signal.
[0067] Calculate the root mean square error between the enhanced amplitude spectrum and the initial amplitude spectrum to get the first loss L m , calculate the root mean square error between the enhanced phase spectrum and the initial phase spectrum, and get the second loss L p , the total loss is calculated based on the first loss and the second loss, and the total loss of training is defined as 0.5×L m +0.5×L p ,The Adam optimizer is used during training, and the initial learning rate is set to 0.0005.
[0068] In step S160, multiple rounds of iterations are performed, and steps S120 to S150 are repeated in batches in each round of iterations for iterative training. After the rounds of iterations are completed, a trained single-channel speech enhancement model is obtained. Specifically, it includes:
[0069] In each iteration, the pre-divided batches are input into the model in sequence. After the previous batch updates the model, the next batch continues to update based on the updated model, and each batch repeats the iterative training process from step S120 to step S150 multiple times. After the iteration, a trained single-channel speech enhancement model is obtained. In this embodiment, the number of iterations is 30. Figure 4 Schematic diagram of iterative changes in total loss according to an embodiment of the present invention. Figure 4 As shown, the process of total loss change after 30 iterations is shown.
[0070] The network structure and parameters of the trained single-channel speech enhancement model are used to enhance the data of noisy speech. The results of multiple indicators obtained by the embodiment of the present invention compared with other methods are shown in Table 5:
[0071] Table 5. Comparison of objective evaluation indicators between current mainstream models and the present invention
[0072] method PESQ CSIG CBAK COVL Noisy 1.97 3.34 2.44 2.63 SEGAN 2.16 3.48 2.94 2.80 MetricGAN 2.86 3.99 3.18 3.42 TSTNN 2.96 4.33 3.53 3.67 PHASEN 2.99 4.21 3.55 3.62 DEMUCS 3.07 4.31 3.40 3.63 Ours(w / o DSP) 3.05 4.31 3.30 3.70 Ours(w / o DTFAB) 3.03 4.28 3.29 3.68 The present invention 3.12 4.33 3.31 3.74
[0073] As shown in Table 5, compared with the current mainstream advanced speech enhancement methods, the method of the present invention is significantly improved in the subjective indicator PESQ for evaluating speech enhancement performance, and three objective indicators CSIG, CBAK, and CVOL, where PESQ represents the perceptual evaluation of speech quality, CSIG is an estimation result related to the signal-to-noise ratio, CBAK is an estimation result related to the background noise, and CVOL is an estimation result of the audio volume level.
[0074] The above technical solutions of the embodiments of the present invention are illustrated with reference to the following drawings.
[0075] Figure 5 is a schematic diagram of a dual-branch model structure according to an embodiment of the present invention. Figure 5 As shown, an amplitude-phase parallel dual-branch structure is used to process the single-channel speech enhancement problem, that is, it includes an amplitude branch of an amplitude encoder, an amplitude module and a mask decoder, and a phase branch of a phase encoder, a phase module and a phase decoder, and the set number of amplitude modules MB (Magnitude Block) is consistent with the set number of phase modules PB (Phase Block), and the two decomposed time-frequency attention blocks in the amplitude module MB are DTFAB.
[0076] In summary, in response to the current problems, the above technical solution of the embodiment of the present invention proposes a training method for a single-channel speech enhancement model, which adopts an amplitude-phase parallel dual-branch structure to process the single-channel speech enhancement problem; a custom decomposition time-frequency attention block is added to the amplitude module to extract features in both the frequency axis and the time axis, which helps to capture important time-frequency distribution information; before the phase branch processing, the low-frequency points and high-frequency points of adjacent time frames of the phase spectrum are differentially calculated, and the differential phase is squared to convert the random and complex initial phase spectrum into a differential square phase spectrum, thereby obtaining phase information with more obvious structure and texture; when obtaining the decomposed time-frequency attention features, the effect of the time-frequency attention is enhanced by mask calculation, highlighting the strong distribution in the time-frequency distribution; after the training, a single-channel speech enhancement model with improved signal-to-noise ratio is obtained.
[0077] Device Embodiment
[0078] According to an embodiment of the present invention, a training device for a single-channel speech enhancement model is provided. Figure 6 is a schematic diagram of a training device for a single-channel speech enhancement model according to an embodiment of the present invention. Figure 6 As shown, the training device of the single-channel speech enhancement model according to an embodiment of the present invention specifically includes:
[0079] A training set generation module 60, used to generate a set of noisy frequency spectra for training;
[0080] The phase spectrum generation module 62 is used to obtain the noisy spectrum, calculate the initial amplitude spectrum and initial phase spectrum corresponding to the noisy spectrum, and convert the initial phase spectrum into a differential square phase spectrum. Specifically used for:
[0081] The initial amplitude spectrum is obtained by calculating the absolute value of the noisy spectrum signal, and the initial phase spectrum is obtained by calculating the arctan function value of the noisy spectrum signal;
[0082] The initial phase spectrum is expanded along the frequency axis direction, the low-frequency points and high-frequency points of each adjacent time frame in the phase spectrum are differentially calculated to obtain the differential phase, and the differential phase is squared to obtain the differential square phase spectrum.
[0083] The dual-branch encoding module 64 is used to input the initial amplitude spectrum into the amplitude encoder and amplitude module corresponding to the amplitude branch in sequence to obtain the decomposed time-frequency attention feature, and input the differential square phase spectrum into the phase encoder and phase module corresponding to the phase branch to obtain the differential square phase feature. Specifically used for:
[0084] The initial amplitude spectrum is input into an amplitude encoder composed of two convolutional layers, and high-level amplitude features are extracted through the amplitude encoder; the high-level amplitude features are input into an amplitude module composed of two decomposed time-frequency attention blocks and three convolutional layers, and the high-level amplitude features are decomposed into a time channel attention vector and a frequency channel attention vector through the amplitude module. The time channel attention vector and the frequency channel attention vector are taken as the outer product to obtain a time-frequency attention matrix, and the mask corresponding to each interval of the time-frequency attention matrix is calculated by the mask partitioning method, and the mask is multiplied by the value of the corresponding position of the time-frequency attention matrix to obtain the decomposed time-frequency attention feature;
[0085] The differential square phase spectrum is input into a phase encoder composed of two convolutional layers, and high-level phase features are extracted through the phase encoder; the high-level phase features are input into a phase module composed of three convolutional layers to obtain differential square phase features.
[0086] Calculating the masks corresponding to each interval of the time-frequency attention matrix through the mask partitioning method specifically includes: setting the decomposition parameters for dividing the intervals, obtaining multiple intervals for dividing the time-frequency attention matrix according to the decomposition parameters, and calculating the information value of each interval according to the decomposition parameters; if the information value is greater than the value of the interval corresponding to the time-frequency attention matrix, the mask value is set to 0, otherwise the mask value is set to 1.
[0087] The interactive calculation module 66 is used to obtain the interactive time-frequency feature and the interactive phase feature by decomposing the interactive calculation between the time-frequency attention feature and the differential square phase feature. Specifically used for:
[0088] Use three groups of corresponding amplitude modules and phase modules to perform three interactive calculations, and use formula 1 to perform interactive calculations on the decomposed time-frequency attention features of the differential square phase features to obtain the interactive time-frequency features; use formula 2 to perform interactive calculations on the decomposed time-frequency attention features of the differential square phase features to obtain the interactive phase features:
[0089]
[0090]
[0091] in, represents the time-frequency characteristics after interaction, represents the phase characteristics after interaction, B m represents the decomposed time-frequency attention feature, B p represents the differential square phase feature, δ() represents the Tanh activation function, Conv() represents changing the channel using a two-dimensional convolution with a convolution kernel of (1,1), and ⊙ represents a dot product operation.
[0092] The dual-branch decoding module 68 is used to input the time-frequency features after interaction into the mask interpreter corresponding to the amplitude branch to obtain an enhanced amplitude spectrum, input the phase features after interaction into the phase decoder corresponding to the phase branch to obtain an enhanced phase spectrum, calculate the total loss according to the enhanced amplitude spectrum and the enhanced phase spectrum, and update the model parameters. Specifically used for:
[0093] The interactive time-frequency features are input into the mask decoder composed of convolutional layer, bGRU layer and fully connected layer to obtain the estimated mask. The estimated mask and the noisy spectrum are Hadamard-producted to obtain the enhanced amplitude spectrum.
[0094] The interacted phase features are input into a phase decoder consisting of a convolutional layer of transformed channels to obtain an enhanced phase spectrum.
[0095] The root mean square error between the enhanced amplitude spectrum and the initial amplitude spectrum is calculated to obtain the first loss, the root mean square error between the enhanced phase spectrum and the initial phase spectrum is calculated to obtain the second loss, and the total loss is calculated based on the first loss and the second loss.
[0096] The training iteration module 610 is used to perform multiple rounds of iterations. In each round of iteration, the steps in the phase spectrum generation module 62, the dual-branch encoding module 64, the interactive calculation module 66 and the dual-branch decoding module 68 are repeatedly called in batches to perform iterative training. After the round of iterations is completed, a trained single-channel speech enhancement model is obtained.
[0097] In summary, in response to the existing problems, the above technical scheme of the embodiment of the present invention proposes a training device for a single-channel speech enhancement model, which adopts an amplitude-phase parallel dual-branch structure to process the single-channel speech enhancement problem, that is, it includes an amplitude branch of an amplitude encoder, an amplitude module and a mask decoder, and a phase branch of a phase encoder, a phase module and a phase decoder; a custom decomposition time-frequency attention block is added to the amplitude module to extract features in both the frequency axis and the time axis, which helps to capture important time-frequency distribution information; before the phase branch processing, the initial phase spectrum that presents random complexity is converted into a differential square phase spectrum by differentially calculating the low-frequency points and high-frequency points of adjacent time frames of the phase spectrum, and then squaring the differential phase, so as to obtain phase information with more obvious structure and texture; when obtaining the decomposed time-frequency attention features, the effect of the time-frequency attention is enhanced by mask calculation, and the strong distribution in the time-frequency distribution is highlighted; after the training, a single-channel speech enhancement model with improved signal-to-noise ratio is obtained.
[0098] Electronic device embodiment
[0099] Figure 77 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 700 may include at least one processor 710 and a memory 720. The processor 710 may execute instructions stored in the memory 720. The processor 710 is connected to the memory 720 through a data bus. In addition to the memory 720, the processor 710 may also be connected to an input device 730, an output device 740, and a communication device 750 through a data bus.
[0100] The processor 710 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0101] The memory 720 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0102] In the embodiment of the present disclosure, executable instructions are stored in the memory 720, and the processor 710 can read the executable instructions from the memory 720 and execute the instructions to implement all or part of the steps of the training method of the single-channel speech enhancement model in any of the above exemplary embodiments.
[0103] Computer Readable Storage Medium Embodiments
[0104] In addition to the above-mentioned methods and devices, the exemplary embodiments of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product, wherein the computer product includes computer program instructions that can be executed by a processor to implement all or part of the steps described in the training method of the single-channel speech enhancement model in any of the above-mentioned exemplary embodiments.
[0105] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages and scripting languages (e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0106] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A training method for a single-channel speech enhancement model, characterized in that: include: Step 1, generate a set of noisy spectra for training; Step 2, obtaining the noisy spectrum, calculating the initial amplitude spectrum and initial phase spectrum corresponding to the noisy spectrum, and converting the initial phase spectrum into a differential square phase spectrum; Step 3, inputting the initial amplitude spectrum into the amplitude encoder and amplitude module corresponding to the amplitude branch in sequence to obtain the decomposed time-frequency attention feature, and inputting the differential square phase spectrum into the phase encoder and phase module corresponding to the phase branch to obtain the differential square phase feature; Step 4, obtaining an interactive time-frequency feature and an interactive phase feature through interactive calculation between the decomposed time-frequency attention feature and the differential square phase feature; Step 5, input the interactive time-frequency features into the mask interpreter corresponding to the amplitude branch to obtain an enhanced amplitude spectrum, input the interactive phase features into the phase decoder corresponding to the phase branch to obtain an enhanced phase spectrum, calculate the total loss according to the enhanced amplitude spectrum and the enhanced phase spectrum, and update the model parameters; Step 6, perform multiple rounds of iterations, repeat steps 2 to 5 in batches in each round of iterations to perform iterative training, and obtain a trained single-channel speech enhancement model after the round of iterations is completed.
2. The method according to claim 1, characterized in that The calculating the initial amplitude spectrum and the initial phase spectrum corresponding to the noisy spectrum and converting the initial phase spectrum into a differential square phase spectrum specifically includes: An initial amplitude spectrum is obtained by calculating the absolute value of the noisy spectrum signal, and an initial phase spectrum is obtained by calculating the arc tangent function value of the noisy spectrum signal; The initial phase spectrum is expanded along the frequency axis to obtain an expanded phase spectrum, the phase spectra of low-frequency points and high-frequency points in each adjacent time frame in the expanded phase spectrum are differentially calculated to obtain a differential phase, and the differential phase is squared to obtain a differential square phase spectrum.
3. The method according to claim 1, characterized in that The step of sequentially inputting the initial amplitude spectrum into the amplitude encoder and the amplitude module corresponding to the amplitude branch to obtain the decomposed time-frequency attention feature, and inputting the differential square phase spectrum into the phase encoder and the phase module corresponding to the phase branch to obtain the differential square phase feature specifically includes: The initial amplitude spectrum is input into an amplitude encoder composed of two convolutional layers, and high-level amplitude features are extracted through the amplitude encoder; the high-level amplitude features are input into the amplitude module composed of two decomposed time-frequency attention blocks and three convolutional layers, and the high-level amplitude features are decomposed into a time channel attention vector and a frequency channel attention vector through the amplitude module, and the time channel attention vector and the frequency channel attention vector are taken as the outer product to obtain a time-frequency attention matrix, and the mask corresponding to each interval of the time-frequency attention matrix is calculated by the mask partitioning method, and the mask is multiplied by the value of the corresponding position of the time-frequency attention matrix to obtain the decomposed time-frequency attention feature; The differential square phase spectrum is input into a phase encoder composed of two convolutional layers, and high-level phase features are extracted through the phase encoder; the high-level phase features are input into a phase module composed of three convolutional layers to obtain differential square phase features.
4. The method according to claim 3, characterized in that The method of calculating the mask of each interval corresponding to the time-frequency attention matrix by the mask partitioning method specifically includes: Set the decomposition parameters for dividing the intervals, obtain multiple intervals for dividing the time-frequency attention matrix according to the decomposition parameters, and calculate the information value of each interval according to the decomposition parameters; if the information value is greater than the value of the corresponding interval of the time-frequency attention matrix, set the value of the mask to 0, otherwise set the value of the mask to 1.
5. The method according to claim 1, characterized in that The interactive calculation between the decomposed time-frequency attention feature and the differential square phase feature to obtain the interactive time-frequency feature and the interactive phase feature specifically includes: Three groups of corresponding amplitude modules and phase modules are used to perform three interactive calculations. Formula 1 is used to perform interactive calculations of the differential square phase feature on the decomposed time-frequency attention feature to obtain the interactive time-frequency feature; Formula 2 is used to perform interactive calculations of the decomposed time-frequency attention feature on the differential square phase feature to obtain the interactive phase feature: in, represents the time-frequency characteristics after interaction, represents the phase characteristics after interaction, B m represents the decomposed time-frequency attention feature, B p represents the differential square phase feature, δ() represents the Tanh activation function, Conv() represents changing the channel using a two-dimensional convolution with a convolution kernel of (1,1), and ⊙ represents a dot product operation.
6. The method according to claim 1, characterized in that The step of inputting the interactive time-frequency feature into a mask decoder corresponding to the amplitude branch to obtain an enhanced amplitude spectrum, and inputting the interactive phase feature into a phase decoder corresponding to the phase branch to obtain an enhanced phase spectrum specifically includes: Inputting the interacted time-frequency features into a mask decoder composed of a convolutional layer, a bGRU layer, and a fully connected layer to obtain an estimated mask, performing a Hadamard product between the estimated mask and the noisy spectrum to obtain an enhanced amplitude spectrum; The interacted phase features are input into a phase decoder composed of convolutional layers of conversion channels to obtain an enhanced phase spectrum.
7. The method according to claim 1, characterized in that The calculating of the total loss according to the enhanced amplitude spectrum and the enhanced phase spectrum specifically includes: A root mean square error between the enhanced amplitude spectrum and the initial amplitude spectrum is calculated to obtain a first loss, a root mean square error between the enhanced phase spectrum and the initial phase spectrum is calculated to obtain a second loss, and a total loss is calculated based on the first loss and the second loss.
8. A training device for a single-channel speech enhancement model, characterized in that: include: A training set generation module, used to generate a set of noisy spectra for training; A phase spectrum generation module is used to obtain the noisy spectrum, calculate the initial amplitude spectrum and the initial phase spectrum corresponding to the noisy spectrum, and convert the initial phase spectrum into a differential square phase spectrum; A dual-branch encoding module, used to sequentially input the initial amplitude spectrum into the amplitude encoder and amplitude module corresponding to the amplitude branch to obtain a decomposed time-frequency attention feature, and input the differential square phase spectrum into the phase encoder and phase module corresponding to the phase branch to obtain a differential square phase feature; An interactive calculation module, used for obtaining an interactive time-frequency feature and an interactive phase feature through interactive calculation between the decomposed time-frequency attention feature and the differential square phase feature; A dual-branch decoding module, used for inputting the interactive time-frequency features into a mask interpreter corresponding to an amplitude branch to obtain an enhanced amplitude spectrum, inputting the interactive phase features into a phase decoder corresponding to a phase branch to obtain an enhanced phase spectrum, calculating a total loss according to the enhanced amplitude spectrum and the enhanced phase spectrum, and updating model parameters; The training iteration module is used to perform multiple rounds of iterations. In each round of iteration, the steps in the phase spectrum generation module, the dual-branch encoding module, the interactive calculation module and the dual-branch decoding module are repeatedly called in batches for iterative training. After the round of iterations is completed, a trained single-channel speech enhancement model is obtained.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the training method of the single-channel speech enhancement model as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by the processor, the steps of the training method of the single-channel speech enhancement model as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and apparatus for tenderizing meat
CA2393768A1
Interval change method and device
CN1347076A
improvements to devices for pattern recognition
FR1351610A
Real-time dynamic noise reduction using convolutional networks
US20210012767A1
Signal acquisition
WO1991020145A1
