Voice spoofing attack detection method and device

By using linear frequency cepspectral coefficients and deep learning models, the problem of low detection accuracy of speech spoofing attacks is solved, the accuracy and versatility of detection are improved, and the security of speech recognition system is enhanced.

CN119049479AActive Publication Date: 2024-11-29HUAZHONG UNIV OF SCI & TECH

Patent Information

Application Number
CN202411211329.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-29
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Voice spoofing attack detection cannot extract effective acoustic features, resulting in low detection accuracy and affecting the reliability and security of the speech recognition system.

Method used

The linear frequency cepspectral coefficient is used as the acoustic feature of speech, and a deep learning detection model including convolutional layer, Res2Net module, attention module and fully connected layer is built. The model parameters are adjusted through backpropagation to determine whether the speech to be detected is fraudulent. voice.

Benefits of technology

It improves the accuracy and versatility of voice spoofing attack detection, weakens the impact of environmental noise, and enhances the representation ability and computing efficiency of the detection model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119049479A_ABST
    Figure CN119049479A_ABST
Patent Text Reader

Abstract

The invention discloses a voice spoofing attack detection method, which comprises the following steps of S1, loading voice data in a voice training set, sampling the voice data according to a preset sampling rate, and converting the voice data into digital voice signals; s2, inputting the digital voice signal into a linear filter, and extracting a linear frequency cepstrum coefficient describing the frequency domain characteristics of the digital voice signal; s3, building a detection model for voice spoofing attacks, and training the detection model by using the linear frequency cepstrum coefficient of the digital signal; and S4, inputting the to-be-detected voice into a trained detection model, and judging whether the to-be-detected voice is deception voice or not according to the output of the detection model. The method has the effect of high voice spoofing detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things security technology, and in particular to a voice deception attack detection method and device. Background Art

[0002] Voice spoofing attack detection is a core technical issue in the development of speech recognition and is a basic requirement for speech recognition systems to meet normal work and provide reliable verification services. Voice spoofing attacks, including speech synthesis attacks, speech conversion attacks, and speech replay attacks, will greatly reduce the reliability, credibility, and availability of speech recognition systems and affect network security. The task of voice spoofing attack detection is to detect the voice input to the speech recognition system and detect whether there is a voice spoofing attack in the shortest possible time. Therefore, it is particularly important to perform real-time and effective spoofing attack detection on speech.

[0003] The difficulty of voice deception attack detection is mainly reflected in three aspects. First, there are differences between different types of deceptive voices, and the choice of model will directly affect the versatility and generalization ability of the voice deception attack detection method; second, choose a suitable attention mechanism for the model, and pay more attention to the parts that are beneficial to attack detection in the process of extracting information to improve the accuracy of the voice deception attack detection model; third, before the voice is input into the attack detection model, it is necessary to select and extract effective acoustic features to include more voice information and increase the detection accuracy of the model. Summary of the invention

[0004] In view of this, it is necessary to provide a voice deception attack detection method and device to effectively solve the technical problem that voice attack detection cannot extract effective acoustic features and has low detection accuracy.

[0005] The present invention provides a voice deception attack detection method, comprising the following steps:

[0006] Step S1, loading speech data in a speech training set, sampling the speech data at a preset sampling rate, and converting the speech data into a digital speech signal;

[0007] Step S2, inputting the digital speech signal into a linear filter, and extracting linear frequency cepstrum coefficients describing the frequency domain characteristics of the digital speech signal;

[0008] Step S3: building a detection model for voice spoofing attacks, and training the detection model using the linear frequency cepstrum coefficients of the digital signal;

[0009] Step S4: input the speech to be detected into the trained detection model, and determine whether the speech to be detected is a deceptive speech according to the output of the detection model.

[0010] Preferably, the step S2 is specifically:

[0011] Step S21, pre-emphasize the digital voice signal;

[0012] Step S22, dividing the digital voice signal into frames to obtain a plurality of short-time frames, and connecting adjacent frames;

[0013] Step S23, multiplying each of the short-time frames by a Hamming window function;

[0014] Step S24, performing Fourier transform on each of the short-time frames to obtain a spectrum of the digital speech signal;

[0015] Step S25, taking the modulus square of the frequency spectrum of the digital speech signal to obtain a power energy spectrum;

[0016] Step S26, extracting the frequency band characteristics of the power energy spectrum through a set of linear scale filters, applying discrete cosine transform to retain the cepstral coefficients, and obtaining the linear frequency cepstral coefficients of the digital speech signal.

[0017] Preferably, the step S24 is specifically as follows: when performing N-point Fourier transform on each of the short-time frames, if the signal length of the short-time frame is insufficient, padding it with zeros.

[0018] Preferably, in step S21, the pre-emphasis coefficient for pre-emphasis on the digital voice signal is 0.95 or 0.97.

[0019] Preferably, the step S3 is specifically:

[0020] Step S31, building a detection model for voice spoofing attacks, wherein the detection model includes a convolutional layer, a Res2Net module, an attention module, a fully connected layer, and an activation function;

[0021] Step S32: inputting the linear frequency cepstrum coefficients of the digital signal into the detection model, and adjusting the parameters of the detection model through back propagation until a preset end condition is reached.

[0022] Preferably, the step S32 is specifically:

[0023] Step S321, inputting the linear frequency cepstrum coefficients into the convolution layer of the detection model for sliding window processing to extract initial feature information;

[0024] Step S322: input the initial feature information into the Res2Net module and the attention module of the detection model to obtain a feature matrix;

[0025] Step S323, obtaining a feature description vector by global average pooling of the feature matrix, flattening the feature description vector on each channel, inputting the flattened feature description vector into the fully connected layer of the detection model, and obtaining a final prediction vector after the output of the fully connected layer passes through an activation function;

[0026] Step S324: According to the data and label of the prediction vector, the binary cross entropy loss function is used to back propagate and calculate the gradient to adjust the weight and bias of the detection model.

[0027] Preferably, the attention module of the detection model uses global average pooling to extract the position information of the input signal in the vertical and horizontal directions respectively, and calculates the attention weights in the vertical and horizontal directions according to the position information in the vertical and horizontal directions respectively to obtain the output of the attention module.

[0028] Preferably, the step S4 is specifically:

[0029] Step S41, loading the speech to be detected in the database, extracting the linear frequency cepstral coefficients of the speech to be detected, and inputting them into the trained detection model;

[0030] Step S42: determine whether the speech to be detected is a deceptive speech according to the prediction vector output by the detection model, and output a detection result.

[0031] Preferably, the step S41 is specifically:

[0032] The linear frequency cepstral coefficients of the speech to be detected are sequentially input into the convolutional layer, Res2Net module, attention module, fully connected layer and activation function of the detection model to obtain the prediction vector of the speech to be detected.

[0033] The present invention also provides a voice deception attack detection device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the voice deception attack detection method is implemented.

[0034] Compared with the prior art, the present invention has the following beneficial effects: the linear frequency cepstral coefficients used in the present invention as the acoustic features of speech are closer to the frequency resolution perceived by the human ear and can more accurately reflect the frequency features of speech signals. Due to the selection of the linear frequency scale, the linear frequency cepstral coefficients can reduce the influence of environmental noise on the features to a certain extent, and can be used for different types of speech deception attack detection, thereby improving the versatility of the detection model. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0036] Figure 1 A flow chart of an embodiment of a voice spoofing attack detection method provided by the present invention;

[0037] Figure 2 yes Figure 1 A detection principle diagram of an embodiment of a voice spoofing attack detection method in the illustrated embodiment;

[0038] Figure 3 yes Figure 1 The structural principle diagram of the detection model 1 embodiment in the shown embodiment;

[0039] Figure 4 yes Figure 1 An example diagram of detection results of an embodiment of a voice spoofing attack detection method in the illustrated embodiment. DETAILED DESCRIPTION

[0040] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0041] The following first explains and illustrates the technical terms of the present invention:

[0042] Res2Net: A convolutional neural network structure that enhances the network's perception of multi-scale information and improves the performance of speech recognition tasks by introducing multi-scale residual connections and group feature extraction.

[0043] Coordinate Attention, or CA for short, is an attention mechanism that can assign different weights to features at different locations based on the location information of the input data to improve the model's ability to model location-related information.

[0044] Linear frequency cepstrum coefficient: A representation method used for feature extraction in speech signal processing. The coefficients representing speech features are obtained by performing a short-time Fourier transform on the speech signal and then performing linear filtering and discrete cosine transform on the spectrum.

[0045] Global average pooling: Global average pooling is a feature extraction operation that averages the feature values ​​of all positions on the feature map to obtain a feature vector of a fixed length to represent the overall feature information.

[0046] Softmax activation function: A function used for multi-class classification problems that converts a set of real numbers into a vector representing a probability distribution, where each element represents the probability of the corresponding category.

[0047] Embodiment 1

[0048] See also Figure 1 A voice spoofing attack detection method in this embodiment specifically includes the following steps:

[0049] Step S1, loading speech data in a speech training set, sampling the speech data at a preset sampling rate, and converting the speech data into a digital speech signal;

[0050] Step S2, inputting the digital speech signal into a linear filter, and extracting linear frequency cepstrum coefficients describing the frequency domain characteristics of the digital speech signal;

[0051] Step S3: building a detection model for voice spoofing attacks, and training the detection model using the linear frequency cepstrum coefficients of the digital signal;

[0052] Step S4: input the speech to be detected into the trained detection model, and determine whether the speech to be detected is a deceptive speech according to the output of the detection model.

[0053] Most existing methods use Gaussian classifiers or linear classifiers for simple classification, and the performance and classification ability of the model are poor. The detection model used in this embodiment is a deep learning model, which can increase the equivalent receptive field by modifying the structure of the bottleneck block, thereby perceiving information from different scales and improving the representation ability of the detection model. At the same time, existing voice deception attack detection models usually use traditional acoustic features as feature representations of speech, but these features have the problem of overly complex operations and too much redundant information. This embodiment uses linear frequency cepstral coefficients as features, which can improve the compactness and computational efficiency of features by selecting appropriate linear frequency scales.

[0054] Specifically, Figure 2As shown, this embodiment first loads the voice data of the training set in the database, sets the sampling rate according to the preset standard according to the time length of the voice, converts the analog signal into a digital signal, maps the sampled continuous amplitude value into a discrete amplitude level, and obtains a digital voice signal that is discrete in time and amplitude; feature extraction module: inputs the processed digital voice signal into a linear filter to extract the linear frequency cepstrum coefficients describing the frequency domain characteristics of the digital voice signal; model training module: builds a voice deception attack detection model, and trains the model using the linear frequency cepstrum coefficients of the training set voice; loads the voice to be detected, uses the trained voice deception attack detection model to perform attack detection, and determines whether it is a deceptive voice based on the prediction vector output by the model.

[0055] This embodiment uses linear frequency cepstral coefficients, which are closer to the frequency resolution perceived by the human ear and can more accurately reflect the frequency characteristics of the speech signal. Due to the selection of the linear frequency scale, the linear frequency cepstral coefficients can reduce the impact of environmental noise on the characteristics to a certain extent, and can be used for different types of voice deception attack detection to improve the versatility of the detection model; at the same time, the structure of the different modules of the detection model in this embodiment is clear and complete, and can be flexibly applied and adjusted in other deep learning tasks. The present invention has high detection accuracy, strong versatility, high efficiency, and easy integration.

[0056] Further, such as Figure 2 As shown, the step S2 is specifically as follows:

[0057] Step S21, pre-emphasize the digital voice signal;

[0058] In order to balance the amplitude of the high-frequency and low-frequency regions in the digital voice signal, the digital voice signal is first pre-emphasized. The expression is as follows:

[0059] y(t)=x(t)-αx(t-1)

[0060] Wherein, y(t) is the digital voice signal after pre-emphasis, t is the time node of the digital voice signal, x(t) represents the strength of the digital voice signal at time t, x(t-1) represents the strength of the digital voice signal at time t-1, and α is the pre-emphasis coefficient;

[0061] Step S22, dividing the digital voice signal into frames to obtain a plurality of short-time frames, and connecting adjacent frames;

[0062] After pre-emphasis, the digital speech signal needs to be divided into short-time frames and adjacent frames are concatenated to obtain a good approximation of the signal's frequency contour;

[0063] Step S23, multiplying each of the short-time frames by a Hamming window function;

[0064] Each short-time frame of the digital speech signal is multiplied by a Hamming window function to increase the continuity of the left and right ends of the window. The formula of the Hamming window function is:

[0065]

[0066] Where w(n) is the value of the window function in the discrete time series, n is the index in the frame sequence, N is the window length, and a0 is a constant coefficient used to adjust the shape of the window function;

[0067] Step S24, performing Fourier transform on each of the short-time frames to obtain a spectrum of the digital speech signal;

[0068] Use Fourier transform to convert the digital speech signal in the time domain into energy distribution in the frequency domain. Perform N-point Fourier transform on each short-time frame signal after frame division and windowing to obtain the spectrum of the digital speech signal. The calculation formula is:

[0069]

[0070] Among them, S i (k) represents the complex function of the digital speech signal in the frequency domain, s i (n) is a function of the digital speech signal in the time domain, n is an index in the frame sequence, N is a window length, in this embodiment, N is 512, and k is a frequency variable, indicating the frequency of the digital speech signal in the frequency domain;

[0071] Step S25, taking the modulus square of the frequency spectrum of the digital speech signal to obtain a power energy spectrum;

[0072] The power energy spectrum of the digital speech signal is obtained by taking the modulus square of the spectrum of the digital speech signal. The calculation formula is:

[0073]

[0074] Where P is the power spectrum of the digital speech signal, S i (k) represents the complex function of the digital speech signal in the frequency domain, and N is the window length;

[0075] Step S26, extracting the frequency band characteristics of the power energy spectrum through a set of linear scale filters, applying discrete cosine transform to retain the cepstral coefficients, and obtaining the linear frequency cepstral coefficients of the digital speech signal;

[0076] The power energy spectrum is passed through a set of linear scale filters to extract the frequency band characteristics, and the discrete cosine transform is applied to retain the 13 obtained cepstrum coefficients to obtain the linear frequency cepstrum coefficients of the digital speech signal. The formula of discrete cosine transform is:

[0077]

[0078] Among them, C(m) represents the m-order linear frequency cepstral coefficient of the digital speech signal, M represents the order of the linear frequency cepstral coefficient; s(n) represents the frequency band characteristics of the short-time frame, n is the index in the frame sequence, N is the window length, and L is the number of linear scale filters.

[0079] Furthermore, the step S24 is specifically as follows: when performing N-point Fourier transform on each of the short-time frames, if the signal length of the short-time frame is insufficient, it is padded with zeros, and N is 512.

[0080] Furthermore, in the step S21, the pre-emphasis coefficient for pre-emphasis on the digital voice signal is 0.95 or 0.97.

[0081] Further, such as Figure 2 As shown, the step S3 is specifically as follows:

[0082] Step S31, building a detection model for voice spoofing attacks, the detection model includes a convolutional layer, a Res2Net module, an attention module, a fully connected layer and an activation function, and the activation function is a Softmax activation function;

[0083] Step S32: inputting the linear frequency cepstrum coefficients of the digital signal into the detection model, and adjusting the parameters of the detection model through back propagation until a preset end condition is reached.

[0084] like Figure 3 As shown, the detection model in this embodiment consists of a convolutional layer Conv_1, four Res2Net modules, four attention modules, a global average pooling layer, a fully connected layer and a Softmax activation function; the linear frequency cepstral coefficients of the speech are input into the speech deception attack detection model, and the weights and biases of the model are adjusted by back propagation to realize the training of the detection model; the training is repeated until the training end condition is reached.

[0085] Further, such as Figure 3 As shown, the step S32 is specifically as follows:

[0086] Step S321, input the linear frequency cepstral coefficient matrix of dimension C×H×W into the convolution layer Conv_1 of the detection model, perform sliding window processing, and extract initial feature information, where C, H, and W are the channel, height, and width of the linear frequency cepstral coefficient matrix respectively;

[0087] Step S322, input the initial feature information into the Res2Net module and the attention module of the detection model, repeat the Res2Net module and the attention module until the initial information features input by the model pass through all the Res2Net modules and the attention modules to obtain the final feature matrix Z;

[0088] Step S323, the feature matrix Z is subjected to global average pooling to obtain a feature description vector, the feature description vector on each channel is flattened, and the flattened feature description vector is input into the fully connected layer of the detection model, the fully connected layer is composed of a plurality of neurons, each neuron is connected to an element in the feature vector, and weighted product and weighted sum operations are performed; the output of the fully connected layer is subjected to an activation function to obtain a final prediction vector; the prediction vector represents the distribution probability of the real speech and the deceptive speech;

[0089] Step S324: According to the data and label of the prediction vector, the gradient is calculated by back propagation using the binary cross entropy loss function to adjust the weight and bias of the detection model;

[0090] The expression of the binary cross entropy loss function is:

[0091] Loss=-(k·log(p)+(1-k)·log(1-p))

[0092] Among them, Loss represents the binary cross entropy loss function, where k is the true label value; p is the prediction result of the model, which indicates the probability of belonging to the positive category.

[0093] Furthermore, the Res2Net module obtains multiple sets of feature sub-matrices based on the input signal, applies a convolution operation to each of the feature sub-matrices, extracts features of the feature sub-matrix, adds the input features of the feature sub-matrix with the features after the convolution operation, and obtains residual features; the residual features are passed to the next layer for convolution operation, summation operation, channel connection, and channel number adjustment to obtain the output of the Res2Net module;

[0094] The attention module uses global average pooling to extract the position information of the input signal in the vertical direction and the horizontal direction respectively, and calculates the attention weights in the vertical direction and the horizontal direction according to the position information in the vertical direction and the horizontal direction respectively, to obtain the output of the attention module;

[0095] The initial feature information is sequentially input into a plurality of the Res2Net modules and a plurality of the attention modules to obtain the feature matrix.

[0096] Specifically, Figure 3As shown, the initial feature information x extracted from the previous layer is input into the Res2Net module, and x is divided into s groups of sub-matrices x1, x2..., x s , in this embodiment, it is divided into 4 groups of sub-matrices x1, x2, x3, x4. Each sub-matrix has the same height and width, but the number of channels may be different; then the convolution operation Γ is applied to each sub-matrix i , extract the features of the submatrix through a series of convolutional layers; these convolutional layers have different depths and convolution kernel sizes to capture features of different scales; within each submatrix, residual connections are used to transfer information; the input features of the submatrix are added to the features obtained after the convolution operation to obtain the residual features; then the residual features are passed to the next layer of convolution operation or other processing; the calculation formula is expressed as:

[0097]

[0098] Among them, y i is the i-th group of convolution operations Γ i The output of (), except x1, each group of sub-matrices is convolved with a convolution kernel size of 3, denoted as Γ i (); Except for x1 and x2, firstly, the i-th group x i With the output of the previous group Γ i-1 () add, Γ i The operation of () is the summation result; finally, the sub-outputs of the s groups are connected in the channel dimension, and then the number of channels of the feature is adjusted through convolution.

[0099] like Figure 3 As shown in the figure, the output y of the Res2Net module is input into the corresponding attention module, and the global average pooling is first used to extract the vertical and horizontal coordinate information respectively; given the input y of dimension C×H×W, the output of channel C in two spatial directions is expressed as:

[0100]

[0101] in, are the outputs of the attention module in h and w dimensions, y c (h,i),y c (j, w) is the vertical and horizontal coordinate information extracted by global average pooling.

[0102] Next, the weights are calculated from the obtained vertical and horizontal position information respectively, and the formula is expressed as:

[0103]

[0104] Among them, h and w represent the vertical dimension and horizontal dimension respectively, k h, k w are the attention weights on h and w dimensions respectively, σ() is the sigmoid activation function, which maps the variables to [0,1], extracts the weights, and φ h ,φ w is a 1×1 convolution, f h 、f w They are the intermediate feature maps of position information in h and w dimensions, expressed as f = Ψ(F({z h ,z w})), where F is a convolution operation with a convolution size of 1×1, {} represents a concatenation operation, and Ψ is a nonlinear activation function;

[0105] Repeat the above operations of the Res2Net module and the attention module until the input initial information features pass through all the Res2Net modules and attention modules to obtain the final feature matrix Z.

[0106] Most existing methods choose channel attention mechanisms. Since these attention mechanisms only consider the attention in the channel dimension, they cannot capture the attention in the spatial dimension. This embodiment adopts a coordinate attention mechanism to simultaneously pay attention to the channel information and position information of the speech, which is conducive to extracting the difference between the deceptive speech and the real speech, thereby accurately distinguishing the synthesized speech and the replayed speech. The present invention also provides a corresponding voice deception attack detection device based on coordinate attention. The coordinate attention mechanism adopted in this embodiment has a relatively high computational efficiency. Compared with the traditional attention mechanism, it does not require global attention calculation, but only pays attention to the channel information and the position information of the features. Coordinate attention reduces the complexity of calculation and improves the running speed of the model.

[0107] Furthermore, the step S4 is specifically:

[0108] Step S41, loading the speech to be detected in the database, extracting the linear frequency cepstral coefficients of the speech to be detected, and inputting them into the trained detection model;

[0109] Step S42: determine whether the speech to be detected is a deceptive speech according to the prediction vector output by the detection model, and output a detection result.

[0110] Furthermore, the step S41 is specifically as follows:

[0111] The linear frequency cepstral coefficients of the speech to be detected are sequentially input into the convolutional layer, Res2Net module, attention module, fully connected layer and activation function of the detection model to obtain the prediction vector of the speech to be detected.

[0112] Specifically, the linear frequency cepstral coefficients of the speech to be detected are passed through the convolution layer Conv_1 and subjected to sliding window processing to extract the initial feature information in the input;

[0113] The initial feature information x extracted from the previous layer is input into the Res2Net module, and x is divided into s groups of sub-matrices x1, x2..., x s , each sub-matrix has the same height and width, but the number of channels may be different; then a convolution operation is applied to each sub-matrix, and the features of the sub-matrix are extracted through a series of convolution layers; these convolution layers have different depths and convolution kernel sizes to capture features of different scales; within each sub-matrix, residual connections are used to transfer information; the input features of the sub-matrix are added to the features obtained after the convolution operation to obtain the residual features; then, the residual features are passed to the convolution operation or other processing of the next layer; the calculation formula is expressed as:

[0114]

[0115] Among them, y i is the i-th group of convolution operations Γ i The output of (), except x1, each group of sub-matrices is convolved with a convolution kernel size of 3, denoted as Γ i (); Except for x1 and x2, firstly, the i-th group x i With the output of the previous group Γ i-1 () add, Γ i The operation of () is the summation result; finally, the sub-outputs of the s groups are connected in the channel dimension, and then the number of channels of the feature is adjusted by convolution;

[0116] For the output y of the Res2Net module, global average pooling is first used to extract the vertical and horizontal coordinate information respectively; given an input y of dimension C×H×W, the output of channel C in two spatial directions is expressed as:

[0117]

[0118] Next, the weights are calculated from the obtained vertical and horizontal position information respectively; the formula is expressed as:

[0119]

[0120] Where h and w represent the vertical and horizontal dimensions, k h , k w are the attention weights on the h and w dimensions respectively, where φ is a 1×1 convolution and f is the intermediate feature map of the position information, expressed as f=Ψ(F({z h ,z w})), where F is a convolution operation with a convolution size of 1×1, {} represents a concatenation operation, and Ψ is a nonlinear activation function;

[0121] Repeat the operations of the Res2Net module and the attention module until the initial information features of the model input pass through all the Res2Net modules and attention modules to obtain the final feature matrix Z;

[0122] The feature matrix Z is subjected to global average pooling to obtain a feature description vector, and then the feature description vector composed of the average values ​​on each channel is flattened. Finally, the flattened feature description vector is input into the fully connected layer for processing; the fully connected layer is composed of multiple neurons, each of which is connected to an element in the feature vector, performing weighted product and weighted sum operations; the output of the fully connected layer is subjected to the Softmax activation function to obtain the final prediction vector, which represents the probability distribution of real speech and deceptive speech.

[0123] The purpose of the voice deception attack detection method provided in this embodiment is to accurately and quickly detect voice deception attacks that occur during voice recognition. The voice attack detection method judges the authenticity of the voice through a deep learning model, uses linear frequency cepstral coefficients as the acoustic features of the voice, and guides the model's attention area based on the coordinate attention mechanism to improve the detection accuracy of the model, thereby solving the technical problem of voice deception attack detection.

[0124] Figure 4 This is an example of the visualization results of the voice spoofing attack detection method in this embodiment on the ASVspoof2019 dataset. In this figure, the ordinate represents the spoofed speech recognition accuracy of the detection model, and the abscissa represents the different tracks and sets of the dataset. The voice spoofing attack detection model in this embodiment, CA-Res2Net in the figure represents the detection model in this embodiment, and its recognition accuracy on each track of the ASVspoof2019 dataset is better than the other two baseline models. Res2Net and SE-Res2Net are used in the figure to represent the other two baseline models respectively.

[0125] Embodiment 2

[0126] This embodiment provides a voice spoofing attack detection device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the voice spoofing attack detection method described in the first embodiment is implemented.

[0127] The voice deception attack detection device provided in this embodiment is used to implement the voice deception attack detection method. Therefore, the technical effects possessed by the voice deception attack detection method are also possessed by the voice deception attack detection device, which will not be repeated here.

[0128] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed in the present invention should be covered by the present invention.

Claims

1. A voice spoofing attack detection method, characterized in that: The following steps are involved: Step S1, loading speech data in a speech training set, sampling the speech data at a preset sampling rate, and converting the speech data into a digital speech signal; Step S2, inputting the digital speech signal into a linear filter, and extracting linear frequency cepstrum coefficients describing the frequency domain characteristics of the digital speech signal; Step S3: building a detection model for voice spoofing attacks, and training the detection model using the linear frequency cepstrum coefficients of the digital signal; Step S4: input the speech to be detected into the trained detection model, and determine whether the speech to be detected is a deceptive speech according to the output of the detection model.

2. The voice spoofing attack detection method according to claim 1, characterized in that: The step S2 is specifically: Step S21, pre-emphasize the digital voice signal; Step S22, dividing the digital voice signal into frames to obtain a plurality of short-time frames, and connecting adjacent frames; Step S23, multiplying each of the short-time frames by a Hamming window function; Step S24, performing Fourier transform on each of the short-time frames to obtain a spectrum of the digital speech signal; Step S25, taking the modulus square of the frequency spectrum of the digital speech signal to obtain a power energy spectrum; Step S26, extracting the frequency band characteristics of the power energy spectrum through a set of linear scale filters, applying discrete cosine transform to retain the cepstral coefficients, and obtaining the linear frequency cepstral coefficients of the digital speech signal.

3. The voice spoofing attack detection method according to claim 2, characterized in that: The step S24 is specifically as follows: when performing N-point Fourier transform on each of the short-time frames, if the signal length of the short-time frame is insufficient, padding it with zeros.

4. The voice spoofing attack detection method according to claim 2, characterized in that: In the step S21, the pre-emphasis coefficient for pre-emphasis on the digital voice signal is 0.95 or 0.

97.

5. The voice spoofing attack detection method according to claim 1, characterized in that: The step S3 is specifically as follows: Step S31, building a detection model for voice spoofing attacks, wherein the detection model includes a convolutional layer, a Res2Net module, an attention module, a fully connected layer, and an activation function; Step S32: inputting the linear frequency cepstrum coefficients of the digital signal into the detection model, and adjusting the parameters of the detection model through back propagation until a preset end condition is reached.

6. The voice spoofing attack detection method according to claim 5, characterized in that: The step S32 is specifically as follows: Step S321, inputting the linear frequency cepstrum coefficients into the convolution layer of the detection model for sliding window processing to extract initial feature information; Step S322: input the initial feature information into the Res2Net module and the attention module of the detection model to obtain a feature matrix; Step S323, obtaining a feature description vector by global average pooling of the feature matrix, flattening the feature description vector on each channel, inputting the flattened feature description vector into the fully connected layer of the detection model, and obtaining a final prediction vector after the output of the fully connected layer passes through an activation function; Step S324: According to the data and label of the prediction vector, the binary cross entropy loss function is used to back propagate and calculate the gradient to adjust the weight and bias of the detection model.

7. The voice spoofing attack detection method according to claim 5, characterized in that: The attention module of the detection model uses global average pooling to extract the position information of the input signal in the vertical direction and the horizontal direction respectively, and calculates the attention weights in the vertical direction and the horizontal direction according to the position information in the vertical direction and the horizontal direction respectively to obtain the output of the attention module.

8. The voice spoofing attack detection method according to claim 1, characterized in that: The step S4 is specifically: Step S41, loading the speech to be detected in the database, extracting the linear frequency cepstral coefficients of the speech to be detected, and inputting them into the trained detection model; Step S42: determine whether the speech to be detected is a deceptive speech according to the prediction vector output by the detection model, and output a detection result.

9. The voice spoofing attack detection method according to claim 8, characterized in that: The step S41 is specifically as follows: The linear frequency cepstral coefficients of the speech to be detected are sequentially input into the convolutional layer, Res2Net module, attention module, fully connected layer and activation function of the detection model to obtain the prediction vector of the speech to be detected.

10. A voice deception attack detection device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the voice deception attack detection method as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Voice spoofing attack detection method based on voice signal spectrum characteristics and deep learning

    CN112201255A

  • Voiceprint recognition method based on deep neural network

    CN116013328A

  • Intelligent voice forgery attack detection method based on attention mechanism

    CN116416997A

  • Voiceprint recognition method and device for complex scene, electronic equipment and storage medium

    CN116758921A

  • Voice spoofing detection method based on feature-enhanced attention mechanism

    CN118298832A

Cited By

  • Synthetic speech detection method and device based on space coordinate attention mechanism

    CN121122320A