Fuzzy semantic recognition method based on GAN network
The fuzzy semantic recognition method based on GAN network solves the problem that traditional speech semantic recognition technology is difficult to deal with the elderly's unclear enunciation or heavy accent. It adopts the structure of dual generators and self-attention layers to achieve low signal-to-noise ratio environment. Better speech reconstruction effect, improving speech clarity and intelligibility.
Patent Information
- Application Number
- CN202410945566.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-12
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional speech semantic recognition technology is difficult to deal with the problems of unclear articulation or heavy accent caused by the elderly due to aging, especially in low signal-to-noise ratio environments.
A fuzzy semantic recognition method based on GAN network is used to segment the speech signal and extract features through pre-processing steps. Two generators with the same parameters are used for multi-stage enhanced mapping, and self-attention is introduced in each generator model. layers to improve speech quality, and finally use standard reconstructed speech for semantic recognition.
It performs better in fuzzy semantic recognition tasks in low signal-to-noise ratio environments, improving speech clarity and intelligibility. Through the model structure of dual generators and frequency domain discriminators, it can better capture the spectral characteristics of speech signals. , generate higher quality speech waveforms.
Smart Images

Figure CN118658476A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence algorithms and speech signal processing cross-processing, and in particular to a fuzzy semantic recognition method based on a GAN network. Background Art
[0002] With the rapid development of artificial intelligence and machine learning technologies, speech recognition technology has become an important part of modern information processing. Speech recognition technology aims to enable computers to understand and interpret the meaning of human speech, thereby realizing functions such as recognition of voice commands, transcription of speech to text, and analysis of speech content. Traditional speech recognition technology is mainly based on pattern matching and statistical modeling, but due to the diversity and complexity of speech signals, these methods have certain challenges in dealing with noise, accents, and changes in speech speed.
[0003] Most elderly people are too old to speak clearly or have a heavy accent. In order to accurately identify what the elderly mean, fuzzy semantic recognition is a technology that handles uncertainty and ambiguity in natural language, aiming to better understand and handle the ambiguity of human language. The technology is based on fuzzy set theory, which allows elements to have continuous membership rather than strict binary membership. Semantic information in text is represented as fuzzy sets or fuzzy logic rather than deterministic concepts. This can include modeling membership in words, phrases, or sentences to capture their ambiguity. In fuzzy semantic recognition, fuzzy matching and reasoning are often used to handle uncertainty. Fuzzy matching takes into account the fuzzy similarity of words or phrases, while fuzzy reasoning takes into account the uncertainty of semantic rules. This enables the system to make inferences in uncertain situations and better understand ambiguous semantic information. Fuzzy semantic recognition usually requires consideration of contextual information. The same word may have different meanings in different contexts, so the model needs to take into account the context around the text to better understand the semantics. The fuzzy semantic recognition system of this product uses machine learning algorithms such as fuzzy logic regression and deep learning models to learn patterns of fuzzy semantic information from a large corpus. Finally, the fuzzy semantic recognition system is usually evaluated based on its output results and adjusted based on the feedback. This helps improve the system's ability to understand fuzzy semantics.
[0004] In recent years, with the rise of deep learning and neural network technology, especially the application of recurrent neural networks and convolutional neural networks, the strong robustness of deep learning and neural networks in the field of speech semantic recognition has been demonstrated, and fuzzy speech semantic recognition technology has made significant progress. Deep learning models can learn and extract advanced feature representations from a large amount of speech data, thereby improving the accuracy and robustness of speech recognition. In addition, these neural networks have attracted much attention due to their powerful complex mapping modeling capabilities. They can learn the deep features of speech and noise from data, thereby effectively suppressing noise and achieving accurate speech semantic recognition. The application of emerging technologies such as generative adversarial networks (GANs) has also brought new ideas and methods to the field of speech semantic recognition. For example, through adversarial learning between generators and discriminators, the performance of speech recognition has been further improved, especially in the case of dealing with noise and fuzzy speech. With the continuous innovation and development of technology, speech recognition technology will continue to develop in a more accurate, efficient and intelligent direction, bringing more possibilities to the fields of human-computer interaction and intelligent applications. However, how to apply GAN networks to semantic recognition faces very great challenges and there are still big problems. Therefore, new methods need to be proposed. Summary of the invention
[0005] Purpose of the invention: In order to overcome the shortcomings of the prior art, the problem of unclear pronunciation or heavy accent caused by aging of the elderly, and the situation that traditional speech semantic recognition technology is difficult to deal with, the present invention is based on the fuzzy semantic recognition method of the GAN network. The method first segments the speech signal and extracts features through a preprocessing step, and then uses two generators with the same parameters to perform multi-stage enhancement mapping to improve the speech quality, and finally uses standard reconstructed speech for semantic recognition. Simulation results show that compared with the benchmark test scheme, this method performs better in the fuzzy semantic recognition task in a low signal-to-noise ratio environment.
[0006] Technical solution: To solve the above technical problems, the fuzzy semantic recognition method based on the GAN network of the present invention comprises the following steps: Step 1: Speech Signal Processing Speech signals can be analyzed from the perspectives of time domain and frequency domain, and the characteristics of speech signals can be divided into two types, namely time domain feature vectors and frequency domain feature vectors; speech signals are output signals generated by the resonance of the vocal tract when it is excited, so a reasonable assumption is made to select a time interval and keep the linear characteristics of the speech signal in this time period unchanged; by analyzing the mechanism of speech generation, the speech signal is regarded as an excitation signal to generate a linear output, thereby digitizing the speech signal; after sampling, the signal is quantized, and errors are inevitably generated in this process. The difference between the quantized signal and the original signal is the quantization error; Step 2: GAN-based fuzzy speech reconstruction The Generative Adversarial Network (GAN) consists of two neural networks, the generator G and the discriminator D, which compete and play against each other. The discriminator is a binary classifier that aims to distinguish whether the received sample data is an actual sample from a real data set or false data generated by the generator. The goal of the generator is to generate more realistic samples to deceive the discriminator into misjudging them as real data. The two models compete continuously and gradually optimize their respective network parameters, eventually making the generated sample distribution gradually approach the real sample distribution. Step 3: Fuzzy semantic recognition based on GAN.
[0007] Furthermore, the step 1 comprises the following steps: Step 1-1: Pre-emphasis The glottis and mouth and nose are two important factors that directly affect the average power of the speech signal. The higher the spectrum of the speech signal, the less the sentence component. Therefore, the speech signal needs to be pre-emphasized before speech recognition. The signal-to-noise ratio of the spectrum is set unchanged. It is more convenient to analyze the spectrum from low to high frequency bands. Pre-emphasis is performed before the speech signal is digitized, and the signal dynamic range is compressed to effectively improve the signal-to-noise ratio. The pre-emphasis coefficient is: (1) In the above formula (1), Indicates that the terminal produces output. Indicates signal ; The sequence after weighting is: (2) In the above formula (2), represents the original signal sequence, Represents the weighted sequence, Indicates signal , b Indicates signal b ; Step 1-2: Windowing and framing After each speech signal is processed, a new time data sequence will be generated. These sequences are used to describe the characteristics of the speech signal. Suppose the original speech signal sampling sequence is , process it in segments, equivalent to multiplying it by a window function with an amplitude of 1 When the window function amplitude is not 1, each frame of speech is added with a weight according to a certain value standard; the speech signal is processed, and the time series obtained after each frame of signal is processed is: (3) In the above formula (3), Represents the time series of the frame signal after processing, represents a linear transformation, represents the original speech signal sampling sequence, is a window function with an amplitude of 1, Indicates signal , b Indicates signal b , Indicates the length of the window.
[0008] Furthermore, the training process of the adversarial network GAN in step 2 can be described as: (4) In the above formula (4), For the distribution The real sample data extracted from For distribution A random vector drawn from represents the expected function, represents the judgement machine, G() represents the generator, and the generator will As input, output a generated sample It is sent to the discriminator D for decision.
[0009] Furthermore, the step 2 comprises the following steps: Fuzzy semantic reconstruction algorithm based on SEGAN: SEGAN makes full use of the characteristics of generative adversarial networks, and continuously narrows the gap between the model distribution and the real data distribution during the training process; the generator consists of an encoder and a decoder, both of which have a symmetrical structure and are used to perform speech reconstruction tasks; the function of the discriminator is to judge a combination of clean speech and fuzzy speech as a real sample, and to discriminate the speech signal enhanced by the generator and the fuzzy speech signal; the task of the discriminator is to measure whether the speech signal output by the generator is close to the clean speech, and then feed the judgment result back to the generator; SEGAN avoids using the sigmoid cross entropy loss function in the traditional GAN in the design of the loss function, because the gradient disappearance problem may occur during the training process; therefore, SEGAN adopts the form of least squares GAN (LSGAN). In addition, in order to produce more realistic samples, the L1 norm metric is introduced in the generator loss function to reconstruct the speech With clean voice The gap between To control the hyperparameters of the L1 loss term, and are the distributions of clean speech and noisy speech signals respectively, and the loss function of SEGAN is: (5) (6) In the above formula (5), represents minimizing the loss with D, represents the expected function, For clean voice, is the noisy speech, For the distribution The real sample data extracted from represents the decision maker, G() represents the generator, For distribution A random vector drawn from To reconstruct speech; In the above formula (6), represents minimizing the loss with G, represents the expected function, For distribution A random vector drawn from For clean voice, is the noisy speech, For the distribution The real sample data extracted from represents the decision maker, G() represents the generator, and the reconstructed speech is , To control the hyperparameters of the L1 loss term, and are the distributions of clean speech and noisy speech signals, respectively. Represents the loss between the reconstructed speech and the clean speech.
[0010] Furthermore, the self-attention mechanism is an important attention mechanism in deep learning and is widely used in multiple task fields such as natural language processing and computer vision. It was initially introduced to solve the problem of encoding-decoding models processing long input sequences and was embedded in the model in the form of a self-attention layer. The main function of the self-attention layer is to calculate the correlation between any given input and other inputs. Through this mechanism, the inputs of each layer can interact with each other, and scores are calculated and output for each input, where the input with a higher score is considered to be more important. It is worth noting that the input and output dimensions of the self-attention layer are consistent. A self-attention mechanism is added to the encoder and the decoder. The self-attention mechanism adopts a query key value mode. For the input sequence, each input corresponds to Three vectors, which are used to calculate the attention weights to generate the final representation; the specific calculation formula is: (7) In the above formula (7), represents the 3 inputs of the self-attention layer, is the activation function, express The transpose of yes The length of , divided by its role is to prevent the inner product from being too large, divided by its role is to prevent the inner product from being too large, Indicates the dimension of the matrix; The calculation formula is: (8) In the above formula (8), are the generating matrices, and Represents the matrix dimension and ensures that the matrix size is , For the feature map, the self-attention layer reduces the channel dimension in order to reduce memory; In addition, a maximum pooling layer is deployed in the self-attention layer structure, and the convolution kernel size and stride of this layer are set to , the purpose is to reduce while improving memory efficiency; the dimension of the matrix is , Used to calculate the attention matrix : (9) In the above formula (9), is the activation function, where the convolution kernel size and stride of the layer are set to , L represents the length of the input signal sequence, and Then through the attention matrix Calculate , through Convolution gets the weighted sum matrix : (10) In the above formula (10), To generate the matrix, pass Calculated, feature map It can be expressed as: (11) In the above formula (11), is a learnable parameter.
[0011] Furthermore, the generator structures G1 and G2 used by the system are exactly the same. During the training process, the two generators are connected in series. First, the noisy speech is passed into the generator after being framed and sampled. , then the first stage enhanced speech is sent to the generator After the same encoding and decoding operations, the enhanced speech of the second stage is obtained; in order to better capture the time-related information of the input sequence, A self-attention layer is added on the basis of the encoder-decoder to help improve the model performance and enhancement effect; Since speech is a one-dimensional signal, the self-attention layer uses one-dimensional convolution to process the input speech signal, and the number of input channels is consistent with the output channel number of the previous convolution layer; The self-attention layer can effectively capture the relationship between different positions in the sequence data, and generate a more representative representation by weighted aggregation of different positions of the input sequence; The remaining convolution and deconvolution layers are connected through jump connections; After many experimental verifications, adding the self-attention layer to the fourth convolution layer can produce the best reconstruction effect; Both generators contain 11 layers of convolution, deconvolution and 1 layer of self-attention, where the convolution kernel size is 32, the step size is 2, and the padding is 15.
[0012] Furthermore, the architecture of the discriminator is similar to the encoder in the generator, which adopts the model structure of frequency domain discrimination, and its input is the frequency domain features of the speech signal; during the training process, the generator The reconstructed speech and noisy speech are subjected to fast Fourier transform to obtain the amplitude and phase representation of the speech signal in frequency; then the spectrum information is sent to the discriminator for judgment; the frequency domain representation provides detailed information about each frequency component in the speech signal, including pitch, timbre, noise and distortion in frequency, and has a high discrimination ability, which can better distinguish the reconstructed speech from the clean speech; in the frequency domain, the difference between the clean speech and the reconstructed speech in the frequency domain can be observed, such as the reduction or elimination of noise, the improvement of sound clarity, etc.; these differences help the discriminator to more accurately judge whether the speech generated by the generator is close to the characteristics of the clean speech; another advantage of the frequency domain representation is that it is more stable in processing speech signals; in the time domain, the speech signal is affected by noise, and the pitch or amplitude may change, which increases the difficulty of the discriminator's judgment; however, in the frequency domain, since the speech signal is represented as spectrum information, its characteristics are more stable and not easily affected by these interferences. Therefore, the frequency domain representation can improve the robustness and accuracy of the discriminator and further improve the training effect of the generator.
[0013] Furthermore, the loss function takes the form of LSGAN, but some adjustments are made on this basis to convert the original time domain loss into frequency domain loss; Since the model adopts a dual generator structure, the generator loss includes the losses of the two generators and two L1 loss terms, which can be expressed as: (12) In the above formula (12), It means minimizing the loss with D as the independent variable, represents the expected function, where represents random noise, represents the fast Fourier transform, For clean voice, Noise speech.
[0014] Beneficial effects: Compared with the prior art, the present invention has the following advantages: 1. This invention aims to address the problem of unclear pronunciation or heavy accent in the elderly, which is difficult to cope with by traditional speech semantic recognition technology, and proposes a fuzzy semantic recognition algorithm based on GAN network. The algorithm first segments the speech signal and extracts features through preprocessing steps such as pre-emphasis and windowing and framing. Then, two generators with the same parameters are used for multi-stage enhancement mapping to improve the speech quality, and a self-attention layer is introduced in each generator model to improve the model performance. The discriminator model uses audio features such as syllables, semi-syllables, phonemes and words to judge the similarity between the reconstructed speech and the original speech. Finally, semantic recognition is performed using standard reconstructed speech. Simulation results show that compared with the benchmark test scheme, the algorithm performs better in fuzzy semantic recognition tasks in low signal-to-noise ratio environments.
[0015] 2. The algorithm adopts a model structure of dual generators and frequency domain discriminators. During the training process, the two generators are connected in series for two-stage speech reconstruction, and the introduction of a self-attention layer in each generator helps prevent the neglect of time correlation during the convolution operation. The advantage of the dual generator is that better reconstructed speech can be obtained during each iteration of speech enhancement. The discriminator's discrimination criterion is the characteristic information of the input speech signal in the frequency domain. The advantage of frequency domain discrimination is that it can better capture the spectral characteristics of the speech signal, thereby improving the discriminator's accurate judgment of the quality of the generated speech. This helps to promote the training of the generator, thereby generating higher quality speech waveforms. The results show that the algorithm can better achieve speech reconstruction in a low signal-to-noise ratio background and improve speech clarity and intelligibility.
[0016] 3. The architecture of the discriminator is similar to the encoder in the generator. It adopts the model structure of frequency domain discrimination, and its input is the frequency domain features of the speech signal. During the training process, the generator The reconstructed speech and noisy speech are subjected to fast Fourier transform to obtain the amplitude and phase representation of the speech signal in frequency; Then the spectrum information is sent to the discriminator for judgment; The frequency domain representation provides detailed information about each frequency component in the speech signal, including pitch, timbre, noise and distortion in frequency, has a high discrimination ability, and can better distinguish the reconstructed speech from the clean speech; In the frequency domain, the difference between the clean speech and the reconstructed speech in the frequency domain can be observed, such as the reduction or elimination of noise, the improvement of sound clarity, etc.; These differences help the discriminator to more accurately judge whether the speech generated by the generator is close to the characteristics of the clean speech; Another advantage of the frequency domain representation is that it is more stable in processing speech signals; In the time domain, the speech signal is affected by noise, and the pitch or amplitude may change, which increases the difficulty of the discriminator's judgment; However, in the frequency domain, since the speech signal is represented as spectrum information, its characteristics are more stable and not easily affected by these interferences. Therefore, the frequency domain representation can improve the robustness and accuracy of the discriminator and further improve the training effect of the generator. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a system block diagram of the present invention.
[0018] Figure 2 This is a block diagram of the generator of the present invention.
[0019] Figure 3 This is a block diagram of the discriminator of the present invention.
[0020] Figure 4 This is a simulation comparison diagram of PESQ scores for different schemes.
[0021] Figure 5 This is a simulation comparison diagram of the STOI scores of different schemes.
[0022] Figure 6 The figure shows the simulation comparison effect of CSIG, CBAK, and COVL scores of different schemes. DETAILED DESCRIPTION
[0023] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0024] Example 1 A fuzzy semantic recognition method based on a GAN network in this embodiment, referring to Figure 1 , the method comprises the following steps: Step 1: Speech Signal Processing Speech signals can be analyzed from the perspectives of time domain and frequency domain, and the characteristics of speech signals can be divided into two types, namely time domain feature vectors and frequency domain feature vectors; speech signals are output signals generated by the resonance of the vocal tract when it is excited, so a reasonable assumption is made to select a time interval and keep the linear characteristics of the speech signal in this time period unchanged; by analyzing the mechanism of speech generation, the speech signal is regarded as an excitation signal to generate a linear output, thereby digitizing the speech signal; after sampling, the signal is quantized, and errors are inevitably generated in this process. The difference between the quantized signal and the original signal is the quantization error; Step 2: GAN-based fuzzy speech reconstruction The Generative Adversarial Network (GAN) consists of two neural networks, the generator G and the discriminator D, which compete and play against each other. The discriminator is a binary classifier that aims to distinguish whether the received sample data is an actual sample from a real data set or false data generated by the generator. The goal of the generator is to generate more realistic samples to deceive the discriminator into misjudging them as real data. The two models compete continuously and gradually optimize their respective network parameters, eventually making the generated sample distribution gradually approach the real sample distribution. Step 3: Perform fuzzy semantic recognition based on GAN.
[0025] The method first segments the speech signal and extracts features through a preprocessing step, then uses two generators with the same parameters to perform multi-stage enhancement mapping to improve speech quality, and finally uses standard reconstructed speech for semantic recognition. Simulation results show that compared with the benchmark test scheme, this method performs better in fuzzy semantic recognition tasks in a low signal-to-noise ratio environment.
[0026] Example 2 A fuzzy semantic recognition method based on a GAN network in this embodiment, based on Embodiment 1, speech signal processing includes the following steps: Step 1-1: Pre-emphasis The glottis and mouth and nose are two important factors that directly affect the average power of the speech signal. The higher the spectrum of the speech signal, the less the sentence component. Therefore, the speech signal needs to be pre-emphasized before speech recognition. The signal-to-noise ratio of the spectrum is set unchanged. It is more convenient to analyze the spectrum from low to high frequency bands. Pre-emphasis is performed before the speech signal is digitized, and the signal dynamic range is compressed to effectively improve the signal-to-noise ratio. The pre-emphasis coefficient is: (1) In the above formula (1), Indicates that the terminal produces output. Indicates signal ; The sequence after weighting is: (2) In the above formula (2), represents the original signal sequence, Represents the weighted sequence, Indicates signal , b Indicates signal b ; Step 1-2: Windowing and framing After each speech signal is processed, a new time data sequence will be generated. These sequences are used to describe the characteristics of the speech signal. Suppose the original speech signal sampling sequence is , process it in segments, equivalent to multiplying it by a window function with an amplitude of 1 When the window function amplitude is not 1, each frame of speech is added with a weight according to a certain value standard; the speech signal is processed, and the time series obtained after each frame of signal is processed is: (3) In the above formula (3), Represents the time series of the frame signal after processing, represents a linear transformation, represents the original speech signal sampling sequence, is a window function with an amplitude of 1, Indicates signal , b Indicates signal b , Indicates the length of the window. Greatly reduces the error.
[0027] Example 3 A fuzzy semantic recognition method based on a GAN network in this embodiment is based on Example 2. The fuzzy speech reconstruction generative adversarial network (GAN) based on GAN is composed of two neural networks, a generator (G) and a discriminator (D), which compete and play against each other. The discriminator is a binary classifier that aims to distinguish whether the received sample data is an actual sample from a real data set or false data generated by the generator. The goal of the generator is to generate more realistic samples to deceive the discriminator into misjudging it as real data. The two models continuously compete and gradually optimize their respective network parameters, so that the generated sample distribution gradually approaches the real sample distribution. The training process of the adversarial network GAN can be described as: (4) In the above formula (4), For the distribution The real sample data extracted from For distribution A random vector drawn from represents the expected function, represents the judgement machine, G() represents the generator, and the generator will As input, output a generated sample It is sent to the discriminator D for decision.
[0028] Example 4 A fuzzy semantic recognition method based on a GAN network in this embodiment is based on Example 3 and adopts a fuzzy semantic reconstruction algorithm based on SEGAN: Figure 2 , SEGAN makes full use of the characteristics of generative adversarial networks, and continuously narrows the gap between the model distribution and the real data distribution during the training process; the generator consists of an encoder and a decoder, both of which have a symmetrical structure and are used to perform speech reconstruction tasks; the function of the discriminator is to judge a combination of clean speech and fuzzy speech as a real sample, and to discriminate the speech signal enhanced by the generator and the fuzzy speech signal; the task of the discriminator is to measure whether the speech signal output by the generator is close to the clean speech, and then feed the judgment result back to the generator; SEGAN avoids using the sigmoid cross entropy loss function in the traditional GAN in the design of the loss function, because the gradient disappearance problem may occur during the training process; therefore, SEGAN adopts the form of least squares GAN (LSGAN). In addition, in order to produce more realistic samples, the L1 norm metric is introduced in the generator loss function to reconstruct the speech With clean voice The gap between To control the hyperparameters of the L1 loss term, and are the distributions of clean speech and noisy speech signals respectively, and the loss function of SEGAN is: (5) (6) In the above formula (5), represents minimizing the loss with D, represents the expected function, For clean voice, is the noisy speech, For the distribution The real sample data extracted from represents the decision maker, G() represents the generator, For distribution A random vector drawn from To reconstruct speech; In the above formula (6), represents minimizing the loss with G, represents the expected function, For distribution A random vector drawn from For clean voice, is the noisy speech, For the distribution The real sample data extracted from represents the decision maker, G() represents the generator, and the reconstructed speech is , To control the hyperparameters of the L1 loss term, and are the distributions of clean speech and noisy speech signals, respectively. Represents the loss between the reconstructed speech and the clean speech.
[0029] The self-attention mechanism mentioned above is an important attention mechanism in deep learning and is widely used in multiple task fields such as natural language processing and computer vision. It was originally introduced to solve the problem of encoding-decoding models processing long input sequences and was embedded in the model in the form of a self-attention layer. The main function of the self-attention layer is to calculate the correlation between any given input and other inputs. Through this mechanism, the inputs of each layer can interact with each other, and scores are calculated and output for each input, where the input with a higher score is considered to be more important. It is worth noting that the input and output dimensions of the self-attention layer remain consistent. A self-attention mechanism is added to the encoder and the decoder. The self-attention mechanism adopts a query key value mode. For the input sequence, each input corresponds to Three vectors, which are used to calculate the attention weights to generate the final representation; the specific calculation formula is: (7) In the above formula (7), represents the 3 inputs of the self-attention layer, is the activation function, express The transpose of yes The length of , divided by its role is to prevent the inner product from being too large, divided by its role is to prevent the inner product from being too large, Indicates the dimension of the matrix; The calculation formula is: (8) In the above formula (8), are the generating matrices, and Represents the matrix dimension and ensures that the matrix size is , For the feature map, the self-attention layer reduces the channel dimension in order to reduce memory; In addition, a maximum pooling layer is deployed in the self-attention layer structure, and the convolution kernel size and stride of this layer are set to , the purpose is to reduce while improving memory efficiency; the dimension of the matrix is , Used to calculate the attention matrix : (9) In the above formula (9), is the activation function, where the convolution kernel size and stride of the layer are set to , L represents the length of the input signal sequence, and Then through the attention matrix Calculate , through Convolution gets the weighted sum matrix : (10) In the above formula (10), To generate the matrix, pass Calculated, feature map It can be expressed as: (11) In the above formula (11), is a learnable parameter.
[0030] The generator structures G1 and G2 used in the system are exactly the same. During the training process, the two generators are connected in series. First, the noisy speech is passed into the generator after being framed and sampled. , then the first stage enhanced speech is sent to the generator After the same encoding and decoding operations, the enhanced speech of the second stage is obtained; in order to better capture the time-related information of the input sequence, A self-attention layer is added on the basis of the encoder-decoder to help improve the model performance and enhancement effect; Since speech is a one-dimensional signal, the self-attention layer uses one-dimensional convolution to process the input speech signal, and the number of input channels is consistent with the output channel number of the previous convolution layer; The self-attention layer can effectively capture the relationship between different positions in the sequence data, and generate a more representative representation by weighted aggregation of different positions of the input sequence; The remaining convolution and deconvolution layers are connected through jump connections; After many experimental verifications, adding the self-attention layer to the fourth convolution layer can produce the best reconstruction effect; Both generators contain 11 layers of convolution, deconvolution and 1 layer of self-attention, where the convolution kernel size is 32, the step size is 2, and the padding is 15.
[0031] The architecture of the discriminator is similar to the encoder in the generator. It adopts the model structure of frequency domain discrimination, and its input is the frequency domain features of the speech signal. During the training process, the generator The reconstructed speech and noisy speech are subjected to fast Fourier transform to obtain the amplitude and phase representation of the speech signal in frequency; Then the spectrum information is sent to the discriminator for judgment; The frequency domain representation provides detailed information about each frequency component in the speech signal, including pitch, timbre, noise and distortion in frequency, has a high discrimination ability, and can better distinguish the reconstructed speech from the clean speech; In the frequency domain, the difference between the clean speech and the reconstructed speech in the frequency domain can be observed, such as the reduction or elimination of noise, the improvement of sound clarity, etc.; These differences help the discriminator to more accurately judge whether the speech generated by the generator is close to the characteristics of the clean speech; Another advantage of the frequency domain representation is that it is more stable in processing speech signals; In the time domain, the speech signal is affected by noise, and the pitch or amplitude may change, which increases the difficulty of the discriminator's judgment; However, in the frequency domain, since the speech signal is represented as spectrum information, its characteristics are more stable and not easily affected by these interferences. Therefore, the frequency domain representation can improve the robustness and accuracy of the discriminator and further improve the training effect of the generator.
[0032] Example 5 A fuzzy semantic recognition method based on a GAN network in this embodiment is based on Example 4, referring to Figure 3 , the loss function takes the form of LSGAN, but some adjustments are made on this basis to convert the original time domain loss into frequency domain loss; Since the model adopts a dual generator structure, the generator loss includes the losses of the two generators and two L1 loss terms, which can be expressed as: (12) In the above formula (12), It means minimizing the loss with D as the independent variable, represents the expected function, where represents random noise, represents the fast Fourier transform, For clean voice, Noise speech.
[0033] Example 6 In this embodiment, a fuzzy semantic recognition method based on a GAN network is based on Embodiment 5. During the training process, the discriminator judges the spectral features of a set of noisy speech and clean speech as a true combination, and then compares the frequency domain features of the clean speech and the reconstructed speech 1 (reconstructed speech 2). After a series of convolution and normalization operations, the discriminant result is finally output through the fully connected layer, and the discriminator model parameters are continuously adjusted during the iteration process. The training process of the generator first passes the noisy speech through the generator. and The encoder / decoder module generates two-stage reconstructed speech 1 and reconstructed speech 2. The two-stage reconstructed speech and noisy speech are sent to the discriminator and compared with the clean speech to continuously update the parameters of the generator model. The generator and the discriminator compete and iterate continuously, so that the generated reconstructed speech 1 (reconstructed speech 2) gradually approaches the clean speech.
[0034] Example 7 A fuzzy semantic recognition method based on a GAN network in this embodiment is based on Example 6. During the speech semantic recognition process, simulation hardware conditions are first prepared, and then simulation system parameters are set, specifically: 1. Simulation hardware conditions 2. Simulation system parameters The experiment selected the open source dataset data_thchs30 and Librispeech corpus as clean speech datasets, where each speech lasts about 10 seconds. 22,400 clean speech were selected for training and 2,100 speech were used for testing. The speech used was half male and half female. The noise data used came from Noise92, and the 100 common noise types in the DEMAN noise library were used as environmental noise in the experiment. In order to create a noisy speech training dataset with different signal-to-noise ratios, the speech and noise signals were fused according to 5 different signal-to-noise ratios. Before the experiment, the speech of the training set and the test set was downsampled to 16kHz, and all speech was framed. The number of sampling points per frame was 16384, and the frame shift was set to 500ms. In terms of the model, the generator uses the RMSprop optimizer, and the initial learning rate is set to 0.0002. The discriminator uses the Adam optimizer with a learning rate of 0.0001. During training, the batch-size was set to 128 and 150 iterations were performed. 3. Simulation content Figure 4 and Figure 5 It shows the perceptual evaluation of speech quality (PESQ) and short-time objective intelligibility (STOI) of the proposed method under 5 signal-to-noise ratio backgrounds. It can be observed that due to the weak ability of SEGAN to capture the distribution of time domain signals under low signal-to-noise ratio conditions, the overall enhancement effect is limited, and the scores of the two are relatively low. ISEGAN and DSEGAN have gradually improved the enhancement effect due to the use of dual generators. SASEGAN introduces a self-attention layer to obtain the temporal information of the input sequence, which has a further improvement on the enhancement effect. MS-GAN combines the features of DSEGAN and SASEGAN, so it has achieved relatively outstanding performance. Figure 6 It represents the scores of each method in the other three subjective indicators, including signal distortion measure (CSIG), noise distortion measure (CBAK) and comprehensive quality measure (COVL). As can be seen from the table, compared with SEGAN, the scores of the three indicators of this method have been greatly improved, which fully proves that the proposed method can more effectively improve the reconstruction effect.
[0035] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A fuzzy semantic recognition method based on GAN network, characterized in that: The method comprises the following steps: Step 1: Speech Signal Processing Speech signals can be analyzed from the perspectives of time domain and frequency domain, and the characteristics of speech signals can be divided into two types, namely time domain feature vectors and frequency domain feature vectors; speech signals are output signals generated by the resonance of the vocal tract when it is excited, so a reasonable assumption is made to select a time interval and keep the linear characteristics of the speech signal in this time period unchanged; by analyzing the mechanism of speech generation, the speech signal is regarded as an excitation signal to generate a linear output, thereby digitizing the speech signal; after sampling, the signal is quantized, and errors are inevitably generated in this process. The difference between the quantized signal and the original signal is the quantization error; Step 2: GAN-based fuzzy speech reconstruction The Generative Adversarial Network (GAN) consists of two neural networks, the generator G and the discriminator D, which compete and play against each other. The discriminator is a binary classifier that aims to distinguish whether the received sample data is an actual sample from a real data set or false data generated by the generator. The goal of the generator is to generate more realistic samples to deceive the discriminator into misjudging them as real data. The two models compete continuously and gradually optimize their respective network parameters, eventually making the generated sample distribution gradually approach the real sample distribution. Step 3: Perform fuzzy semantic recognition based on GAN.
2. The fuzzy semantic recognition method based on the GAN network according to claim 1 is characterized in that: The step 1 comprises the following steps: Step 1-1: Pre-emphasis The glottis and mouth and nose are two important factors that directly affect the average power of the speech signal. The higher the spectrum of the speech signal, the less the sentence component. Therefore, the speech signal needs to be pre-emphasized before speech recognition. The signal-to-noise ratio of the spectrum is set unchanged. It is more convenient to analyze the spectrum from low to high frequency bands. Pre-emphasis is performed before the speech signal is digitized, and the signal dynamic range is compressed to effectively improve the signal-to-noise ratio. The pre-emphasis coefficient is: (1) In the above formula (1), Indicates that the terminal produces output. Indicates signal ; The sequence after weighting is: (2) In the above formula (2), represents the original signal sequence, Represents the weighted sequence, Indicates signal , b Indicates signal b ; Step 1-2: Windowing and framing After each speech signal is processed, a new time data sequence will be generated. These sequences are used to describe the characteristics of the speech signal. Suppose the original speech signal sampling sequence is , process it in segments, equivalent to multiplying it by a window function with an amplitude of 1 When the window function amplitude is not 1, each frame of speech is added with a weight according to a certain value standard; the speech signal is processed, and the time series obtained after each frame of signal is processed is: (3) In the above formula (3), Represents the time series of the frame signal after processing, represents a linear transformation, represents the original speech signal sampling sequence, is a window function with an amplitude of 1, Indicates signal , b Indicates signal b , Indicates the length of the window.
3. The fuzzy semantic recognition method based on GAN network according to claim 2 is characterized in that: The training process of the adversarial network GAN in step 2 can be described as: (4) In the above formula (4), For the distribution The real sample data extracted from For distribution A random vector drawn from represents the expected function, represents the judgement machine, G() represents the generator, and the generator will As input, output a generated sample It is sent to the discriminator D for decision.
4. The fuzzy semantic recognition method based on the GAN network according to claim 3 is characterized in that: The step 2 comprises the following steps: Fuzzy semantic reconstruction algorithm based on SEGAN: SEGAN makes full use of the characteristics of generative adversarial networks, and continuously narrows the gap between the model distribution and the real data distribution during the training process; the generator consists of an encoder and a decoder, both of which have a symmetrical structure and are used to perform speech reconstruction tasks; the function of the discriminator is to judge a combination of clean speech and fuzzy speech as a real sample, and to discriminate the speech signal enhanced by the generator and the fuzzy speech signal; the task of the discriminator is to measure whether the speech signal output by the generator is close to clean speech, and then feed the judgment result back to the generator; SEGAN avoids using the sigmoid cross entropy loss function in the traditional GAN in the design of the loss function, because the gradient disappearance problem may occur during the training process; therefore, SEGAN adopts the form of least squares GAN (LSGAN). In addition, in order to produce more realistic samples, the L1 norm metric is introduced in the generator loss function to reconstruct speech With clean voice The gap between To control the hyperparameters of the L1 loss term, and are the distributions of clean speech and noisy speech signals respectively, and the loss function of SEGAN is: (5) (6) In the above formula (5), represents minimizing the loss with D, represents the expected function, For clean voice, is the noisy speech, For the distribution The real sample data extracted from represents the decision maker, G() represents the generator, For distribution A random vector drawn from To reconstruct speech; In the above formula (6), represents minimizing the loss with G, represents the expected function, For distribution A random vector drawn from For clean voice, is the noisy speech, For the distribution The real sample data extracted from represents the decision maker, G() represents the generator, and the reconstructed speech is , To control the hyperparameters of the L1 loss term, and are the distributions of clean speech and noisy speech signals, respectively. Represents the loss between the reconstructed speech and the clean speech.
5. The fuzzy semantic recognition method based on GAN network according to claim 4 is characterized in that: A self-attention mechanism is added to the encoder and the decoder. The self-attention mechanism adopts a query key value mode. For the input sequence, each input corresponds to Three vectors, which are used to calculate the attention weights to generate the final representation; the specific calculation formula is: (7) In the above formula (7), represents the 3 inputs of the self-attention layer, is the activation function, express The transpose of yes The length of , divided by its role is to prevent the inner product from being too large, divided by its role is to prevent the inner product from being too large, Indicates the dimension of the matrix; The calculation formula is: (8) In the above formula (8), are the generating matrices, and Represents the matrix dimension and ensures that the matrix size is , For the feature map, the self-attention layer reduces the channel dimension in order to reduce memory; In addition, a maximum pooling layer is deployed in the self-attention layer structure, and the convolution kernel size and stride of this layer are set to , the purpose is to reduce while improving memory efficiency; the dimension of the matrix is , Used to calculate the attention matrix : (9) In the above formula (9), is the activation function, where the convolution kernel size and stride of the layer are set to , L represents the length of the input signal sequence, and Then through the attention matrix Calculate , through Convolution gets the weighted sum matrix : (10) In the above formula (10), To generate the matrix, pass Calculated, feature map It can be expressed as: (11) In the above formula (11), is a learnable parameter.
6. The fuzzy semantic recognition method based on GAN network according to claim 5 is characterized in that: The generator structures G1 and G2 used in this system are exactly the same. During the training process, these two generators are connected in series. First, the noisy speech is passed into the generator after being framed and sampled. , then the first stage enhanced speech is sent to the generator After the same encoding and decoding operations, the enhanced speech of the second stage is obtained; in order to better capture the time-related information of the input sequence, A self-attention layer is added on the basis of the encoder-decoder to help improve the model performance and enhancement effect; Since speech is a one-dimensional signal, the self-attention layer uses a one-dimensional convolution to process the input speech signal, and the number of input channels is consistent with the number of output channels of the previous convolution layer; The self-attention layer can effectively capture the relationship between different positions in the sequence data, and generate a more representative representation by weighted aggregation of different positions of the input sequence; The remaining convolution and deconvolution layers are connected through jump connections; After many experimental verifications, adding the self-attention layer to the fourth convolution layer can produce the best reconstruction effect; Both generators contain 11 layers of convolution, deconvolution and 1 layer of self-attention, where the convolution kernel size is 32, the step size is 2, and the padding is 15.
7. The fuzzy semantic recognition method based on GAN network according to claim 6 is characterized in that: The architecture of the discriminator adopts the encoder in the generator and the model structure of frequency domain discrimination, and its input is the frequency domain features of the speech signal; During training, the generator The reconstructed speech and noisy speech are subjected to fast Fourier transform to obtain the amplitude and phase representation of the speech signal in frequency; then this spectral information is sent to the discriminator for judgment; the frequency domain representation provides detailed information about the various frequency components in the speech signal, including pitch, timbre, and noise and distortion in frequency.
8. The fuzzy semantic recognition method based on GAN network according to claim 7 is characterized in that: The loss function takes the form of LSGAN, but some adjustments are made on this basis to convert the original time domain loss into frequency domain loss. Since the model adopts a dual generator structure, the generator loss includes the losses of the two generators and two L1 loss terms, which can be expressed as: (12) In the above formula (12), It means minimizing the loss with D as the independent variable, represents the expected function, where represents random noise, represents the fast Fourier transform, For clean voice, Noise speech.
Citation Information
Cited By
Audio noise reduction method and system based on Polar code transmission
CN120498595A
Fault arc data generation method of self-attention residual generative adversarial network
CN121479256A
