Audio recognition method, medium, electronic device and program product
Through suppression processing and feature extraction of audio data, combined with generative and decision-based models, human voice audio and pseudo-human voice audio can be accurately identified, which solves the problem of difficulty in judging audio authenticity in the existing technology and improves security.
Patent Information
- Application Number
- CN202410526661.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-04-29
AI Technical Summary
Existing technology makes it difficult to accurately judge machine-synthesized audio and audio produced by real people, which poses safety risks, especially in safety situations.
By obtaining audio data for suppression processing, the generative model and the decision-making model are combined to extract audio features, determine whether the audio is human voice audio or pseudo-human voice audio, and determine its category through the degree of similarity to improve recognition accuracy.
It achieves accurate recognition of machine-synthesized audio and real-person audio, reduces safety risks and improves the accuracy of audio recognition.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and specifically to an audio recognition method, medium, electronic device and program product. Background Art
[0002] With the rapid development of large models and personalized voice reproduction technology, machine-synthesized human voices are becoming more and more natural. Sometimes, it is difficult for people to distinguish whether the audio played by electronic devices is synthesized by machines or by real people, which makes it difficult for users to distinguish the authenticity of the content in the audio, posing a security risk.
[0003] Currently, machine-synthesized audio can pose some safety hazards to humans in some situations.
[0004] Therefore, how to accurately determine whether the audio is machine-synthesized audio or audio produced by a real person is of great importance and significance in many security situations. Summary of the invention
[0005] In order to solve the above problems, the present application proposes an audio recognition method, medium, electronic device and program product to avoid the inability to accurately determine whether the audio is machine-synthesized audio or audio emitted by a real person.
[0006] In a first aspect, the present application provides an audio recognition method, the method comprising: acquiring first audio data; performing suppression processing on the first audio data to obtain first processed data, wherein the suppression processing is to suppress audio data in the first audio data that does not belong to a first category of audio data; determining the category of the first audio data based on the degree of similarity between the first processed data and the first audio data, wherein when the degree of similarity between the first processed data and the first audio data is greater than a first threshold, the first audio data is determined to be first category audio data, and when the degree of similarity between the first processed data and the first audio data is less than the first threshold, the first audio data is determined to be second category audio data.
[0007] It can be understood that the first audio data is the audio data to be identified below. After suppressing the audio data that does not belong to the first category of audio data in the first audio data, the first processed data is obtained, and the first processed data is the data with the first category of audio data characteristics retained in the first audio data. At this time, the category of the first audio data can be determined according to the similarity between the first processed data and the first audio data. If the first processed data and the first audio data have a large degree of similarity, it indicates that the first audio data and the first category of audio data are relatively close, so it can be determined that the category of the first audio data is the first category of audio data; if the first processed data and the first audio data have a small degree of similarity, it indicates that there are more audio data that do not belong to the first category of audio data in the first audio data, and the first audio data and the first category of audio data are very different, so it can be determined that the category of the first audio data is the second category of audio data. It can be understood that by comparing the first audio data with the first processed audio data that retains the characteristics of the first category of audio data, the category of the first audio data can be accurately identified.
[0008] In a possible implementation of the first aspect above, the method also includes that the first audio data includes multiple audio segments; and corresponding to the similarity between the first processed data and the first audio data being greater than a first threshold, determining that the first audio data is first category audio data includes: corresponding to the similarity between a first audio segment among the multiple audio segments and a first data segment corresponding to the first audio segment in the first processed data being greater than the first threshold, determining that the first audio segment is first category audio data.
[0009] It is understandable that after obtaining the first processed data, when determining the similarity between the first processed data and the first audio data, the similarity between the first audio data and the corresponding audio segments of the first processed data can be determined respectively, thereby identifying the category of each audio segment and improving the accuracy of identifying the category of the first audio data. Furthermore, it avoids the problem that the category of the first audio data cannot be accurately identified when there is only a slight difference between the first audio data and the first processed data retaining the characteristics of the first category audio data in one or part of the audio segments.
[0010] In a possible implementation of the first aspect, the first category of audio data is human voice audio data, and the second category of audio data is pseudo human voice audio data; or the first category of audio data is pseudo human voice audio data, and the second category of audio data is human voice audio data.
[0011] It can be understood that when the first category of audio data is human voice audio data, at this time, the audio data that does not belong to the human voice audio data in the first audio data is suppressed, for example, the pseudo human voice audio data and the environment and machine noise data are suppressed, and the human voice audio data is retained. At this time, the first processed data is data that retains the characteristics of the human voice audio data. At this time, if the first audio data and the first processed data have a large degree of similarity, the first audio data is human voice audio data, and if the first audio data and the first processed data have a small degree of similarity, the first audio data is pseudo human voice audio data. It can be understood that when the first category of audio data is pseudo human voice audio data, at this time, the audio data that does not belong to the pseudo human voice audio data in the first audio data is suppressed, for example, the human voice audio data and the environment and machine noise data are suppressed, and the pseudo human voice audio data is retained. At this time, the first processed data is data that retains the characteristics of the pseudo human voice audio data. At this time, if the first audio data and the first processed data have a large degree of similarity, the first audio data is pseudo human voice audio data, and if the first audio data and the first processed data have a small degree of similarity, the first audio data is human voice audio data. Therefore, it is possible to accurately distinguish whether the first audio data is pseudo human voice audio data or human voice audio data.
[0012] In a possible implementation of the first aspect above, suppression processing is performed on the first audio data to obtain first processed data, including: feature extraction processing is performed on the first audio data to obtain first audio features; the first audio features are input into a generative model to obtain first processed data, wherein the generative model includes at least one of the following: a diffusion model, a generative adversarial network model, and a variational autoencoder model.
[0013] It can be understood that the generative model can process the first audio data so that the processed data retains human voice audio or pseudo human voice audio, and the generative model is used to suppress the first audio feature, which is scientific and reasonable.
[0014] In a possible implementation of the first aspect above, suppression processing is performed on the first audio data to obtain first processed data, including: feature extraction processing is performed on the first audio data to obtain first audio features and second audio features, wherein the first audio feature is an audio feature sequence corresponding to each audio segment of the first audio data; the second audio feature is input into a decision model to obtain first high-dimensional category feature data; the first audio feature and the first high-dimensional category feature data are input into a generative model to obtain first processed data, wherein the generative model includes at least one of the following: a diffusion model, a generative adversarial network model, and a variational autoencoder model.
[0015] It can be understood that the decision model can obtain the first high-dimensional category feature based on the second audio feature, and the first high-dimensional category feature can indicate the category of the first audio data. At this time, the category information of the first audio data obtained by the decision model can be input into the generative model as the prior information of the generative model, thereby improving the accuracy of the generative model in generating human voice audio data or pseudo human voice audio data corresponding to each audio segment, thereby improving the accuracy of identifying pseudo human voice audio.
[0016] In a possible implementation of the first aspect above, the first processed data is audio feature data; and the degree of similarity between the first processed data and the first audio data is the degree of similarity between the first processed data and the first audio feature.
[0017] In a possible implementation of the first aspect above, the first processed data is audio feature data; and the degree of similarity between the first processed data and the first audio data is the degree of similarity between the audio data corresponding to the first processed data and the first audio data.
[0018] In a possible implementation of the first aspect above, corresponding to the generative model being a diffusion model, the neural network in the diffusion model includes: a first attention mechanism module, a first residual block, a second attention mechanism module, a third attention mechanism module, and a second residual block; and includes: the input of the first attention mechanism module includes a first audio feature, and the output of the first attention mechanism module is the input of the first residual block; the output of the first residual block and the first high-dimensional category feature data are the input of the second attention mechanism module; the output of the second attention mechanism module and the first high-dimensional category feature data are the input of the third attention mechanism module; the output of the third attention mechanism module is the input of the second residual block, and the output of the second residual block is the first processed data.
[0019] For example, the first attention mechanism module is the first attention mechanism module 301, the first residual block is the first residual block 302, the second attention mechanism module is the second attention mechanism module 303, the third attention mechanism module is the third attention mechanism module 304, and the second residual block is the second residual block 305.
[0020] In a possible implementation of the first aspect above, a diffusion model is obtained in the following manner: a first audio sample set is obtained, wherein the audio samples in the first audio sample set are samples corresponding to first category audio data; noise is added to a third audio feature after feature extraction based on the audio sample to obtain first noisy data; the first noisy data and the second high-dimensional category feature data are input into a neural network in the diffusion model for model training to obtain a trained diffusion model, wherein the second high-dimensional category feature data is obtained by inputting a fourth audio feature after feature extraction based on the audio sample into a decision-making model.
[0021] It is understandable that the reverse diffusion process in the diffusion model requires the use of a neural network to predict noisy data, so training the diffusion model is actually iterating the parameters of the neural network in the diffusion model.
[0022] In a second aspect, the present application provides an electronic device comprising: one or more processors; one or more memories; one or more memories storing one or more programs, and when the one or more programs are executed by one or more processors, the electronic device executes the audio recognition method provided by the above-mentioned first aspect and various possible implementations.
[0023] In a third aspect, the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, enables the computer to execute the audio recognition method provided by the first aspect and various possible implementations.
[0024] In a fourth aspect, the present application provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the audio recognition method provided in the first aspect and various possible implementations.
[0025] It can be understood that the beneficial effects of the second to fourth aspects mentioned above refer to the first aspect and various possible implementations, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 According to some embodiments of the present application, a schematic diagram of a user call scenario is shown;
[0027] Figure 2A According to some embodiments of the present application, a schematic diagram of the structure of an audio recognition model 10 is shown;
[0028] Figure 2B According to some embodiments of the present application, a schematic diagram of high-dimensional feature distribution is shown;
[0029] Figure 3A According to some embodiments of the present application, a schematic diagram of a diffusion model training process is shown;
[0030] Figure 3B According to some embodiments of the present application, a schematic diagram of a process of processing a sample set using a diffusion model is shown;
[0031] Figure 3C According to some embodiments of the present application, a specific structural schematic diagram of a neural network model used in a reverse diffusion process is shown;
[0032] Figure 3DAccording to some embodiments of the present application, a schematic diagram of a residual layer structure is shown;
[0033] Figure 4A According to some embodiments of the present application, a schematic diagram of a process of performing audio recognition using a trained diffusion model is shown;
[0034] Figure 4B According to some embodiments of the present application, a module schematic diagram of audio recognition is shown;
[0035] Figure 5A According to some embodiments of the present application, another schematic diagram of a diffusion model training process is shown;
[0036] Figure 5B According to some embodiments of the present application, another schematic diagram of a process of processing a sample set using a diffusion model is shown;
[0037] Figure 5C According to some embodiments of the present application, a specific structural schematic diagram of another neural network model used in the reverse diffusion process is shown;
[0038] Fig. 6A According to some embodiments of the present application, a schematic diagram of a process of performing audio recognition using a trained diffusion model is shown;
[0039] Figure 6B According to some embodiments of the present application, a module schematic diagram of audio recognition is shown;
[0040] Figure 7 According to an embodiment of the present application, a schematic diagram of the hardware structure of a mobile phone 100 is shown. DETAILED DESCRIPTION
[0041] The illustrative embodiments of the present application include but are not limited to an audio recognition method, a medium, an electronic device, a program product, etc.
[0042] The following is an introduction to the technical terms mentioned in this application.
[0043] Mel filter bank coefficient: mel filter bank, fbank. It is usually used to represent the energy distribution of audio in the frequency domain. It decomposes audio data into a series of filter bands, each of which corresponds to a different frequency range. By analyzing the energy of these filter bands, some features about the audio can be obtained, such as the spectral shape and frequency content of the audio. In an embodiment of the present application, static fbank and dynamic fbank differences can be selected as audio features for audio recognition, wherein the dynamic fbank difference can be the difference between adjacent static fbanks, and the static fbank and dynamic fbank differences are used to reflect the rhythm, emotional fluctuations, etc. of the speaker. For example, the static fbank of the current 10ms is fank1, and the static fbank of the next 10ms is fank2, then the dynamic fbank difference can be fank1-fank2. In addition, other methods can also be used to calculate the dynamic fbank difference, which is not required here.
[0044] Pitch: It is a parameter that describes the frequency of a sound. Pitch is directly related to the frequency of the sound. A higher frequency corresponds to a higher pitch, and a lower frequency corresponds to a lower pitch.
[0045] It can be understood that for audio produced by real people (hereinafter referred to as human voice audio), the changes between the static fbanks of adjacent audio frames are generally continuous, and for the pitch feature, the normal male voice frequency is generally 80Hz-180Hz, which is relatively thick, and the normal female voice frequency is generally 180Hz-300Hz, which is relatively sharp; for machine-synthesized audio, the static fbanks of continuous time periods vary greatly, and for the pitch feature, the normal male voice frequency and female voice frequency are higher than the aforementioned normal human voice.
[0046] Discriminative model: Also known as a discriminant model, it is a machine learning model used for classification problems. By learning from the training data, it finds features or patterns that can distinguish different categories. When making predictions, the model compares the features of the input data with the learned patterns and then gives the corresponding category prediction.
[0047] Diffusion model: includes forward diffusion process and reverse diffusion process.
[0048] The forward diffusion process is to gradually add noise (such as Gaussian noise, other distinguishing information that is different from clean data, etc.) to the input clean data (i.e., noise-free data), while the backward diffusion process refers to the process of gradually denoising the noisy data to restore the clean data. The denoising process satisfies certain mathematical laws, while the denoising process uses neural network learning. Therefore, the neural network can generate the required clean data based on the noisy data. That is, the diffusion model can learn the distribution of the input data, thereby generating new samples similar to the training data.
[0049] Generative model: A generative model is a machine learning model that can generate new data, such as text, images, audio, etc. The purpose of a generative model is to learn the probability distribution of data and then generate new samples based on this distribution. Common generative models include diffusion models, generative adversarial nets (GAN), variational autoencoder (VAE), etc.
[0050] The technical solution of the present application is described in detail below with reference to the accompanying drawings.
[0051] Figure 1 According to some embodiments of the present application, a user call scenario is shown. Figure 1 As shown, user KA may hear a part of the modified audio when talking on the mobile phone 100. At this time, it is necessary to identify that the audio played by the mobile phone 100 is the synthesized audio, so as to avoid the loss of user KA.
[0052] In some embodiments, a neural network model (hereinafter referred to as an audio recognition model) may be used to perform audio recognition to distinguish whether the audio corresponds to human voice audio emitted by a real person or synthesized audio (hereinafter referred to as "pseudo human voice audio"). For example, the audio recognition model may be a decision-making model, such as a binary classification model, etc. The audio recognition model may distinguish the input audio to distinguish whether the audio is pseudo human voice audio or human voice audio.
[0053] Figure 2A According to some embodiments of the present application, a schematic diagram of the structure of an audio recognition model 10 is shown. The audio recognition model is the above-mentioned decision-making model. Figure 2A As shown, the audio recognition model 10 includes an attention module 101 , a residual block 102 , a pooling layer 103 , a full connection layer 104 , and a softmax layer 105 .
[0054] Specifically, the attention mechanism module 101 can dynamically assign different weights to different parts according to certain features of the input data. In the embodiment of the present application, it is possible to learn a variety of input audio features, such as the importance difference of static fbank, dynamic fbank difference and pitch, and to assign weights to different audio features according to these differences, so as to help the model pay more attention to the important parts when processing the input data, while ignoring the less important parts, so that it can better handle complex tasks.
[0055] The residual block 102 may include multiple residual layers, such as residual layer 102A, residual layer 102B, etc., and the number of residual layers specifically included is not limited here. The residual block 102 is used for further feature extraction. It can be understood that each residual layer can add the output of layers of different depths as the input of subsequent layers to ensure that the performance of the network will not degrade when the depth is deepened, so that a deeper network structure can be trained.
[0056] The pooling layer 103 can downsample or compress the features output by the previous layer to reduce the number and size of features while extracting important features. Specifically, the pooling operation can be selected according to the characteristics of the features and the task requirements, such as maximum pooling, average pooling or other pooling methods, which are not required here.
[0057] The fully connected layer 104 can perform weighted summation on the features of the previous layer to integrate and compress the features extracted by the previous layers, and map the input features to the category or continuous value of the target, so as to transform the distributed feature representation into a more global feature representation.
[0058] The softmax layer 105 is used to obtain each category, for example, a probability estimate of pseudo human voice audio and human voice audio, so as to determine the most likely category. It can be understood that the softmax layer 105 can also be a sigmoid layer, which is not required here.
[0059] It is understandable that after the decision model is trained using audio samples, the decision model can identify whether the current audio to be identified is human voice audio or pseudo-human voice audio, thereby reminding the user whether there is a hidden danger. For example, the mobile phone 100 can perform real-time detection on the played audio during a call to determine whether the audio is human voice audio or pseudo-human voice audio, thereby preventing the user's KA from suffering losses.
[0060] However, the discriminative model learns the differences between different categories and lacks robustness. When the category differences are not large, the discriminative model cannot accurately identify them.
[0061] For example, if the audio to be recognized is a human voice audio that has been slightly modified, such as the pitch feature of a part of the human voice audio in a certain section of the audio to be recognized exceeds the normal male voice frequency range, which is 199Hz, the user hears a pseudo human voice audio. In addition, the discriminant model classifies the features extracted from the audio data to be recognized based on the learned feature differences between the pseudo human voice and the real human voice, thereby obtaining the recognition result. However, since the discriminant model needs to classify the features, a larger amount of audio information is required to obtain the classification result. Therefore, when the feature difference between the pseudo human voice and the real human voice is small, when the discriminant model is used to judge the entire longer audio data, some features will be misclassified, thereby misidentifying the pseudo human voice audio as human voice audio.
[0062] To further understand the problem of misidentifying pseudo-human voice audio as human voice audio, you can also refer to Figure 2B As shown in the figure, a schematic diagram of the high-dimensional feature distribution when the discriminant model recognizes the features of pseudo-human voice and real human voice. Figure 2B The figure shows a schematic diagram of a discriminative model identifying high-dimensional features belonging to a pseudo voice or a real voice based on the feature differences between the pseudo voice and the real voice, for example, based on the difference in the size of the pitch audio features of the pseudo voice and the real voice. Figure 2B It is shown that there are 7 high-dimensional features for real human voices, and 5 high-dimensional features for pseudo human voices. Since the decision model is based on the overall judgment of the audio, for example, the final category is determined based on the proportion of the high-dimensional features of the two categories identified. At this time, the decision model may mistakenly identify the audio to be identified as human voice audio. In addition, since the decision model is based on the difference in the characteristics of pseudo human voices and real human voices, Figure 2B The high-dimensional features P1 and P2 are near the classification boundary line, and the feature differences between the pseudo-human voice and the real human voice reflected are small, so it is very likely to be classified incorrectly, for example, the high-dimensional features P1 and P2 that actually belong to the pseudo-human voice are mistakenly identified as human voice audio.
[0063] Therefore, in order to solve the above problems, the present application proposes an audio recognition method, in which an audio recognition model is trained to have the function of generating human voice audio or pseudo human voice audio corresponding to the audio data to be recognized, and the generated human voice audio or pseudo human voice audio is compared with the audio data to be recognized according to audio segments (for example, by frames) to determine whether each audio segment in the audio data to be recognized is human voice audio or pseudo human voice audio, thereby improving the accuracy of audio recognition.
[0064] As mentioned above, the reverse diffusion of the diffusion model can gradually remove the noise from the data and restore the noise-free data. It can be understood that the noise can include Gaussian noise, certain audio feature information, etc. Therefore, in some embodiments, the diffusion model can be used as a part of the audio recognition model, so as to obtain the noise-free audio data corresponding to the audio data to be recognized by utilizing the reverse diffusion function of the diffusion model.
[0065] For example, a diffusion model can be pre-trained so that the diffusion model can suppress the noise audio data and pseudo human voice audio data in the input audio data, and retain and output the human voice audio data in the input audio data. When the audio data to be identified needs to be identified, the audio data to be identified can be input into the diffusion model, and the diffusion model can suppress the noise (including environmental, machine and other noise audio and pseudo human voice audio) in the audio data to be identified that is different from the human voice audio data, and obtain data that only includes the features of the human voice audio data. If the audio data to be identified is human voice audio data, the audio data obtained after the diffusion model is used to suppress the audio data to be identified is human voice audio data; if the audio data to be identified is pseudo human voice audio data, the audio data obtained after the diffusion model is used to suppress the audio data to be identified is also human voice audio data.
[0066] Then, the audio segment in the audio data after the suppression processing can be compared with the corresponding audio segment in the audio data to be identified to determine the degree of similarity between the two (such as similarity, distance, etc.). If the degree of similarity between the audio segment in a certain section of the audio data after the suppression processing and the corresponding audio segment in the audio data to be identified is small, then the audio segment in the audio data to be identified is determined to be pseudo human voice audio data; if the degree of similarity of a certain section is large, it can be determined that the audio data to be identified is human voice audio data. Similarly, a pre-trained diffusion model can also be used to suppress the noise audio data and human voice audio data in the audio data to be identified, so as to obtain data with higher pseudo human voice audio features, based on the comparison of the degree of similarity between each segment of the obtained audio data and each segment of the audio data to be identified, if the degree of similarity is large, the audio segment to be identified is pseudo human voice audio, otherwise it is human voice audio.
[0067] In some embodiments, the aforementioned audio recognition model may further include a discriminative model. The discriminative model may be a pre-trained model that classifies features of audio data, and the discriminative model may generate high-dimensional category features of the input audio data, and the high-dimensional category features may indicate the category of the input audio data. Figure 2BThe high-dimensional features shown are all high-dimensional category features, and each high-dimensional feature has a category to which it belongs. At this time, the category information of the audio data to be identified obtained by the decision model can be input into the diffusion model as the prior information of the diffusion model, thereby improving the accuracy of the diffusion model in generating the human voice audio data or pseudo human voice audio data corresponding to each audio segment, and then improving the accuracy of identifying pseudo human voice audio. For example, the high-dimensional category features output by the fully connected layer 104 of the above-mentioned audio recognition model can be used as the input of the diffusion model. It can be understood that the high-dimensional category features output by the fully connected layer 104 carry human voice audio information and pseudo human voice audio information belonging to different categories, respectively, which can guide the diffusion model to identify the human voice audio features and pseudo human voice audio features in the audio data to be identified, thereby improving the accuracy of the diffusion model in generating the required data.
[0068] For another example, when the audio recognition model may include a diffusion model and a discriminant model, the diffusion model may be trained to generate data including not only human voice audio features but also pseudo human voice audio features, and the discrimination result may be directly obtained based on the generated data. Specifically, the audio sample, the label of the audio sample, and the high-dimensional category features of the corresponding audio sample output by the discriminant model (for example, the high-dimensional category features may correspond to human voice audio information and pseudo human voice audio information) may be used as input data of the diffusion model, and the diffusion model may be trained so that the diffusion model can obtain the labels corresponding to each segment of the audio sample (for example, the identification corresponding to the pseudo human voice audio or the identification corresponding to the human voice audio) based on the input data.
[0069] When the audio to be identified needs to be detected, the audio to be identified can be input into the decision model to obtain the high-dimensional category features of the audio to be identified, and the audio data to be identified and the high-dimensional category features are used as the input of the diffusion model, so that the diffusion model can output the labels of each audio segment. For example, for 2s of audio data to be identified, there is a category label every 100ms to indicate whether the audio segment is pseudo-human voice audio or human voice audio.
[0070] It can be understood that the solution of the present application can be applied to any electronic device, including but not limited to mobile phones, tablet computers, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), servers, server clusters, etc., without limitation herein.
[0071] It can be understood that in addition to using the above-mentioned diffusion model for denoising to achieve recognition of the audio to be recognized, the generative network in the generative adversarial network can also be used to achieve recognition of the audio to be recognized, as well as other generative models that can be used to generate human voice audio and pseudo-human voice audio functions. They are all within the scope of protection of this application and will not be elaborated here.
[0072] It can be understood that the neural network used in the reverse diffusion process of the diffusion model in the embodiment of the present application includes but is not limited to a convolutional neural network, a recurrent neural network, and a deep neural network, which is not limited here.
[0073] It can be understood that, for the sake of convenience, the data after the audio data to be recognized is suppressed may be referred to as processed data.
[0074] Embodiment 1:
[0075] It can be understood that, as described above, on the one hand, the noise audio data and pseudo human voice audio data in the audio data to be identified can be suppressed by a pre-trained diffusion model to obtain the human voice audio data corresponding to the audio data to be identified. The similarity between each segment of the output audio data and each segment of the audio data to be identified is compared to determine whether the audio data to be identified is pseudo human voice audio. On the other hand, the noise audio data and human voice audio data in the audio data to be identified can be suppressed by a pre-trained diffusion model to obtain the pseudo human voice audio data corresponding to the audio data to be identified. The similarity between each segment of the output audio data and each segment of the audio data to be identified is compared to determine whether the audio data to be identified is pseudo human voice audio.
[0076] For ease of understanding, the following is a specific explanation using an example of using a pre-trained diffusion model to suppress noise audio data and pseudo human voice audio data in the audio data to be recognized, and outputting human voice audio data corresponding to the audio data to be recognized.
[0077] In some embodiments, human voice audio can be used as a sample data set to extract features from human voice audio, obtain a human voice audio feature sequence corresponding to each segment of human voice audio (for example, every 100ms), and use it to train a diffusion model, so that the model used for prediction in the reverse diffusion process in the diffusion model can learn the forgery process of human voice audio to pseudo human voice audio. When the reverse diffusion function in the diffusion model is actually used for audio recognition, the noise features of the environment, machine, etc. and the pseudo human voice audio features in the audio to be recognized can be suppressed, and the human voice audio features can be retained, thereby outputting the processed data.
[0078] It is understandable that the processed data can be audio data or audio feature data. When the audio feature is used as the input of the diffusion model, the processed data is the audio feature data. And the corresponding audio data can be obtained based on the audio feature data output by the diffusion model.
[0079] In addition, in some embodiments, during the reverse diffusion process, the high-dimensional feature data generated by the decision model can be used as input data for one or more layers of the diffusion model to perform model training, thereby preventing the obtained diffusion model from falling into a local optimal situation. Furthermore, in actual use, the high-dimensional feature data generated by the decision model is used as prior information of the diffusion model, so that the data output by the diffusion model has a higher accuracy.
[0080] It can be understood that since the high-dimensional category features obtained in the intermediate process when the discriminant model classifies the audio samples include information such as high-dimensional features for distinguishing synthetic sounds or real human voices, for example, the output of the above-mentioned fully connected layer 104 can be used as initial information reflecting the category features to guide training in the form of conditional input of the diffusion model, so that the diffusion model converges quickly and saves computing power, thereby avoiding the problem of falling into local optimality after training the diffusion model.
[0081] The following will be explained using an audio recognition model including a combination of a decision model and a diffusion model as an example.
[0082] Combine the following Figure 3A-3D Explain the training process of the diffusion model:
[0083] For example, refer to Figure 3A , for the forward diffusion process, it can actually be regarded as a parameterized Markov chain. In addition, Gaussian noise and pseudo-human voice audio features are gradually added to the input human voice audio feature X0. The noise addition process continues T times, generating a series of noisy data X1,...,X T . Among them, the noisy data X1,...,X T All of them have different degrees of Gaussian noise and pseudo-human voice audio features. t-1 Add noise to X t In the process, data X t The distribution is only the same as the previous data X t-1 The relationship can be expressed as q(X t |X t-1 ).
[0084] For the reverse diffusion process, the forward process can be reversed, that is, from q(X t-1 |X t) (not shown in the figure), we can reconstruct the real original data, that is, get a processed data from a completely chaotic noise data. However, since we need to find the data distribution from the complete data set, it is not easy to predict q (X t-1 |X t ), so a neural network model can be used to approximate this conditional probability p θ , thus running the reverse diffusion process. That is, predicting data X t With data X t-1 The relationship is as follows Figure 3A The p shown in θ (X t-1 |X t ).
[0085] Specifically, the generated noisy data can be predicted by the neural network model in the diffusion model to obtain processed data with human voice audio features. In addition, the high-dimensional category features obtained by processing the human voice audio feature sequence using the decision model can be input into the neural network model in the diffusion model to improve the accuracy of the reverse diffusion process prediction.
[0086] Figure 3B According to some embodiments of the present application, a schematic diagram of a process of processing a sample set using a diffusion model is shown.
[0087] like Figure 3B As shown, the first audio recognition model 30 includes a first diffusion model 30A and a first decision model 30B. First, a human voice audio sample set of human voice audio samples can be obtained, and a first feature extraction module 20A extracts features from the human voice audio sample set to obtain multiple audio feature sequences A1.
[0088] Secondly, the second feature extraction module 20B may be used to extract features from the human voice audio sample set to obtain a plurality of audio features A2. In this case, the audio features A2 may be the same as or different from the audio feature sequence A1.
[0089] Then, multiple audio features A2 are input into the first decision model 30B to obtain corresponding multiple high-dimensional category features C1. Then, multiple audio feature sequences A1 and multiple high-dimensional category features C1 are input into the first diffusion model 30A for processing. At this time, in the forward diffusion process, the first diffusion model 30A will perform noise processing on multiple audio feature sequences A1 to obtain multiple noisy data B1. In the reverse diffusion process, multiple noisy data B1 and high-dimensional category features C1 are input into the trained diffusion model for prediction to obtain prediction results. Then, the neural network model is iteratively trained based on the loss function obtained by the difference between the prediction result and the audio feature sequence A1. When the preset rounds of training are completed or the loss function value satisfies the first loss function threshold, the model training is terminated. It can be understood that as the loss function value gradually decreases, the neural network used in the reverse diffusion process can obtain the information from X. t The ability to reason out X0 after N steps.
[0090] In some embodiments, the first feature extraction module 20A and the second feature extraction module 20B can be completely the same module, or modules with the same function but different implementation methods, which is not limited here. That is to say, the features extracted by the first feature extraction module 20A and the second feature extraction module 20B for the same input data can be the same or different.
[0091] Figure 3C According to some embodiments of the present application, a schematic diagram of a specific structure of a neural network model used in the reverse diffusion process of a first diffusion model 30A is shown. The specific structure of the neural network model is based on a U-net structure as an example, and is constructed with a residual layer as the main framework.
[0092] like Figure 3C As shown, the first diffusion model 30A includes a first attention mechanism module 301, a first residual block 302, a second attention mechanism module 303, a third attention mechanism module 304 and a second residual block 305. Among them, the first residual block 302 and the second residual block 305 include multiple residual layers. The first residual block 302 includes at least a first residual layer 302A and a second residual layer 302B, and the second residual block 305 includes at least a third residual layer 305A and a fourth residual layer 305B. For the convenience of explanation, the first residual block 302 for dimensionality reduction in the U-net structure is referred to as the first downsampling part M1, the second attention mechanism module 303 and the third attention mechanism module 304 are referred to as the first intermediate part M2, and the second residual block 305 for increasing the dimension is used as the first upsampling part M3. It can be understood that in other embodiments, the first diffusion model 30A can also be other structures, which are not required here. Figure 3DAccording to some embodiments of the present application, a structure of a residual layer is shown. The residual layer includes convolution layer 1 and convolution layer 2. It should be noted that the embodiments of the present application do not limit the specific number of residual layers in the residual block in the diffusion model and the specific structure of the residual layer, and those skilled in the art can determine it according to actual needs.
[0093] Specifically, the first attention mechanism module 301, the second attention mechanism module 303 and the third attention mechanism module 304 can all be used to receive input data of the diffusion model. The second residual block 305 can output processed data.
[0094] In the reverse diffusion process: the first attention mechanism module 301 receives noisy data, and the second attention mechanism module 303 and the third attention mechanism module 304 receive multiple high-dimensional category features C1. The first decision model 30B has the same structure as the above-mentioned audio recognition model 10. At this time, the high-dimensional category feature C1 can be the output of the above-mentioned fully connected layer 104. Then the second residual block 305 can output the predicted processed data. The audio feature sequence and the high-dimensional category feature are input into the first diffusion model 30A for model training.
[0095] It can be understood that by training the first diffusion model 30A, the diffusion model learns the distribution of human voice audio, for example, the frequency, loudness, timbre, sound image movement speed, rhythm, tempo and other details of human voice audio. At this time, since the high-dimensional category features obtained by the first decision model 30B are input into the diffusion model, the model training process can converge quickly and avoid falling into the global optimum.
[0096] Therefore, after the diffusion model is trained, the reverse diffusion function of the diffusion model (i.e. the trained neural network model) can be used to predict noise, suppress the environment, machine noise and pseudo-human voice audio features of the audio to be identified, and obtain processed data. Based on the similarity between the processed data and the audio to be identified, the category corresponding to each audio segment of the audio to be identified can be obtained.
[0097] Figure 4A According to some embodiments of the present application, a schematic diagram of a process of using a trained diffusion model to perform audio recognition is shown. The execution subject of the process can be any electronic device, for example, the mobile phone 100 mentioned above. The specific steps are as follows:
[0098] S401, obtaining audio K1 to be recognized, and performing feature extraction to obtain a feature sequence K2 of the audio to be recognized.
[0099] It is understandable that the features obtained after feature extraction of the audio to be identified may include but are not limited to pitch, static fbank and dynamic fbank difference, spectrum, energy, entropy, Mel frequency cepstral coefficients (Mel frequency cepstral coefficients, MFCC), etc. As long as the audio features can be used for feature analysis, they are within the protection scope of this application. The audio feature sequence K2 to be identified includes multiple audio features, each of which corresponds to a segment of audio to be identified.
[0100] For example, during a call, the mobile phone 100 can extract features from the call audio of a preset time period, such as 2s, to obtain an audio feature sequence to be identified, that is, to obtain an audio feature sequence to be identified of 2s (i.e., 2000ms). Taking 100ms of audio as one segment, the audio feature sequence to be identified includes 20 segments of audio features, and each 100ms audio feature corresponds to each 100ms audio segment.
[0101] It is understandable that the embodiments of the present application do not limit the method of feature extraction, and those skilled in the art can select different feature extraction methods according to actual needs to obtain audio features.
[0102] Optionally, S402, using a discriminative model, based on the feature U1 of the audio to be identified, a high-dimensional category feature U2 is generated.
[0103] It is understandable that, before inputting the discriminant model, it is also necessary to extract features of the audio to be identified to obtain features of the audio to be identified using the discriminant model. It is understandable that the features of the audio to be identified input into the discriminant model may be the same as or different from the feature sequence of the audio to be identified. It is understandable that step S401 and step S402 are not in any particular order.
[0104] In some embodiments, the features of the audio to be recognized are input into a pre-trained discriminative model to obtain a high-dimensional category feature output.
[0105] For example, the high-dimensional category features may be the audio features of the call audio input into the first decision model 30B, and the data output from the fully connected layer 104 .
[0106] S403, input the audio feature sequence K2 to be identified and the high-dimensional category feature U2 into the diffusion model to obtain processed data G1.
[0107] It is understandable that in this step, the high-dimensional category feature U2 is optional. In the case of not using a discriminant model, the diffusion model is used to output the processed data G1 based on the audio feature sequence K2 to be identified.
[0108] In some embodiments, the to-be-recognized audio feature sequence K2 and the high-dimensional category feature U2 are input into different parts of the first diffusion model 30A to generate processed data G1.
[0109] In some implementations, if the trained diffusion model can suppress the environment, machine noise audio features, and pseudo human voice audio features in the audio data to be identified, the output processed data G1 is human voice audio feature data.
[0110] In some other implementations, if the trained diffusion model can suppress the noise audio features and the human voice audio features in the audio data to be identified, the output processed data G1 is pseudo human voice audio feature data.
[0111] For example, the audio feature sequence to be recognized of the call audio is input as follows Figure 3C In the first attention mechanism module 301 in the first diffusion model 30A, the high-dimensional category feature U2 output by the fully connected layer 104 of the audio recognition model 10 is input into the second attention mechanism module 303 and the third attention mechanism module 304, so that the first diffusion model 30A outputs the processed data G1.
[0112] S404: Determine the category of each audio segment in the audio K1 to be recognized based on the similarity between each audio segment corresponding to the processed data G1 and the corresponding audio segment in the audio K1 to be recognized.
[0113] In some embodiments, when the diffusion model is a model that suppresses environmental, machine noise, and pseudo-human voice audio features and retains human voice audio features, the processed data G1 is human voice audio feature data, and the similarity of each audio segment of the audio Z1 corresponding to the processed data G1 is compared with each audio segment corresponding to the audio to be identified. If the similarity between the audio segment in the audio Z1 corresponding to the processed data G1 and the audio segment of the audio to be identified reaches a threshold value N1, it is considered that the audio segment in the audio to be identified is human voice audio, otherwise it is pseudo-human voice audio. The method of calculating the similarity may include but is not limited to perceptual evaluation of speech quality (PESQ) and dynamic time warping (DTW) algorithm.
[0114] For example, for a 2s call audio, the similarity between each 100ms in the 2s call audio and the corresponding 100ms in the audio Z1 corresponding to the processed data G1 is compared. If the similarity reaches the threshold N1, then the 100ms in the call audio is considered to be human voice audio, for example, the category label "1" can be output; otherwise, it is pseudo human voice audio, for example, the category label "0" can be output, thereby obtaining a category label sequence corresponding to 2s.
[0115] In other embodiments, when the diffusion model is a model that suppresses the environment, machine noise, and human voice audio features and retains pseudo human voice audio features, the processed data G1 is pseudo human voice audio feature data, and the similarity between each audio segment of the audio Z1 corresponding to the processed data G1 and each audio segment corresponding to the audio to be recognized is compared. If the similarity between the audio segment in the audio Z1 corresponding to the processed data G1 and the audio segment of the audio to be recognized meets the threshold value N2, then the audio segment in the audio to be recognized is considered to be pseudo human voice audio, otherwise it is human voice audio.
[0116] For example, for a 2s call audio, the similarity between each 100ms in the 2s call audio and the corresponding 100ms in the audio Z1 corresponding to the processed data G1 is compared. If the similarity reaches the threshold N2, the 100ms in the call audio is considered to be pseudo human voice audio, for example, the category label "0" can be output; otherwise, it is human voice audio, for example, the category label "1" can be output, thereby obtaining a category label sequence corresponding to 2s.
[0117] In some implementations, the processed data G1 is audio feature data after suppression processing, and the audio feature data can be converted into audio. For example, the audio corresponding to the processed data G1 is obtained by inverse Fourier transform, and then the audio Z1 corresponding to the processed data G1 is compared with the audio K1 to be identified for similarity, and the category of the audio segment is identified based on the comparison result.
[0118] In some other implementations, the processed data G1 is audio feature data after suppression processing. In this case, the processed data G1 can be directly compared with the audio feature sequence K2 to be identified of the audio K1 to be identified for similarity, and the category of the audio segment can be identified based on the comparison result.
[0119] It can be understood that the execution order of S401 to S404 described above is only an example. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.
[0120] Figure 4BAccording to some embodiments of the present application, a module flow chart for performing audio recognition is shown. The audio K1 to be recognized is input into the first feature extraction module 20A for processing to obtain the audio feature sequence K2 to be recognized. The audio K1 to be recognized is input into the second feature extraction module 20B for processing to obtain the feature U1 of the audio to be recognized. The feature U1 of the audio to be recognized is input into the trained first decision model 30B to obtain the high-dimensional category feature U2 of the audio to be recognized, and the trained first diffusion model 30A is used to output the processed data G1 with human voice audio features according to the input audio feature sequence K2 to be recognized and the obtained high-dimensional category feature U2. Then, the similarity between the generated processed data G1 and the audio feature sequence K2 to be recognized is calculated, and the difference between the audio Z1 corresponding to the processed data G1 and each audio segment in the audio K1 to be recognized is obtained, so as to obtain the category label sequence corresponding to each audio segment.
[0121] Embodiment 2:
[0122] In some embodiments, a sample data set may be prepared in advance, and the samples in the sample data set may be audio samples including human voice audio segments but not including pseudo human voice audio segments, samples including pseudo human voice audio segments but not including human voice audio segments, or samples including pseudo human voice audio segments and human voice audio segments. And both human voice audio and pseudo human voice audio are configured with corresponding labels. For example, for an audio sample, if the audio sample is human voice audio, the entire audio sample is configured with a label of 1; if the audio sample is pseudo human voice audio, the entire audio sample is configured with a label of 0; if the audio sample includes both human voice audio content and pseudo human voice audio content, the audio segment corresponding to the human voice audio content is configured with a label of 1, and the audio segment corresponding to the pseudo human voice audio is configured with a label of 0.
[0123] It can be understood that, since the samples during training include human voice audio features and pseudo human voice audio features, as well as the corresponding labels, the model used for prediction in the diffusion model can learn the characteristic distribution of human voice audio and the characteristic distribution of pseudo human voice audio. At this time, the trained diffusion model can output processed data and a category label sequence corresponding to each segment of the processed data according to the input audio feature sequence to be identified. Among them, each label in the label sequence reflects whether the corresponding audio segments in the processed data have data with human voice audio features or data with pseudo human voice audio features. Therefore, the use of a diffusion model can achieve a better judgment effect on frame-level audio data, thereby improving the accuracy of audio recognition.
[0124] Specifically, feature extraction is performed on the audio sample to obtain an audio feature sequence corresponding to each segment of the audio sample (for example, every 100ms). At this time, each audio feature sequence has a corresponding label sequence. The audio feature sequence and the label sequence are used together for diffusion model training. This allows the model used for prediction in the reverse diffusion process in the diffusion model to learn the features of human voice audio and pseudo human voice audio. When the reverse diffusion function in the diffusion model is actually used for audio recognition, the distribution of human voice audio features and pseudo human voice audio features in the audio to be recognized can be identified.
[0125] Similarly, the discriminant model can be combined with the diffusion model to achieve audio recognition. In the reverse diffusion process, the high-dimensional feature data of a certain layer of the discriminant model can be used as the input data of one or more layers of the diffusion model, so that the trained diffusion model can obtain more accurate results in actual use.
[0126] It can be understood that since the high-dimensional category features obtained in the intermediate process when the discriminant model classifies the audio samples include information such as high-dimensional features for distinguishing synthetic sounds or real human voices, for example, the output of the above-mentioned fully connected layer 104 can be used as initial information reflecting the category features to guide training in the form of conditional input of the diffusion model, so that the diffusion model converges quickly and saves computing power, thereby avoiding the problem of falling into local optimality after training the diffusion model.
[0127] The following will be explained using an audio recognition model including a combination of a decision model and a diffusion model as an example.
[0128] Combine the following Figure 5A-Figure 5C Explain the training process of the diffusion model.
[0129] For example, refer to Figure 5A It can be found that Figure 5A and Figure 3A The process is essentially the same. The difference is that in the forward diffusion process, since the training sample set used involves human voice audio and pseudo human voice audio, the input of the diffusion model is an audio feature sequence involving human voice audio features and pseudo human voice audio features. At this time, since the samples used for training include pseudo human voice audio features, and the training purpose of the model is to learn human voice audio features and pseudo human voice audio features, it is only necessary to gradually add Gaussian noise to the input audio feature Y0. The noise adding process continues T times, generating a series of noisy data Y1, ..., Y T Among them, the noisy data Y1, ..., Y T All of them have different degrees of Gaussian noise. t-1 Add noise to Y t In the process, data Y t The distribution is only the same as the previous data Yt-1 The relationship can be expressed as q(Y t |Y t-1 ).
[0130] For the reverse diffusion process, the forward process can be reversed, that is, from q(Y t-1 |Y t ) (not shown in the figure), so that the Gaussian noise in the noisy data can be removed and a processed data can be constructed, that is, the original data without noise can be restored as much as possible, as well as the labels corresponding to each segment in the processed data. However, since the data distribution needs to be found from the complete data set, it is not easy to predict q(Y t-1 |Y t ), so a neural network model can be used to approximate this conditional probability p θ , thus running the reverse diffusion process. That is, predicting data Y t With data Y t-1 The relationship is as follows Figure 5A The p shown in θ (Y t-1 |Y t ).
[0131] Furthermore, the audio feature sequence corresponding to the audio sample set can be processed using a discriminative model to obtain high-dimensional category features, and the high-dimensional category features can be input into the neural network model used in the back diffusion process to improve the accuracy of the back diffusion process prediction.
[0132] Figure 5B According to some embodiments of the present application, a schematic diagram of a process of processing a sample set using a diffusion model is shown.
[0133] like Figure 5BAs shown, the second audio recognition model 40 including the second diffusion model 40A and the second decision model 40B is introduced as an example. An audio sample set including human voice audio and pseudo human voice audio (hereinafter referred to as "mixed audio sample set") is prepared in advance. It can be understood that each audio sample in the mixed audio sample set has a corresponding label (hereinafter referred to as "standard label"). In addition, the first feature extraction module 20A performs feature extraction on the mixed audio sample set to obtain multiple audio feature sequences H1. The second feature extraction module 20B performs feature extraction on the mixed audio sample set to obtain multiple audio features H2, at which time the audio features H2 and the audio feature sequence H1 can be the same or different. The multiple audio features H2 are input into the trained second decision model 40B to obtain high-dimensional category features J1. The standard label corresponding to each audio sample in each mixed audio sample set is processed by the label vectorization module 50 to obtain a vector standard label. Then the audio feature sequence H1, the vector standard label corresponding to the audio feature sequence H1, and the high-dimensional category feature J1 are processed by the second diffusion model 40A.
[0134] At this time, during the forward diffusion process, the second diffusion model 40A performs noise addition (for example, adding Gaussian noise) processing on each audio feature sequence H1 to obtain corresponding noisy data V1.
[0135] In the reverse diffusion process, each noisy data V1 and each high-dimensional category feature J1 are input into the neural network model for prediction to obtain a prediction result, which includes processed data and category labels. Then, based on the difference between the prediction result and the audio feature sequence H1 and the corresponding standard label, the loss function F1 is calculated to perform iterative training of the neural network model. It can be understood that the calculated loss function F1 takes into account both the loss function value F11 corresponding to the predicted processed data and the loss function value F12 corresponding to the predicted label. The model training ends when the preset rounds of training are completed or the loss function value F1 is less than the second loss function threshold. It can be understood that as the loss function value gradually decreases, the neural network used in the reverse diffusion process can obtain the loss function F1 from Y t The ability to reason out Y0 after N steps.
[0136] Figure 5C According to some embodiments of the present application, a specific structural schematic diagram of a neural network model used in the reverse diffusion process of a second diffusion model 40A is shown. Figure 5CAs shown, the second diffusion model 40A includes a fourth attention mechanism module 401, a splicing module 402, a third residual block 403, a fifth attention mechanism module 404, a sixth attention mechanism module 405, and a fourth residual block 406. Among them, the third residual block 403 and the fourth residual block 406 include multiple residual layers. The third residual block 403 includes at least a fifth residual layer 403A and a sixth residual layer 403B, and the fourth residual block 406 includes at least a seventh residual layer 406A and an eighth residual layer 406B. For the convenience of explanation, the third residual block 403 used for dimensionality reduction in the U-net structure is referred to as the second down-sampling part M4, the fifth attention mechanism module 404 and the sixth attention mechanism module 405 are referred to as the second intermediate part M5, and the fourth residual block 406 used for increasing the dimensionality is referred to as the second up-sampling part M6. It can be understood that the second diffusion model 40A and Figure 3C The structure of the first diffusion model 30A shown is substantially the same except for the addition of a splicing module 402, and will not be described in detail herein.
[0137] The splicing module 402 is used to splice the vector standard label output by the label vectorization module 50 with the feature data output by the fourth attention mechanism module 401 as the input of the third residual block 403. The vector standard label is obtained in the following manner: the standard label corresponding to the mixed audio sample set is generated by the label vectorization module 50. Specifically, the input standard label, such as 0 or 1, is encoded and mapped (embedding) to obtain the vector standard label. It can be understood that the vector standard label is used as a training target when the subsequent model is trained. For example, it can participate in the calculation of the loss function process based on the difference between the prediction result and the audio feature sequence H1 and the corresponding standard label to perform iterative training.
[0138] In the reverse diffusion process: the fourth attention mechanism module 401 receives the noisy data, the splicing module 402 splices the vector standard label and the output features of the fourth attention mechanism module 401, and the fifth attention mechanism module 404 and the sixth attention mechanism module 405 receive multiple high-dimensional category features J1. Then the fourth residual block 406 can output the predicted processed data and category labels. The loss function is calculated, so as to iterate the model parameters based on the loss function value.
[0139] It can be understood that by training the second diffusion model 40A, the diffusion model learns the distribution of human voice audio and pseudo human voice audio, for example, learns the characteristics of human voice audio and pseudo human voice audio, such as rhythm, timbre, emotion and other details. At this time, since the high-dimensional category features obtained by the second decision model 40B are input into the second diffusion model 40A, the model training process can converge quickly and avoid falling into the global optimum.
[0140] Therefore, after the diffusion model is trained, the reverse diffusion function of the diffusion model (i.e., the trained neural network model) can be used to predict noise, and a part of the audio data to be identified that is less different from the pseudo-human voice audio data can be suppressed from the environment and machine noise of the pseudo-human voice audio data to obtain the pseudo-human voice audio data, and another part of the audio data that is less different from the human voice audio data can be suppressed from the environment and machine noise of the human voice audio data to obtain the human voice audio data. In addition, the human voice audio part is configured with a human voice audio label corresponding to it, such as "1", and the pseudo-human voice audio part is configured with a pseudo-human voice audio label corresponding to it, such as "0". At this point, the pseudo-human voice audio can be clearly detected.
[0141] Fig. 6A According to some embodiments of the present application, a schematic diagram of a process of performing audio recognition using the reverse diffusion function in a trained diffusion model is shown. The execution subject of the process can be any electronic device, such as a mobile phone 100. The specific steps are as follows:
[0142] S601, obtaining audio to be identified W1, and performing feature extraction to obtain a feature sequence W2 of the audio to be identified.
[0143] It can be understood that this step is substantially the same as the above step S401 and will not be described in detail here.
[0144] Optionally, S602, using a discriminative model, based on the feature D1 of the audio to be identified, a high-dimensional category feature D2 is generated.
[0145] It is understandable that this step is substantially the same as the above step S402, and will not be described in detail here. It is understandable that step S601 and step S602 are not performed in any particular order.
[0146] S603, input the audio feature sequence W2 to be identified and the high-dimensional category feature D2 into the diffusion model to obtain the processed data S1 and the category label sequence R1 corresponding to the processed data S1. Optionally, in this step, the high-dimensional category feature D2 is optional. In the case of not using a discriminant model, the diffusion model can be used to output the processed data S1 and the category label sequence R1 based on the audio feature sequence W2 to be identified.
[0147] It can be understood that each segment of the processed data S1 corresponds to each segment of the audio to be identified, and each category label in the category label sequence corresponds to each audio segment in the audio to be identified.
[0148] For example, the audio features of a 2s call audio (with 100ms as one audio segment) are input as follows: Figure 5CIn the fourth attention mechanism module 401 in the second diffusion model 40A, the high-dimensional category feature D2 output by the fully connected layer 104 is input into the fifth attention mechanism module 404 and the sixth attention mechanism module 405, so that the second diffusion model 40A generates processed data S1 and a category label sequence. If only a 100ms segment of call audio in the 3S call audio is pseudo-human voice audio, the category label corresponding to the segment of the pseudo-human voice audio in the output category label sequence is "0", and the category labels of other audio segments are "1". At this time, the category label sequence corresponding to the processed data S1 is "1, ..., 1, 0, 1, .... 1", thereby achieving a better judgment effect on the frame-level data audio and improving the accuracy of audio recognition.
[0149] It can be understood that the execution order of S601 to S603 described above is only an example. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.
[0150] Figure 6B According to some embodiments of the present application, a module flow chart for performing audio recognition is shown. The audio to be recognized W1 is input into the first feature extraction module 20A for processing to obtain the audio feature sequence W2 to be recognized. The audio to be recognized W1 is input into the second feature extraction module 20B for processing to obtain the feature D1 of the audio to be recognized. The feature D1 of the audio to be recognized is input into the trained second decision model 40B to obtain the high-dimensional category feature D2 of the audio to be recognized, and the trained second diffusion model 40A is used to output the processed data S1 having human voice audio features and pseudo human voice audio features and the category label sequence R1 according to the input audio feature sequence W2 to be recognized and the obtained high-dimensional category feature D2. It can be understood that in some implementations, when the second diffusion model 40A outputs the processed data S1, it can output the vector category label corresponding to each audio segment, thereby obtaining the category label sequence R1.
[0151] For example, for a 100-second audio to be recognized, the diffusion model can generate processed data and output a category label sequence, in which each category label represents the judgment result of a 100-ms audio, that is, the category label sequence is used as the detection result.
[0152] Figure 7 According to an embodiment of the present application, a schematic diagram of the hardware structure of a mobile phone 100 is shown.
[0153] The mobile phone 100 can execute the audio recognition method provided in the embodiment of the present application. Figure 7 In the drawings, similar parts have the same reference numerals. Figure 7As shown, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0154] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0155] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. The processor 110 can execute the audio recognition method provided in the embodiment of the present application.
[0156] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0157] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0158] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0159] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0160] The embodiments of the present application also provide a program product, which, when executed on an electronic device, can enable the electronic device to implement the audio recognition methods provided in the aforementioned embodiments.
[0161] An embodiment of the present application further provides a readable storage medium, in which one or more programs are stored. When the one or more programs are executed by an electronic device, the electronic device implements the audio recognition method provided by the aforementioned embodiments.
[0162] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0163] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.
[0164] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0165] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical discs, compact disc-read only memory (CD-ROMs), magneto-optical disks, read-only memory (ROM), random-access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information using the Internet in an electrical, optical, acoustic or other form of propagation signal (e.g., carrier wave, infrared signal, digital signal, etc.). Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
[0166] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0167] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0168] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0169] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. An audio recognition method, characterized in that: The method comprises: Acquire first audio data; Performing suppression processing on the first audio data to obtain first processed data, wherein the suppression processing is suppressing audio data in the first audio data that does not belong to the first category of audio data; The first category of audio data is human voice audio data, and the audio data not belonging to the first category of audio data includes pseudo human voice audio data and environmental and machine noise data; or the first category of audio data is pseudo human voice audio data, and the audio data not belonging to the first category of audio data includes human voice audio data and environmental and machine noise data; Determine the category of the first audio data based on the similarity between the first processed data and the first audio data, wherein, corresponding to the similarity between the first processed data and the first audio data being greater than a first threshold, the first audio data is determined to be audio data of the first category, and corresponding to the similarity between the first processed data and the first audio data being less than the first threshold, the first audio data is determined to be audio data of the second category; The first audio data includes a plurality of audio segments; and the similarity between the first processed data and the first audio data is greater than a first threshold, determining that the first audio data is first category audio data, comprises: When the degree of similarity between a first audio segment among the multiple audio segments and a first data segment corresponding to the first audio segment in the first processed data is greater than the first threshold, determining that the first audio segment is audio data of the first category; The first category of audio data is human voice audio data, and the second category of audio data is pseudo human voice audio data; Or the first category audio data is the pseudo human voice audio data, and the second category audio data is the human voice audio data.
2. The method according to claim 1, characterized in that The suppressing process on the first audio data to obtain first processed data includes: Performing feature extraction processing on the first audio data to obtain a first audio feature; Inputting the first audio feature into a generative model to obtain the first processed data, Among them, the generative model includes at least one of the following: a diffusion model, a generative adversarial network model, and a variational autoencoder model.
3. The method according to claim 1, characterized in that The suppressing process on the first audio data to obtain first processed data includes: Performing feature extraction processing on the first audio data to obtain a first audio feature and a second audio feature, wherein the first audio feature is an audio feature sequence corresponding to each audio segment of the first audio data; Inputting the second audio feature into a decision model to obtain first high-dimensional category feature data; The first audio feature and the first high-dimensional category feature data are input into a generative model to obtain the first processed data, wherein the generative model includes at least one of the following: a diffusion model, a generative adversarial network model, and a variational autoencoder model.
4. The method according to claim 2 or 3, characterized in that: The first processed data is audio feature data; and the degree of similarity between the first processed data and the first audio data is the degree of similarity between the first processed data and the first audio feature.
5. The method according to claim 2 or 3, characterized in that: The first processed data is audio feature data; and the degree of similarity between the first processed data and the first audio data is the degree of similarity between the audio data corresponding to the first processed data and the first audio data.
6. The method according to claim 3, characterized in that Corresponding to the generative model being a diffusion model, the neural network in the diffusion model includes: a first attention mechanism module, a first residual block, a second attention mechanism module, a third attention mechanism module, and a second residual block; and includes: The input of the first attention mechanism module includes the first audio feature, and the output of the first attention mechanism module is the input of the first residual block; The output of the first residual block and the first high-dimensional category feature data are input to the second attention mechanism module; The output of the second attention mechanism module and the first high-dimensional category feature data are input to the third attention mechanism module; The output of the third attention mechanism module is the input of the second residual block, and the output of the second residual block is the first processed data.
7. The method according to claim 3 or 6, characterized in that: The diffusion model is obtained by: Acquire a first audio sample set, wherein the audio samples in the first audio sample set are samples corresponding to the first category of audio data; Adding noise to the third audio feature after feature extraction based on the audio sample to obtain first noisy data; The first noisy data and the second high-dimensional category feature data are input into the neural network in the diffusion model for model training to obtain a trained diffusion model, wherein the second high-dimensional category feature data is obtained by inputting the fourth audio feature after feature extraction based on the audio sample into the decision model.
8. An electronic device, characterized in that: include: one or more processors; One or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the audio recognition method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The storage medium stores instructions, which, when executed on a computer, enable the computer to execute the audio recognition method according to any one of claims 1 to 7.
10. A computer program product, the computer program product comprising: The computer program code, when the computer program code is run on a computer, enables the computer to perform the audio recognition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Audio recognition method and device, electronic equipment and storage medium
CN114550731A
A method, apparatus, and storage medium for voiceprint recognition to prevent speech synthesis attacks.
CN114937454A
Multi-mode audio-visual separation method and system fusing two-channel attention mechanism
CN116110423A
Virtual human generation method and device based on audio control, equipment and medium
CN117152285A
Voice noise reduction method and device based on model fusion and storage medium
CN117789744A
