Context-aware mask feature-enhanced synthetic speech detection method
By introducing context-aware mask feature enhancement technology in synthetic speech detection, using SincNet, CAM-ResNet and L-Transformer networks to extract and analyze speech features, the limitations of the existing technology in dealing with new spoofing attacks and environmental noise interference are solved, and more efficient synthetic speech detection is achieved.
Patent Information
- Application Number
- CN202411750746.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-02
AI Technical Summary
The existing synthetic speech detection technology has limitations in dealing with traditional known spoof attacks and new unknown spoof methods, and voice samples are susceptible to environmental noise interference, affecting detection performance.
The synthetic speech detection method with enhanced context-aware mask feature is adopted, speech timing features are extracted through the SincNet filter module, and local features are extracted by the ResNet module with context-aware mask, and global features are calculated using the Llama-style Transformer network, and finally classified through the full connection layer and Sigmoid activation function.
Effectively weaken irrelevant features, focus on context-related features, improve speech context perception ability, capture local details, and improve the accuracy of synthetic speech detection through global features.
Smart Images

Figure CN119673140A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of speech signal processing, and more specifically, to a context-aware mask feature enhanced synthetic speech detection method. Background Art
[0002] With the rapid development of artificial intelligence-generated content, synthetic speech technology has made significant breakthroughs. Modern synthetic speech systems include text-to-speech (TTS) and voice conversion (VC), which can generate natural, fluent and near-real speech, and accurately imitate the personalized characteristics of a specific individual, such as intonation, rhythm and emotion. The advancement of these technologies has gradually expanded its application to multiple fields such as intelligent voice assistants, intelligent voice customer service systems, virtual reality and entertainment games. However, the illegal abuse of synthetic speech technology is becoming increasingly serious, causing a series of serious security and privacy issues.
[0003] However, with the continuous updating and iteration of speech synthesis technology, the existing system has limitations in dealing with traditional known deception attack types and is powerless in the face of new unknown deception methods. At the same time, speech samples are often interfered by environmental noise. These irrelevant factors significantly affect the detection performance. Therefore, synthetic speech detection technology must keep pace with the times and strengthen the detection algorithm to deal with various new types of counterfeit attacks and reduce the impact of irrelevant factors, so as to effectively identify real voice and counterfeit voice. This will not only prevent personal identity from being impersonated and tampered with, but also provide effective protection for information security in the Internet and Internet of Things environments, thereby enhancing users' sense of security and promoting the reliability and practicality of biometric technology in various application scenarios. Summary of the invention
[0004] In order to solve the above technical problems, the present invention discloses a context-aware mask feature enhanced synthetic speech detection method, which aims to achieve efficient synthetic speech detection through a multi-layer structure of context-aware feature extraction and global feature analysis.
[0005] The present invention provides a context-aware mask feature enhanced synthetic speech detection method, comprising the following steps:
[0006] Step S1: obtaining original audio data, performing data preprocessing on the original audio data, and using the preprocessed speech data as input of a synthetic speech detection framework;
[0007] Step S2: Input the preprocessed speech data into the SincNet filter module to extract speech time series features;
[0008] Step S3: inputting the speech time series features into a ResNet module with a context-aware mask to extract context-aware local features;
[0009] Step S4: inputting the context-aware local features into a Transformer network module with Llama style to calculate global features;
[0010] Step S5: Process the global features using a fully connected layer, classify them using a Sigmoid activation function, and output the detection result of the synthesized speech.
[0011] In this solution, in step S1, the data preprocessing includes standardization processing, cropping and padding processing, and application pre-emphasis processing, and the synthetic speech detection framework includes a SincNet filter module, a ResNet module with a context-aware mask module, and a Transformer network module with a Llama style.
[0012] In this solution, in step S2, the preprocessed speech signal x[n] is filtered using the SincNet filter module to obtain the speech time series feature y[n]. The convolution in the SincNet filter is defined as:
[0013] y[n]=x[n]*g[n,f1,f2]·w[n]
[0014] Among them, g represents a bandpass filter, n represents a timestamp, f1 and f2 represent learnable parameters, representing the low cutoff frequency and high cutoff frequency of the bandpass filter respectively, and w[n] represents a Hamming window function.
[0015] In this solution, in step S3, the ResNet module with context-aware mask is denoted as CAM-ResNet module;
[0016] Using the CAM-ResNet module with the same 6-layer structure, the output speech time series feature y[n] of the SincNet filter module is extracted using two convolution blocks with Conv-ReLU-BatchNorm structure. The calculation of each convolution block is expressed as: local =BatchNorm(ReLU(Conv(Y)));
[0017] The extracted features are subjected to context-aware masking, and different weights are assigned to the extracted features using attention statistical pooling. The pooled features are processed by the Sigmoid activation function to obtain a context-aware mask. The context-aware mask is used to reduce the influence of irrelevant features and focus on the context-aware feature representation. The context-aware mask M is expressed as:
[0018] M=σ(W·S+b)
[0019] Where W represents the weight matrix of the linear layer, b represents the bias term, and σ represents the Sigmoid function, which is used to generate a context-aware mask between 0 and 1;
[0020] The context-aware mask is used to enhance the speech-related features, suppress the environmental noise, and extract more discriminative upper and lower human-aware local features. The context-aware local features are expressed as:
[0021] Y cam =Y res +Y local ⊙M
[0022] Among them, Y res Represents the residual.
[0023] In this scheme, in step S4, a two-layer Llama-style Transformer module is set for global feature extraction, and the Llama-style Transformer module is denoted as an L-Transformer module;
[0024] Importing the context-aware local features into the L-Transformer module, dividing the context-aware local features into a plurality of adjacent element pairs, introducing a rotation angle for position encoding, determining position information, and performing RMSNorm normalization processing on the position-encoded features to stabilize their value range;
[0025] Import the normalized features into the multi-head attention layer, obtain the output of the single-head attention through the self-attention mechanism, concatenate the outputs of all attention heads, and obtain the output of the multi-head attention layer through the linear layer transformation;
[0026] The output of the multi-head attention layer is combined with the position-encoded features, and the combined features are imported into the feedforward neural network. After RMSNorm normalization and linear transformation, the global features are obtained using the SwiGLU activation function.
[0027] In this scheme, the 2-layer L-Transformer module is set as a dual-path structure to train the speech data of real speech labels and the speech data of synthetic speech labels;
[0028] The speech-related features after position encoding are respectively passed through the real speech label path and the synthetic speech label path to obtain the global feature embedding vectors of the two paths, and the global feature embedding vectors are connected in series and input into the fully connected layer for detection.
[0029] In this solution, in step S6, the global features are input into the fully connected layer, the Sigmoid activation function is used in the fully connected layer to perform category classification, and the probability distribution of the real speech label and the synthetic speech label is output as the detection result.
[0030] In this solution, the synthetic speech detection framework is trained using training data, specifically:
[0031] Extract corpus samples based on speech-related corpus, match category labels for corpus samples through description information of each corpus sample, and obtain data sets of real speech labels and data sets of synthetic speech labels;
[0032] The data set of each label is randomly divided into a training set, a validation set and a test set according to a proportion, the network framework parameters and the learning rate are initialized, the corpus samples in the training set are selected as the input of the synthetic speech detection framework, and the classification output value is obtained through the detection operation;
[0033] The loss function is constructed by calculating the cross entropy based on the subordinate relationship function between the corpus sample and the category label and the classification output value. The network parameters of the synthetic speech detection framework are iteratively updated according to the forward propagation loss. The detection results are verified using the validation set in each round of iteration.
[0034] If the detection performance of the synthetic speech detection framework meets the preset standards, the current network parameters are retained and then tested using the test set. If the test results meet the preset test standards, the current network parameters are used as structural parameters of the synthetic speech detection framework and the synthetic speech detection framework is output.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] The present invention introduces CAM-ResNet and L-Transformer networks, combines context-aware mask and deep feature modeling, wherein the CAM-ResNet network can effectively weaken irrelevant features and focus on context-related features, thereby improving the perception ability of context-effective features and capturing local details of speech context-aware features; and then calculates global features through the L-Transformer deep network to improve the detection accuracy of synthesized speech. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments or exemplary embodiments of the present invention, the drawings required for use in the embodiments or exemplary descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained according to the drawings without paying creative work.
[0038] Figure 1 A flow chart of a synthetic speech detection method using context-aware mask feature enhancement according to the present invention is shown;
[0039] Figure 2 The following is an architecture diagram of a speech detection framework according to an embodiment of the present invention;
[0040] Figure 3 The algorithm flow chart of the CAM-ResNet module in an embodiment of the present invention is shown;
[0041] Figure 4 The algorithm flow chart of the L-Transformer module in the embodiment of the present invention is shown;
[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0044] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0045] Figure 1 A flow chart of a synthetic speech detection method with context-aware mask feature enhancement provided in Embodiment 1 of the present invention;
[0046] like Figure 1 As shown, the present invention provides a context-aware mask feature enhanced synthetic speech detection method, comprising the following steps:
[0047] Step S1: obtaining original audio data, performing data preprocessing on the original audio data, and using the preprocessed speech data as input of a synthetic speech detection framework;
[0048] Step S2: Input the preprocessed speech data into the SincNet filter module to extract speech time series features;
[0049] Step S3: inputting the speech time series features into a ResNet module with a context-aware mask to extract context-aware local features;
[0050] Step S4: inputting the context-aware local features into a Transformer network module with Llama style to calculate global features;
[0051] Step S5: Process the global features using a fully connected layer, classify them using a Sigmoid activation function, and output the detection result of the synthesized speech.
[0052] It should be noted that the data preprocessing includes standardization, cropping and padding, and application of pre-emphasis to avoid interference caused by excessive differences in input data. The speech signal within the steady-state time range is obtained by cropping and padding the original audio data, which is beneficial to the subsequent processing of the audio data. Synthesized speech exists at the sub-band level, and synthesized speech is usually detected using the high-frequency part expressed in the same sub-band. Since the human pronunciation system suppresses the high-frequency part of the speech signal, it is necessary to use pre-emphasis to enhance the high-frequency part. The use of pre-emphasis can better highlight the high-frequency resonance peaks.
[0053] like Figure 2 As shown, the synthetic speech detection framework includes a SincNet filter module, a ResNet module with a context-aware mask module (CAM-ResNet module), and a Transformer network module with a Llama style (L-Transformer module).
[0054] The preprocessed speech signal x[n] is filtered using the SincNet filter module to obtain the speech time series features y[n]. In the SincNet filter, its first layer of convolution is regarded as a set of trainable finite impulse response (FIR) filters. Each convolution is defined as y[n]=x[n]*h[n], where h[n] represents a filter of length L. h[n] is predefined as a function g, and function g has only a small number of learnable parameters θ. The convolution formula is converted to y[n]=x[n]*g[n,θ]. In this scheme, the function g is defined as a bandpass filter. The bandpass filter g can be expressed as the difference between the results of two low-pass filters rect, expressed as f represents the parameters of the bandpass filter. After inverse Fourier transform, the time domain representation of the bandpass filter g is finally obtained: g[n,f1,f2]=2f2sinc(2πf2n)-2f1sinc(2πf1n), where the sinc function is defined as: sinc(x)=sin(x) / x; in order to reduce the spectrum leakage effect, a window function is added in the convolution process, so the bandpass filter after windowing is expressed as: g w [n,f1,f2]=g[n,f1,f2]·w[n], so the convolution process of the SincNet filter module is defined as:
[0055] y[n]=x[n]*g[n,f1,f2]·w[n]
[0056] Among them, g represents a bandpass filter, n represents a timestamp, f1 and f2 represent learnable parameters, representing the low cutoff frequency and high cutoff frequency of the bandpass filter respectively, and w[n] represents a Hamming window function.
[0057] Figure 3 An algorithm flow chart of the CAM-ResNet module in an embodiment of the present invention is shown.
[0058] It should be noted that the ResNet module with context-aware mask is denoted as CAM-ResNet module, local features are further extracted from the speech time series features after SincNet filtering, and the context-aware mask enhancement features are used to improve the generalization ability of the model.
[0059] Using the CAM-ResNet module with the same 6-layer structure, the output speech time series feature y[n] of the SincNet filter module is extracted using two convolution blocks with Conv-ReLU-BatchNorm structure. The calculation of each convolution block is expressed as: local =BatchNorm(ReLU(Conv(Y))); Perform context-aware masking on the extracted speech-related features. The context-aware masking module (CAM) includes three parts: attention statistical pooling, linear layer, and Sigmoid activation function. The extracted features are assigned different weights using attention statistical pooling. For example, a smaller weight is assigned to noisy frames and a larger weight is assigned to voice-related frames. Attention statistical pooling helps the synthetic speech detection framework to focus on and learn key frame-level features. It applies an attention mechanism to the input speech features along the frame length T direction to obtain the importance of frame-level features at different times for the channel. After nonlinear transformation, it is converted into a channel-dependent self-attention value through a linear layer to obtain the importance of frame-level features for each channel. The importance is mapped to a weight, which is expressed as:
[0060]
[0061]
[0062] where s t Represents the frame-level feature y of the tth frame t For the importance of each channel, W represents the weight, δ represents the activation function, p represents the bias, q represents the linear layer bias, and v represents the linear layer weight;
[0063] Performing weighted calculation of the importance of different frame-level features in each channel, obtaining the weighted average value and weighted standard deviation of the channel, concatenating the weighted average value and weighted standard deviation of the channel, and outputting them for subsequent processing;
[0064] The pooled features are processed by the Sigmoid activation function to obtain a context-aware mask. The context-aware mask is used to reduce the influence of irrelevant features and focus on the feature representation of context-awareness. The context-aware mask M is expressed as:
[0065] M=σ(W·S+b)
[0066] Where W represents the weight matrix of the linear layer, b represents the bias term, and σ represents the Sigmoid function, which is used to generate a context-aware mask between 0 and 1;
[0067] The context-aware mask is used to enhance the speech-related features, suppress the environmental noise, and extract more discriminative upper and lower human-aware local features. The context-aware local features are expressed as:
[0068] Y cam =Y res +Y local ⊙M
[0069] Among them, Y res Represents the residual.
[0070] Figure 4 An algorithm flow chart of the L-Transformer module in an embodiment of the present invention is shown.
[0071] It should be noted that a two-layer Llama-style Transformer module is set for global feature extraction. The Llama-style improvements include rotation position embedding (RoPE), RMSNorm normalization, and SwigLU activation function. The Llama-style Transformer module is denoted as L-Transformer module.
[0072] The context-aware local features are imported into the L-Transformer module for rotational position encoding (RoPE), the context-aware local features are divided into multiple adjacent element pairs, the rotation angle is introduced for position encoding, and the position information is determined, which can more effectively represent the relative position relationship. Assume that the feature embedding vector of each position is X = [x1, x2, ..., x d ], where d is the embedding dimension. For each set of adjacent elements in the vector (x 2i ,x 2i+1 ) is used for rotation encoding, and the resulting rotation transformation is as follows:
[0073]
[0074] Among them, the rotation angle θ i With position p and frequency parameter ω i Related:
[0075] θ i =p·ω i
[0076] According to the property that the inner product satisfies linear superposition, any even-dimensional RoPE can be expressed as the concatenation of the two-dimensional case, that is:
[0077]
[0078] Perform RMS Norm normalization on the position-encoded features to stabilize their numerical range, import the normalized features into the multi-head attention layer, obtain the output of the single-head attention through the self-attention mechanism, concatenate the outputs of all attention heads, and obtain the output of the multi-head attention layer through linear layer transformation;
[0079] The output of the multi-head attention layer is combined with the position-encoded features, and the combined features are imported into the feedforward neural network. After RMSNorm normalization and linear transformation, the global features are obtained using the SwiGLU activation function. The SwiGLU activation function is an activation function that combines the Swish activation function and the gated linear unit. For the input vector x, a linear layer is used to generate two branch outputs x1 and x2. The output value is obtained by multiplying x1 and x2 after Swish activation, which is expressed as
[0080] In the L-Transformer module, the 2-layer L-Transformer module is set as a dual-path structure, and the speech data of the real speech label and the speech data of the synthetic speech label are trained; the speech-related features after position encoding are respectively passed through the real speech label path and the synthetic speech label path to obtain the global feature embedding vectors of the two paths, and the global feature embedding vectors are connected in series and input into the fully connected layer for detection. The global features are input into the fully connected layer, and the Sigmoid activation function is used in the fully connected layer for category classification, and the probability distribution of the real speech label and the synthetic speech label is output as the detection result.
[0081] It should be noted that in the training of the synthetic speech detection framework, the CAM-ResNet and L-Transformer networks are pre-trained first, and the fully connected layer with sigmoid output is temporarily added to each path of the L-Transformer module, and then the cross entropy loss function is used for training. Then the fully connected layer is removed, and the CAM-ResNet and L-Transformer network parameters are frozen to train the fully connected layer classifier.
[0082] Corpus samples are extracted based on speech-related corpora, and category labels are matched to the corpus samples through the description information of each corpus sample to obtain a data set of real speech labels and a data set of synthetic speech labels; the data set of each label is randomly divided into a training set, a validation set, and a test set according to a proportion, and the network framework parameters and learning rate are initialized. The corpus samples in the training set are selected as the input of the synthetic speech detection framework, and the classification output value z is obtained through the detection operation. i,b ; According to the subordinate relationship function f between the corpus sample and the category label i,b And the classification output value calculates the cross entropy to construct the loss function L, which is expressed as:
[0083]
[0084] Among them, b represents the category label, i represents the corpus sample, M represents the total number of corpus samples, N represents the total number of category labels, and f m,i It represents the subordinate relationship function between the corpus sample and the category label. When the corpus sample i belongs to the analogy label b, it is 1, otherwise it is 0.
[0085] The network parameters of the synthetic speech detection framework are iteratively updated according to the forward propagation loss, and the verification set is used to verify the detection results in each round of iteration; if the detection performance of the synthetic speech detection framework meets the preset standards, the current network parameters are retained, and then the test set is used for testing; if the test results meet the preset test standards, the current network parameters are used as the structural parameters of the synthetic speech detection framework, and the synthetic speech detection framework is output.
[0086] In a preferred embodiment, the ASVspoof 2019 logical access and ASVspoof2021 logical access corpora are used to train and verify the synthetic speech detection framework. The real samples in the corpus are derived from the VCTK corpus, which contains 46 male speakers and 61 female speakers, a total of 107 speakers. The forged samples are generated using TTS (text to speech) and VC (voice conversion) technologies different from those used in the training set and development set. Compared with previous synthetic speech or logical access databases, the ASVspoof 2019 logical access corpus has a larger scale and diversity in attack algorithms. The ASVspoof2021 logical access test dataset includes a collection of real and deceptive utterances transmitted through various telephone systems, including Voice over IP (VoIP) and Public Switched Telephone Network (PSTN). Transmitting all data through the telephone system introduces interference changes, which may occur in a range of actual logical access application scenarios.
[0087] The initial learning rate is 3e-4, the batch size is 16, the optimizer is AdamW, and the number of training rounds is set to 100. During the training process, a combination of learning rate warm-up and cosine annealing is adopted. In the first 10 rounds of training, the learning rate warm-up strategy is adopted to gradually increase the learning rate; when the maximum cycle of cosine annealing is reached, the learning rate begins to decrease again.
[0088] Finally, the trained synthetic speech detection framework was tested on the logical access corpus test set of ASVspoof2021, and the equal error rate was used as the test indicator. The measured equal error rate (EER) score was 3.35%, which exceeded the preset test standard formulated according to the pre-prepared automatic speaker verification system.
[0089] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0090] Alternatively, if the above-mentioned integrated module of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0091] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A context-aware mask feature enhanced synthetic speech detection method, the method comprising the following steps: Step S1: obtaining original audio data, performing data preprocessing on the original audio data, and using the preprocessed speech data as input of a synthetic speech detection framework; Step S2: Input the preprocessed speech data into the SincNet filter module to extract speech time series features; Step S3: inputting the speech time series features into a ResNet module with a context-aware mask to extract context-aware local features; Step S4: inputting the context-aware local features into a Transformer network module with Llama style to calculate global features; Step S5: Process the global features using a fully connected layer, classify them using a Sigmoid activation function, and output the detection result of the synthesized speech.
2. The context-aware mask feature enhanced synthetic speech detection method according to claim 1, characterized in that: In step S1, the data preprocessing includes standardization processing, cropping and padding processing, and application pre-emphasis processing, and the synthetic speech detection framework includes a SincNet filter module, a ResNet module with a context-aware mask module, and a Transformer network module with a Llama style.
3. The context-aware mask feature enhanced synthetic speech detection method according to claim 1, characterized in that: In step S2, the preprocessed speech signal x[n] is filtered using the SincNet filter module to obtain the speech time series feature y[n]. The convolution in the SincNet filter is defined as: y[n]=x[n]*g[n,f1,f2]·w[n] Among them, g represents a bandpass filter, n represents a timestamp, f1 and f2 represent learnable parameters, representing the low cutoff frequency and high cutoff frequency of the bandpass filter respectively, and w[n] represents a Hamming window function.
4. The context-aware mask feature enhanced synthetic speech detection method according to claim 1, characterized in that: In step S3, the ResNet module with context-aware mask is denoted as a CAM-ResNet module; Using the CAM-ResNet module with the same 6-layer structure, the output speech time series feature y[n] of the SincNet filter module is extracted using two convolution blocks with Conv-ReLU-BatchNorm structure. The calculation of each convolution block is expressed as: local =BatchNorm(ReLU(Conv(Y))); The extracted features are subjected to context-aware masking, and different weights are assigned to the extracted features using attention statistical pooling. The pooled features are processed by the Sigmoid activation function to obtain a context-aware mask. The context-aware mask is used to reduce the influence of irrelevant features and focus on the context-aware feature representation. The context-aware mask M is expressed as: M=σ(W·S+b) Where W represents the weight matrix of the linear layer, b represents the bias term, and σ represents the Sigmoid function, which is used to generate a context-aware mask between 0 and 1; The context-aware mask is used to enhance the speech-related features, suppress the environmental noise, and extract more discriminative upper and lower human-aware local features. The context-aware local features are expressed as: AND cam =And res +Y local ⊙M Among them, Y res Represents the residual.
5. The context-aware mask feature enhanced synthetic speech detection method according to claim 1, characterized in that: In step S4, a two-layer Llama-style Transformer module is set for global feature extraction, and the Llama-style Transformer module is denoted as an L-Transformer module; Importing the context-aware local features into the L-Transformer module, dividing the context-aware local features into a plurality of adjacent element pairs, introducing a rotation angle for position encoding, determining position information, and performing RMSNorm normalization processing on the position-encoded features to stabilize their value range; Import the normalized features into the multi-head attention layer, obtain the output of the single-head attention through the self-attention mechanism, concatenate the outputs of all attention heads, and obtain the output of the multi-head attention layer through the linear layer transformation; The output of the multi-head attention layer is combined with the position-encoded features, and the combined features are imported into the feedforward neural network. After RMSNorm normalization and linear transformation, the global features are obtained using the SwiGLU activation function.
6. The context-aware mask feature enhanced synthetic speech detection method according to claim 5, characterized in that: The 2-layer L-Transformer module is set as a dual-path structure to train the speech data with real speech labels and the speech data with synthetic speech labels; The speech-related features after position encoding are respectively passed through the real speech label path and the synthetic speech label path to obtain the global feature embedding vectors of the two paths, and the global feature embedding vectors are connected in series and input into the fully connected layer for detection.
7. The context-aware mask feature enhanced synthetic speech detection method according to claim 1, characterized in that: In step S6, the global features are input into a fully connected layer, a Sigmoid activation function is used in the fully connected layer to perform category classification, and a probability distribution of real speech labels and synthetic speech labels is output as a detection result.
8. The context-aware mask feature enhanced synthetic speech detection method according to claim 1, characterized in that: The synthetic speech detection framework is trained using training data, specifically: Extract corpus samples based on speech-related corpus, match category labels for corpus samples through description information of each corpus sample, and obtain data sets of real speech labels and data sets of synthetic speech labels; The data set of each label is randomly divided into a training set, a validation set and a test set according to a proportion, the network framework parameters and the learning rate are initialized, the corpus samples in the training set are selected as the input of the synthetic speech detection framework, and the classification output value is obtained through the detection operation; The loss function is constructed by calculating the cross entropy based on the subordinate relationship function between the corpus sample and the category label and the classification output value. The network parameters of the synthetic speech detection framework are iteratively updated according to the forward propagation loss. The detection results are verified using the validation set in each round of iteration. If the detection performance of the synthetic speech detection framework meets the preset standards, the current network parameters are retained and then tested using the test set. If the test results meet the preset test standards, the current network parameters are used as structural parameters of the synthetic speech detection framework and the synthetic speech detection framework is output.
Citation Information
Patent Citations
Synthetic speech detection method based on residual network
CN115132180A
GPT generation language recognition and detection system
CN116757164A
Double-branch synthetic speech detection model based on attention and SE-Inc
CN117409820A
Voice spoofing detection method based on feature-enhanced attention mechanism
CN118298832A
Voice event detection and positioning method and device based on time sequence attention
CN118335065A