Lightweight voiceprint recognition method and system

By using a loss function that balances the area under the detection error curve for knowledge distillation in the voiceprint recognition system, a high-performance, lightweight student model is constructed, which solves the problems of poor recognition of mundane pronunciations and the influence of noise, and achieves efficient recognition on edge devices.

CN116631409BActive Publication Date: 2025-11-07NANJING INST OF INTELLIGENT TECH INST OF MICROELECTRONICS OF THE CHINESE ACAD OF
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310434146.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2025-11-07
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

Existing voiceprint recognition systems perform poorly when dealing with ordinary pronunciations and fail to effectively account for the impact of noise, especially when deployed on edge devices where lightweight models are lacking.

Method used

We employ a loss function based on the area under the curve of the detection error trade-off, utilize a high-performance teacher model to perform knowledge distillation on a lightweight student model, construct a high-performance lightweight student model, and obtain the registered and real-time speaker embedding layers by constructing batch data and extracting spectral features, and use cosine similarity for voiceprint recognition.

Benefits of technology

It improves the recognition of short-term pronunciations that are easily affected by the environment, such as ordinary pronunciations, prevents the model from learning content other than voiceprint features, and improves the performance of the lightweight student model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116631409B_ABST
    Figure CN116631409B_ABST
Patent Text Reader

Abstract

The application discloses a lightweight voiceprint recognition method and system, and belongs to the technical field of voiceprint recognition. The method comprises the following steps: constructing batch data according to the quality of audio in a pre-acquired training data set; using a pre-acquired high-performance teacher model with fixed parameters to perform knowledge distillation on a pre-acquired lightweight student model with to-be-updated parameters according to the batch data and a loss function based on a detection error trade-off curve area, so as to acquire a high-performance lightweight student model; using the high-performance lightweight student model to acquire a registration speaker embedding layer and a real-time speaker embedding layer; calculating the similarity of the real-time speaker embedding layer and the registration speaker embedding layer, and acquiring a voiceprint recognition result according to the similarity. The method can acquire a high-performance lightweight student model, and improve the recognition effect of short-time pronunciation, such as ordinary pronunciation, which is easily affected by the environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a lightweight voiceprint recognition method and system, and belongs to the technical field of voiceprint recognition. BACKGROUND

[0002] Voiceprint recognition technology is a kind of biometric recognition authentication technology, which has wide application prospects, such as judicial authentication, financial security, etc. However, the voiceprint recognition system composed of the existing methods currently has two problems. First, since the length of ordinary pronunciation is short and there is no obvious semantic information, and it is easily affected by noise, the voiceprint recognition system has poor effect when identifying ordinary pronunciation. Among them, ordinary pronunciation refers to the pronunciation that often appears in oral conversation and is less controlled by the speaker, such as coughing, laughing, "hello" sound commonly used when making a phone call, "um" sound indicating affirmation, and clearing throat sound, etc. Second, deploying a voiceprint recognition system on an edge device requires a lightweight model.

[0003] However, the existing methods pay little attention to the processing of ordinary pronunciation, especially the influence of noise on ordinary pronunciation. In addition, the existing lightweight methods based on knowledge distillation mostly use the speaker embedding layer of the teacher model to directly guide the student model, without considering the actual evaluation and the capacity of the student model being insufficient to fit the entire embedding layer of the teacher model. SUMMARY

[0004] The purpose of the present application is to provide a lightweight voiceprint recognition method and system, which can obtain a high-performance lightweight student model and improve the recognition effect of short-time pronunciation such as ordinary pronunciation that is easily affected by the environment.

[0005] To achieve the above purpose, the present application provides the following technical solutions:

[0006] In a first aspect, the present application provides a lightweight voiceprint recognition method, comprising:

[0007] Constructing batch data according to the quality of the audio in the pre-obtained training data set;

[0008] Using a pre-obtained high-performance teacher model with fixed parameters to perform knowledge distillation on a pre-obtained lightweight student model with to-be-updated parameters according to the batch data and a loss function based on the area under the detection error trade-off curve, to obtain a high-performance lightweight student model;

[0009] Using the high-performance lightweight student model to obtain a registration speaker embedding layer and a real-time speaker embedding layer;

[0010] Calculating the similarity of the real-time speaker embedding layer and the registration speaker embedding layer, and obtaining a voiceprint recognition result according to the similarity.

[0011] According to the quality of the audio in the pre-acquired training data set, constructing the batch data includes:

[0012] Selecting a plurality of speakers, randomly selecting an audio in the training data set as an anchor audio for each speaker, each anchor audio corresponding to a positive sample and a negative sample;

[0013] The positive pair is composed of the anchor audio and its corresponding positive sample, and the negative pair is composed of the anchor audio and its corresponding negative sample;

[0014] The batch data is composed of the positive pair and the negative pair;

[0015] The training data set is constructed and acquired from a plurality of speakers' speech audios and trivial pronunciation audios, each of the speech audios and the trivial pronunciation audios corresponding to a speaker label;

[0016] The positive sample corresponding to the anchor audio is an audio in the training data set with a quality equal to or higher than the anchor audio, and the negative sample corresponding to the anchor audio is an audio randomly selected from the training data set;

[0017] The evaluation index of the quality is a signal-to-noise ratio.

[0018] According to the batch data and the loss function based on the area under the detection error trade-off curve, using a pre-acquired high-performance teacher model with fixed parameters to perform knowledge distillation on a pre-acquired lightweight student model with to-be-updated parameters, and acquiring a high-performance lightweight student model includes:

[0019] Inputting the batch data into the high-performance teacher model to obtain the area under the detection error trade-off curve of the high-performance teacher model for the batch data;

[0020] Inputting the batch data into the lightweight student model to obtain the area under the detection error trade-off curve of the lightweight student model for the batch data;

[0021] According to the area under the detection error trade-off curve of the high-performance teacher model for the batch data and the area under the detection error trade-off curve of the lightweight student model for the batch data, obtaining the loss function;

[0022] Using the loss function, continuously updating the parameters of the lightweight student model until the parameters of the lightweight student model reach loss convergence, and obtaining a high-performance lightweight student model.

[0023] According to the first aspect, further, the expression of the loss function is shown in formula (1):

[0024] L = || AUC1 - AUC2 || (1)

[0025] In formula (1), L is a loss function, AUC1 is an area under a detection error trade-off curve of the high-performance teacher model for batch data, and AUC2 is an area under a detection error trade-off curve of the lightweight student model for batch data.

[0026] In combination with the first aspect, further, a calculation formula of the area under the detection error trade-off curve is shown in formula (2):

[0027]

[0028] In formula (2), AUC is the area under the detection error trade-off curve, t is a sample similarity threshold, t max is an upper limit of the sample similarity threshold, t min is a lower limit of the sample similarity threshold, FRR(t) is a false rejection rate, FAR(t) is a false acceptance rate, j is a jth anchor point, N n is a total number of negative pairs in the current batch data, N p is a total number of positive pairs in the current batch data, e 1j is a jth anchor point speaker embedding layer, e 2j is a jth anchor point negative sample speaker embedding layer, e 3j is a jth anchor point positive sample speaker embedding layer, and f(·) is a sample similarity calculation formula, and H(·) is a step function.

[0029] The area under the detection error trade-off curve AUC is converted from an integral form to a difference form, and a parametric sigmoid function is used to replace the step function, to obtain a difference form AUC' of the area under the detection error trade-off curve. An expression of the difference form AUC' of the area under the detection error trade-off curve is shown in formula (3):

[0030]

[0031] In formula (3), AUC' is the difference form of the area under the detection error trade-off curve, Δt is a sample similarity threshold change amount, FRR'(·) is a difference form of a false rejection rate, FAR'(·) is a difference form of a false acceptance rate, and σ γ (·) is a parametric sigmoid function.

[0032] The expression of the differential form AUC' of the area under the detection error trade-off curve is used to calculate the differential form AUC1' of the area under the detection error trade-off curve of the high-performance teacher model for batch data and the differential form AUC2' of the area under the detection error trade-off curve of the lightweight student model for batch data, and the differential form AUC1' of the area under the detection error trade-off curve of the high-performance teacher model for batch data and the differential form AUC2' of the area under the detection error trade-off curve of the lightweight student model for batch data are used to obtain an approximate calculation formula of a loss function, and the approximate calculation formula of the loss function is shown as formula (4):

[0033] L' = ||AUC1'-AUC2'|| (4)

[0034] In formula (4), L' is an approximate calculation form of a loss function, AUC1' is a differential form of the area under the detection error trade-off curve of a high-performance teacher model for batch data, and AUC2' is a differential form of the area under the detection error trade-off curve of a lightweight student model for batch data.

[0035] Wherein, the expression of the parametric sigmoid function σ γ (·) is shown as formula (5):

[0036]

[0037] In formula (5), σ γ (x) is an expression of a parametric sigmoid function σ γ (·), x is an independent variable of the parametric sigmoid function σ γ (·), and γ is a hyperparameter.

[0038] In combination with the first aspect, further, the registered speaker embedding layer and the real-time speaker embedding layer are obtained by using the high-performance lightweight student model.

[0039] The registered audio is subjected to spectrum feature extraction to obtain registered audio spectrum features, and the registered audio spectrum features are input into the high-performance lightweight student model to obtain a registered speaker embedding layer.

[0040] The real-time audio is subjected to spectrum feature extraction to obtain real-time audio spectrum features, and the real-time audio is subjected to activity detection according to the registered audio until the real-time audio is detected as speech or pronunciation of the registered speaker, and the real-time audio spectrum features corresponding to the real-time audio are input into the high-performance lightweight student model to obtain a real-time speaker embedding layer.

[0041] In combination with the first aspect, further, the registered audio is randomly selected speech audio or trivial pronunciation audio.

[0042] With reference to the first aspect, further, the activity detection employs a double-threshold endpoint detection method based on short-time energy and short-time average zero-crossing rate.

[0043] With reference to the first aspect, further, the acquiring a voiceprint recognition result according to the similarity comprises:

[0044] comparing the similarity with a preset threshold;

[0045] if the similarity exceeds the preset threshold, the voiceprint recognition result is that the real-time speaker is the same as the registered speaker;

[0046] otherwise, the voiceprint recognition result is that the real-time speaker is different from the registered speaker;

[0047] wherein the similarity is a cosine similarity.

[0048] The second aspect, the present application provides a kind of light voiceprint recognition system, comprising:

[0049] batch data construction module: for according to the quality of pre-acquired training data set audio, construct batch data;

[0050] model acquisition module: for according to the batch data and the loss function based on the area under the detection error trade-off curve, utilize pre-acquired high-performance teacher model of fixed parameter, to pre-acquired light student model of updating parameter carries out knowledge distillation, obtains high-performance light student model;

[0051] speaker embedding layer acquisition module: for utilizing the high-performance light student model, obtains registered speaker embedding layer and real-time speaker embedding layer;

[0052] voiceprint recognition module: for calculating the similarity of real-time speaker embedding layer and registered speaker embedding layer, and according to the similarity obtains voiceprint recognition result.

[0053] Compared with the prior art, the present application has the following advantages:

[0054] The lightweight voiceprint recognition method provided by the application is based on a loss function of a detection error trade-off curve area, a high-performance teacher model is used to perform knowledge distillation on a lightweight student model, a high-performance lightweight student model is obtained, the lightweight student model can learn the relationship between samples processed by the high-performance teacher model, and the voiceprint recognition performance is improved. According to the audio quality, batch data is constructed, which can prevent the model from learning other content in addition to voiceprint features when low-quality speech or trivial pronunciation is used as training input, causing model drift and performance degradation, and improving the recognition effect of trivial pronunciation and other short-time pronunciations that are easily affected by the environment. The detection error trade-off curve area is converted from an integral form to a difference form, which can continuously optimize the loss function and improve the performance of the lightweight student model. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 is a lightweight voiceprint recognition method flowchart provided by the embodiment of the application. DETAILED DESCRIPTION

[0056] The technical solutions of the patent will be further described in detail below in combination with specific implementation manners.

[0057] The embodiments of the patent will be described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the patent, and cannot be understood as a limitation on the patent. The technical features in the embodiments and the embodiments can be combined with each other without conflict.

[0058] Embodiment one:

[0059] Figure 1 is a lightweight voiceprint recognition method flowchart provided by the embodiment one of the application, and the flowchart only shows the logical order of the method of the embodiment, and the steps shown or described can be completed in an order different from that shown in other possible embodiments of the application without conflict. Figure 1

[0060] The lightweight voiceprint recognition method provided by the embodiment can be applied to a terminal and can be executed by a lightweight voiceprint recognition system, which can be realized in the form of software and / or hardware, and the system can be integrated in a terminal, such as any tablet computer or computer device with communication function. Referring to Figure 1 , the method of the embodiment specifically includes the following steps:

[0061] Step one: according to the quality of the audio in the pre-acquired training data set, batch data is constructed;

[0062] ​According to the quality of the audio in the pre-acquired training data set, the batch data is constructed, including the following steps:

[0063] Step A: Select several speakers, and randomly select audio in the training data set as anchor audio for each speaker, each anchor audio corresponding to a positive sample and a negative sample;

[0064] Step B: The positive pair is composed of the anchor audio and its corresponding positive sample, and the negative pair is composed of the anchor audio and its corresponding negative sample;

[0065] Step C: The batch data is composed of the positive pair and the negative pair;

[0066] The training data set is constructed and acquired from the speech audio and the plain pronunciation audio of several speakers, each speech audio and plain pronunciation audio corresponding to a speaker label; the positive sample corresponding to the anchor audio is the audio in the training data set with quality equal to or higher than the anchor audio, and the negative sample corresponding to the anchor audio is the randomly selected audio in the training data set; the evaluation index of quality is signal-to-noise ratio.

[0067] In the training data set used in this embodiment, the number of speakers exceeds 1000, the gender ratio is balanced, the total length of the speech audio of each speaker is about 120s, and the plain pronunciation audio is about 10 sentences, wherein the frequency spectrum size of each audio is [spectrum dimension, time frame number]. The frame length used for extracting the frequency spectrum can be selected as 25ms, the frame shift is 10ms, the frequency spectrum dimension of each audio can be selected as 64, and the time frame number can be selected as 200 frames.

[0068] Step two: according to the batch data and the loss function based on the area under the detection error trade-off curve, using the pre-acquired high-performance teacher model with fixed parameters, the pre-acquired lightweight student model with to-be-updated parameters is knowledge distilled to obtain a high-performance lightweight student model;

[0069] The pre-acquired high-performance teacher model with fixed parameters can be selected as a ResNet34SE model, and each audio frequency spectrum is obtained through the high-performance teacher model to obtain a speaker embedding layer e1.

[0070] The pre-acquired lightweight student model with to-be-updated parameters can be selected as a VGG model, and the lightweight student model is replaced by a depth separable convolution except for the first layer convolution layer which is a standard convolution layer, and each audio frequency spectrum is obtained through the lightweight student model to obtain a speaker embedding layer e2.

[0071] According to the batch data and the loss function based on the area under the detection error trade-off curve, using the pre-acquired high-performance teacher model with fixed parameters, the pre-acquired lightweight student model with to-be-updated parameters is knowledge distilled to obtain a high-performance lightweight student model, including the following steps:

[0072] Step a: input batch data into the high-performance teacher model to obtain an area under a detection error trade-off curve of the high-performance teacher model for the batch data;

[0073] Step b: input the batch data into the lightweight student model to obtain an area under a detection error trade-off curve of the lightweight student model for the batch data;

[0074] Step c: according to the area under the detection error trade-off curve of the high-performance teacher model for the batch data and the area under the detection error trade-off curve of the lightweight student model for the batch data, obtain a loss function;

[0075] Step d: continuously update parameters of the lightweight student model by using the loss function until the parameters of the lightweight student model reach loss convergence, and obtain a high-performance lightweight student model;

[0076] The area under the detection error trade-off curve of the high-performance teacher model and the lightweight student model can be selected as MSE (mean square error), and an expression of the loss function is shown in formula (1):

[0077] L = ||AUC1-AUC2|| (1)

[0078] In formula (1), L is the loss function, AUC1 is the area under the detection error trade-off curve of the high-performance teacher model for the batch data, and AUC2 is the area under the detection error trade-off curve of the lightweight student model for the batch data.

[0079] A calculation formula of the area under the detection error trade-off curve is shown in formula (2):

[0080]

[0081] In formula (2), AUC is the area under the detection error trade-off curve, t is a sample similarity threshold, t max is an upper limit of the sample similarity threshold, t min is a lower limit of the sample similarity threshold, FRR(t) is a false rejection rate, FAR(t) is a false acceptance rate, j is a jth anchor point, N n is a total number of negative pairs in the current batch data, N p is a total number of positive pairs in the current batch data, e 1j is a jth anchor point speaker embedding layer, e 2j is a jth anchor point negative sample speaker embedding layer, e 3j is a jth anchor point positive sample speaker embedding layer, and f(·) is a sample similarity calculation formula, and H(·) is a step function.

[0082] In the sample similarity calculation, the cosine similarity can be selected, and the greater the sample similarity, the higher the cosine similarity.

[0083] When the similarity between the anchor point negative sample speaker embedding layer and the anchor point speaker embedding layer exceeds the sample similarity threshold t, it is recorded as FA, and FAR(t) is the ratio of the number of FA to the total number of negative pairs N in the current batch data. n When the similarity between the anchor point positive sample speaker embedding layer and the anchor point speaker embedding layer exceeds the sample similarity threshold t, it is recorded as FR, and FRR(t) is the ratio of the number of FR to the total number of positive pairs N in the current batch data. p

[0084] The area under the detection error trade-off curve AUC is converted from the integral form to the differential form, and the step function is replaced by the parametric sigmoid function to obtain the differential form AUC' of the area under the detection error trade-off curve. The expression of the differential form AUC' of the area under the detection error trade-off curve is shown in formula (3):

[0085]

[0086] In formula (3), AUC' is the differential form of the area under the detection error trade-off curve, Δt is the sample similarity threshold change, Δt can be selected as 0.1, FRR'(·) is the differential form of the rejection rate, FAR'(·) is the differential form of the false rejection rate, and σ γ (·) is the parametric sigmoid function.

[0087] Using the expression of the differential form AUC' of the area under the detection error trade-off curve, the differential form AUC1' of the area under the detection error trade-off curve of the batch data of the high-performance teacher model and the differential form AUC2' of the area under the detection error trade-off curve of the batch data of the lightweight student model are calculated and obtained. Using the differential form AUC1' of the area under the detection error trade-off curve of the batch data of the high-performance teacher model and the differential form AUC2' of the area under the detection error trade-off curve of the batch data of the lightweight student model, an approximate calculation formula of the loss function is obtained. The approximate calculation formula of the loss function is shown in formula (4):

[0088] L' = ||AUC1'-AUC2'|| (4)

[0089] In formula (4), L' is the approximate calculation form of the loss function, AUC1' is the differential form of the area under the detection error trade-off curve of the batch data of the high-performance teacher model, and AUC2' is the differential form of the area under the detection error trade-off curve of the batch data of the lightweight student model.

[0090] where the parametric sigmoid function σ γ ​The expression of (·) is shown as formula (5):

[0091]

[0092] In formula (5), σ γ (x) is a parametric sigmoid function σ γ The expression of (·) is shown as formula (5), x is a parametric sigmoid function σ γ The independent variable of (·) is γ, and γ is a hyperparameter, which can be selected as 22.

[0093] Step three: obtaining the registered speaker embedding layer and the real-time speaker embedding layer by using the high-performance lightweight self-model;

[0094] Obtaining the registered speaker embedding layer and the real-time speaker embedding layer by using the high-performance lightweight self-model includes the following steps:

[0095] Step I: obtaining the registered audio to perform spectrum feature extraction, obtaining the registered audio spectrum feature, and inputting the registered audio spectrum feature into the high-performance lightweight self-model to obtain the registered speaker embedding layer;

[0096] Step II: obtaining the real-time audio to perform spectrum feature extraction, obtaining the real-time audio spectrum feature, and performing activity detection on the real-time audio according to the registered audio until the real-time audio is detected as the speech or pronunciation of the registered speaker, inputting the real-time audio spectrum feature corresponding to the real-time audio into the high-performance lightweight self-model to obtain the real-time speaker embedding layer;

[0097] The registered audio is randomly selected speech audio or trivial pronunciation audio; the activity detection adopts a double-threshold endpoint detection method based on short-time energy and short-time average zero-crossing rate.

[0098] Step four: calculating the similarity of the real-time speaker embedding layer and the registered speaker embedding layer, and obtaining a voiceprint recognition result according to the similarity;

[0099] Obtaining a voiceprint recognition result according to the similarity includes the following steps:

[0100] Step i: comparing the similarity with a preset threshold;

[0101] Step ii: if the similarity exceeds the preset threshold, the voiceprint recognition result is that the real-time speaker is the same as the registered speaker; otherwise, the voiceprint recognition result is that the real-time speaker is different from the registered speaker;

[0102] The similarity is a cosine similarity.

[0103] The lightweight voiceprint recognition method provided in the embodiment can prevent the model from learning other content in addition to voiceprint features when low-quality speech or trivial pronunciation is input, causing the model to deviate and performance to decrease, and can improve the recognition effect of short-time pronunciation, such as trivial pronunciation, which is easily affected by the environment. The loss function based on the area under the detection error trade-off curve is used for knowledge distillation, which can enable the lightweight student model to learn the relationship between samples in each batch of data processed by the high-performance teacher model. The loss based on the area under the detection error trade-off curve is consistent with the actual test evaluation method, and therefore, a high-performance lightweight student model can be obtained. The area under the detection error trade-off curve is converted from the integral form to the differential form, which can continuously optimize the loss function and improve the performance of the lightweight student model. When constructing the batch data, the negative samples are randomly selected. The purpose of this selection method is to accurately verify the same speaker when there is high-quality audio, and to reject as much as possible to ensure low false alarm rate when the audio is low-quality, preventing the model from learning non-speaker information of low-quality speech or trivial pronunciation, such as noise environment, causing the model to deviate and the voiceprint recognition performance to decrease. In addition, reducing the impact of low-quality audio can improve the recognition effect of the system on short-time pronunciation, such as trivial pronunciation, which is easily affected by the environment.

[0104] Embodiment two:

[0105] The embodiment provides a lightweight voiceprint recognition system, comprising:

[0106] The batch data construction module is configured to construct batch data according to the quality of the audio in the pre-acquired training data set.

[0107] The model acquisition module is configured to acquire a high-performance lightweight student model by using the pre-acquired high-performance teacher model with fixed parameters to perform knowledge distillation on the pre-acquired lightweight student model with to-be-updated parameters according to the batch data and the loss function based on the area under the detection error trade-off curve.

[0108] The speaker embedding layer acquisition module is configured to acquire a registered speaker embedding layer and a real-time speaker embedding layer by using the high-performance lightweight student model.

[0109] The voiceprint recognition module is configured to calculate the similarity between the real-time speaker embedding layer and the registered speaker embedding layer, and acquire a voiceprint recognition result according to the similarity.

[0110] The lightweight voiceprint recognition system provided in the embodiment can perform the lightweight voiceprint recognition method provided in any embodiment of the application, and has the corresponding function modules and beneficial effects of the execution method.

[0111] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0112] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing system or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0113] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0115] The above merely preferred embodiments of the present application and it is to be understood that those skilled in the technical field of the present application can make a number of improvements and variations without departing from the technical principles of the present application, and these improvements and variations shall be considered as falling within the scope of the present application.

Claims

1. A lightweight voiceprint recognition method, characterized in that, The method comprises the following steps: constructing batch data according to the quality of audio in a pre-acquired training data set; performing knowledge distillation on a pre-acquired lightweight student model with to-be-updated parameters by using a pre-acquired high-performance teacher model with fixed parameters according to the batch data and a loss function based on the area under the detection error trade-off curve, to obtain a high-performance lightweight student model; obtaining a registered speaker embedding layer and a real-time speaker embedding layer by using the high-performance lightweight student model; calculating the similarity of the real-time speaker embedding layer and the registered speaker embedding layer, and obtaining a voiceprint recognition result according to the similarity; performing knowledge distillation on a pre-acquired lightweight student model with to-be-updated parameters by using a pre-acquired high-performance teacher model with fixed parameters according to the batch data and a loss function based on the area under the detection error trade-off curve, to obtain a high-performance lightweight student model, comprising the following steps: inputting the batch data into the high-performance teacher model to obtain the area under the detection error trade-off curve of the high-performance teacher model for the batch data; inputting the batch data into the lightweight student model to obtain the area under the detection error trade-off curve of the lightweight student model for the batch data; obtaining the loss function according to the area under the detection error trade-off curve of the high-performance teacher model for the batch data and the area under the detection error trade-off curve of the lightweight student model for the batch data; continuously updating the parameters of the lightweight student model by using the loss function until the parameters of the lightweight student model reach loss convergence, to obtain the high-performance lightweight student model; the expression of the loss function is shown in formula (1): (1); In formula (1), is a loss function, is an area under the detection error trade-off curve of the high-performance teacher model for batch data, is an area under the detection error trade-off curve of the lightweight student model for batch data; the calculation formula of the area under the detection error trade-off curve is shown in formula (2): (2); In formula (2), To measure the error, the area under the curve is considered. The sample similarity threshold. This is the upper limit of the sample similarity threshold. This is the lower limit of the sample similarity threshold. To reduce the rejection rate, For false recognition rate, For the first Anchor points, This represents the total number of negative pairs in the current batch of data. This represents the total number of pairs in the current batch of data. For the first Anchor speaker embedding layer, For the first Anchor point negative sample speaker embedding layer, For the first Anchor point positive sample speaker embedding layer, Here is the formula for calculating sample similarity. It is a step function; The area under the detection error tradeoff curve is calculated The area under the detection error tradeoff curve is converted from integral form to differential form and replaced by a sigmoid function with parameters to obtain a differential form The differential form of the area under the detection error tradeoff curve The expression of the differential form of the area under the detection error tradeoff curve is shown in formula (3): (3); In formula (3), A differential form of the area under the error trade-off curve is detected, A sample similarity threshold change amount, A differential form of the rejection rate, A differential form of the false rejection rate, A parametric sigmoid function; Calculating a differential form of an area under a detection error trade-off curve using a high-performance teacher model and a lightweight student model , and calculating a differential form of an area under a detection error trade-off curve using the high-performance teacher model and the lightweight student model , to obtain an approximate calculation formula of a loss function , the approximate calculation formula of the loss function being shown in Equation (4): (4); In formula (4), is an approximate calculation form of the loss function, is a differential form of the area under the detection error trade-off curve of the high-performance teacher model for batch data, is a differential form of the area under the detection error trade-off curve of the lightweight student model for batch data; where the sigmoid function with parameter The expression is given by equation (5): (5); In formula (5), The parameterized sigmoid function The expression, The parameterized sigmoid function The independent variable, This is a hyperparameter.

2. The lightweight voiceprint recognition method of claim 1, wherein, constructing batch data according to the quality of audio in a pre-acquired training data set, comprising the following steps: selecting a plurality of speakers, randomly selecting audio in the training data set as anchor audio for each speaker, and each anchor audio corresponding to a positive sample and a negative sample; forming a positive pair from the anchor audio and the corresponding positive sample, and forming a negative pair from the anchor audio and the corresponding negative sample; forming batch data from the positive pair and the negative pair; wherein the training data set is constructed and obtained from a plurality of speaker voice audios and trivial pronunciation audios, and each of the voice audios and the trivial pronunciation audios corresponds to a speaker label; the positive sample corresponding to the anchor audio is an audio in the training data set with a quality equal to or higher than the anchor audio, and the negative sample corresponding to the anchor audio is an audio randomly selected from the training data set; the evaluation index of the quality is signal-to-noise ratio.

3. The lightweight voiceprint recognition method of claim 1, wherein, obtaining a registered speaker embedding layer and a real-time speaker embedding layer by using the high-performance lightweight student model, comprising the following steps: performing spectral feature extraction on the registered audio to obtain registered audio spectral features, inputting the registered audio spectral features into the high-performance lightweight student model, and obtaining a registered speaker embedding layer; The real-time audio is acquired to extract spectrum features, the spectrum features of the real-time audio are acquired, and activity detection is performed on the real-time audio according to the registered audio until it is detected that the real-time audio is the voice or pronunciation of the registered speaker, the spectrum features of the real-time audio corresponding to the real-time audio are input into the high-performance lightweight student model, and a real-time speaker embedding layer is acquired.

4. The lightweight voiceprint recognition method of claim 3, wherein, The registered audio is randomly selected voice audio or trivial pronunciation audio.

5. The lightweight voiceprint recognition method of claim 3, wherein, The activity detection adopts a double-threshold endpoint detection method based on short-time energy and short-time average zero-crossing rate.

6. The lightweight voiceprint recognition method of claim 1, wherein, The voiceprint recognition result includes: The similarity is compared with a preset threshold value; If the similarity exceeds the preset threshold value, the voiceprint recognition result is that the real-time speaker is the same as the registered speaker; Otherwise, the voiceprint recognition result is that the real-time speaker is different from the registered speaker. The similarity is a cosine similarity.

7. A lightweight voiceprint recognition system, characterized in that, The voiceprint recognition method includes: A batch data construction module is configured to construct batch data according to the quality of audio in a pre-acquired training data set; A model acquisition module is configured to acquire a high-performance lightweight student model by performing knowledge distillation on a pre-acquired lightweight student model with to-be-updated parameters using a pre-acquired high-performance teacher model with fixed parameters according to batch data and a loss function based on the area under a detection error trade-off curve; A speaker embedding layer acquisition module is configured to acquire a registered speaker embedding layer and a real-time speaker embedding layer using the high-performance lightweight student model; A voiceprint recognition module is configured to calculate the similarity of the real-time speaker embedding layer and the registered speaker embedding layer and acquire a voiceprint recognition result according to the similarity. The high-performance lightweight student model is acquired by performing knowledge distillation on the pre-acquired lightweight student model with to-be-updated parameters using the pre-acquired high-performance teacher model with fixed parameters according to the batch data and the loss function based on the area under the detection error trade-off curve, and includes: The batch data is input into the high-performance teacher model to acquire the area under the detection error trade-off curve of the high-performance teacher model for the batch data; The batch data is input into the lightweight student model to acquire the area under the detection error trade-off curve of the lightweight student model for the batch data; The loss function is acquired according to the area under the detection error trade-off curve of the high-performance teacher model for the batch data and the area under the detection error trade-off curve of the lightweight student model for the batch data; The parameters of the lightweight student model are continuously updated using the loss function until the parameters of the lightweight student model reach loss convergence, and the high-performance lightweight student model is acquired; The expression of the loss function is shown in formula (1): (1); In formula (1), is a loss function, is an area under the detection error trade-off curve of the high-performance teacher model for batch data, is an area under the detection error trade-off curve of the lightweight student model for batch data; The calculation formula of the area under the detection error trade-off curve is shown in formula (2): (2); In formula (2), To measure the error, the area under the curve is considered. The sample similarity threshold. This is the upper limit of the sample similarity threshold. This is the lower limit of the sample similarity threshold. To reduce the rejection rate, For false recognition rate, For the first Anchor points, This represents the total number of negative pairs in the current batch of data. This represents the total number of correct pairs in the current batch of data. For the first Anchor speaker embedding layer, For the first Anchor point negative sample speaker embedding layer, For the first Anchor point positive sample speaker embedding layer, Here is the formula for calculating sample similarity. It is a step function; The area under the detection error tradeoff curve is calculated The area under the detection error tradeoff curve is converted from integral form to difference form and replaced by a sigmoid function with parameters to obtain a difference form The area under the detection error tradeoff curve is converted from integral form to difference form and replaced by a sigmoid function with parameters to obtain a difference form The expression of the difference form of the area under the detection error tradeoff curve is shown in formula (3): (3); In formula (3), As a differential form of the area under the error trade-off curve, As a differential form of the area under the error trade-off curve, As a differential form of the area under the error trade-off curve, As a differential form of the area under the error trade-off curve, As a differential form of the area under the error trade-off curve, Calculating a differential form of an area under a detection error trade-off curve using a high-performance teacher model , a differential form of an area under a detection error trade-off curve for batch data of the high-performance teacher model , a differential form of an area under a detection error trade-off curve for batch data of the light-weight student model , a differential form of an area under a detection error trade-off curve for batch data of the high-performance teacher model , a differential form of an area under a detection error trade-off curve for batch data of the light-weight student model , an approximate calculation formula of a loss function is obtained, and the approximate calculation formula of the loss function is shown in formula (4): (4); In formula (4), is an approximate calculation form of the loss function, is a differential form of the area under the detection error trade-off curve of the high-performance teacher model for batch data, is a differential form of the area under the detection error trade-off curve of the lightweight student model for batch data; where the sigmoid function with parameter The expression is given by equation (5): (5); In equation (5), is a parametric sigmoid function is an expression, is a parametric sigmoid function is an argument of the parametric sigmoid function is a hyperparameter.

Citation Information

Patent Citations

  • Multi-modal knowledge distillation method and system

    CN113361396A

  • Behavior prediction method and device and related product

    CN113821720A