Speech signal processing method, device and equipment

By acquiring and processing the statistical feature vectors of the voice signal, the target category of the voice signal is directly determined, which solves the problem of degradation of the detection accuracy of recording and playback attacks, and achieves efficient and accurate recording and playback detection.

CN111292754BActive Publication Date: 2025-03-25SHENZHEN MESAITU TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010096100.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-17
Publication Date
2025-03-25
Estimated Expiration
2040-02-17

AI Technical Summary

Technical Problem

In the prior art, when preventing recording and replay attacks, especially when the user has a serious accent or has special pronunciation habits, the accuracy of voice content recognition decreases, resulting in a decrease in the accuracy of recording and replay voice signal detection.

Method used

By obtaining the first statistical feature vector of the to-process speech signal and inputting it into the model for processing, the second statistical feature vector is obtained to determine the target category of the speech signal. This method does not rely on the detection of speech signal content and directly classifies the statistical characteristics of speech signal.

Benefits of technology

It improves the accuracy of recording and playback signal detection, reduces dependence on voice signal content detection, improves detection efficiency, and is suitable for users with different accents and pronunciation habits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111292754B_ABST
    Figure CN111292754B_ABST
Patent Text Reader

Abstract

The present invention provides a speech signal processing method, device and equipment, wherein the method comprises: obtaining a first statistical feature vector corresponding to a speech signal to be processed, the first statistical feature vector is used to represent the statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, wherein M is an integer greater than 1; inputting the first statistical feature vector into a first model for processing to obtain a second statistical feature vector, wherein the first model is used to process the first statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space; and determining the target category of the speech signal to be processed according to the second statistical feature vector, wherein the target category includes an original speech signal or a recorded and played back speech signal. This technical solution can improve the accuracy of recording and playing back signal detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing, and in particular to a method, device and equipment for processing speech signals. Background Art

[0002] In recent years, voiceprint recognition technology has been widely used in the field of remote unsupervised identity authentication. However, there are also many security risks in its use. For example, the most common attack method faced by voiceprint recognition systems is to record the voice of the speaker and then replay the recording. Recording replay attack is a technical method that uses high-fidelity recording equipment to record the voice of the target person, and then uses the recorded voice signal to crack the voiceprint authentication system. The voice of the voice replay attack comes from the speaker himself, so it is more authentic. This attack will pose a greater threat to the security of the system.

[0003] Currently, in order to avoid recording playback attacks, when users perform voiceprint verification, the system will specify the text sentences that users need to recite, and when performing voiceprint verification, voice content recognition is used to perform recording playback detection. However, when users have a strong accent or have their own special pronunciation habits, the accuracy of voice content recognition drops significantly, reducing the accuracy of recording playback voice signal detection. Summary of the invention

[0004] The embodiments of the present invention provide a speech signal processing method, apparatus and device, which can improve the accuracy of recording and playback signal detection, and do not need to detect the content of the speech signal, thereby improving the detection efficiency.

[0005] In a first aspect, a speech signal processing method is provided, comprising:

[0006] Acquire a first statistical feature vector corresponding to the speech signal to be processed, where the first statistical feature vector is used to represent the statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, where M is an integer greater than 1;

[0007] Inputting the first statistical feature vector into a first model for processing to obtain a second statistical feature vector, wherein the first model is used to process the first statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space;

[0008] A target category of the speech signal to be processed is determined according to the second statistical feature vector, where the target category includes an original speech signal or a recorded and played back speech signal.

[0009] In combination with the first aspect, in a possible implementation method, obtaining the first statistical feature vector corresponding to the speech signal to be processed includes: dividing the speech signal to be processed into N speech frames, where N is an integer greater than or equal to 1; obtaining the first feature vector of each speech frame in the N speech frames, the first feature vector being used to represent the feature value of each dimension of the speech frame in the M-dimensional feature space; for each dimension of the feature space in the M-dimensional feature space, calculating the statistical value corresponding to the dimension of the feature space, the statistical value being the statistical value of the N speech frames in the dimension of the feature space; and constructing the first statistical feature vector corresponding to the speech signal to be processed according to the statistical value corresponding to each dimension of the feature space in the M-dimensional feature space.

[0010] In combination with the first aspect, in a possible implementation, the first statistical feature vector includes a first mean vector and / or a first standard deviation vector, the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

[0011] In combination with the first aspect, in a possible implementation method, if the first statistical feature vector includes the first mean vector and the first standard deviation vector; the second statistical feature vector includes a second mean vector and a second standard deviation vector, the second mean vector is obtained based on the first mean vector and the first model, and the second standard deviation vector is obtained based on the first standard vector and the first model; determining the target category of the speech signal to be processed based on the second statistical feature vector includes: constructing a third statistical feature vector based on the second mean vector and the second standard deviation vector; determining the target category of the speech signal to be processed based on the third statistical feature vector.

[0012] In combination with the first aspect, in a possible implementation method, before obtaining the first statistical feature vector corresponding to the speech signal to be processed, it also includes: obtaining a first sample statistical feature vector corresponding to the first sample speech signal, the first sample statistical feature vector is used to represent the statistical value of the first sample speech signal in each dimension of the M-dimensional feature space, the M is an integer greater than 1, and the first sample speech signal is a recorded playback speech signal or an original speech signal; inputting the first sample statistical feature vector into the first model for processing to obtain a second sample statistical feature vector; calculating the first loss of the first model based on the second sample statistical feature vector; and training the first model based on the first loss.

[0013] In combination with the first aspect, in a possible implementation method, before obtaining the first statistical feature vector corresponding to the speech signal to be processed, it also includes: obtaining a first speech signal, wherein the first speech signal is a recorded and reproduced speech signal; obtaining a second feature vector of the first speech signal, and inputting the second feature vector into a coding model for coding processing to obtain a fourth statistical feature vector, wherein the fourth statistical feature vector is used to represent the statistical characteristics of the first speech signal; constructing a first latent vector based on the fourth statistical feature vector, and inputting the first latent vector into a decoding model for decoding processing to obtain a third feature vector, wherein the similarity between the second speech signal generated by the third feature vector and the first speech signal meets the target condition; if the first sample speech signal is a recorded and reproduced speech signal, then the first sample speech signal is the first speech signal or the second speech signal.

[0014] In combination with the first aspect, in a possible implementation method, before obtaining the first speech signal, it also includes: obtaining a first sample feature vector corresponding to the second sample speech signal; inputting the first sample feature vector into the encoding model for encoding processing to obtain a third sample statistical feature vector, and the third sample statistical feature vector is used to represent the statistical characteristics of the second sample speech signal; determining a second loss based on the third sample statistical feature vector and a standard normal distribution function; constructing a first sample latent vector based on the third sample statistical feature vector, and inputting the first sample latent vector into the decoding model for decoding processing to obtain a second sample feature vector; determining a third loss based on the first sample feature vector and the second sample feature vector; and training the encoding model and the decoding model based on the second loss and the third loss.

[0015] In a second aspect, a speech signal processing device is provided, comprising:

[0016] A first feature acquisition module, used to acquire a first statistical feature vector corresponding to the speech signal to be processed, wherein the first statistical feature vector is used to represent the statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, where M is an integer greater than 1;

[0017] A second feature acquisition module, used for inputting the first statistical feature vector into a first model for processing to obtain a second statistical feature vector, wherein the first model is used for processing the first statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space;

[0018] The target category determination module is used to determine the target category of the speech signal to be processed according to the second statistical feature vector, and the target category includes an original speech signal or a recorded and played back speech signal.

[0019] In combination with the second aspect, in a possible implementation method, a first feature acquisition module is used to: divide the speech signal to be processed into N speech frames, where N is an integer greater than or equal to 1; obtain a first feature vector of each speech frame in the N speech frames, and the first feature vector is used to represent the feature value of each dimension of the speech frame in the M-dimensional feature space; for each dimension of the feature space in the M-dimensional feature space, calculate the statistical value corresponding to the dimension of the feature space, and the statistical value is the statistical value of the N speech frames in the dimension of the feature space; according to the statistical value corresponding to each dimension of the feature space in the M-dimensional feature space, construct a first statistical feature vector corresponding to the speech signal to be processed.

[0020] In combination with the second aspect, in a possible implementation, the first statistical feature vector includes a first mean vector and / or a first standard deviation vector, the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

[0021] In combination with the second aspect, in a possible implementation method, if the first statistical feature vector includes the first mean vector and the first standard deviation vector; the second statistical feature vector includes a second mean vector and a second standard deviation vector, the second mean vector is obtained based on the first mean vector and the first model, and the second standard deviation vector is obtained based on the first standard vector and the first model; the target category determination module is also used to construct a third statistical feature vector based on the second mean vector and the second standard deviation vector; and determine the target category of the speech signal to be processed based on the third statistical feature vector.

[0022] In combination with the second aspect, in a possible implementation method, the device also includes: a first model training module, used to obtain a first sample statistical feature vector corresponding to a first sample speech signal, the first sample statistical feature vector is used to represent the statistical value of the first sample speech signal in each dimension of the M-dimensional feature space, the M is an integer greater than 1, and the first sample speech signal is a recorded playback speech signal or an original speech signal; the first model training module is also used to input the first sample statistical feature vector into the first model for processing to obtain a second sample statistical feature vector; according to the second sample statistical feature vector, calculate the first loss of the first model; according to the first loss, train the first model.

[0023] In combination with the second aspect, in a possible implementation method, the device also includes: a speech signal acquisition module, used to acquire a first speech signal, the first speech signal is a recorded and played back speech signal; obtain a second feature vector of the first speech signal, and input the second feature vector into a coding model for encoding processing to obtain a fourth statistical feature vector, the fourth statistical feature vector is used to represent the statistical characteristics of the first speech signal; construct a first latent vector according to the fourth statistical feature vector, and input the first latent vector into a decoding model for decoding processing to obtain a third feature vector, wherein the similarity between the second speech signal generated by the third feature vector and the first speech signal meets the target condition; if the first sample speech signal is a recorded and played back speech signal, then the first sample speech signal is the first speech signal or the second speech signal.

[0024] In combination with the second aspect, in a possible implementation method, the device also includes: a second model training module, used to obtain a first sample feature vector corresponding to a second sample speech signal; input the first sample feature vector into the encoding model for encoding processing to obtain a third sample statistical feature vector, and the third sample statistical feature vector is used to represent the statistical characteristics of the second sample speech signal; determine the second loss based on the third sample statistical feature vector and the standard normal distribution function; construct a first sample latent vector based on the third sample statistical feature vector, and input the first sample latent vector into the decoding model for decoding processing to obtain a second sample feature vector; determine a third loss based on the first sample feature vector and the second sample feature vector; train the encoding model and the decoding model based on the second loss and the third loss.

[0025] In a third aspect, a speech signal processing device is provided, comprising a processor, a memory, and an input / output interface, wherein the processor, the memory, and the input / output interface are interconnected, wherein the input / output interface is used to input or output data, the memory is used to store application code for the speech signal processing device to execute the above method, and the processor is configured to execute the method of the first aspect.

[0026] According to a fourth aspect, a computer storage medium is provided, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method according to the first aspect.

[0027] In an embodiment of the present invention, a first statistical feature vector corresponding to a speech signal to be processed is obtained, the first statistical feature vector is input into a first model for processing, a second statistical feature vector is obtained, and a target category of the speech signal to be processed is determined according to the second statistical feature vector, thereby determining whether the speech signal to be processed is an original speech signal or a recorded playback speech signal. Since the first statistical feature vector is processed according to the importance of each dimension of the feature space in the M-dimensional feature space, the statistical features of each dimension of the feature space in the M-dimensional feature space are enhanced, and the statistical features of the speech signal to be processed can be more accurately reflected, thereby accurately determining the target category of the speech signal to be processed, improving the accuracy of recorded playback detection, and there is no need to detect the content of the speech signal to be processed, thereby improving detection efficiency and having strong applicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 It is a flow chart of a method for processing a speech signal provided by an embodiment of the present invention;

[0030] Figure 2 is a flow chart of another speech signal processing method provided by an embodiment of the present invention;

[0031] Figure 3 is a schematic diagram of training a first model provided by an embodiment of the present invention;

[0032] Figure 4 is a flow chart of another speech signal processing method provided by an embodiment of the present invention;

[0033] Figure 5 is a schematic diagram of a training encoding model and a decoding model provided by an embodiment of the present invention;

[0034] Figure 6 It is a schematic diagram of the structure of a speech signal processing device provided by an embodiment of the present invention;

[0035] Figure 7 The present invention provides a schematic diagram of the structure of a speech signal processing device. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] The scheme of the embodiment of the present invention is applicable to a scenario in which a speech signal is processed to determine whether the target category to which the speech signal belongs is a recorded and played back speech signal category. The scheme is applied to a scenario in which a first statistical feature vector corresponding to the speech signal to be processed is obtained, the first statistical feature vector is input into a first model for processing, a second statistical feature vector is obtained, and the target category of the speech signal to be processed is determined according to the second statistical feature vector, thereby determining whether the speech signal to be processed is an original speech signal or a recorded and played back speech signal. Since the first statistical feature vector is processed according to the importance of each dimension of the feature space in the M-dimensional feature space, the statistical features of each dimension of the feature space in the M-dimensional feature space are enhanced, and the statistical features of the speech signal to be processed can be more accurately reflected, thereby accurately determining the target category of the speech signal to be processed, improving the accuracy of the recorded and played back detection, and there is no need to detect the content of the speech signal to be processed, thereby improving the detection efficiency and having strong applicability.

[0038] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for processing a speech signal provided by an embodiment of the present invention. As shown in the figure, the method includes:

[0039] S101, obtaining a first statistical feature vector corresponding to a speech signal to be processed, where the first statistical feature vector is used to represent a statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, where M is an integer greater than 1.

[0040] The embodiments of the present application can be applied to a voiceprint recognition authentication system, that is, the identity of a user is determined by detecting the voiceprint of a voice signal to be processed. The voice signal to be processed may be a voice signal used for voiceprint recognition. In order to prevent illegal persons from using a user's recorded and replayed voice signal for voiceprint recognition, the embodiments of the present application require recording and replay detection of the voice signal to be processed.

[0041] The voice signal to be processed may be an original voice signal or a recorded and played back voice signal, wherein the original voice signal may be a voice signal generated by a user's direct voice (e.g., speaking) (i.e., a voice signal that has not been recorded and played back by a recording or video recording device), and the recorded and played back voice signal may include a voice signal obtained by recording a voice signal generated by a user's direct voice, or a voice signal synthesized by a signal synthesis method and other methods that is not generated by a user's direct voice, etc. In the present technical solution, all voice signals other than the original voice signal are referred to as recorded and played back voice signals.

[0042] The first statistical feature vector includes a first mean vector and / or a first standard deviation vector, the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

[0043] In one achievable manner, specifically obtaining the first statistical feature vector corresponding to the speech signal to be processed may include the following steps:

[0044] 1. Divide the speech signal to be processed into N speech frames, where N is an integer greater than or equal to 1.

[0045] Specifically, the speech signal to be processed can be sampled at a preset sampling period, and the continuous speech signal to be processed can be converted into a discretized speech signal. The sampling period can be a period determined according to the Nyquist sampling theorem; then the discretized speech signal is filtered by a digital filter with a transfer function of H(Z)=1-αZ-1 to increase the high-frequency resolution of the speech signal, α is a pre-emphasis coefficient, α is greater than 0.9 and less than 1; finally, the discrete speech signal can be framed by a window function to obtain multiple speech frames, that is, N speech frames are obtained here, wherein the window function can be any one of a rectangular window, a Hamming window or a Hanning window.

[0046] Optionally, the noise and interference in the speech frame can be removed by endpoint detection, which can be performed by energy-based endpoint detection, information entropy-based endpoint detection, or frequency band variance-based endpoint detection.

[0047] 2. Obtain a first feature vector of each speech frame in the N speech frames, where the first feature vector is used to represent a feature value of each dimension of the speech frame in the M-dimensional feature space.

[0048] Here, for example, M is 400 and N is 100, then 100 speech frames are obtained, wherein the first feature vector of each speech frame is a feature vector with a 400-dimensional feature space, that is, the first feature vector is used to represent the feature value of each dimension of the speech frame in the 400-dimensional feature space, then 100 400-dimensional first feature vectors are obtained.

[0049] Specifically, linear prediction cepstral coefficients (LPCC) feature extraction, Mel-scale frequency cepstral coefficients (MFCC) feature extraction, or constant Q cepstral coefficients (CQCC) feature extraction can be performed on each of the N speech frames to obtain a first feature vector.

[0050] In a specific implementation, taking the example of performing CQCC feature extraction on each of N speech frames to obtain a first feature vector, firstly, a constant Q transform (CQT) is performed on the speech signal corresponding to each of the N speech frames to convert the time domain signal into a frequency domain signal; secondly, the energy spectrum of each of the N speech frames is calculated, and the logarithm of the energy spectrum is taken to obtain a logarithmic energy spectrum; finally, the logarithmic energy spectrum is uniformly resampled to obtain a sampling function, and then the sampling function is discrete cosine transformed (DCT) to obtain a CQCC feature vector, i.e., the first feature vector, thereby obtaining the first feature vector of each of the N speech frames.

[0051] 3. For each dimension of the M-dimensional feature space, calculate the statistical value corresponding to the dimension of the feature space, where the statistical value corresponding to the dimension of the feature space is the statistical value of N speech frames in the dimension of the feature space.

[0052] Here, for each dimension of the M-dimensional feature space, the statistical values ​​of N speech frames in the dimension of the feature space are calculated. For example, if M is 400 and N is 100, then for each dimension of the 400-dimensional feature space, the statistical values ​​of 100 speech frames in the dimension of the feature space are calculated.

[0053] The statistical value may include a mean and / or a standard deviation, that is, for each dimension of the M-dimensional feature space, the mean of N speech frames in the dimension of the feature space is calculated to obtain an M-dimensional mean vector; for each dimension of the M-dimensional feature space, the standard deviation of N speech frames in the dimension of the feature space is calculated to obtain an M-dimensional standard deviation vector. For example, for each dimension of the 400-dimensional feature space, the mean and / or standard deviation of 100 speech frames in the dimension of the feature space is calculated to obtain a 400-dimensional mean vector and / or a 400-dimensional standard deviation vector.

[0054] 4. Construct a first statistical feature vector corresponding to the speech signal to be processed according to the statistical value corresponding to each dimension of the M-dimensional feature space.

[0055] Here, the first statistical feature vector includes a first mean vector and / or a first standard deviation vector, the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

[0056] In the case where the statistical value includes the mean and the standard deviation, the first statistical feature vector corresponding to the speech signal to be processed is constructed according to the statistical value corresponding to each dimension of the feature space in the M-dimensional feature space, that is: the first mean vector corresponding to the speech signal to be processed is constructed according to the mean corresponding to each dimension of the feature space in the M-dimensional feature space, and the first standard deviation vector corresponding to the speech signal to be processed is constructed according to the standard deviation corresponding to each dimension of the feature space in the M-dimensional feature space. It can be seen that the first mean vector is a vector with an M-dimensional feature space composed of M means, and the first standard deviation vector is a vector with an M-dimensional feature space composed of M standard deviations.

[0057] S102, inputting the first statistical feature vector into the first model for processing to obtain a second statistical feature vector, wherein the first model is used to process the first statistical feature vector according to the importance of each dimension of the M-dimensional feature space.

[0058] Specifically, the first statistical feature vector can be processed by the weight module in the first model to obtain the second statistical feature vector. Here, the weight module includes a target weight matrix, and the target weight matrix can be a matrix with an M-dimensional feature space, wherein the numerical value corresponding to each dimension of the feature space in the M-dimensional feature space is used to represent the importance of the feature space of that dimension, that is, the larger the numerical value corresponding to the feature space, the higher the importance of the feature space of that dimension; the smaller the numerical value corresponding to the feature space, the lower the importance of the feature space of that dimension.

[0059] Optionally, the target weight matrix can be obtained by assigning weights to each dimension of the feature space according to the target rule based on the mean size of each dimension of the feature space in the M-dimensional feature space of the first mean vector, that is, the target weight matrix is ​​a matrix with an M-dimensional feature space. Here, the target rule can be that if the mean of a certain dimension in the M-dimensional feature space of the first mean vector is large, the weight of the feature space in that dimension is large; if the mean of a certain dimension in the M-dimensional feature space of the first mean vector is small, the weight of the feature space in that dimension is small, that is, the feature space with a larger mean in the M-dimensional feature space of the first mean vector has a larger weight, and the feature space with a smaller mean has a smaller weight.

[0060] It should be noted that the first model can be trained in advance so that the second statistical feature vector obtained by processing with the trained first model more accurately represents the category of the speech signal to be processed. The specific process of training the first model can be referred to. Figure 3 The description in the corresponding embodiment will not be described in detail here.

[0061] S103: Determine a target category of the speech signal to be processed according to the second statistical feature vector, where the target category includes an original speech signal or a recorded and played back speech signal.

[0062] Here, the original voice signal may be a voice signal generated by the user's direct voice (i.e., a voice signal that has not been recorded and played back by recording or video recording equipment), and the recorded and played back voice signal may include a voice signal obtained by recording a voice signal generated by the user's direct voice, or a voice signal synthesized by signal synthesis or other means that is not generated by the user's direct voice, and so on.

[0063] Specifically, if the first statistical feature vector includes a first mean vector and a first standard deviation vector, the second statistical feature vector includes a second mean vector and a second standard deviation vector, the second mean vector is obtained according to the first mean vector and the first model, and the second standard deviation vector is obtained according to the first standard vector and the first model. In a specific implementation, the second mean vector can be the product of the first mean vector and the target weight matrix, and the second standard vector can be the product of the first standard vector and the target weight matrix.

[0064] In a possible implementation manner, a third statistical feature vector may be first constructed according to the second mean vector and the second standard deviation vector; and then a target category of the speech signal to be processed may be determined according to the third statistical feature vector.

[0065] In a specific implementation, the third statistical feature vector can be obtained by concatenating the second mean vector and the second standard deviation vector. Since the second mean vector is a vector with an M-dimensional feature space and the second standard deviation vector is a vector with an M-dimensional feature space, the concatenated third statistical feature vector can be a vector with a 2M-dimensional feature space, that is, the third statistical feature vector is a 2M-dimensional feature vector.

[0066] Optionally, the third statistical feature vector may be subjected to dimensionality reduction processing by a dimensionality reduction module to obtain a two-dimensional feature vector, thereby determining the target category of the speech signal to be processed based on the two-dimensional feature vector. In a specific implementation, the correspondence between the two-dimensional feature vector and the speech signal category may be preset, and then when the third statistical feature vector is subjected to dimensionality reduction processing to obtain a two-dimensional feature vector, the speech signal category corresponding to the two-dimensional feature vector may be determined based on the obtained two-dimensional feature vector and the correspondence between the two-dimensional feature vector and the speech signal category, thereby determining the target category of the speech signal to be processed.

[0067] In an embodiment of the present invention, a first statistical feature vector corresponding to a speech signal to be processed is obtained, the first statistical feature vector is input into a first model for processing, a second statistical feature vector is obtained, and a target category of the speech signal to be processed is determined according to the second statistical feature vector, thereby determining whether the speech signal to be processed is an original speech signal or a recorded playback speech signal. Since the first statistical feature vector is processed according to the importance of each dimension of the feature space in the M-dimensional feature space, the statistical features of each dimension of the feature space in the M-dimensional feature space are enhanced, and the statistical features of the speech signal to be processed can be more accurately reflected, thereby accurately determining the target category of the speech signal to be processed, improving the accuracy of recorded playback detection, and there is no need to detect the content of the speech signal to be processed, thereby improving detection efficiency and having strong applicability.

[0068] In a possible implementation, in order to make the second statistical feature vector processed by the first model more accurately represent the category of the speech signal to be processed, before the first statistical feature vector is input into the first model for processing (using the first model), a large number of sample speech signals can be used to train the first model, and the first model can be adjusted according to the loss value obtained by the training, so that the second statistical feature vector processed by the first model after the training can more accurately represent the category of the speech signal to be processed. The specific steps of training the first model are as follows: Figure 2 As shown, Figure 2 FIG. 1 is a flow chart of another method for processing a speech signal provided by an embodiment of the present invention. As shown in the figure, the method includes:

[0069] S201, obtaining a first sample statistical feature vector corresponding to a first sample speech signal, where the first sample statistical feature vector is used to represent the statistical value of each dimension of the first sample speech signal in an M-dimensional feature space, where M is an integer greater than 1, and the first sample speech signal is a recorded playback speech signal or an original speech signal.

[0070] Here, the first sample speech signal is a speech signal prepared for training the first model. For example, the first sample speech signal can be obtained by recording an original speech signal, or by recording a recorded and replayed speech signal.

[0071] Optionally, when acquiring the first sample speech signal, the target category of the first sample speech signal may be determined, that is, before the first sample speech signal is input into the first model for processing, it may be predetermined whether the first sample speech signal belongs to the original speech signal or the recorded playback speech signal. For example, the target categories of the first sample speech signal 1, the first sample speech signal 2, and the first sample speech signal 3 may be pre-recorded. For example, if the target categories of the first sample speech signal 1, the first sample speech signal 2, and the first sample speech signal 3 are the original speech signal, the original speech signal, and the recorded playback speech signal, respectively, then the first sample speech signal 1 to the original speech signal, the first sample speech signal 2 to the original speech signal, the first sample speech signal 3 to the recorded playback speech signal, and so on may be recorded.

[0072] In a specific implementation, the method for obtaining the first sample statistical feature vector corresponding to the first sample speech signal may refer to the method for obtaining the first statistical feature vector corresponding to the speech signal to be processed in step S101, which will not be described in detail here. The first sample statistical feature vector includes a first sample mean vector and / or a first sample standard deviation vector, the first sample mean vector is used to represent the mean of each dimension of the first sample speech signal in the M-dimensional feature space, and the first sample standard deviation vector is used to represent the standard deviation of each dimension of the first sample speech signal in the M-dimensional feature space.

[0073] S202: Input the first sample statistical feature vector into the first model for processing to obtain a second sample statistical feature vector.

[0074] Here, if the first sample statistical feature vector includes a first sample mean vector and a first sample standard deviation vector, the second sample statistical feature vector includes a second sample mean vector and a second sample standard deviation vector, the second sample mean vector is obtained based on the first sample mean vector and the first model, and the second sample standard deviation vector is obtained based on the first sample standard vector and the first model.

[0075] The following specifically describes the process of inputting the first sample statistical feature vector into the first model for processing to obtain the second sample statistical feature vector. Figure 3 , Figure 3 This is a schematic diagram of a first model training method provided by an embodiment of the present invention, as shown in the figure:

[0076] A first sample statistical feature vector corresponding to the first sample speech signal is obtained, the first sample statistical feature vector is input into the first model, and the first sample statistical feature vector is weighted by the weight module in the first model to obtain a second sample statistical feature vector. Optionally, a third sample statistical feature vector can be obtained based on the second sample statistical feature vector, and the third sample statistical feature vector is reduced in dimension by the dimension reduction module to obtain a two-dimensional sample feature vector, and the two-dimensional sample feature vector corresponds to a target category.

[0077] Among them, the weight module includes a target weight matrix, which is used to represent the importance of each dimension of the feature space in the M-dimensional feature space, that is, the weight module is used to perform weight calculation on the first sample statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space to obtain a third sample statistical feature vector; the dimensionality reduction module may include a fully connected layer, which is used to reduce the amount of calculation in the first model training. For example, the third sample statistical feature vector obtained is a high-dimensional feature matrix. The high-dimensional feature matrix can be reduced in dimension by the dimensionality reduction module to obtain a low-dimensional feature matrix. For example, the high-dimensional feature matrix is ​​2M-dimensional. The dimensionality reduction module can reduce the dimensionality to obtain a two-dimensional low-dimensional feature matrix. The dimensionality reduction process can reduce the amount of calculation in the model training.

[0078] S203: Calculate the first loss of the first model according to the second sample statistical feature vector.

[0079] Here, the first loss of the first model is calculated according to the second sample statistical feature vector, that is, the first loss of the first model is calculated according to the first sample mean vector and the first sample standard deviation vector.

[0080] In a specific implementation, since the target category of the first sample speech signal is predetermined, and the first sample statistical feature vector corresponding to the first sample speech signal is processed by the first model to obtain the second sample statistical feature vector, and the third sample statistical feature vector is obtained based on the second sample statistical feature vector, and the third sample statistical feature vector is reduced in dimension by the dimension reduction module, the obtained two-dimensional sample feature vector corresponds to a target category, and the first loss of the first model is calculated based on the similarity between the predetermined target category of the first sample speech signal and the target category corresponding to the two-dimensional sample feature vector. Here, the higher the similarity, the smaller the first loss, and the lower the similarity, the larger the first loss, wherein the first loss can be a cross entropy loss.

[0081] S204: Train a first model according to the first loss.

[0082] Here, when the first loss is large, the gradient descent method can be used to adjust the first model, that is, to adjust the weight module in the first model. The gradient descent method can also be used to adjust the dimension reduction module, so that the parameters of the model training and the parameters in the dimension reduction module are more accurate, so that the second statistical feature vector obtained after processing by the first model can more accurately reflect the category of the first sample speech signal.

[0083] In an embodiment of the present invention, a large number of sample speech signals are used to train the first model, and the first loss of the first model is determined based on the similarity between the target category of each predetermined sample speech signal and the target category of the sample speech signal obtained after processing by the first model, and whether the first model is accurate is determined based on the first loss. In the case where the first loss is large, the first model is adjusted so that the second statistical feature vector obtained by processing the trained first model more accurately represents the target category of the sample speech signal. Since a large number of sample speech signals are used to train the first model, the trained first model is more accurate, thereby making the recording playback detection result more accurate.

[0084] In a possible implementation, in order to make the trained first model more accurate, a large number of sample speech signals need to be used to train the first model, so a large number of sample speech signals need to be obtained. Since the method of obtaining sample speech signals for recording and playback by recording speech signals is inefficient, a large number of sample speech signals for recording and playback can be quickly obtained by the following method. The specific steps for obtaining a large number of sample speech signals are as follows: Figure 4 As shown, Figure 4 FIG. 1 is a flow chart of another method for processing a speech signal provided by an embodiment of the present invention. As shown in the figure, the method includes:

[0085] S301, obtaining a first voice signal, where the first voice signal is a recorded and played back voice signal.

[0086] S302, obtaining a second eigenvector of the first speech signal, and inputting the second eigenvector into a coding model for coding processing to obtain a fourth statistical eigenvector, where the fourth statistical eigenvector is used to represent statistical features of the first speech signal.

[0087] Here, the second feature vector may include an LPCC feature vector, an MFCC feature vector, or a CQCC feature vector, and the second feature vector may be obtained by performing LPCC feature extraction, MFCC feature extraction, or CQCC feature extraction on the first speech signal. The specific method of performing CQCC feature extraction on the first speech signal to obtain a CQCC feature vector can refer to the description in step S101, which will not be repeated here.

[0088] In an embodiment of the present invention, a second feature vector is obtained by performing feature extraction on a first speech signal, and the second feature vector is input into a coding model for coding processing to obtain a fourth statistical feature vector, wherein the fourth statistical feature vector includes a third mean vector and a third standard deviation vector, wherein the third mean vector is used to represent the mean of each dimension of the feature space of the first speech signal in the M-dimensional feature space, and the third standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the first speech signal in the M-dimensional feature space.

[0089] S303, constructing a first latent vector according to the fourth statistical feature vector, and inputting the first latent vector into a decoding model for decoding processing to obtain a third feature vector, wherein the similarity between the second speech signal generated by the third feature vector and the first speech signal meets the target condition.

[0090] Here, the target condition is that the similarity between the second speech signal and the first speech signal satisfies the similarity threshold. For example, the similarity threshold can be 80%, 90%, 95%, etc., that is, the first speech signal and the second speech signal are two speech signals with high similarity. That is, in this way, a recorded and played back speech signal can be used to generate a recorded and played back speech signal that is very similar to the recorded and played back speech signal. For example, if there are X recorded and played back speech signals, 2X recorded and played back speech signals can be generated in the above manner, and the 2X recorded and played back speech signals are further used to train the first model.

[0091] Here, the first latent vector is constructed according to the fourth statistical eigenvector, that is, the first latent vector is constructed according to the third mean vector and the third standard deviation vector, and the first latent vector is input into the decoding model for decoding processing to obtain the third eigenvector.

[0092] Optionally, the encoding model and the decoding model may be the encoding layer and the decoding layer in a variational autoencoder (VAE). Before using the encoding model and the decoding model, the encoding model and the decoding model may be pre-trained to make the trained encoding model and the decoding model more accurate, thereby making the obtained second speech signal and the first speech signal corresponding to the second feature vector in the input encoding model have a higher similarity. The method for training the encoding model and the decoding model can refer to Figure 5 , Figure 5 This is a schematic diagram of a training encoding model and a decoding model provided by an embodiment of the present invention, as shown in the figure:

[0093] 1. Obtain a first sample feature vector corresponding to a second sample speech signal.

[0094] The specific method for obtaining the first sample feature vector corresponding to the second sample speech signal may refer to the method for obtaining the second feature vector of the first speech signal in step S302, which will not be described in detail here.

[0095] 2. Input the first sample feature vector into the coding model for coding processing to obtain a third sample statistical feature vector, where the third sample statistical feature vector is used to represent the statistical features of the second sample speech signal.

[0096] Here, the third sample statistical feature vector includes a second sample mean vector and a second sample standard deviation vector, wherein the second sample mean vector is used to represent the mean of each dimension of the second sample speech signal in the M-dimensional feature space, and the second sample standard deviation vector is used to represent the standard deviation of each dimension of the second sample speech signal in the M-dimensional feature space. That is, the first sample feature vector is input into the coding model for coding processing to obtain the second sample mean vector and the second sample standard deviation vector.

[0097] 3. Determine the second loss based on the third sample statistical eigenvector and the standard normal distribution function.

[0098] Here, the first normal distribution function can be first determined according to the second sample mean vector and the second sample standard deviation vector, and then the second loss can be determined according to the degree of overlap between the first normal distribution function and the standard normal distribution function, wherein the higher the degree of overlap between the first normal distribution function and the standard normal distribution function, the smaller the second loss, and the lower the degree of overlap between the first normal distribution function and the standard normal distribution function, the larger the second loss, wherein the second loss can be a divergence loss, and the degree of overlap between the first normal distribution function and the standard normal distribution function is the degree of overlap between the graph corresponding to the first normal distribution function on the coordinate axis and the graph corresponding to the standard normal distribution function on the coordinate axis.

[0099] 4. Construct the first sample latent vector according to the third sample statistical feature vector, and input the first sample latent vector into the decoding model for decoding processing to obtain the second sample feature vector.

[0100] In a specific implementation, the first sample latent vector can be obtained by multiplying the second sample standard deviation vector by the standard normal distribution function, and then adding the second sample mean vector. That is, the first sample latent vector can be the product of the standard normal distribution function and the second sample standard deviation vector, and then the sum of the second sample mean vector. The first sample latent vector is input into the decoding model for decoding processing to obtain the second sample feature vector. Here, the second sample feature vector is the feature vector constructed by inputting the first sample feature vector into the encoding model and the decoding model.

[0101] 5. Determine a third loss based on the first sample feature vector and the second sample feature vector.

[0102] Here, the third loss can be determined according to the similarity between the first sample feature vector and the second sample feature vector, that is, the higher the similarity between the first sample feature vector and the second sample feature vector, the smaller the third loss; the lower the similarity between the first sample feature vector and the second sample feature vector, the larger the third loss, wherein the third loss can be a cross entropy loss.

[0103] 6. Based on the second loss and the third loss, train the encoding model and the decoding model.

[0104] When the second loss is large, the gradient descent method can be used to adjust the parameters in the encoding model. When the third loss is large, the gradient descent method can be used to adjust the parameters in the decoding model, so that the adjusted encoding model and decoding model are more accurate, so that the second sample feature vector obtained by processing the encoding model and decoding model has a higher similarity with the first sample feature vector.

[0105] If the first sample voice signal used to train the first model is a recorded and played back voice signal, the first sample voice signal is the first voice signal or the second voice signal.

[0106] Here, the first speech signal and the second speech signal are both recorded and played back speech signals, the first speech signal is a speech signal corresponding to a first sample feature vector input into the encoding model, and the second speech signal is a speech signal corresponding to a second sample feature vector output from the decoding model. Optionally, the recorded and played back speech signal may include a transcribed speech signal, and the transcribed speech signal is a speech signal obtained by transcribing the recorded and played back speech signal through the encoding model and the decoding model, that is, the second speech signal. When training the first model, the original speech signal or the recorded and played back speech signal may be used, and the recorded and played back speech signal also includes a transcribed speech signal, that is, the target category of the transcribed speech signal obtained by inputting the statistical feature vector corresponding to the transcribed speech signal into the first model for processing is the recorded and played back speech signal.

[0107] In an embodiment of the present invention, a large number of sample voice signals can be quickly obtained by processing the statistical feature vectors corresponding to the sample voice signals using a coding model and a decoding model. Compared with the method of recording the sample voice signals through a recording device, this method is more efficient in obtaining a large number of sample voice signals.

[0108] The method according to the embodiment of the present invention is introduced above, and the device according to the embodiment of the present invention is introduced below.

[0109] See also Figure 6 , Figure 6 60 is a schematic diagram of the structure of a speech signal processing device provided by an embodiment of the present invention. The device 60 includes:

[0110] A first feature acquisition module 601 is used to acquire a first statistical feature vector corresponding to the speech signal to be processed, wherein the first statistical feature vector is used to represent the statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, where M is an integer greater than 1;

[0111] The voice signal to be processed may be an original voice signal or a recorded and played back voice signal, wherein the original voice signal may be a voice signal generated by a user's direct voice (e.g., speaking) (i.e., a voice signal that has not been recorded and played back by a recording or video recording device), and the recorded and played back voice signal may include a voice signal obtained by recording a voice signal generated by a user's direct voice, or a voice signal synthesized by a signal synthesis method and other methods that is not generated by a user's direct voice, etc. In the present technical solution, all voice signals other than the original voice signal are referred to as recorded and played back voice signals.

[0112] The first statistical feature vector includes a first mean vector and / or a first standard deviation vector, the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

[0113] A second feature acquisition module 602 is used to input the first statistical feature vector into a first model for processing to obtain a second statistical feature vector, wherein the first model is used to process the first statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space;

[0114] Specifically, the second feature acquisition module 602 can process the first statistical feature vector through the weight module in the first model to obtain the second statistical feature vector. Here, the weight module includes a target weight matrix, and the target weight matrix can be a matrix with an M-dimensional feature space, wherein the numerical value corresponding to each dimension of the feature space in the M-dimensional feature space is used to represent the importance of the feature space of that dimension, that is, the larger the numerical value corresponding to the feature space, the higher the importance of the feature space of that dimension; the smaller the numerical value corresponding to the feature space, the lower the importance of the feature space of that dimension.

[0115] Optionally, the target weight matrix can be obtained by assigning weights to each dimension of the feature space according to the target rule based on the mean size of each dimension of the feature space in the M-dimensional feature space of the first mean vector, that is, the target weight matrix is ​​a matrix with an M-dimensional feature space. Here, the target rule can be that if the mean of a certain dimension in the M-dimensional feature space of the first mean vector is large, the weight of the feature space in that dimension is large; if the mean of a certain dimension in the M-dimensional feature space of the first mean vector is small, the weight of the feature space in that dimension is small, that is, the feature space with a larger mean in the M-dimensional feature space of the first mean vector has a larger weight, and the feature space with a smaller mean has a smaller weight.

[0116] It should be noted that the first model can be trained in advance so that the second statistical feature vector obtained by processing with the trained first model more accurately represents the category of the speech signal to be processed. The specific process of training the first model can be referred to. Figure 3 The description in the corresponding embodiment will not be described in detail here.

[0117] The target category determination module 603 is used to determine the target category of the speech signal to be processed according to the second statistical feature vector, and the target category includes an original speech signal or a recorded and played back speech signal.

[0118] Here, the original voice signal may be a voice signal generated by the user's direct voice (i.e., a voice signal that has not been recorded and played back by recording or video recording equipment), and the recorded and played back voice signal may include a voice signal obtained by recording a voice signal generated by the user's direct voice, or a voice signal synthesized by signal synthesis or other means that is not generated by the user's direct voice, and so on.

[0119] In a possible design, the first feature acquisition module 601 is used to:

[0120] Dividing the speech signal to be processed into N speech frames, where N is an integer greater than or equal to 1;

[0121] Specifically, the first feature acquisition module 601 can sample the speech signal to be processed at a preset sampling period, and transform the continuous speech signal to be processed into a discretized speech signal. The sampling period can be a period determined according to the Nyquist sampling theorem; then the discretized speech signal is filtered by a digital filter with a transfer function of H(Z)=1-αZ-1 to increase the high-frequency resolution of the speech signal, α is the pre-emphasis coefficient, α is greater than 0.9 and less than 1; finally, the discrete speech signal can be framed using a window function to obtain multiple speech frames, where N speech frames are obtained, wherein the window function can be any one of a rectangular window, a Hamming window or a Hanning window.

[0122] Optionally, the first feature acquisition module 601 may also remove noise and interference in the speech frame by endpoint detection, wherein endpoint detection may be performed by energy-based endpoint detection, information entropy-based endpoint detection, or frequency band variance-based endpoint detection.

[0123] Acquire a first feature vector of each speech frame in the N speech frames, where the first feature vector is used to represent a feature value of each dimension of the speech frame in the M-dimensional feature space;

[0124] Here, for example, M is 400 and N is 100, then 100 speech frames are obtained, wherein the first feature vector of each speech frame is a feature vector with a 400-dimensional feature space, that is, the first feature vector is used to represent the feature value of each dimension of the speech frame in the 400-dimensional feature space, then 100 400-dimensional first feature vectors are obtained.

[0125] Specifically, the first feature acquisition module 601 can perform linear prediction cepstral coefficients (LPCC) feature extraction, Mel-scale frequency cepstral coefficients (MFCC) feature extraction, or constant Q cepstral coefficients (CQCC) feature extraction on each of the N speech frames to obtain a first feature vector.

[0126] In a specific implementation, taking the extraction of CQCC features from each of N speech frames to obtain a first feature vector as an example, the first feature acquisition module 601 can first perform a constant Q transform (CQT) on the speech signal corresponding to each of the N speech frames to convert the time domain signal into a frequency domain signal; secondly, calculate the energy spectrum of each of the N speech frames, and take the logarithm of the energy spectrum to obtain a logarithmic energy spectrum; finally, uniformly resample the logarithmic energy spectrum to obtain a sampling function, and then perform a discrete cosine transform (DCT) on the sampling function to obtain a CQCC feature vector, i.e., the first feature vector, thereby obtaining the first feature vector of each of the N speech frames.

[0127] For each dimension of the M-dimensional feature space, calculate a statistical value corresponding to the dimension of the feature space, where the statistical value is a statistical value of the N speech frames in the dimension of the feature space;

[0128] Here, the first feature acquisition module 601 calculates the statistical values ​​of N speech frames in each dimension of the M-dimensional feature space. For example, if M is 400 and N is 100, then for each dimension of the 400-dimensional feature space, the statistical values ​​of 100 speech frames in the dimension are calculated.

[0129] The statistical value may include a mean and / or a standard deviation, that is, the first feature acquisition module 601 calculates the mean of N speech frames in each dimension of the M-dimensional feature space to obtain an M-dimensional mean vector; the first feature acquisition module 601 calculates the standard deviation of N speech frames in each dimension of the M-dimensional feature space to obtain an M-dimensional standard deviation vector. For example, for each dimension of the 400-dimensional feature space, the mean and / or standard deviation of 100 speech frames in the dimension of the feature space are calculated to obtain a 400-dimensional mean vector and / or a 400-dimensional standard deviation vector.

[0130] According to the statistical value corresponding to each dimension of the M-dimensional feature space, a first statistical feature vector corresponding to the speech signal to be processed is constructed.

[0131] Here, the first statistical feature vector includes a first mean vector and / or a first standard deviation vector, the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

[0132] In the case where the statistical value includes the mean and the standard deviation, the first feature acquisition module 601 constructs the first statistical feature vector corresponding to the speech signal to be processed according to the statistical value corresponding to each dimension of the feature space in the M-dimensional feature space, that is: the first feature acquisition module 601 constructs the first mean vector corresponding to the speech signal to be processed according to the mean corresponding to each dimension of the feature space in the M-dimensional feature space, and constructs the first standard deviation vector corresponding to the speech signal to be processed according to the standard deviation corresponding to each dimension of the feature space in the M-dimensional feature space. It can be seen that the first mean vector is a vector with an M-dimensional feature space composed of M means, and the first standard deviation vector is a vector with an M-dimensional feature space composed of M standard deviations.

[0133] In one possible design, the first statistical feature vector includes a first mean vector and / or a first standard deviation vector, the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

[0134] In a possible design, if the first statistical feature vector includes the first mean vector and the first standard deviation vector; the second statistical feature vector includes a second mean vector and a second standard deviation vector, the second mean vector is obtained according to the first mean vector and the first model, and the second standard deviation vector is obtained according to the first standard vector and the first model;

[0135] Specifically, if the first statistical feature vector includes a first mean vector and a first standard deviation vector, the second statistical feature vector includes a second mean vector and a second standard deviation vector, the second mean vector is obtained according to the first mean vector and the first model, and the second standard deviation vector is obtained according to the first standard vector and the first model. In a specific implementation, the second mean vector can be the product of the first mean vector and the target weight matrix, and the second standard vector can be the product of the first standard vector and the target weight matrix.

[0136] The target category determination module 603 is further configured to construct a third statistical feature vector according to the second mean vector and the second standard deviation vector;

[0137] In a specific implementation, the target category determination module 603 can obtain a third statistical feature vector by concatenating the second mean vector and the second standard deviation vector. Since the second mean vector is a vector with an M-dimensional feature space and the second standard deviation vector is a vector with an M-dimensional feature space, the concatenated third statistical feature vector can be a vector with a 2M-dimensional feature space, that is, the third statistical feature vector is a 2M-dimensional feature vector.

[0138] The target category determination module 603 is further configured to determine the target category of the speech signal to be processed according to the third statistical feature vector.

[0139] Optionally, the target category determination module 603 can also perform dimensionality reduction processing on the third statistical feature vector through a dimensionality reduction module to obtain a two-dimensional feature vector, thereby determining the target category of the speech signal to be processed based on the two-dimensional feature vector. In a specific implementation, the target category determination module 603 can pre-set the correspondence between the two-dimensional feature vector and the speech signal category. Then, when the third statistical feature vector is subjected to dimensionality reduction processing to obtain a two-dimensional feature vector, the speech signal category corresponding to the two-dimensional feature vector can be determined based on the obtained two-dimensional feature vector and the correspondence between the two-dimensional feature vector and the speech signal category, thereby determining the target category of the speech signal to be processed.

[0140] In a possible design, the device 60 further includes:

[0141] The first model training module 604 is used to obtain a first sample statistical feature vector corresponding to the first sample speech signal, where the first sample statistical feature vector is used to represent the statistical value of each dimension of the first sample speech signal in an M-dimensional feature space, where M is an integer greater than 1, and the first sample speech signal is a recorded playback speech signal or an original speech signal;

[0142] Here, the first sample speech signal is a speech signal prepared for training the first model. For example, the first sample speech signal can be obtained by recording an original speech signal, or by recording a recorded and replayed speech signal.

[0143] Optionally, when acquiring the first sample voice signal, the first model training module 604 may determine the target category of the first sample voice signal, that is, before inputting the first sample voice signal into the first model for processing, it may be pre-determined whether the first sample voice signal belongs to the original voice signal or the recorded playback voice signal. For example, the target categories of the first sample voice signal 1, the first sample voice signal 2, and the first sample voice signal 3 may be pre-recorded. For example, if the target categories of the first sample voice signal 1, the first sample voice signal 2, and the first sample voice signal 3 are the original voice signal, the original voice signal, and the recorded playback voice signal, respectively, then the first sample voice signal 1 to the original voice signal, the first sample voice signal 2 to the original voice signal, the first sample voice signal 3 to the recorded playback voice signal, and so on may be recorded.

[0144] In a specific implementation, the first model training module 604 obtains the first sample statistical feature vector corresponding to the first sample speech signal, which can refer to the method for obtaining the first statistical feature vector corresponding to the speech signal to be processed in step S101, which will not be repeated here. The first sample statistical feature vector includes a first sample mean vector and / or a first sample standard deviation vector, the first sample mean vector is used to represent the mean of the first sample speech signal in each dimension of the feature space in the M-dimensional feature space, and the first sample standard deviation vector is used to represent the standard deviation of the first sample speech signal in each dimension of the feature space in the M-dimensional feature space.

[0145] The first model training module 604 is further used to input the first sample statistical feature vector into the first model for processing to obtain a second sample statistical feature vector;

[0146] Here, if the first sample statistical feature vector includes a first sample mean vector and a first sample standard deviation vector, the second sample statistical feature vector includes a second sample mean vector and a second sample standard deviation vector, the second sample mean vector is obtained based on the first sample mean vector and the first model, and the second sample standard deviation vector is obtained based on the first sample standard vector and the first model.

[0147] The following specifically describes the process of inputting the first sample statistical feature vector into the first model for processing to obtain the second sample statistical feature vector. Figure 3 , Figure 3 This is a schematic diagram of a first model training method provided by an embodiment of the present invention, as shown in the figure:

[0148] The first model training module 604 obtains a first sample statistical feature vector corresponding to the first sample speech signal, inputs the first sample statistical feature vector into the first model, and performs weight calculation on the first sample statistical feature vector through the weight module in the first model to obtain a second sample statistical feature vector. Optionally, a third sample statistical feature vector can also be obtained based on the second sample statistical feature vector, and the third sample statistical feature vector is subjected to dimensionality reduction processing through the dimensionality reduction module to obtain a two-dimensional sample feature vector, which corresponds to a target category.

[0149] Among them, the weight module includes a target weight matrix, which is used to represent the importance of each dimension of the feature space in the M-dimensional feature space, that is, the weight module is used to perform weight calculation on the first sample statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space to obtain a third sample statistical feature vector; the dimensionality reduction module may include a fully connected layer, which is used to reduce the amount of calculation in the first model training. For example, the third sample statistical feature vector obtained is a high-dimensional feature matrix. The high-dimensional feature matrix can be reduced in dimension by the dimensionality reduction module to obtain a low-dimensional feature matrix. For example, the high-dimensional feature matrix is ​​2M-dimensional. The dimensionality reduction module can reduce the dimension to obtain a 2-dimensional low-dimensional feature matrix. The dimensionality reduction process can reduce the amount of calculation in the model training.

[0150] The first model training module 604 is further used to calculate the first loss of the first model according to the second sample statistical feature vector;

[0151] Here, the first model training module 604 calculates the first loss of the first model according to the second sample statistical feature vector, that is, the first model training module 604 calculates the first loss of the first model according to the first sample mean vector and the first sample standard deviation vector.

[0152] In a specific implementation, the first model training module 604 predetermines the target category of the first sample speech signal, and processes the first sample statistical feature vector corresponding to the first sample speech signal through the first model to obtain the second sample statistical feature vector, and obtains the third sample statistical feature vector based on the second sample statistical feature vector, and performs dimensionality reduction processing on the third sample statistical feature vector through the dimensionality reduction module, and the obtained two-dimensional sample feature vector corresponds to a target category. According to the similarity between the predetermined target category of the first sample speech signal and the target category corresponding to the two-dimensional sample feature vector, the first loss of the first model is calculated. Here, the higher the similarity, the smaller the first loss, and the lower the similarity, the larger the first loss, wherein the first loss can be a cross entropy loss.

[0153] The first model training module 604 is further used to train the first model according to the first loss.

[0154] Here, when the first loss is large, the first model training module 604 can use the gradient descent method to adjust the first model, that is, to adjust the weight module in the first model. The first model training module 604 can also use the gradient descent method to adjust the dimension reduction module, so that the parameters of the model training are more accurate, so that the second statistical feature vector obtained after processing by the first model can more accurately reflect the category of the first sample speech signal.

[0155] In a possible design, the device 60 further includes:

[0156] The voice signal acquisition module 605 is used to acquire a first voice signal, where the first voice signal is a recorded and played back voice signal;

[0157] Here, the voice signal acquisition module 605 can record the original voice signal through a recording device or the like to obtain a recorded and played back voice signal.

[0158] The speech signal acquisition module 605 is further used to acquire a second feature vector of the first speech signal, and input the second feature vector into a coding model for coding processing to obtain a fourth statistical feature vector, wherein the fourth statistical feature vector is used to represent the statistical features of the first speech signal;

[0159] Here, the second feature vector may include an LPCC feature vector, an MFCC feature vector, or a CQCC feature vector, and the speech signal acquisition module 605 may obtain the second feature vector by performing LPCC feature extraction, MFCC feature extraction, or CQCC feature extraction on the first speech signal. The specific method for the speech signal acquisition module 605 to perform CQCC feature extraction on the first speech signal to obtain a CQCC feature vector can refer to the description in step S101, which will not be repeated here.

[0160] In an embodiment of the present invention, the speech signal acquisition module 605 obtains a second feature vector by performing feature extraction on the first speech signal, and inputs the second feature vector into a coding model for coding processing to obtain a fourth statistical feature vector, wherein the fourth statistical feature vector includes a third mean vector and a third standard deviation vector, wherein the third mean vector is used to represent the mean of each dimension of the feature space of the first speech signal in the M-dimensional feature space, and the third standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the first speech signal in the M-dimensional feature space.

[0161] The speech signal acquisition module 605 is further configured to construct a first latent vector according to the fourth statistical feature vector, and input the first latent vector into a decoding model for decoding processing to obtain a third feature vector, wherein the similarity between the second speech signal generated by the third feature vector and the first speech signal meets a target condition;

[0162] Here, the target condition is that the similarity between the second speech signal and the first speech signal satisfies the similarity threshold. For example, the similarity threshold can be 80%, 90%, 95%, etc., that is, the first speech signal and the second speech signal are two speech signals with high similarity. That is, in this way, a recorded and played back speech signal can be used to generate a recorded and played back speech signal that is very similar to the recorded and played back speech signal. For example, if there are X recorded and played back speech signals, 2X recorded and played back speech signals can be generated in the above manner, and the 2X recorded and played back speech signals are further used to train the first model.

[0163] Here, the speech signal acquisition module 605 constructs a first latent vector according to the fourth statistical feature vector, that is, constructs a first latent vector according to the third mean vector and the third standard deviation vector, and inputs the first latent vector into the decoding model for decoding processing to obtain a third feature vector.

[0164] Optionally, the encoding model and the decoding model may be an encoding layer and a decoding layer in a variational autoencoder (VAE). Before using the encoding model and the decoding model, the speech signal acquisition module 605 may pre-train the encoding model and the decoding model to make the trained encoding model and the decoding model more accurate, thereby making the obtained second speech signal have a higher similarity with the first speech signal corresponding to the second feature vector in the input encoding model. The method for training the encoding model and the decoding model may refer to Figure 5 .

[0165] The voice signal acquisition module 605 is further configured to: if the first sample voice signal is a recorded and played back voice signal, then the first sample voice signal is the first voice signal or the second voice signal.

[0166] In a possible design, the device 60 further includes:

[0167] A second model training module 606, used to obtain a first sample feature vector corresponding to a second sample speech signal;

[0168] The specific method for the second model training module 606 to obtain the first sample feature vector corresponding to the second sample speech signal can refer to the method for obtaining the second feature vector of the first speech signal in step S302, which will not be repeated here.

[0169] The second model training module 606 is further used to input the first sample feature vector into the coding model for coding processing to obtain a third sample statistical feature vector, wherein the third sample statistical feature vector is used to represent the statistical features of the second sample speech signal;

[0170] Here, the third sample statistical feature vector includes a second sample mean vector and a second sample standard deviation vector, the second sample mean vector is used to represent the mean of each dimension of the second sample speech signal in the M-dimensional feature space, and the second sample standard deviation vector is used to represent the standard deviation of each dimension of the second sample speech signal in the M-dimensional feature space. That is, the second model training module 606 inputs the first sample feature vector into the encoding model for encoding processing to obtain the second sample mean vector and the second sample standard deviation vector.

[0171] The second model training module 606 is further used to determine a second loss according to the third sample statistical feature vector and the standard normal distribution function;

[0172] Here, the second model training module 606 can first determine the first normal distribution function based on the second sample mean vector and the second sample standard deviation vector, and then determine the second loss based on the degree of overlap between the first normal distribution function and the standard normal distribution function, wherein the higher the degree of overlap between the first normal distribution function and the standard normal distribution function, the smaller the second loss, and the lower the degree of overlap between the first normal distribution function and the standard normal distribution function, the larger the second loss, wherein the second loss can be a divergence loss, and the degree of overlap between the first normal distribution function and the standard normal distribution function is the degree of overlap between the graph corresponding to the first normal distribution function on the coordinate axis and the graph corresponding to the standard normal distribution function on the coordinate axis.

[0173] The second model training module 606 is further used to construct a first sample latent vector according to the third sample statistical feature vector, and input the first sample latent vector into the decoding model for decoding processing to obtain a second sample feature vector;

[0174] In a specific implementation, the second model training module 606 can obtain the first sample implicit vector by multiplying the second sample standard deviation vector by the standard normal distribution function, and then adding the second sample mean vector, that is, the first sample implicit vector can be the product of the standard normal distribution function and the second sample standard deviation vector, and then the sum of the second sample mean vector. The second model training module 606 inputs the first sample implicit vector into the decoding model for decoding processing to obtain the second sample feature vector. Here, the second sample feature vector is a feature vector constructed by inputting the first sample feature vector into the encoding model and the decoding model.

[0175] The second model training module 606 is further used to determine a third loss according to the first sample feature vector and the second sample feature vector;

[0176] Here, the second model training module 606 can determine the third loss based on the similarity between the first sample feature vector and the second sample feature vector, that is, the higher the similarity between the first sample feature vector and the second sample feature vector, the smaller the third loss; the lower the similarity between the first sample feature vector and the second sample feature vector, the larger the third loss, wherein the third loss can be a cross entropy loss.

[0177] The second model training module 606 is further used to train the encoding model and the decoding model according to the second loss and the third loss.

[0178] When the second loss is large, the second model training module 606 can use the gradient descent method to adjust the parameters in the encoding model. When the third loss is large, the gradient descent method can be used to adjust the parameters in the decoding model, so that the adjusted encoding model and decoding model are more accurate, so that the second sample feature vector obtained by processing the encoding model and decoding model has a higher similarity with the first sample feature vector.

[0179] Here, the first speech signal and the second speech signal are both recorded and played back speech signals, the first speech signal is a speech signal corresponding to a first sample feature vector input into the encoding model, and the second speech signal is a speech signal corresponding to a second sample feature vector output from the decoding model. Optionally, the recorded and played back speech signal may include a transcribed speech signal, and the transcribed speech signal is a speech signal obtained by transcribing the recorded and played back speech signal through the encoding model and the decoding model, that is, the second speech signal. When training the first model, the original speech signal or the recorded and played back speech signal may be used, and the recorded and played back speech signal also includes a transcribed speech signal, that is, the target category of the transcribed speech signal obtained by inputting the statistical feature vector corresponding to the transcribed speech signal into the first model for processing is the recorded and played back speech signal.

[0180] It should be noted that Figure 6 For the contents not mentioned in the corresponding embodiments, please refer to the description of the method embodiments, which will not be repeated here.

[0181] In the embodiment of the present invention, by obtaining a first statistical feature vector corresponding to a speech signal to be processed, inputting the first statistical feature vector into a first model for processing, obtaining a second statistical feature vector, and determining the target category of the speech signal to be processed according to the second statistical feature vector, it is determined that the speech signal to be processed is an original speech signal or a recorded playback speech signal. Since the first statistical feature vector is processed according to the importance of each dimension of the feature space in the M-dimensional feature space, the statistical features of each dimension of the feature space in the M-dimensional feature space are strengthened, and the statistical features of the speech signal to be processed can be more accurately reflected, thereby accurately determining the target category of the speech signal to be processed, improving the accuracy of the recorded playback detection, and there is no need to detect the content of the speech signal to be processed, thereby improving the detection efficiency and having strong applicability; since a large number of sample speech signals are used to train the first model, the trained first model is more accurate, thereby making the recorded playback detection result more accurate; by using the encoding model and the decoding model to process the statistical feature vector corresponding to the sample speech signal, a large number of sample speech signals can be quickly obtained. Compared with the method of recording the sample speech signal through a recording device, this method has a high efficiency in obtaining a large number of sample speech signals.

[0182] See also Figure 7 , Figure 7 1 is a schematic diagram of the structure of a speech signal processing device provided by an embodiment of the present invention, wherein the device 70 includes a processor 701, a memory 702, and an input / output interface 703. The processor 701 is connected to the memory 702 and the input / output interface 703, for example, the processor 701 can be connected to the memory 702 and the input / output interface 703 via a bus.

[0183] The processor 701 is configured to support the speech signal processing device to perform Figure 1-Figure 2 , Figure 4 The corresponding function in the speech signal processing method. The processor 701 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above-mentioned hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0184] The memory 702 is used to store program codes, etc. The memory 702 may include a volatile memory (VM), such as a random access memory (RAM); the memory 702 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 702 may also include a combination of the above-mentioned types of memories.

[0185] The input / output interface 703 is used to input or output data.

[0186] The processor 701 may call the program code to perform the following operations:

[0187] Acquire a first statistical feature vector corresponding to the speech signal to be processed, where the first statistical feature vector is used to represent the statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, where M is an integer greater than 1;

[0188] Inputting the first statistical feature vector into a first model for processing to obtain a second statistical feature vector, wherein the first model is used to process the first statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space;

[0189] A target category of the speech signal to be processed is determined according to the second statistical feature vector, where the target category includes an original speech signal or a recorded and played back speech signal.

[0190] It should be noted that the implementation of each operation may also refer to the corresponding description of the above method embodiment; the processor 701 may also cooperate with the input and output interface 703 to perform other operations in the above method embodiment.

[0191] The embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment, and the computer may be a part of the above-mentioned speech signal processing device, such as the above-mentioned processor 701.

[0192] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0193] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A speech signal processing method, characterized in that: include: Obtaining a first sample statistical feature vector corresponding to a first sample voice signal, where the first sample statistical feature vector is used to represent a statistical value of each dimension of the first sample voice signal in an M-dimensional feature space, where M is an integer greater than 1, and the first sample voice signal is a recorded playback voice signal or an original voice signal; Inputting the first sample statistical feature vector into a first model for processing to obtain a second sample statistical feature vector; Calculating a first loss of the first model according to the second sample statistical feature vector; Training the first model according to the first loss; Acquire a first voice signal, where the first voice signal is a recorded and played back voice signal; Acquire a second feature vector of the first speech signal, and input the second feature vector into a coding model for coding processing to obtain a fourth statistical feature vector, where the fourth statistical feature vector is used to represent the statistical features of the first speech signal; Constructing a first latent vector according to the fourth statistical feature vector, and inputting the first latent vector into a decoding model for decoding processing to obtain a third feature vector, wherein the similarity between the second speech signal generated by the third feature vector and the first speech signal meets a target condition; If the first sample voice signal is a recorded and reproduced voice signal, then the first sample voice signal is the first voice signal or the second voice signal; Acquire a first statistical feature vector corresponding to the speech signal to be processed, where the first statistical feature vector is used to represent the statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, where M is an integer greater than 1; Inputting the first statistical feature vector into a trained first model for processing to obtain a second statistical feature vector, wherein the first model is used to process the first statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space; A target category of the speech signal to be processed is determined according to the second statistical feature vector, where the target category includes an original speech signal or a recorded and played back speech signal.

2. The method according to claim 1, characterized in that The step of obtaining a first statistical feature vector corresponding to the speech signal to be processed includes: Dividing the speech signal to be processed into N speech frames, where N is an integer greater than or equal to 1; Acquire a first feature vector of each speech frame in the N speech frames, where the first feature vector is used to represent a feature value of each dimension of the speech frame in the M-dimensional feature space; For each dimension of the M-dimensional feature space, calculate a statistical value corresponding to the dimension of the feature space, where the statistical value is a statistical value of the N speech frames in the dimension of the feature space; According to the statistical value corresponding to each dimension of the M-dimensional feature space, a first statistical feature vector corresponding to the speech signal to be processed is constructed.

3. The method according to claim 1 or 2, characterized in that The first statistical feature vector includes a first mean vector and / or a first standard deviation vector, wherein the first mean vector is used to represent the mean of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space, and the first standard deviation vector is used to represent the standard deviation of each dimension of the feature space of the speech signal to be processed in the M-dimensional feature space.

4. The method according to claim 3, characterized in that If the first statistical feature vector includes the first mean vector and the first standard deviation vector; the second statistical feature vector includes a second mean vector and a second standard deviation vector, the second mean vector is obtained according to the first mean vector and the first model, and the second standard deviation vector is obtained according to the first standard deviation vector and the first model; The step of determining the target category of the speech signal to be processed according to the second statistical feature vector includes: constructing a third statistical feature vector according to the second mean vector and the second standard deviation vector; A target category of the speech signal to be processed is determined according to the third statistical feature vector.

5. The method according to claim 1, characterized in that Before acquiring the first voice signal, the method further includes: Obtaining a first sample feature vector corresponding to a second sample speech signal; Inputting the first sample feature vector into the coding model for coding processing to obtain a third sample statistical feature vector, wherein the third sample statistical feature vector is used to represent the statistical features of the second sample speech signal; Determine a second loss according to the third sample statistical feature vector and the standard normal distribution function; constructing a first sample latent vector according to the third sample statistical feature vector, and inputting the first sample latent vector into the decoding model for decoding processing to obtain a second sample feature vector; Determining a third loss according to the first sample feature vector and the second sample feature vector; The encoding model and the decoding model are trained according to the second loss and the third loss.

6. A speech signal processing device, characterized in that: include: A first model training module, used for obtaining a first sample statistical feature vector corresponding to a first sample speech signal, wherein the first sample statistical feature vector is used for representing a statistical value of each dimension of the first sample speech signal in an M-dimensional feature space, wherein M is an integer greater than 1, and the first sample speech signal is a recorded playback speech signal or an original speech signal; The first model training module is further used to input the first sample statistical feature vector into the first model for processing to obtain a second sample statistical feature vector; The first model training module is further used to calculate the first loss of the first model according to the second sample statistical feature vector; A first model training module is further used to train the first model according to the first loss; A voice signal acquisition module, used to acquire a first voice signal, where the first voice signal is a recorded and played back voice signal; The speech signal acquisition module is further used to acquire a second feature vector of the first speech signal, and input the second feature vector into a coding model for coding processing to obtain a fourth statistical feature vector, wherein the fourth statistical feature vector is used to represent the statistical features of the first speech signal; The speech signal acquisition module is further used to construct a first latent vector according to the fourth statistical feature vector, and input the first latent vector into a decoding model for decoding processing to obtain a third feature vector, wherein the similarity between the second speech signal generated by the third feature vector and the first speech signal meets the target condition; If the first sample voice signal is a recorded and reproduced voice signal, then the first sample voice signal is the first voice signal or the second voice signal; A first feature acquisition module, used to acquire a first statistical feature vector corresponding to the speech signal to be processed, wherein the first statistical feature vector is used to represent the statistical value of each dimension of the speech signal to be processed in an M-dimensional feature space, where M is an integer greater than 1; A second feature acquisition module is used to input the first statistical feature vector into a trained first model for processing to obtain a second statistical feature vector, wherein the first model is used to process the first statistical feature vector according to the importance of each dimension of the feature space in the M-dimensional feature space; The target category determination module is used to determine the target category of the speech signal to be processed according to the second statistical feature vector, and the target category includes an original speech signal or a recorded and played back speech signal.

7. A speech signal processing device, characterized in that: It includes a processor, a memory and an input-output interface, wherein the processor, the memory and the input-output interface are connected to each other, wherein the input-output interface is used to input or output data, the memory is used to store program code, and the processor is used to call the program code to execute the method according to any one of claims 1 to 5.

8. A computer storage medium, characterized in that The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Playback voice voiceprint recognition method, device and storage medium

    CN109300479A