Voiceprint fraud detection method based on reconstructed group delay-constant Q transform spectrogram
By using CQT and feature reconstruction technology to generate RGD-CQT spectrogram features in voice fraud detection, and combining it with the residual network of the attention mechanism, the problem of ignored feature reconstruction in the existing technology is solved, and the voice fraud detection rate is significantly improved. Detection accuracy and performance.
Patent Information
- Application Number
- CN202210221453.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-03-07
AI Technical Summary
Existing fraudulent speech detection methods ignore the feature reconstruction process, resulting in insufficient performance in speech fraud detection and difficulty in effectively distinguishing real speech and fraudulent speech.
Constant Q transform (CQT) is used for spectrogram feature processing, and feature reconstruction is performed through Q-DCT and Q-IDCT. Combined with group delay calculation, a reconstructed group delay-constant Q transform (RGD-CQT) spectrogram is generated. Features and input them into the residual network containing the attention mechanism for detection.
It significantly improves the accuracy of voice fraud detection, can effectively preserve the human factors in the voice signal, significantly reduces the false recognition rate, and improves the performance of the system.
Smart Images

Figure CN114639387B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fraudulent speech detection, and in particular to feature processing. Background Art
[0002] In the past decade, identity authentication technology based on biometrics has become increasingly important in daily life. Some common biometric recognition technologies, such as fingerprint recognition, face recognition, and voiceprint recognition, have been widely used in a variety of scenarios. However, any biometric system has certain vulnerabilities. Intruders can conduct fraudulent attacks on biometric systems by imitating and tampering with features, posing a serious threat to the security of biometric systems. In the field of biometrics, fraud refers to presenting a forged feature on the sensor of a biometric system, thereby illegally attacking the system. For example, facial recognition systems can be deceived by impersonating photos, and fingerprint recognition systems can be deceived by forged fingerprints made of plastic. Similarly, speaker recognition systems are also vulnerable to various degrees of fraudulent attacks.
[0003] Voice technology has become an important medium for human-computer interaction. For example, modern voice assistants can easily control various home devices and applications, but these devices are extremely vulnerable to fraudulent voice attacks. With the increasing use of voice technology, the security of speaker recognition systems has received increasing attention. Fraud attacks can be divided into four categories: imitation, recording playback, speech synthesis, and speech conversion. All four attack methods will seriously affect the performance of speaker recognition systems.
[0004] In speech playback, the time-frequency representation of the speech signal must have a high resolution in order to better extract the distinguishing information between real speech and deceptive speech from a specific spectral region. Constant Q Transform (CQT) refers to a filter group with a center frequency distributed according to an exponential law, different filter bandwidths, but a center frequency to bandwidth ratio of constant Q. This method gives a higher frequency resolution for lower frequencies and a higher time resolution for higher frequencies. It is often used as an acoustic feature in speech deception detection. The Group Delay Spectrogram (GD-gram) feature also has a significant effect in the field of speech fraud detection. Because it contains both power spectrum and phase spectrum information, this feature can make the difference between real speech and deceptive speech more obvious.
[0005] Various features of existing research, such as constant Q cepstral coefficients, linear frequency cepstral coefficients, cochlear cepstral coefficients based on instantaneous frequency, single-frequency filtering cepstral coefficients, etc., all ignore the process of feature reconstruction. In this patent, we replace the short-time Fourier transform stage in GD-gram with CQT. And reconstruct the CQT energy spectrum based on the discrete cosine transform modified by constant Q transform (hereinafter referred to as Q-DCT) and its inverse transform (hereinafter referred to as Q-IDCT), and then generate the final reconstructed group delay-constant Q transform (hereinafter referred to as RGD-CQT) spectrogram feature. Summary of the invention
[0006] In view of the problem that the importance of feature reconstruction is ignored in existing fraudulent speech detection methods, the present invention provides a voiceprint fraud detection method. First, Q-DCT and Q-IDCT are performed on the CQT spectrogram of the speech, and then group delay calculation is performed to obtain the final feature; this feature preserves the human factors in the speech signal to a great extent; finally, the feature is passed to the residual network containing the attention mechanism, the speech to be tested is scored, and then whether a piece of speech is a fraudulent speech is detected.
[0007] The technical solution of the present invention is: a voiceprint fraud detection method, a method for detecting voice fraud attacks based on discrete cosine transform compression data modified by CQT and group delay information modified by CQT spectrogram, mainly comprising the following steps:
[0008] Step 1: Perform a preprocessing operation on each speech sequence read from the audio file in the data set to make the length of each speech sequence consistent, and output a speech sequence x(n) with a length of n.
[0009] Step 2: Take the speech sequence x(n) read in step 1 as input and calculate y(n)=x(n)×(n+1), n=0,1,...,n.
[0010] Step 3: Perform CQT transformation on the sequences x(n) and y(n) obtained in steps 1 and 2 to obtain spectrogram X and spectrogram Y respectively, and then extract the actual part X of the obtained spectrogram X and spectrogram Y respectively. r ,Y r and the imaginary part X i ,Y i .
[0011] Step 4: Take the energy spectrum of the spectrogram X obtained in step 3 and perform feature reconstruction to obtain a new spectrogram.
[0012] Step 5: Calculate the group delay of the spectrograms obtained in step 3 and step 4 to obtain an intermediate spectrogram.
[0013] Step 6: Normalize and logarithmize the intermediate spectrogram obtained in step 5 to obtain the RGD-CQT spectrogram.
[0014] Step 7: Pass the RGD-CQT spectrogram obtained in step 6 into the residual network model with attention mechanism for training to obtain the optimal network model.
[0015] Step 8: Use the optimal network model obtained in step 7 as a test model, pass the speech to be tested into the model, and then determine whether the speech is a fraudulent speech.
[0016] Furthermore, the preprocessing operation described in step 1 is to fill and truncate each audio sequence; if the sequence length is less than the specified length, a filling operation is performed; if the sequence length is greater than the specified length, a truncation operation is performed to make the lengths of these sequences consistent.
[0017] Furthermore, in step 3, X is obtained r ,Y r ,X i ,Y i The calculation steps are as follows: 1) Perform CQT calculations on x(n) and y(n) respectively to obtain two spectrograms, spectrogram X and spectrogram Y. 2) Take out the real part X of spectrogram X r and the imaginary part X i , take out the real part Y of the spectrogram Y r and the imaginary part Y i .
[0018] Furthermore, the specific process of reconstructing the energy spectrum of the spectrogram X in step 4 is as follows: 1) first extracting the amplitude spectrum X of the spectrogram X mag ; 2) For the X in the amplitude spectrum mag Each element is squared to obtain the energy spectrum S; 3) Median filtering is performed on the energy spectrum S, that is, the grayscale value of each pixel in the energy spectrum is replaced by the median value of each point in a neighborhood of the point, thereby eliminating isolated noise points. 4) Finally, feature reconstruction is performed on the energy spectrum S to obtain an intermediate spectrogram; the one-dimensional Q-DCT derivation process in feature reconstruction is:
[0019] 1) The original CQT formula is:
[0020]
[0021] The windowed sound sequence is defined as x(n), where n=0, 1, ..., N. k -1,N k is the number of sampling points at the kth frequency; X(k) is the spectrum, and Q is the ratio of the center frequency to the bandwidth.
[0022] Expand the sequence x(n) of length n to twice its original length, {x[-N k ],x[-N k +1],...,x[0],x[1],...,x[N k -1]};
[0023]
[0024] Among them, x'(m)∈{x[-N k ],x[-N k +1],...,x[0],x[1],...,x[N k -1]}.
[0025] 2) Shift the sequence x'(m) to the right have to:
[0026]
[0027] 3) For formula (3) Taking positive numbers, we get the following form:
[0028]
[0029] 4) Order Get the following form:
[0030]
[0031] From the above derivation process, we can see that the one-dimensional Q-DCT is as shown in formula (6):
[0032]
[0033] The two-dimensional Q-DCT is based on the one-dimensional Q-DCT, and then performs another Q-DCT. Therefore, the two-dimensional Q-DCT formula (7) is:
[0034]
[0035] in, and The two-dimensional Q-DCT calculation can be regarded as the energy spectrum S being multiplied by the matrix A on the left and the matrix B on the right, and the new spectrogram X is obtained. dct , that is, X dct =AX mag B; then X dct Perform the inverse transformation, that is, multiply A on the left -1 and right multiply B -1 , get the intermediate spectrogram X, that is, X = A -1 X dct B-1 .
[0036] Furthermore, in step 5, the group delay characteristics are calculated to obtain the GD spectrogram. The specific calculation formula is:
[0037]
[0038] Furthermore, in step 6, the group delay feature is normalized and logarithmic. The specific calculation process is as follows: 1) the elements in the GD spectrogram are normalized to obtain a new spectrogram MGD. The calculation formula is: 2) Find the largest element max in the MGD spectrogram, and then divide each element in the MGD spectrogram by the maximum value max in the spectrogram to get the new spectrogram MGD max ,Right now 3) MGD of spectrogram max Take the logarithm and obtain the final feature RGD-CQT spectrogram. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 : is a flow chart of a fraud signal detection method according to some embodiments of the present invention;
[0040] Figure 2 : is a schematic diagram of the specific process of the feature extraction step in the present invention;
[0041] Figure 3 : is a network structure diagram of the training model in the present invention;
[0042] Figure 4 : is the EER change curve corresponding to different training times of the method of the present invention. DETAILED DESCRIPTION
[0043] The technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings. The described implementation examples are only part of the embodiments of the present invention.
[0044] Example:
[0045] The present invention is a voiceprint fraud detection method based on a reconstructed group delay-constant Q transform (RGD-CQT) spectrogram, the method comprising the following steps:
[0046] Step 1: Preprocess each speech sequence read from the audio file in the data set to make the length of each speech sequence consistent.
[0047] Step 2: Multiply each element in the speech sequence x(n) read in step 1 by its subscript plus 1 to obtain a new sequence y(n).
[0048] Step 3: Perform CQT transformation on the sequences x(n) and y(n) obtained in step 2 to obtain spectrogram X and spectrogram Y respectively, and then extract the actual part X of the obtained spectrogram X and spectrogram Y respectively. r ,Y r and the imaginary part X i ,Y i .
[0049] Step 4: Reconstruct the energy spectrum S of the spectrogram X obtained in step 3 to obtain a new spectrogram.
[0050] Step 5: Calculate the group delay of the spectrograms obtained in step 3 and step 4 to obtain an intermediate spectrogram.
[0051] Step 6: Normalize and log the intermediate spectrogram obtained in step 5 to obtain the final RGD-CQT feature.
[0052] Step 7: Pass the final features obtained in step 6 into the residual network model with attention mechanism for training to obtain the optimal network model.
[0053] Step 8: Use the optimal network model obtained in step 7 as a test model, pass the speech to be tested into the model, and then determine whether the speech is a fraudulent speech.
[0054] In this embodiment, the specific process of step 1 is:
[0055] Step 1-1, read the recording file in the data set to obtain the corresponding speech sequence x(n), where the sampling rate of the recording file is 16000 Hz.
[0056] Step 1-2: perform padding and truncation operations on each speech sequence to make all speech sequences unified into a fixed length, and the unified fixed length is 64000.
[0057] In this embodiment, the specific process of step 2 is:
[0058] Step 2-1, generate a sequence len from 1 to 64000.
[0059] Step 2-2: Perform dot multiplication of x(n) and the sequence len to obtain a new sequence y(n).
[0060] In this embodiment, the specific process of step 3 is:
[0061] Step 3-1: Perform a constant Q transformation on the sequence x(n) and the sequence y(n) to obtain spectrogram X and spectrogram Y. The dimensions of the two spectrograms are both 251×192.
[0062] Step 3-2: Extract the real part X of the spectrogram Xr and the imaginary part X i , extract the real part Y of the spectrogram Y r and the imaginary part Y i Among them, X r ,X i ,Y r ,Y i The dimensions are 251×192.
[0063] In this embodiment, the specific process of step 4 is as follows:
[0064] Step 4-1: First find the amplitude spectrum X of the above CQT spectrogram X mag , then the amplitude spectrum X mag Perform median filtering to replace the value of a point in a digital image or digital sequence with the median of the values of all points in a neighborhood of that point, so that the surrounding pixel values are close to the true value, thereby eliminating isolated noise points.
[0065] Step 4-2: After median filtering, the amplitude spectrum is squared to obtain the energy spectrum S, and finally feature reconstruction is performed to obtain a smoothed new energy spectrum S.
[0066] In this embodiment, the specific process of step 5 is as follows:
[0067] Step 5-1: Using the above matrix X r ,X i ,Y r ,Y i ,S performs group delay calculation, and the specific calculation steps are:
[0068]
[0069]
[0070] Finally, the intermediate spectrogram MGD is obtained.
[0071] In this embodiment, the specific process of step 6 is as follows:
[0072] Step 6-1, find the maximum value max in the intermediate spectrogram MGD, divide each element in MGD by max, and normalize the MGD spectrogram.
[0073] Step 6-2: Take the logarithm of the normalized MGD spectrogram to obtain the final feature. The dimension of this feature is 251×192.
[0074] In this embodiment, the specific process of step 7 is as follows:
[0075] The features obtained in step 6 are passed into the residual network with attention mechanism for training, and the model with the best performance is obtained as the test model.
[0076] In this embodiment, the specific process of step 8 is as follows:
[0077] The test speech is passed into the model obtained in step 7 and the score is calculated. If the score is greater than 0, the test speech is judged to be a real speech, otherwise it is a false speech.
[0078] Experimental results:
[0079] (1) Compare the detection performance of RGD-CQT proposed in this patent with other methods, and conduct quantitative analysis. The comparison will be carried out from the front-end acoustic features and the back-end model. In addition to the constant Q cepstral coefficients and Gaussian mixture model (CQCC+GMM), linear frequency cepstral coefficients and Gaussian mixture model (LFCC+GMM), the front-end acoustic features also selected the segment-level features of CQCC feature splicing, CQT spectrogram, and MGD spectrogram. The network model selected ResNet-18 without attention mechanism and ResNet-18+CBAM with attention mechanism. The objective function of the network adopts the cross entropy function, and the optimizer adopts the adaptive moment estimation (Adam) algorithm. According to the above experimental settings, the system performance corresponding to different methods is shown in Table 1. It can be seen from Table 1 that:
[0080] (1) On the development set, the proposed method RGD-CQT+ResNet-18+CBAM can outperform most methods and reduce the relative EER by up to 90.8%.
[0081] (2) On the evaluation set, the performance of the RGD-CQT feature is better than other comparison features. When the CBAM attention mechanism is added, the performance can be further improved, and the relative EER is reduced by up to 65.3%, which verifies the effectiveness of the method proposed in this patent from the performance point of view.
[0082] (3) Both CQCC and CQT features have ideal performance in the development set, but poor performance in the evaluation set with out-of-set data. Compared with the above two, the RGD-CQT feature can achieve relatively ideal performance in both the development set and the evaluation set, so it is more suitable for real application systems that may face unknown attacks.
[0083] Table 1: Performance comparison of different methods
[0084]
[0085] (2) The focus of the present invention is to further extract useful information from the features after CQT transformation, thereby improving the performance of the system.
[0086] (3) Through the analysis of the speech signal spectrogram, the present invention finds that the group delay spectrogram features contain information that can clearly identify fraudulent speech; among them, feature extraction of the amplitude spectrum of the speech can further improve the system performance and is easy to implement.
[0087] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes made based on the principles and ideas disclosed by the present invention still fall within the protection scope of the present invention.
Claims
1. A voiceprint fraud detection method, a method for detecting voice fraud attacks based on discrete cosine transform compression data modified by CQT and group delay information modified by CQT spectrogram, mainly comprising the following steps: Step 1: preprocess each speech sequence read from the audio file in the data set to make the length of each speech sequence consistent, and output a speech sequence x(n) with a length of n; Step 2: Take the speech sequence x(n) read in step 1 as input and calculate y(n)=x(n)×(n+1), n=0, 1,...,n; Step 3: Perform CQT transformation on the sequences x(n) and y(n) obtained in steps 1 and 2 to obtain spectrogram X and spectrogram Y respectively, and then extract the actual part X of the obtained spectrogram X and spectrogram Y respectively. r ,Y r and the imaginary part X i ,Y i ; Step 4: Take the energy spectrum of the spectrogram X obtained in step 3 and perform feature reconstruction to obtain an intermediate spectrogram; Step 5, calculating the group delay of the spectrograms obtained in step 3 and step 4 to obtain a GD spectrogram; Step 6, normalize and logarithmize the GD spectrogram obtained in step 5 to obtain the RGD-CQT spectrogram; Step 7: The RGD-CQT spectrogram obtained in step 6 is passed into the residual network model with attention mechanism for training to obtain the optimal network model; Step 8: Use the optimal network model obtained in step 7 as a test model, pass the speech to be tested into the model, and then determine whether the speech is a fraudulent speech; Furthermore, the preprocessing operation described in step 1 is to fill and truncate each audio sequence; if the sequence length is less than the specified length, a filling operation is performed; if the sequence length is greater than the specified length, a truncation operation is performed to make the lengths of these sequences consistent; Furthermore, in step 3, X is obtained r ,Y r ,X i ,Y i The calculation steps are as follows: 1) perform CQT calculations on x(n) and y(n) respectively to obtain two spectrograms, spectrogram X and spectrogram Y; 2) extract the real part X of spectrogram X r and the imaginary part X i , take out the real part Y of the spectrogram Y r and the imaginary part Y i ; Furthermore, the specific process of reconstructing the energy spectrum of the spectrogram X in step 4 is as follows: 1) first extracting the amplitude spectrum X of the spectrogram X mag ; 2) For the X in the amplitude spectrum mag Each element is squared to obtain the energy spectrum S; 3) the energy spectrum S is subjected to median filtering, that is, the gray value of each pixel in the energy spectrum is replaced by the median value of each point in a neighborhood of the point, thereby eliminating isolated noise points; 4) finally, the energy spectrum S is feature reconstructed to obtain an intermediate spectrogram; the one-dimensional Q-DCT derivation process in feature reconstruction is as follows: 1) The original CQT formula is: The windowed sound sequence is defined as x(n), where n=0, 1, ..., N. k -1, N k is the number of sampling points at the kth frequency; X(k) is the spectrum, and Q is the ratio of the center frequency to the bandwidth; Expand the sequence x(n) of length n to twice its original length, {x[-N k ],x[-N k +1],...,x[0],x[1],...,x[N k -1]}; where x'(m) ∈ {x[-N k , x[-N k + 1],..., x[0], x[1],..., x[N k - 1]}; 2) Shift the sequence x'(m) to the right by 12 to obtain: 3) For formula (3) Taking positive numbers, we get the following form: 4) Order Get the following form: From the above derivation process, we can see that the one-dimensional Q-DCT is as shown in formula (6): The two-dimensional Q-DCT is based on the one-dimensional Q-DCT, and then performs another Q-DCT. Therefore, the two-dimensional Q-DCT formula (7) is: in, and are the number of sampling points in the time domain and frequency domain respectively; the two-dimensional Q-DCT calculation is regarded as the energy spectrum S, which is multiplied by the matrix A on the left and the matrix B on the right, to obtain the new spectrogram X dct , that is, X dct =AX mag B; then X dct Perform the inverse transformation, that is, multiply A on the left -1 and right multiply B -1 , and get the intermediate spectrogram X1, that is, X1 = A -1 X dct B -1 ; Furthermore, in step 5, the group delay characteristics are calculated to obtain the GD spectrogram. The specific calculation formula is: Furthermore, in step 6, the group delay feature is normalized and logarithmic. The specific calculation process is as follows: 1) the elements in the GD spectrogram are normalized to obtain a new spectrogram MGD. The calculation formula is: 2) Find the largest element max in the MGD spectrogram, and then divide each element in the MGD spectrogram by the maximum value max in the spectrogram to get the new spectrogram MGDmax, that is 3) MGD of spectrogram max Take the logarithm and obtain the final feature RGD-CQT spectrogram.
