A voice detection method
By extracting the vocal tract and sound source wave features of speech, and using principal component analysis and inverse filters to construct a classifier, the problem of low generalization ability in existing fake speech detection systems is solved, and efficient fake speech detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2026-03-24
AI Technical Summary
Existing fake speech detection systems rely excessively on traditional manually designed features and deep neural networks, resulting in low model generalization ability and difficulty in deployment in real-world application scenarios.
By acquiring and preprocessing the target speech, extracting vocal tract and sound source wave features, using principal component analysis to select highly correlated features, and combining inverse filters and linear predictive coding, a classifier is constructed to detect forged speech.
It improves the model's generalization ability and efficiency, reduces feature redundancy, and achieves effective forged speech detection in real-world scenarios.
Smart Images

Figure CN116778910B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech detection, and more particularly to a speech detection method. Background Technology
[0002] With the continuous advancement of technology, speech technology has been widely applied, such as in speech recognition and speech synthesis. The rapid development of deep learning has introduced artificial intelligence techniques to improve performance in many tasks within the speech domain. However, the development of speech technology has also introduced some challenges. To address the significant threat of speech spoofing attacks, the development of forged speech detection systems has received considerable attention in recent years. Although many forged speech detection methods have been proposed, only a very small number have been implemented. Existing forged speech detection systems are not designed specifically for the characteristics of forged speech, resulting in low model generalization ability and difficulty in gaining public trust.
[0003] Current fake speech detection and authentication systems rely excessively on traditional manually designed features and the classification performance of deep neural networks. They are not designed specifically for the characteristics of fake speech, resulting in models that are closely related to the dataset, have poor generalization ability in real-world application scenarios, and are difficult to deploy in practice. Summary of the Invention
[0004] In a first aspect, embodiments of this application provide a speech detection method, the method comprising: acquiring target speech; preprocessing the target speech, the preprocessing including pre-emphasis, framing, and windowing; determining multiple first channel features of the preprocessed target speech; determining first sound source wave features of the preprocessed target speech; the first sound source wave features being extracted by an inverse filter; determining first principal component features based on the multiple first channel features and the first sound source wave features; inputting the first principal component features into a trained classifier, and outputting the classification result, the classification result being either fake speech or natural speech.
[0005] Therefore, the speech detection method proposed in this application utilizes the trace information left by the forged speech at the fundamental frequency, and leverages the differences in sound source and vocal tract features between forged speech and natural speech due to different generation processes to achieve forged speech detection. Simultaneously, principal component analysis is used to screen sound source and vocal tract features separately, selecting principal components with high correlation as features, reducing feature dimensionality and redundant features, and improving the model's generalization ability and efficiency.
[0006] In some implementable embodiments, the multiple first vocal tract features include the amplitude-frequency characteristics of the vocal tract filter and the amplitude-frequency characteristics of the inverse filter. Determining the multiple first vocal tract features of the preprocessed target speech includes: predicting the filter parameters of each frame of the preprocessed target speech using linear predictive coding; calculating and determining the amplitude-frequency characteristics of the vocal tract filter and the amplitude-frequency characteristics of the inverse filter based on the filter parameters of each frame.
[0007] Thus, the embodiments of the present application introduce various vocal tract-related features to enhance the generalization ability of the classifier.
[0008] In some implementable embodiments, the multiple first vocal tract features further include fundamental frequency features, fundamental frequency perturbation features, amplitude perturbation features, and Mel cepstral coefficients.
[0009] Thus, the embodiments of the present application introduce various vocal tract-related features to enhance the generalization ability of the classifier.
[0010] In some implementable embodiments, determining the first sound source wave feature of the preprocessed target speech includes: obtaining the short-time Fourier features of the framed target speech; performing inverse filtering on the short-time Fourier features through an inverse filter to obtain the first sound source wave feature of the preprocessed target speech.
[0011] Thus, the embodiments of the present application use the method of inverse filtering to separate the sound source features and vocal tract features, enabling the classifier to make decisions using the specific features introduced by the different generation mechanisms of forged speech and natural speech, making more full use of the information, and at the same time not introducing too many data preprocessing steps.
[0012] In some implementable embodiments, determining the first principal component feature based on the multiple first vocal tract features and the first sound source wave feature includes: concatenating the multiple first vocal tract features and the first sound source wave feature to obtain a first concatenated feature; the number of features of the first concatenated feature is n; de-centralizing each feature in the first concatenated feature; calculating the covariance matrix of the de-centralized first concatenated feature; performing eigenvalue decomposition on the covariance matrix to obtain multiple eigenvalues and corresponding eigenvectors; selecting the first k eigenvectors in descending order of the multiple eigenvalues to form a transformation matrix, where k < n; multiplying the first concatenated feature by the transformation matrix to obtain the first principal component feature.
[0013] Thus, the embodiments of the present application introduce principal component analysis during the feature concatenation process to achieve dimensionality reduction, select high-correlation features with higher contribution degrees to the task, reduce redundancy, and thus achieve efficiency improvement.
[0014] In some implementable embodiments, the method further includes the step of training a classifier: obtaining labeled training voices in a training set, preprocessing the training voices, and the preprocessing includes pre-emphasis, framing, and windowing; determining a plurality of second channel features of the preprocessed training voices; determining a second sound source wave feature of the preprocessed training voices; the second sound source wave feature is extracted by a channel inverse filter; determining second principal component features based on the plurality of second channel features and the second sound source wave feature; inputting the second principal component features into the classifier for iterative training, and obtaining a trained classifier when the loss function converges.
[0015] Thus, the classifier trained in the embodiments of the present application has a simple structure and good portability. Other beneficial effects are as described above and will not be elaborated here.
[0016] In some implementable embodiments, the plurality of second channel features include the amplitude-frequency characteristics of a channel filter and the amplitude-frequency characteristics of an inverse filter. Determining the plurality of second channel features of the preprocessed training voices includes: predicting filter parameters of each frame of the preprocessed training voices using linear predictive coding; calculating and determining the amplitude-frequency characteristics of the channel filter and the amplitude-frequency characteristics of the inverse filter according to the filter parameters of each frame of the training voices.
[0017] In some implementable embodiments, the plurality of second channel features further include fundamental frequency features, fundamental frequency perturbation features, amplitude perturbation features, and mel cepstral coefficients.
[0018] In some implementable embodiments, determining the second sound source wave feature of the preprocessed training voices includes: obtaining short-time Fourier features of the framed training voices; performing inverse filtering on the short-time Fourier features through an inverse filter to obtain the second sound source wave feature of the preprocessed training voices.
[0019] In some implementable embodiments, determining the second principal component features based on the plurality of second channel features and the second sound source wave feature includes: splicing the plurality of second channel features and the second sound source wave feature to obtain a second spliced feature; the number of features of the second spliced feature is n; de-centralizing each feature in the second spliced feature; calculating the covariance matrix of the de-centralized second spliced feature; performing eigenvalue decomposition on the covariance matrix to obtain n eigenvalues and corresponding eigenvectors; selecting the first k eigenvectors in descending order of the plurality of eigenvalues to form a transformation matrix, where k < n; multiplying the second spliced feature by the transformation matrix to obtain the second principal component features.
[0020] In a second aspect, embodiments of the present application provide an electronic device, including: at least one memory for storing programs;
[0021] At least one processor is configured to execute a program stored in the memory, wherein, when the program stored in the memory is executed, the processor is configured to perform the method as described in any one of the first aspects.
[0022] Thirdly, embodiments of this application provide a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the method provided in the first aspect. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the various embodiments disclosed in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only a few embodiments disclosed in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] The accompanying drawings used in the description of the embodiments or prior art are briefly introduced below.
[0025] Figure 1 This is a system architecture diagram of a speech detection method provided in an embodiment of this application;
[0026] Figure 2 This is a flowchart of a speech detection method provided in an embodiment of this application;
[0027] Figure 3 This is a training flowchart of a speech detection method provided in an embodiment of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings.
[0029] In the description of the embodiments of this application, the words "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the words "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a specific manner.
[0030] In the description of the embodiments in this application, the term "and / or" is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, B existing alone, and A and B existing simultaneously. Furthermore, unless otherwise stated, the term "multiple" means two or more. For example, multiple systems refer to two or more systems, and multiple terminals refer to two or more terminals.
[0031] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.
[0032] In the description of the embodiments in this application, "some embodiments" are mentioned, which describe a subset of all possible embodiments. However, it is understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0033] In the description of the embodiments of this application, the terms "first, second, third, etc." or module A, module B, module C, etc. are used only to distinguish similar objects and do not represent a specific ordering of objects. It is understood that, where permitted, a specific order or sequence can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0034] In the description of the embodiments of this application, the reference numerals for the steps, such as S110, S120, etc., do not necessarily indicate that the steps will be executed in this manner. Where permissible, the order of the steps can be interchanged or executed simultaneously.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0036] Figure 1 This is a system architecture diagram of a speech detection method provided in an embodiment of this application. Figure 1As shown, the speech preprocessing module 11 first preprocesses the target speech, which can be either real or fabricated speech; preprocessing includes pre-emphasis, framing, and windowing. The vocal tract feature extraction module 121 uses Linear Predictive Coding (LPC) to extract the coefficients of the vocal tract filter for each frame of the target speech signal, and estimates the amplitude-frequency characteristics of the vocal tract filter and its inverse filter based on these coefficients to obtain the vocal tract features. The sound source wave feature extraction module 122 calculates the short-time Fourier transform (STFT) spectrum for each preprocessed frame of the speech signal, and uses the inverse vocal tract filter to inversely filter the STFT spectrum to obtain the sound source wave features. The sound source and vocal tract correlation feature extraction module 123 extracts the fundamental frequency features, fundamental frequency perturbation features, Mel-frequency cepstral coefficients (MFCC), and other correlation features for each preprocessed frame of the speech signal. Principal component determination module 13 concatenates relevant features such as vocal tract features, sound source wave features, fundamental frequency features, fundamental frequency perturbation features, and Mel-frequency cepstral coefficients (MFCCs), and uses principal component analysis (PCA) to remove redundant features, obtaining highly correlated principal component features. Classification module 14 inputs the principal component features into a classifier for binary classification, outputting either natural speech or forged speech. This application provides a speech detection method that, for speech difficult to distinguish between genuine and forged speech, fully utilizes the differences at the sound source and vocal tract to achieve forged speech recognition with generalizability in practical applications; it also leverages the feature selection capability of principal component analysis to reduce redundancy and improve efficiency.
[0037] Figure 2 This is a schematic diagram of a speech detection method provided in an embodiment of this application. Figure 2 As shown, the speech detection method includes: S11, acquiring the target speech and preprocessing it, including pre-emphasis, framing, and windowing; S12, determining the first tract feature, the first source wave feature, and multiple first correlation features of the preprocessed target speech; S14, determining the first principal component feature based on the first tract feature, the first source wave feature, and multiple first correlation features; S15, inputting the first principal component feature into a trained classifier and outputting the classification result, which is either fake speech or natural speech.
[0038] The steps of the speech detection method provided in this application will be described in detail below with reference to the embodiments.
[0039] S11, acquire the target speech, and preprocess the target speech, including pre-emphasis, framing, and windowing.
[0040] Since the high-frequency part of speech usually has a smaller amplitude compared to the lower-frequency part, pre-emphasis can balance the spectrum, avoid numerical problems during Fourier transform operations, improve the signal-to-noise ratio (SNR), eliminate the effects of the vocal cords and lips during phonation, compensate for the high-frequency part of the speech signal suppressed by the articulation system, and highlight the high-frequency formants.
[0041] In this embodiment, a high-pass filter can be used to pre-emphasize the target speech. The pre-emphasized speech signal y(n) is:
[0042] y(n)=x(n)-0.79·x(n-1) (1)
[0043] Where x(n) represents the nth frame of the target speech signal, and x(n-1) represents the (n-1)th frame of the target speech signal.
[0044] In most cases, speech signals are non-stationary, making a Fourier transform of the entire signal meaningless. Therefore, a Fourier transform can be performed on short time frames, and a good approximation of the signal's time-frequency transformation can be obtained by connecting adjacent frames.
[0045] In the embodiments of this application, after pre-emphasis, the target speech is divided into multiple short frames, each of which is a short-term stable speech signal.
[0046] For example, the frame length can be set to 25ms, the frame shift can be set to 10ms, and the original speech is divided into multiple speech frames to calculate short-time frequency features.
[0047] After segmenting the target speech into multiple short-time frames, each frame is multiplied by a window function to increase the continuity at the left and right ends of the frame and reduce spectral leakage. The window function can be a Hamming window, and the formula for the window function w(n) is:
[0048]
[0049] Where N represents the number of sampling points within the window.
[0050] S12, determine the first tract features, first source wave features and multiple first correlation features of the preprocessed target speech.
[0051] The following sections introduce the first tract features, first source wave features, and various first correlation features of the target speech.
[0052] S121, Determine the first tract features of the preprocessed target speech.
[0053] The first channel features include the amplitude-frequency characteristics of the channel filter and the amplitude-frequency characteristics of the inverse filter. The channel filter parameters of each frame of the preprocessed target speech can be predicted using linear predictive coding (LPC). The amplitude-frequency characteristics of the channel filter and the amplitude-frequency characteristics of the inverse filter of each frame of the target speech are calculated based on the filter parameters of each frame.
[0054] In this embodiment, the zeros and poles of the vocal tract filter under the z-transform of each frame of speech can be calculated using Linear Predictive Coding (LPC), and the amplitude-frequency characteristics of the vocal tract filter can be determined based on these zeros and poles. Further, for each frame of the target speech, the zeros and poles of the vocal tract filter are interchanged to obtain the inverse vocal tract filter. The amplitude-frequency characteristics of the inverse filter are calculated based on the interchanged zeros and poles.
[0055] S122, Determine the first sound source wave feature of the preprocessed target speech; the first sound source wave feature is obtained by multiplying the amplitude-frequency characteristics of the inverse filter with the original speech in the frequency domain and then filtering out the vocal tract features.
[0056] In this embodiment of the application, the short-time Fourier features of each frame of the target speech are obtained; the short-time Fourier features are inversely filtered by an inverse filter to obtain the first sound source wave features.
[0057] S123, determine multiple first-relevance features of the preprocessed target speech, including Mel-frequency cepstral coefficients, fundamental frequency features, fundamental frequency perturbation features, and amplitude perturbation features.
[0058] Among them, the Mel cepstral coefficients are obtained by filtering the short-time Fourier spectrum of each frame of the target speech using a Mel filter bank to obtain the Mel spectral features (fbank).
[0059] Specifically, after windowing each frame of the target speech using the Short-Time Fourier Transform (SFT), time-frequency analysis is performed, and then the logarithmic amplitude spectrum is obtained to produce a spectrogram. The SFT is defined as follows:
[0060]
[0061] Where x(τ) is a single-frame speech signal, h(τ-t) is the analysis window function, and τ is the offset.
[0062] The spectrogram is filtered through an 80-dimensional Mel filter bank to obtain Mel spectrum features.
[0063] The Mel filter bank mimics the human auditory perception system, exhibiting varying sensitivities to different frequency signals. The Mel filter bank is not uniformly distributed along the frequency axis; it is densely distributed in the low-frequency region and sparsely distributed in the high-frequency region. Therefore, the Mel filter bank can simulate the non-linear perception of sound by the human ear, demonstrating greater discriminative power at lower frequencies and lower resolution at higher frequencies. Mel frequency f mel The formula for converting to linear frequency f is:
[0064]
[0065] The Mel filter bank can be calculated using this formula. By sequentially multiplying and summing the results of each filter in the filter bank with the short-time Fourier spectrum (STFT), the characteristics of the Mel filter bank are obtained. Cepstral analysis of the calculated Mel filter bank characteristics yields the final Mel cepstral (MFCC) characteristics.
[0066] Cepstral analysis extracts the envelope of the spectral spectrum; in the time-frequency features of speech, this translates to extracting formant features, or vocal tract features. Discrete cosine transform (DCT) can be used to perform cepstral analysis on fbank features to obtain Mel-frequency cepstral coefficients (MFCCs). i :
[0067]
[0068] Where S j It is the output value of the j-th filter in fbank, MFCC i is the Mel cepstral coefficient of the i-th Mel filter, and N is the number of Mel filter banks.
[0069] The fundamental frequency feature F0 is a feature obtained by calculating the fundamental frequency period of each frame of the signal.
[0070] Fundamental frequency perturbation characteristics are features that characterize the non-periodic variation of the fundamental frequency perturbation. Fundamental frequency perturbation is a measure of the change in fundamental frequency between adjacent cycles, expressed as a percentage (%). The formula for fundamental frequency perturbation jitter is:
[0071]
[0072] Where F0 is the fundamental frequency of each speech frame, and J is the number of gene cycles in each speech frame.
[0073] Amplitude perturbation is a feature that characterizes the non-periodic variation of amplitude perturbation. Amplitude perturbation is a measure of the change in amplitude between adjacent periods of a speech signal, and it is expressed in decibels (dB).
[0074] The formula for the amplitude perturbation Shimmer is:
[0075]
[0076] Where A is the interpeak amplitude of each fundamental tone period, and L is the number of amplitudes.
[0077] The aforementioned first tract feature, first source feature, and various first correlation features all characterize the source and tract information of speech, and these features indicate the differences between forged speech and real speech in the generation process.
[0078] In this application's embodiments, various relevant features were obtained during the speech feature extraction process. However, too many features contain redundant information, which affects the model's generalization ability and computational speed. Therefore, it is necessary to filter the features to obtain those with higher relevance to the speech authentication task.
[0079] S13, determine the first principal component features based on the first channel features, the first sound source wave features, and multiple first correlation features.
[0080] This application embodiment uses principal component analysis (PCA) to screen multiple first channel features and first sound source wave features, including the following steps:
[0081] S131, the first spliced feature is obtained by splicing the first channel feature, the first source wave feature, and multiple first correlation features; the number of spliced features is n.
[0082] In this embodiment of the application, n features, including the amplitude-frequency characteristics of the vocal tract filter, the amplitude-frequency characteristics of the inverse filter, the fundamental frequency characteristics, the fundamental frequency perturbation characteristics, the amplitude perturbation characteristics, the Mel-frequency cepstral coefficients, and the first sound source wave characteristics of each frame of the target speech, are spliced together to obtain the first spliced feature.
[0083] S132, decentralize each feature in the spliced features.
[0084] In this embodiment of the application, decentralization includes subtracting the mean of that dimension from each feature in the first splicing feature.
[0085] S133, calculate the covariance matrix based on the decentralized first splicing feature.
[0086] S134, perform eigenvalue decomposition on the covariance matrix to obtain multiple first eigenvalues and corresponding first eigenvectors.
[0087] S135, select the first k eigenvectors in descending order of eigenvalues to form the first transformation matrix, where k is the number of features after dimensionality reduction. <n。
[0088] S136, multiply the first concatenation feature by the first transformation matrix to obtain the first principal component feature.
[0089] Among them, the first principal component feature is the highly correlated feature after dimensionality reduction.
[0090] In the embodiments of this application, the principal component feature analysis process can project high-dimensional features onto low-dimensional features and retain features that are highly relevant to the task to the greatest extent possible.
[0091] S14: Input the first principal component features into the trained classifier and output the classification result, which is either fake speech or natural speech.
[0092] The speech detection method provided in this application embodiment also includes the step of training a classifier.
[0093] Figure 3 This is a flowchart illustrating the training of a classifier in the speech detection method provided in this application embodiment. Figure 3 As shown, the classifier training process includes: S31, acquiring labeled training speech from the training set, and preprocessing the training speech, including pre-emphasis, frame segmentation, and windowing. S32, determining the second tract features, second source wave features, and multiple second correlation features of the preprocessed training speech. S34, determining the second principal component features based on the second tract features, second source wave features, and multiple second correlation features of the training speech. S35, inputting the second principal component features into the classifier for iterative training, obtaining the trained classifier when the loss function converges.
[0094] The following section provides a detailed explanation of each step in training the classifier.
[0095] S31, Obtain labeled training speech from the training set, and preprocess the training speech, including pre-emphasis, frame segmentation, and windowing.
[0096] The implementation methods for pre-emphasis, framing, and windowing can be referred to the implementation method of step S11, and will not be repeated here.
[0097] S32, determine the second tract features, second source wave features and multiple second correlation features of the preprocessed training speech.
[0098] The second tract features, second source wave features, and several second correlation features of the training speech are introduced below.
[0099] S321, Determine the second tract features of the preprocessed training speech.
[0100] The second tract features include the amplitude-frequency characteristics of the tract filters and the inverse filters of the training speech. The filter parameters of each frame of the preprocessed training speech can be predicted using the linear predictive coding (LPC) method. The amplitude-frequency characteristics of the tract filters and the inverse filters of each frame of the training speech are calculated based on the filter parameters of each frame of the training speech.
[0101] The relationship between the amplitude-frequency characteristics of the inverse filter and the amplitude-frequency characteristics of the filter for each frame of the training speech, as well as the calculation method, can be found in step S121, and will not be repeated here.
[0102] S322, Determine the second sound source wave feature of the preprocessed training speech; the second sound source wave feature is the sound source wave feature obtained by multiplying the amplitude-frequency characteristics of the inverse filter of the training speech with the original speech in the frequency domain and then filtering out the vocal tract features.
[0103] S323, determine various second correlation features of the preprocessed training speech, including Mel-frequency cepstral coefficients, fundamental frequency features, fundamental frequency perturbation features, and amplitude perturbation features.
[0104] The various relevant features and calculation methods for each frame of the training speech can be found in step S123, and will not be repeated here.
[0105] The second tract feature, second source feature, and various related features of the training speech all characterize the source and tract information of the training speech. These features indicate the differences between the fake speech and the real speech in the generation process.
[0106] Similarly, in the process of extracting features from training speech, many sound source and vocal tract related features were obtained in the embodiments of this application. Too many features contain redundant information, which affects the generalization of the model and the computation speed. These features need to be screened to obtain features that are more relevant to the speech authentication task.
[0107] S33, the second principal component features are determined based on the features of the second channel, the features of the second sound source, and multiple related features.
[0108] This application embodiment uses principal component analysis (PCA) to screen second channel features, second sound source features, and various related features, including the following steps:
[0109] S331, the second spliced feature is obtained by splicing the second channel feature, the second sound source feature and multiple related features; the number of features of the second spliced feature is n.
[0110] In this embodiment of the application, n features, including the amplitude-frequency characteristics of the filter, the amplitude-frequency characteristics of the inverse filter, the fundamental frequency features, the fundamental frequency perturbation features, the amplitude perturbation features, the Mel-frequency cepstral coefficients, and the second sound source features of each frame of the training speech, are concatenated to obtain the second concatenated feature.
[0111] S332, decenter each feature in the second concatenation feature.
[0112] In this embodiment of the application, decentralization includes subtracting the mean of that dimension from each feature in the second splicing feature.
[0113] S333, based on the decentralized second concatenation feature, calculate the covariance matrix.
[0114] S334, perform eigenvalue decomposition on the covariance matrix to obtain multiple second eigenvalues and corresponding second eigenvectors.
[0115] S335, select the first k second eigenvectors in descending order of the multiple second eigenvalues to form the second transformation matrix, where k is the dimension number after dimensionality reduction. <n。
[0116] S336, multiply the second concatenation feature by the second transformation matrix to obtain the second principal component feature. The second principal component feature is the highly correlated feature after dimensionality reduction.
[0117] S34. Input the second principal component features into the classifier and perform iterative training. If the loss function converges, the trained classifier is obtained.
[0118] In this embodiment, the classifier used is a hidden layer feature extractor, which has a residual network (ResNet) with an excitation squeeze module (SE-block).
[0119] Residual networks are a variant of convolutional neural networks (CNNs) that address the degradation problem caused by increasing network depth by adding residual connections between convolutional layers. Each residual module typically contains multiple layers, which can be components of any neural network, giving residual networks good scalability. After the input x of the residual module undergoes forward computation F(x), the original input (without forward computation) is added to the output, forming a short-circuit connection. This computational method ensures that even if the forward computation is zero, the residual module is equivalent to performing an identity mapping, guaranteeing that network performance does not degrade. Residual modules allow convolutional neural networks to avoid degradation by increasing the number of layers, resulting in better performance for deep neural networks.
[0120] The squeeze activation module is an extension module of convolutional neural networks that explicitly models the dependencies between feature channels, improving system performance from a channel perspective. The squeeze activation module first squeezes the input feature map by using a global average pooling layer to compress the spatial dimension, transforming each two-dimensional feature channel into a real number with a global receptive field. Then, it activates the output one-dimensional channel features, generating weights for each feature channel through parameters, explicitly modeling the correlations between feature channels. Finally, the calculated weights are reweighted back into the initial two-dimensional channel features, completing the recalibration of the original features in the channel dimension.
[0121] The hidden features extracted by the hidden layer feature extractor are then subjected to binary classification by a linear layer to obtain the final fake speech detection result.
[0122] In this embodiment, the classifier is trained using the Adam optimizer and the additive angular margin softmax loss (AAM-Softmax). The formula for calculating the AAM-Softmax loss function is as follows:
[0123]
[0124] In the formula, m is the boundary value, and m = 0.2, and s = 40 is the scale parameter. i It is the embedded feature of the input. It is the weight matrix, y i This represents the label information carried by the speech, where c is the number of categories (2 in this case), and N is the number of speech segments in the training dataset. The optimizer parameters are: β1 = 0.9, β2 = 0.999, ∈ = 10. -8 The weight decays to 10. -4 .
[0125] The speech detection method provided in this application is applied to electronic devices that deploy and configure the PyTorch runtime environment.
[0126] The speech detection method provided in this application uses inverse filtering to separate sound source features and vocal tract features. By taking advantage of the different generation mechanisms of fake speech and natural speech, the classifier can incorporate information from specific features, making full use of the analysis of specific features. At the same time, it does not require too many data preprocessing steps, consumes fewer resources, and saves training time.
[0127] The speech detection method provided in this application introduces various sound source and vocal tract-related features to enhance the generalization ability of the model.
[0128] The speech detection method provided in this application introduces principal component analysis during feature concatenation to achieve dimensionality reduction and select highly relevant features that contribute more to the task. This reduces redundancy and improves efficiency.
[0129] The speech detection method provided in this application has a simple structure, good portability, and the classifier used can be other binary classification convolutional neural networks.
[0130] This application provides an electronic device, including: at least one memory for storing a program; and at least one processor for executing the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the speech detection method.
[0131] This application provides a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the speech detection method.
[0132] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0133] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0134] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0135] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
Claims
1. A speech detection method, characterized in that, The method includes: The target speech is acquired and preprocessed, including pre-emphasis, framing, and windowing. The determination of the first channel feature, first source wave feature, and multiple first correlation features of the preprocessed target speech includes: predicting the filter parameters of each frame of the preprocessed target speech using linear predictive coding; calculating and determining the amplitude-frequency characteristics of the channel filter and the inverse filter based on the filter parameters of each frame to obtain the first channel feature of the preprocessed target speech; the first channel feature includes the amplitude-frequency characteristics of the channel filter and the inverse filter; determining the multiple first correlation features, including fundamental frequency features, fundamental frequency perturbation features, amplitude perturbation features, and Mel-frequency cepstral coefficients; obtaining the short-time Fourier features of the framed target speech; and performing inverse filtering on the short-time Fourier features using an inverse filter to obtain the first source wave feature of the preprocessed target speech. The first principal component features are determined based on the first acoustic tract features, the first sound source wave features, and multiple first correlation features; The first principal component features are input into the trained classifier, and the classification result is output as either fake speech or natural speech.
2. The method according to claim 1, characterized in that, The determination of the first principal component features based on the first acoustic channel features, the first acoustic source wave features, and multiple first correlation features includes: The first spliced feature is obtained by splicing the first channel feature, the first source wave feature, and multiple first correlation features; the number of features in the first spliced feature is n; Decentralize each feature in the first concatenated feature; calculate the covariance matrix of the decentralized first concatenated feature; The covariance matrix is decomposed into eigenvalues to obtain multiple eigenvalues and corresponding eigenvectors; Based on the plurality of eigenvalues in descending order, the first k eigenvectors are selected to form a transformation matrix, where k <n; The first concatenated feature is multiplied by the transformation matrix to obtain the first principal component feature.
3. The method according to claim 2, characterized in that, The method also includes the step of training a classifier: Obtain labeled training speech from the training set, and preprocess the training speech, including pre-emphasis, frame segmentation, and windowing. Determine the second tract features, second source wave features, and multiple second correlation features of the preprocessed training speech; The second principal component features are determined based on the second tract features, the second source wave features, and multiple second correlation features of the training speech; The second principal component features are input into the classifier for iterative training, and the trained classifier is obtained when the loss function converges.
4. The method according to claim 3, characterized in that, The second channel feature includes the amplitude-frequency characteristics of the channel filter and the amplitude-frequency characteristics of the inverse filter. Determining the second channel feature of the preprocessed training speech includes: Linear predictive coding is used to predict the filter parameters for each frame of the preprocessed training speech; The amplitude-frequency characteristics of the vocal tract filter and the amplitude-frequency characteristics of the inverse filter are calculated and determined based on the filter parameters of each frame of the training speech.
5. The method according to claim 3, characterized in that, The multiple second correlation features also include the fundamental frequency feature, fundamental frequency perturbation feature, amplitude perturbation feature, and Mel-frequency cepstral coefficients for each frame of the training speech.
6. The method according to claim 3, characterized in that, The determination of the second tract features, second source wave features, and multiple second correlation features of the preprocessed training speech includes: Obtain the short-time Fourier features of the framed training speech; The short-time Fourier features are inversely filtered by the inverse filter to obtain the second sound source wave features of the preprocessed training speech.
7. The method according to claim 3, characterized in that, The determination of the second principal component features based on the second tract feature, the second source wave feature, and multiple second correlation features of the training speech includes: The second concatenated feature is obtained by concatenating the second tract feature, the second source wave feature, and multiple second correlation features of the training speech; the number of features in the second concatenated feature is n. Decentralize each feature in the second concatenated features; calculate the covariance matrix of the decentralized second concatenated features; The covariance matrix is decomposed into eigenvalues to obtain n eigenvalues and corresponding eigenvectors; Based on the plurality of eigenvalues in descending order, the first k eigenvectors are selected to form a transformation matrix, where k <n; The second concatenation feature is multiplied by the transformation matrix to obtain the second principal component feature.
Citation Information
Patent Citations
Voice authenticity verification method and device, electronic equipment and readable storage medium
CN112992126A
Refining of segmental boundaries in speech waveforms using contextual-dependent models
US20050228664A1