A time-domain flexible vibration sensor speech enhancement method and system
By combining the dual-path Transformer and equalization-generated component prediction, the time-domain flexible vibration sensor speech enhancement method solves the problems of high-frequency attenuation and low cut-off frequency of the speech signal in the flexible vibration sensor, achieving a significant improvement in speech quality and a reduction in the number of parameters. reduce.
Patent Information
- Application Number
- CN202111313917.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-11-08
AI Technical Summary
Flexible vibration sensors cause serious attenuation of high-frequency speech signals due to the low-pass nature of human body signal conduction, and the speech cut-off frequency is low, causing speech enhancement methods to face more serious signal loss problems. Existing methods rely on strong assumptions or suboptimal phases. Spectrum processing, the improvement effect is limited.
A time-domain flexible vibration sensor speech enhancement method that combines dual-path Transformer and equalization-generated component prediction is used to reconstruct time-domain speech through speech segmentation, compression, feature extraction, intra-frame and inter-frame attention learning, equalization component and generative component prediction, and Waveforms for speech enhancement.
It effectively restores the lost speech components in the flexible vibration sensor and improves the speech quality. Compared with the existing methods, the enhancement performance is greatly improved, the number of parameters is greatly reduced, and the model complexity is low, making it suitable for practical applications.
Smart Images

Figure CN114067818B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of vibration sensors, in particular to the field of flexible vibration sensors, and more particularly to a time-domain flexible vibration sensor speech enhancement method and system combining dual-path Transformer and equalization-generation component prediction. Background Art
[0002] Different types of flexible vibration sensors can be realized based on piezoelectric effect, piezoresistive effect, piezoelectric capacitance effect, electromagnetic effect, etc. This type of sensor has been studied for capturing throat vibrations to obtain speech signals. Figure 1 As shown in the figure, it is a flexible vibration sensor based on electromagnetic effect. Like the laryngeal microphone made of rigid materials, this sensor can also block the noise propagated in the air and has natural anti-noise performance. However, because the material is soft and comfortable to wear, it is a very promising future wearable device solution. However, due to the low-pass nature of human body signal transmission, the acquired voice signal is severely attenuated at high frequencies, and the flexible structure tends to obtain a lower resonance frequency, so it faces a more serious signal loss problem than the laryngeal microphone made of rigid materials. Specifically, the speech cutoff frequency of the laryngeal microphone made of rigid materials is around 2.5kHz, while the speech cutoff frequency of the flexible vibration sensor is around 1kHz. Therefore, the research on the speech enhancement method of flexible vibration sensors is an urgent and very challenging issue.
[0003] Some similar vibration sensor speech, such as bone conduction speech and non-vocalized speech, mainly adopts statistical model-based enhancement methods in early related research, which achieves enhancement by converting distorted low-dimensional spectral envelope acoustic features to corresponding air-conducted speech features. However, the statistical model method relies on very strong assumptions. When the assumptions are not met, the enhancement performance deteriorates seriously, and low-dimensional acoustic features are difficult to represent speech well. Subsequently, related enhancement methods based on deep learning have achieved better performance because they can overcome the above problems. Related enhancement methods based on deep learning are almost all processed in the time-frequency domain, estimating the enhanced amplitude spectrum from the distorted amplitude spectrum, and then reconstructing the enhanced speech waveform using the distorted phase spectrum. Since the phase spectrum used is suboptimal, the overall enhancement performance improvement has an upper limit. It is natural to think that a further improvement method is to process directly in the time domain, so that the model can automatically extract appropriate features instead of using manually designed features, thereby avoiding the use of distorted phase spectrum. At present, time domain methods are very active in the field of speech denoising, and have achieved better results than frequency domain and complex domain. Summary of the invention
[0004] The purpose of the present invention is to provide a time-domain flexible vibration sensor speech enhancement method and system combining dual-path Transformer and equalization-generation component prediction in order to solve the problems existing in the prior art.
[0005] The technical solution to achieve the purpose of the present invention is: a time domain flexible vibration sensor speech enhancement method, the algorithm includes the following steps:
[0006] Step 1, performing speech segmentation on the time domain speech of the flexible vibration sensor;
[0007] Step 2, compressing the speech frame and projecting it into the latent feature space;
[0008] Step 3: Based on the dual-path Transformer, feature attention learning is implemented within and between frames to establish the local and global correlation of implicit expressions;
[0009] Step 4, based on the results of step 3, predict the equilibrium component and the generated component respectively;
[0010] Step 5, based on the results of step 2 and step 4, reconstructing the time domain speech waveform from the implicit feature space;
[0011] Step 6: Perform overlap-addition to obtain the final enhanced time-domain speech waveform.
[0012] Furthermore, the step 1 of performing speech segmentation on the flexible vibration sensor speech specifically includes:
[0013] Step 1-1, for the flexible sensor time domain speech x(t)∈R with length L L , divide the frame into frames according to the frame length F and the frame shift H, and obtain N speech frames; the calculation formula of N is:
[0014] N = floor[(LF) / H]+1
[0015] Step 1-2: for a training batch of B voices, divide them into frames according to the method of step 1-1, and use the method of filling 0 to fill the number of frames of all voices to the maximum number of voice frames N in the batch. max , and record the actual number of voice frames each voice has;
[0016] Step 1-3: concatenate all speech frames and perform Hamming window processing to obtain a three-dimensional data tensor
[0017] Furthermore, step 2 of compressing the speech frame and projecting it into the implicit feature space specifically includes:
[0018] Step 2-1, compressing the speech frame through a 2D convolution; wherein the size of the convolution kernel of the 2D convolution is (1,3), the step size is (1,2), and the number of feature channels of the convolution is C;
[0019] Step 2-2, the compressed speech frame is sequentially subjected to layer normalization and PReLU activation function, and then sent to a 2D 1×1 convolution and a PReLU activation function, thereby converting the speech data into a new feature space; wherein the number of feature channels of the 2D 1×1 convolution is C.
[0020] Furthermore, in step 3, feature attention learning within and between frames is realized based on the dual-path Transformer, and local and global correlations of implicit expressions are established. This is specifically achieved through M stacked dual-path Transformer blocks, and the input of the dual-path Transformer block is the tensor D pre ∈[B,C,N max ,F'], including intra-frame Transformer and inter-frame Transformer; the specific process includes:
[0021] Step 3-1: The intra-frame Transformer focuses on dimension F', that is, on the samples in the same speech frame. The output after the intra-frame Transformer is D intra :
[0022] D intra = transformer(D pre [:,:,:,i]),i=1,...,F'
[0023] In the formula, transformer(·) represents the Transformer transformation, and the number of feature map channels is set to C, then D intra ∈[B,C,N max ,F'];
[0024] The inter-frame Transformer applies attention to dimension N max , that is, acting on the sample points between the frames of the speech sequence, the number of feature map channels is still set to C, then the output after the inter-frame Transformer is D inter :
[0025] D inter = transformer(D intra [:,:,i,:]),i=1,...,N max
[0026] Among them, D inter ∈[B,C,N max ,F'];
[0027] Step 3-2, group normalize the outputs of both the intra-frame Transformer and the inter-frame Transformer;
[0028] In step 3-3, residual connections are established between the input of the intra-frame Transformer and the corresponding group-normalized output, and between the input of the inter-frame Transformer and the corresponding group-normalized output, respectively. The input of the intra-frame Transformer is the result of step 2, and the input of the inter-frame Transformer is the output of the intra-frame Transformer after group normalization.
[0029] Furthermore, in step 4, based on the result of step 3, the balanced component and the generated component are predicted respectively, and the specific process includes:
[0030] The result of step 3 is input into two 2D convolutions after passing through the PReLU nonlinear function and a 2D convolution, and then output after passing through the gate activation function, a 2D convolution and the ReLU activation function in sequence to obtain the balanced component;
[0031] The result of step 3 is input into two 2D convolutions after passing through the PReLU nonlinear function and a 2D convolution, and then output after passing through the gate activation function, a 2D convolution and the Tanh activation function in sequence to obtain the generated component;
[0032] The size of the convolution kernel of the 2D convolution is (1, 1) and the step size is (1, 1).
[0033] Furthermore, step 5 reconstructs the time domain speech waveform from the implicit feature space based on the results of step 2 and step 4, and the specific process includes:
[0034] Step 5-1, multiply the result of step 2 by the balanced component, and then add it to the generated component;
[0035] Step 5-2, feature upsampling is performed through sub-pixel transposed convolution, and then after layer normalization and PReLU activation function, it is sent to a two-dimensional convolution to reconstruct the time domain speech waveform; wherein, the size of the convolution kernel of the sub-pixel transposed convolution is (1,3) and the step size is (1,1), and the size of the convolution kernel of the two-dimensional convolution is (1,1) and the step size is (1,1).
[0036] A time-domain flexible vibration sensor speech enhancement system, the system comprising a speech segmentation module, a time-domain flexible vibration sensor speech enhancement model and an overlap-addition module arranged in sequence, wherein the time-domain flexible vibration sensor speech enhancement model comprises a pre-processing module, a dual-path Transformer module, an equalization module, a generation module and a post-processing module arranged in sequence;
[0037] The speech segmentation module is used to perform speech segmentation on the time domain speech of the flexible vibration sensor;
[0038] The preprocessing module is used to compress the speech frames and project them into the latent feature space;
[0039] The dual-path Transformer module is used to establish local and global correlations of implicit expressions using its own self-attention mechanism;
[0040] The equalization module uses the output of the dual-path Transformer module as input to predict the equalization component;
[0041] The generation module uses the output of the dual-path Transformer module as input to predict the generation component;
[0042] The output of the pre-processing module is multiplied by the output of the equalization module, and then added with the output of the generation module and sent to the post-processing module, and the post-processing module reconstructs the time domain speech waveform from the implicit feature space;
[0043] The overlap-add module is used to operate the framed speech segments obtained by the post-processing module according to the reverse process of speech framing, restore them to normal speech waveforms, and obtain the final enhanced time-domain speech waveforms.
[0044] Further, the dual-path Transformer module includes five stacked identical dual-path Transformer blocks, and the dual-path Transformer block includes an intra-frame Transformer unit and an inter-frame Transformer unit;
[0045] The intra-frame Transformer unit includes a first improved Transformer and a first group normalization unit that are sequentially arranged, and the inter-frame Transformer unit includes a second improved Transformer and a second group normalization unit that are sequentially arranged;
[0046] The input of the first improved Transformer is the output of the preprocessing module, the input is connected to the output of the first group normalization unit through a residual connection, and then input to the second improved Transformer, the input of the second improved Transformer is connected to the output of the second group normalization unit through a residual connection as the output of the dual-path Transformer module;
[0047] The first improved Transformer or the second improved Transformer includes a multi-head attention mechanism unit, a first-layer normalization unit, a feedforward network and a second-layer normalization unit arranged in sequence, wherein the input of the multi-head attention mechanism unit establishes a residual connection with its output and is input to the first-layer normalization unit, and the output of the first-layer normalization unit establishes a residual connection with the output of the feedforward network and is input to the second-layer normalization unit; the feedforward network includes a GRU layer, a ReLU layer and a linear transformation layer arranged in sequence.
[0048] The present invention proposes a time domain enhancement model for flexible vibration sensor speech, which combines dual-path Transformer and equalization-generation component prediction. The dual-path Transformer realizes the effective modeling of local and global context information of long-term speech sequences, which is very beneficial to the recovery of a large number of lost components in the flexible vibration sensor speech; the constructed equalization module and generation module are based on the analysis of the loss mechanism of the flexible vibration sensor speech, and according to the enhancement idea of the loss mechanism, the speech quality can be further improved; compared with the existing speech time domain enhancement model, the whole model has a significant improvement in enhancement performance and a significant reduction in the number of parameters.
[0049] Compared with the prior art, the present invention has the following significant advantages: 1) The dual-path Transformer adopted uses its self-attention mechanism to learn the relationship between samples within the speech frame and between frames respectively, which can effectively construct the local and global contextual correlation of long-term speech sequences, thereby helping to accurately infer a large number of lost speech components in the speech of the flexible vibration sensor, and the Transformer structure has greatly reduced parameters compared to the general temporal relationship construction model; 2) Based on the speech loss mechanism of the flexible vibration sensor, an equalization module and a generation module are constructed, and the equalization coefficient obtained by the equalization module directly operates on the low-frequency characteristics of the speech, and its value is similar to the masking in speech denoising. value, which can effectively suppress the noise in the speech. The generation module focuses on the recovery of lost components. Through the clear division of labor among modules, the speech quality is further improved, and it is highly interpretable; 3) The constructed preprocessing module effectively compresses the speech frame information, which reduces the number of parameters of subsequent modules while compacting the information expression. The post-processing module uses sub-pixel convolution to achieve upsampling and corresponding information decompression, avoiding the chessboard effect problem caused by ordinary upsampling convolution; 4) The entire model uses a large number of 1×1 convolutions, and the multiple convolutions set are consistent in the number of feature channels, so that the entire model has a very low model complexity, which is conducive to promotion in practical applications.
[0050] The present invention is further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1(a) Schematic diagram of voice acquisition using a flexible vibration sensor based on electromagnetic effect.
[0052] Figure 1 (b) is a schematic diagram of the structure of a flexible vibration sensor based on electromagnetic effect.
[0053] Figure 2 Schematic diagram of the flexible vibration sensor and air-conducted speech amplitude spectrum, where Figure (a) is the flexible vibration sensor speech amplitude spectrum, and Figure (b) is the air-conducted speech amplitude spectrum.
[0054] Figure 3 Schematic diagram of the framework of a time-domain flexible vibration sensor speech enhancement system in one embodiment.
[0055] Figure 4 Schematic diagram of an h-head multi-head attention mechanism in one embodiment.
[0056] Figure 5 FIG. 4 is a structural diagram of an improved Transformer in one embodiment.
[0057] Figure 6 It is a comparison diagram of amplitude spectra in an embodiment, wherein Figure (a) to Figure (i) are the amplitude spectra corresponding to the FVS (flexible vibration sensor), GCRN*, BLSTM, CRNN*, Wave-U-Net, DEMUCS, TSTNN, DPT-EGNet, and AC (air conducted) models respectively. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] Assume that the flexible vibration sensor speech is x(t)∈R T , the corresponding air-conducted speech is y(t)∈R T , and perform enhancement processing on it. The goal is to find an enhancement function f(·) that makes the following equation hold:
[0060] y(t)≈f(x(t))
[0061] Where T is the duration of speech.
[0062] Figure 2The amplitude spectra of the flexible vibration sensor speech and the corresponding air-conducted speech are shown. It can be seen that the low frequencies of the air-conducted speech and the flexible vibration sensor speech are highly similar, but not completely consistent. This is because the excitation signals of the two voices are the same, but the conduction path is changed from the original air conduction to body tissue conduction, and the latter is closer to solid, and more low-frequency components pass through. In the low-frequency band, the flexible vibration sensor speech can be regarded as a distorted signal of the air-conducted speech, and the masking value in the speech denoising model can be estimated to achieve enhancement, which can also be called the equalization coefficient. In the high-frequency band, the flexible vibration sensor speech components are almost completely lost, so it is necessary to estimate the lost speech components. Therefore, the enhancement of the flexible vibration sensor speech can be regarded as a process of achieving equalization of the speech and adding the lost components.
[0063] Based on the above analysis, in one embodiment, a time domain flexible vibration sensor speech enhancement method is provided, and the method comprises the following steps:
[0064] Step 1, performing speech segmentation on the time domain speech of the flexible vibration sensor;
[0065] Step 2, compressing the speech frame and projecting it into the latent feature space;
[0066] Step 3: Based on the dual-path Transformer, feature attention learning is implemented within and between frames to establish the local and global correlation of implicit expressions;
[0067] Step 4, based on the results of step 3, predict the equilibrium component and the generated component respectively;
[0068] Step 5, based on the results of step 2 and step 4, reconstructing the time domain speech waveform from the implicit feature space;
[0069] Step 6: Perform overlap-addition to obtain the final enhanced time-domain speech waveform.
[0070] Further, in one embodiment, the step 1 of performing speech segmentation on the flexible vibration sensor speech specifically includes:
[0071] Step 1-1, for the flexible sensor time domain speech x(t)∈R with length L L , divide the frame into frames according to the frame length F and the frame shift H, and obtain N speech frames; the calculation formula of N is:
[0072] N = floor[(LF) / H]+1
[0073] Step 1-2: for a training batch of B voices, divide them into frames according to the method of step 1-1, and use the method of filling 0 to fill the number of frames of all voices to the maximum number of voice frames N in the batch. max, and record the actual number of speech frames of each voice, so as to correctly calculate the loss function and restore the speech waveform;
[0074] Here, since the number of speech frames obtained by segmenting speech of different durations is different, in order to enable B speech pieces of a training batch to be calculated simultaneously, a zero-filling method is adopted.
[0075] Step 1-3: concatenate all speech frames and perform Hamming window processing to obtain a three-dimensional data tensor
[0076] Further, in one embodiment, the step 2 of compressing the speech frame and projecting it into the implicit feature space specifically includes:
[0077] Step 2-1, compressing the speech frame through a 2D convolution; wherein the size of the convolution kernel of the 2D convolution is (1,3), the step size is (1,2), and the number of feature channels of the convolution is C;
[0078] Here, the speech samples can be compressed to half of their original size to remove redundant information.
[0079] Step 2-2, the compressed speech frame is sequentially subjected to layer normalization and PReLU activation function, and then sent to a 2D 1×1 convolution and a PReLU activation function, thereby converting the speech data into a new feature space; wherein the number of feature channels of the 2D 1×1 convolution is C.
[0080] Here, the layer normalization operation and the adopted PReLU (Parametric Rectified Linear Unit) activation function are used to ensure the stability of network data and improve the network gradient calculation problem.
[0081] Further, in one embodiment, step 3 implements feature attention learning within and between frames based on dual-path Transformer to establish local and global correlation of implicit expression, which is specifically implemented by N stacked dual-path Transformer blocks, and the input of the dual-path Transformer block is the tensor D pre ∈[B,C,N max ,F'] (the input is the output result of step 2), including intra-frame Transformer and inter-frame Transformer; the specific process includes:
[0082] Step 3-1: The intra-frame Transformer focuses on dimension F', that is, on the samples in the same speech frame. The output after the intra-frame Transformer is D intra :
[0083] Dintra = transformer(D pre [:,:,:,i]),i=1,...,F'
[0084] In the formula, transformer(·) represents the Transformer transformation, and the number of feature map channels is set to C, then D intra ∈[B,C,N max ,F']; The intra-frame Transformer acts on the samples in the same frame, thereby realizing the correlation modeling between local samples;
[0085] The inter-frame Transformer applies attention to dimension N max , that is, acting on the sample points between the frames of the speech sequence, the number of feature map channels is still set to C, then the output after the inter-frame Transformer is D inter :
[0086] D inter = transformer(D intra [:,:,i,:]),i=1,...,N max
[0087] Among them, D inter ∈[B,C,N max ,F']; The inter-frame Transformer aggregates all the inter-frame information in a sentence, thereby realizing global correlation modeling.
[0088] Step 3-2, group normalize the outputs of both the intra-frame Transformer and the inter-frame Transformer;
[0089] In step 3-3, residual connections are established between the input of the intra-frame Transformer and the corresponding group-normalized output, and between the input of the inter-frame Transformer and the corresponding group-normalized output, respectively. The input of the intra-frame Transformer is the result of step 2, and the input of the inter-frame Transformer is the output of the intra-frame Transformer after group normalization.
[0090] Further, in one embodiment, the step 4 predicts the balanced component and the generated component based on the result of step 3, and the specific process includes:
[0091] The result of step 3 is input into two 2D convolutions after passing through the PReLU nonlinear function and a 2D convolution, and then output after passing through the gate activation function, a 2D convolution and the ReLU activation function in sequence to obtain the balanced component;
[0092] The result of step 3 is input into two 2D convolutions after passing through the PReLU nonlinear function and a 2D convolution, and then output after passing through the gate activation function, a 2D convolution and the Tanh activation function in sequence to obtain the generated component;
[0093] The size of the convolution kernel of the 2D convolution is (1, 1) and the step size is (1, 1).
[0094] Here, the nonlinear activation functions used to predict the equalization component and the generated component are different because the equalization coefficient is greater than 0, while the value of the generated component has no such restriction.
[0095] Further, in one embodiment, step 5 reconstructs the time domain speech waveform from the implicit feature space based on the results of step 2 and step 4, and the specific process includes:
[0096] Step 5-1, multiply the result of step 2 by the balanced component, and then add it to the generated component;
[0097] Step 5-2, feature upsampling is performed through sub-pixel transposed convolution, and then after layer normalization and PReLU activation function, it is sent to the two-dimensional convolution, so that different enhanced feature space channels are fused and finally merged into one channel to reconstruct the time domain speech waveform; wherein, the size of the convolution kernel of the sub-pixel transposed convolution is (1,3) and the step size is (1,1), and the size of the convolution kernel of the two-dimensional convolution is (1,1) and the step size is (1,1).
[0098] Here, compared with the general transposed convolution, the sub-pixel transposed convolution avoids the checkerboard effect that may be caused by zero padding.
[0099] In one embodiment, in combination Figure 3 , provides a time-domain flexible vibration sensor speech enhancement system, the system comprises a speech segmentation module, a time-domain flexible vibration sensor speech enhancement model and an overlap-addition module which are arranged in sequence, wherein the time-domain flexible vibration sensor speech enhancement model comprises a pre-processing module, a dual-path Transformer module, an equalization module, a generation module and a post-processing module which are arranged in sequence;
[0100] The speech segmentation module is used to perform speech segmentation on the time domain speech of the flexible vibration sensor;
[0101] The preprocessing module is used to compress the speech frames and project them into the latent feature space;
[0102] The dual-path Transformer module is used to establish local and global correlations of implicit expressions using its own self-attention mechanism;
[0103] The equalization module uses the output of the dual-path Transformer module as input to predict the equalization component;
[0104] The generation module uses the output of the dual-path Transformer module as input to predict the generation component;
[0105] The output of the pre-processing module is multiplied by the output of the equalization module, and then added with the output of the generation module and sent to the post-processing module, and the post-processing module reconstructs the time domain speech waveform from the implicit feature space;
[0106] The overlap-add module is used to operate the framed speech segments obtained by the post-processing module according to the reverse process of speech framing, restore them to normal speech waveforms, and obtain the final enhanced time-domain speech waveforms.
[0107] Further, in one of the embodiments, the loss function of the time-domain flexible vibration sensor speech enhancement model is:
[0108]
[0109] Among them, the time domain loss function The mean square error between enhanced speech and time domain speech is:
[0110]
[0111] In the formula, is the time domain speech, x is the target speech, x n and represents the nth sample point of the target speech and enhanced speech, and M represents the length of the speech waveform;
[0112] Among them, the frequency domain loss function The absolute value difference between the real and imaginary parts of the short-time Fourier spectrum of the enhanced speech and the target speech is:
[0113]
[0114] In the formula, X and They represent the STFT complex spectra of the target speech and enhanced speech respectively, T represents the number of speech frames, F represents the number of STFT frequency bands, r and i represent the real part and imaginary part respectively; the hyperparameter α is used to adjust the proportion of the time domain loss function and the frequency domain loss function.
[0115] Further, in one of the embodiments, the preprocessing module includes a 2D convolution unit, a layer normalization unit, a PReLU activation function, and a 2D convolution and PReLU activation function combination unit arranged in sequence;
[0116] The post-processing module includes a sub-pixel transposed convolution unit, a layer normalization unit, a PReLU activation function, and a 2D convolution unit which are arranged in sequence;
[0117] The equalization module and the generation module both include a PReLU nonlinear function and a 2D convolution, two 2D convolutions, a gate activation function, a 2D convolution and a nonlinear activation function, which are arranged in sequence; the difference between the equalization module and the generation module is that the nonlinear activation functions are a ReLU activation function and a Tanh activation function, respectively;
[0118] Among them, the size of the convolution kernel of the two-dimensional convolution is (1, 1) and the step size is (1, 1), and the size of the convolution kernel of the sub-pixel transposed convolution is (1, 3) and the step size is (1, 1).
[0119] Further, in one of the embodiments, the dual-path Transformer module includes five stacked identical dual-path Transformer blocks, the dual-path Transformer blocks including intra-frame Transformer units and inter-frame Transformer units;
[0120] The intra-frame Transformer unit includes a first improved Transformer and a first group normalization unit that are sequentially arranged, and the inter-frame Transformer unit includes a second improved Transformer and a second group normalization unit that are sequentially arranged;
[0121] The input of the first improved Transformer is the output of the preprocessing module, the input is connected to the output of the first group normalization unit through a residual connection, and then input to the second improved Transformer, the input of the second improved Transformer is connected to the output of the second group normalization unit through a residual connection as the output of the dual-path Transformer module;
[0122] Combination Figure 5 , the first improved Transformer or the second improved Transformer includes a multi-head attention mechanism unit, a first layer normalization unit, a feedforward network and a second layer normalization unit arranged in sequence, wherein the input of the multi-head attention mechanism unit establishes a residual connection with its output and then inputs it to the first layer normalization unit, and the output of the first layer normalization unit establishes a residual connection with the output of the feedforward network and then inputs it to the second layer normalization unit; the feedforward network includes a GRU layer, a ReLU layer and a linear transformation layer arranged in sequence. Here, the GRU layer (Gate Recurrent Unit) is used to learn the order information of the sequence, and the layer normalization and residual connection further increase the convergence of the network.
[0123] Transformer can learn the importance of each dimension of the feature sequence and reasonably allocate attention to the features of each dimension of the sequence, thereby achieving effective contextual relevance modeling. The multi-head attention mechanism is an important part of Transformer. The structure of the h-head multi-head attention mechanism is as follows: Figure 4 As shown. Under this attention mechanism, the input data can learn multiple queries Q respectively under the action of the learnable linear weights constructed in the network. i , key K i and the value V i (i=1,2,...h). Every pair of queries Q i and key K i After the dot product Scaling, then the attention weight can be obtained through Softmax calculation, and then the attention weight and value V i By multiplying, we can get the output of the single-head attention mechanism, as shown in formula (3). The h-head attention mechanism connects the outputs of h single-head attentions and then obtains the output through linear weight conversion, as shown in the following formula.
[0124]
[0125] MultiHead(Q,K,V)=Concat(head1,...,head h )W o
[0126] For example, in one embodiment, the present invention is further experimentally verified and described, including the following contents:
[0127] The neural network based on the dual-path Transformer and combined with the balanced-generative component prediction proposed in the present invention is denoted as DPT-EGNet below.
[0128] A. Data
[0129] The flexible vibration sensor speech designed by the Biomedical Flexible Electronics Laboratory of Tianjin University was used as the research object. The domestic microphone brand SHUYIN ECM8000 was used to synchronously collect the speech data of the flexible vibration sensor and the air conduction microphone at a sampling rate of 16kHz in a quiet environment, and a parallel database of the flexible vibration sensor and air conduction speech was produced. The data of a boy and a girl were collected. Each person was asked to read 1000 sentences in Mandarin with a duration of about 3 to 4 seconds. The corpus came from the public Mandarin corpus AISHELL-ASR0009-OS1. In the experiment, the data of boys and girls were trained separately to obtain the speaker-dependent flexible vibration sensor speech enhancement model. During the experiment, 30 sentences from each person's database were randomly selected for testing, and the rest were used for training.
[0130] B. Experimental Setup
[0131] For the DPT-EGNet experiment, the speech frame length and frame shift were set to 32ms and 16ms, respectively, corresponding to 512 and 256 samples at a 16kHz sampling rate. In the experiment, if the sentence duration exceeds 4s, a 4s sentence is randomly intercepted, and when the speech duration is less than 4s, the maximum duration sentence is used as the standard in each batch of data for zero padding.
[0132] The experiment used the Adam optimizer to train for 200 rounds, and adopted a warm-up training strategy. When the number of training iterations is within the warm-up number, the learning rate increases linearly. After exceeding the warm-up number, it decays every 2 rounds, and the decay factor is set to 0.98. This training strategy can effectively avoid the gradient explosion problem, which is also a common training strategy based on the Transformer model. The specific training strategy is defined as follows:
[0133]
[0134] Set k1 = 0.2, k2 = 4e -4 , num_warmups=4000,d model is the number of feature maps input to the Transformer, set to 64.
[0135] In the study, the proposed model is compared with 8 other baseline models, namely GCRN, GCRN*, BLSTM, CRNN, CRNN*, Wave-U-Net, DEMUCS, and TSTNN. Among them, Wave-U-Net, DEMUCS, and TSTNN are all cutting-edge time-domain speech enhancement models. BLSTM and CRNN are estimation methods based on amplitude spectrum, while GCRN is estimation based on complex spectrum. Since the original CRNN and GCRN are causal models, and the other models are non-causal models, in order to be able to compare fairly, considering that both models are encoding-decoding structures and LSTM modules are set in the middle layer, according to the causal and non-causal construction methods of the DEMUCS model, the LSTM module in the middle layer is changed to a BLSTM module, and the CRNN* and GCRN* models are constructed respectively. All models use the same training and test data.
[0136] In order to explore the effects of different modules in the DPT-EGNet model, different variation models were constructed and decomposition experiments were conducted on female voice data. SPT-EGNet, based on the DPT-EGNet model, changed the dual-path Transformer module into a single-path Transformer module, that is, the module only contains the intra-frame Transformer; DPT-EGNet w / o G, removed the generation module based on the DPT-EGNet model. DPT-EGNet w / o EG, removed the equalization module and generation module based on the DPT-EGNet model. In order to eliminate the impact of parameter reduction on the model, we experimented with DPT-EGNet w / o EG models containing 5 and 7 dual-path Transformer blocks, respectively. The model with 7 dual-path Transformer blocks has 1.33 times the number of parameters of DPT-EGNet.
[0137] C. Evaluation Indicators
[0138] The proposed method is verified by using objective indicators such as perceptual evaluation of speech quality (PESQ), short-time objective intelligibility (STOI) and composite measure for overall speech quality (COVL). The PESQ value range is -0.5-4.5, and the higher the value, the better the speech quality. The STOI value range is between 0-1 (0-100%), and the higher the value, the higher the speech intelligibility. The COVL score is between 1-5, and the higher the score, the higher the quality. This indicator has a good correlation with the Mean Opinion Score (MOS).
[0139] D. Result Analysis
[0140] 1. Comparison of objective results
[0141] Table 1 Experimental results of the proposed method and other baseline methods
[0142]
[0143] Table 1 shows the average results of the proposed method and eight baseline methods on male and female voice test data, and also shows the number of parameters of each model. From the table, we can see the following phenomenon: the proposed method performs best in all three objective indicators, and the number of parameters is greatly reduced compared to other models. For example, compared with the time domain method DEMUCS, the proposed method improves PESQ, STOI and COVL by about 0.52%, 6.90% and 0.51 respectively on average on the two speaker data, while the number of parameters is only about 1 / 4 of the original, which fully demonstrates the effectiveness of the proposed method. In general, the enhancement effect of each model on male data is higher than that on female data on average, because female voices have more high frequencies, so there are more lost components and it is difficult to recover, while the difficulty of male voice enhancement is relatively low.
[0144] 2. Spectrum comparison
[0145] Figure 6 The spectrograms of flexible sensor speech, air conduction speech and speech enhanced by different methods are shown. By comparison, it can be seen that each method can restore the lost high-frequency components to varying degrees. The amplitude spectra of TSTNN and the proposed method are closer to the target speech, while TSTNN is too smooth in the consonant part, similar to the mechanical sound component, and is not as natural as the proposed method. Therefore, the proposed method can obtain higher quality speech.
[0146] 3. Decomposition experiment
[0147] Table 2 Decomposition experimental results of DPT-EGNet
[0148]
[0149] As can be seen from Table 2, compared with DPT-EGNet, the performance of SPT-EGNet has seriously declined, indicating that the dual-path Transformer module plays an important role in the entire model. Compared with DPT-EGNet, the PESQ, STOI, and COVL scores of DPT-EGNet w / o G have dropped by about 0.11, 0.5%, and 0.12, respectively. Compared with DPT-EGNet w / o G, the performance of DPT-EGNet w / o EG model has further declined, which fully demonstrates that both the equalization module and the generation module have a great influence on the model enhancement effect. In addition, we can see that the DPT-EGNet w / oEG model with 7 dual-path Transformer blocks has a lower enhancement effect than the DPT-EGNet with fewer parameters, indicating that the dual-path Transformer module has been saturated, and also proves that the equalization module and the generation module have different roles from the dual-path Transformer module in the model.
[0150] In summary, the present invention proposes a time domain enhancement model for flexible vibration sensor speech, which combines dual-path Transformer and equalization-generation component prediction. The dual-path Transformer realizes effective local and global context information modeling of long-term speech sequences, and the constructed equalization module and generation module can further improve the speech quality. Experiments show that the proposed model can well enhance the flexible sensor speech, outperforming the baseline model in PESQ, STOI and COVL indicators, and greatly reducing the number of model parameters.
[0151] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A time domain flexible vibration sensor speech enhancement method, characterized in that: The method comprises the following steps: Step 1, performing speech segmentation on the time domain speech of the flexible vibration sensor; Step 2, compressing the speech frame and projecting it into the latent feature space; Step 3: Based on the dual-path Transformer, feature attention learning is implemented within and between frames to establish the local and global correlation of implicit expressions; Step 4: Based on the results of step 3, predict the equilibrium component and the generated component respectively; the specific process includes: The result of step 3 is input into two 2D convolutions after passing through the PReLU nonlinear function and a 2D convolution, and then output after passing through the gate activation function, a 2D convolution and the ReLU activation function in sequence to obtain the balanced component; The result of step 3 is input into two 2D convolutions after passing through the PReLU nonlinear function and a 2D convolution, and then output after passing through the gate activation function, a 2D convolution and the Tanh activation function in sequence to obtain the generated component; The size of the convolution kernel of the 2D convolution is (1,1) and the step size is (1,1); Step 5, based on the results of step 2 and step 4, reconstruct the time domain speech waveform from the implicit feature space; the specific process includes: Step 5-1, multiply the result of step 2 by the balanced component, and then add it to the generated component; Step 5-2, perform feature upsampling through sub-pixel transposed convolution, and then send it to 2D convolution after layer normalization and PReLU activation function to reconstruct the time domain speech waveform; wherein the convolution kernel size of the sub-pixel transposed convolution is (1,3) and the step size is (1,1), and the convolution kernel size of the 2D convolution is (1,1) and the step size is (1,1); Step 6: Perform overlap-addition to obtain the final enhanced time-domain speech waveform.
2. The time-domain flexible vibration sensor speech enhancement method according to claim 1 is characterized in that: The step 1 of performing speech segmentation on the time domain speech of the flexible vibration sensor specifically includes: Step 1-1, for the flexible sensor time domain speech x(t)∈R with length L L , divide the frame into frames according to the frame length F and the frame shift H, and obtain N speech frames; the calculation formula of N is: N = floor[(LF) / H]+1 Step 1-2: for a training batch of B voices, divide them into frames according to the method of step 1-1, and use the method of filling 0 to fill the number of frames of all voices to the maximum number of voice frames N in the batch. max , and record the actual number of voice frames each voice has; Step 1-3: concatenate all speech frames and perform Hamming window processing to obtain a three-dimensional data tensor 3. The time-domain flexible vibration sensor speech enhancement method according to claim 1 or 2, characterized in that: Step 2 compresses the speech frame and projects it into the implicit feature space, specifically including: Step 2-1, compressing the speech frame through a 2D convolution; wherein the size of the convolution kernel of the 2D convolution is (1,3), the step size is (1,2), and the number of feature channels of the convolution is C; Step 2-2, the compressed speech frame is sequentially subjected to layer normalization and PReLU activation function, and then sent to a 2D 1×1 convolution and a PReLU activation function, thereby converting the speech data into a new feature space; wherein the number of feature channels of the 2D 1×1 convolution is C.
4. The time-domain flexible vibration sensor speech enhancement method according to claim 3 is characterized in that: Step 3 describes the dual-path Transformer based intra-frame and inter-frame feature attention learning, establishing the local and global correlation of implicit expression, which is specifically implemented by M stacked dual-path Transformer blocks. The input of the dual-path Transformer block is the tensor D pre ∈[B,C,N max ,F'], including intra-frame Transformer and inter-frame Transformer; the specific process includes: Step 3-1: The intra-frame Transformer focuses on dimension F', that is, on the samples in the same speech frame. The output after the intra-frame Transformer is D intra : D intra =transformer(D pre [:,:,:,i]),i=1,...,F' In the formula, transformer(·) represents the Transformer transformation, and the number of feature map channels is set to C, then D intra ∈[B,C,N max ,F']; The inter-frame Transformer applies attention to dimension N max , that is, acting on the sample points between the frames of the speech sequence, the number of feature map channels is still set to C, then the output after the inter-frame Transformer is D inter : D inter =transformer(D intra [:,:,i,:]),i=1,...,N max Among them, D inter ∈[B,C,N max ,F']; Step 3-2, group normalize the outputs of both the intra-frame Transformer and the inter-frame Transformer; In step 3-3, residual connections are established between the input of the intra-frame Transformer and the corresponding group-normalized output, and between the input of the inter-frame Transformer and the corresponding group-normalized output, respectively. The input of the intra-frame Transformer is the result of step 2, and the input of the inter-frame Transformer is the output of the intra-frame Transformer after group normalization.
5. A time domain flexible vibration sensor speech enhancement system based on the method of claims 1 to 4, characterized in that: The system comprises a speech segmentation module, a time-domain flexible vibration sensor speech enhancement model and an overlap-addition module which are arranged in sequence, wherein the time-domain flexible vibration sensor speech enhancement model comprises a pre-processing module, a dual-path Transformer module, an equalization module, a generation module and a post-processing module which are arranged in sequence; The speech segmentation module is used to perform speech segmentation on the time domain speech of the flexible vibration sensor; The preprocessing module is used to compress the speech frames and project them into the latent feature space; The dual-path Transformer module is used to establish local and global correlations of implicit expressions using its own self-attention mechanism; The equalization module uses the output of the dual-path Transformer module as input to predict the equalization component; The generation module uses the output of the dual-path Transformer module as input to predict the generation component; The output of the pre-processing module is multiplied by the output of the equalization module, and then added with the output of the generation module and sent to the post-processing module, and the post-processing module reconstructs the time domain speech waveform from the implicit feature space; The overlap-add module is used to operate the framed speech segments obtained by the post-processing module according to the reverse process of speech framing, restore them to normal speech waveforms, and obtain the final enhanced time-domain speech waveforms.
6. The time-domain flexible vibration sensor speech enhancement system according to claim 5 is characterized in that: The loss function of the time-domain flexible vibration sensor speech enhancement model is: Among them, the time domain loss function The mean square error between enhanced speech and time domain speech is: In the formula, is the time domain speech, x is the target speech, x n and represents the nth sample point of the target speech and enhanced speech, and M represents the length of the speech waveform; Among them, the frequency domain loss function The absolute value difference between the real and imaginary parts of the short-time Fourier spectrum of the enhanced speech and the target speech is: In the formula, X and They represent the short-time Fourier transform (STFT) complex spectra of the target speech and enhanced speech respectively, T represents the number of speech frames, F represents the number of STFT frequency bands, r and i represent the real part and imaginary part respectively; the hyperparameter α is used to adjust the proportion of the time domain loss function and the frequency domain loss function.
7. The time-domain flexible vibration sensor speech enhancement system according to claim 6 is characterized in that: The preprocessing module includes a 2D convolution unit, a layer normalization unit, a PReLU activation function, and a 2D convolution and PReLU activation function combination unit arranged in sequence; The post-processing module includes a sub-pixel transposed convolution unit, a layer normalization unit, a PReLU activation function, and a 2D convolution unit which are arranged in sequence; The equalization module and the generation module both include a PReLU nonlinear function and a 2D convolution, two 2D convolutions, a gate activation function, a 2D convolution and a nonlinear activation function, which are arranged in sequence; the difference between the equalization module and the generation module is that the nonlinear activation functions are a ReLU activation function and a Tanh activation function, respectively; Among them, the size of the convolution kernel of the two-dimensional convolution is (1, 1) and the step size is (1, 1), and the size of the convolution kernel of the sub-pixel transposed convolution is (1, 3) and the step size is (1, 1).
8. The time-domain flexible vibration sensor speech enhancement system according to claim 7 is characterized in that: The dual-path Transformer module includes five stacked identical dual-path Transformer blocks, wherein the dual-path Transformer block includes an intra-frame Transformer unit and an inter-frame Transformer unit; The intra-frame Transformer unit includes a first improved Transformer and a first group normalization unit that are sequentially arranged, and the inter-frame Transformer unit includes a second improved Transformer and a second group normalization unit that are sequentially arranged; The input of the first improved Transformer is the output of the preprocessing module, the input is connected to the output of the first group normalization unit through a residual connection, and then input to the second improved Transformer, the input of the second improved Transformer is connected to the output of the second group normalization unit through a residual connection as the output of the dual-path Transformer module; The first improved Transformer or the second improved Transformer includes a multi-head attention mechanism unit, a first-layer normalization unit, a feedforward network and a second-layer normalization unit arranged in sequence, wherein the input of the multi-head attention mechanism unit establishes a residual connection with its output and is input to the first-layer normalization unit, and the output of the first-layer normalization unit establishes a residual connection with the output of the feedforward network and is input to the second-layer normalization unit; the feedforward network includes a GRU layer, a ReLU layer and a linear transformation layer arranged in sequence.
