Voiceprint recognition model training method, recognition method, system, medium and electronic device

By introducing embedded spatial geometric constraints and time-frequency representation continuity constraints as losses, combined with a cascaded network structure, the compatibility issues of the voiceprint recognition model in training and deployment are solved, improving recognition accuracy and anti-interference ability, making it suitable for embedded real-time recognition.

CN122392540APending Publication Date: 2026-07-14SICHUAN YINGTENG RUIDE TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN YINGTENG RUIDE TECH CO LTD
Filing Date
2026-05-21
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing voiceprint recognition schemes have difficulty simultaneously optimizing the embedded spatial geometry and the continuity of time-frequency representation during the training phase. They also lack the ability to perform time-series modeling and have compatibility issues when the model is deployed on the edge, resulting in insufficient recognition accuracy and anti-interference capabilities.

Method used

A voiceprint recognition model training method is adopted. By calculating the embedding spatial geometric constraint loss and the time-frequency representation continuity constraint loss, and combining the cascaded spatial feature extraction network, the temporal feature enhancement subnetwork and the statistical pooling layer, a fixed-shape static computation graph without dynamic operators is constructed.

Benefits of technology

It improves the model's recognition accuracy and anti-interference ability in complex environments, reduces edge inference latency and power consumption, and enhances its application adaptability in embedded real-time recognition scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122392540A_ABST
    Figure CN122392540A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of speech signal processing and biometric recognition, and discloses a voiceprint recognition model training method, a recognition method, a system, a medium and an electronic device. The training method comprises: acquiring a time-frequency feature map with an identity category label and inputting the voiceprint recognition model to output a voiceprint embedding vector; calculating a classification loss based on the embedding vector; calculating an embedding space geometric constraint loss, including an intra-class compactness constraint loss term and an inter-class separation constraint loss term, the inter-class separation constraint loss term imposing a lower bound constraint on the distance between two representative vectors of different identity categories; calculating a time-frequency representation continuity constraint loss, imposing amplitude suppression based on the difference between adjacent elements of the time-frequency feature map along the frequency dimension and the time dimension; and combining the three types of losses as a total loss for back propagation to update the model parameters. The present application can simultaneously improve the discriminability of the embedding space, the stability of the time-frequency representation, and the collaborative adaptability with processor static graph quantization inference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of speech signal processing and biometric recognition technology, specifically to a voiceprint recognition model training method, a voiceprint recognition method, a voiceprint recognition model training system, a computer-readable storage medium, and a voiceprint recognition electronic device. Background Technology

[0002] Voiceprint recognition identifies individuals based on their physiological and behavioral characteristics. Due to its non-contact and easy-to-collect features, it is widely used in scenarios such as identity verification, intelligent voice interaction, vehicle voice control, and identification of voice commands from airborne or terrestrial radios. With the increasing availability of embedded processors with neural network inference acceleration capabilities, the demand for real-time voiceprint recognition on the edge is growing, placing higher demands on the model's discrimination accuracy, anti-interference capabilities, and hardware deployability.

[0003] Existing speaker recognition schemes can be broadly categorized into two types. One type is the traditional approach based on i-vectors, x-vectors, etc., which relies on manually designed statistical features and linear projections to model the speaker. However, its accuracy significantly decreases in complex noisy environments and under short speech conditions. The other type is the deep learning approach, which has gradually become mainstream in recent years. This approach typically uses time-frequency representations (e.g., Mel spectrum) as input and trains the speaker embedding vector through convolutional backbones, channel attention, statistical pooling, and angular interval classification loss. The latter has better discrimination capabilities under clean speech conditions, but it still faces several challenges in engineering and edge deployment.

[0004] 1. Existing solutions mostly rely on a single classification loss during the training phase (such as a conventional classification loss based on Softmax or a classification loss based on angular margin), placing the pressure of class discrimination primarily on the margin mechanism within the classification loss. Under this type of mechanism, the optimization pressure of intra-class compactness and inter-class separation in the embedding space is intertwined within the classification loss, making it difficult to control them separately. This limits the model's generalization ability outside the training data distribution and its ability to maintain intra-class consistency and inter-class discriminancy for out-of-domain samples.

[0005] 2. Existing solutions generally treat time-frequency feature maps only as model input for forward computation, excluding them from loss function construction. The time-frequency representation of speech has a physical prior of continuity: features between adjacent frequency points and adjacent time points do not exhibit drastic discontinuous jumps. This prior is reflected in the speech signal generation mechanism and acquisition process. When the training target completely deviates from this prior, the model may unnecessarily amplify small time-frequency fluctuations introduced by disturbances such as environmental noise, equipment differences, and speech variations, affecting the stability and anti-interference ability of the embedding vector.

[0006] 3. Speech signals have strong temporal dependencies, but some existing solutions still rely mainly on pure spatial convolutional structures, which have weak temporal context modeling capabilities and are difficult to fully capture the coherent features between speech frames. A few solutions that introduce recurrent networks or attention mechanisms do not systematically cascade multiple temporal modeling steps such as frequency dimension compression, recurrent modeling, multi-head self-attention, and upsampling recovery, and there is also a lack of stable shape alignment between temporal and spatial features.

[0007] 4. Many existing voiceprint models include dynamic operators in their training implementation (such as pooling with variable shapes and attention masking related to the input length), which makes it difficult to derive static computation graphs with fixed shapes and no dynamic operators. This often leads to compatibility issues in processor-oriented compilation and quantization conversion processes, and makes it difficult to reduce edge inference latency and power consumption, thus limiting their application in embedded real-time recognition scenarios.

[0008] To address the aforementioned issues, there is an urgent need in this field for a voiceprint recognition model training method, corresponding recognition method, system, medium, and electronic device that can simultaneously introduce embedded spatial geometric constraints and time-frequency representation continuity constraints during the training phase and can coordinate with edge processor deployment. Summary of the Invention

[0009] The purpose of this invention is to overcome the problems in the prior art, such as insufficient control of the embedded spatial geometry by the internal interval mechanism of classification loss, insufficient stability of the model to time-frequency disturbances due to the absence of time-frequency feature maps in loss constraints, lack of systematic design of the cascaded structure of time-series modeling, and insufficient adaptability of model computation graph to edge processor deployment. The invention provides a voiceprint recognition model training method, recognition method, system, medium, and electronic device.

[0010] To achieve the above-mentioned objectives, the technical solution provided by this invention includes:

[0011] Voiceprint recognition model training methods include:

[0012] Multiple sets of time-frequency feature maps with identity category labels are obtained, and each set of time-frequency feature maps is input into the voiceprint recognition model to output a voiceprint embedding vector.

[0013] The classification loss is calculated based on the voiceprint embedding vector and the identity category label.

[0014] The embedding space geometric constraint loss is calculated, which includes at least an intra-class compactness constraint loss term and an inter-class separation constraint loss term. The intra-class compactness constraint loss term is used to reduce the distance between the voiceprint embedding vector of the same identity category and the representative vector of the same identity category. The inter-class separation constraint loss term is used to limit the distance between any two representative vectors of different identity categories to not less than a preset lower bound. The representative vector is used to characterize the statistical center of the voiceprint embedding vector of the same identity category in the embedding space.

[0015] The time-frequency representation continuity constraint loss is calculated, which suppresses the magnitude of the difference between adjacent elements along the frequency dimension and the difference between adjacent elements along the time dimension of the time-frequency feature map.

[0016] The classification loss, the embedding space geometric constraint loss, and the time-frequency representation continuity constraint loss are weighted and combined to form the total loss, which is then backpropagated to update the parameters of the voiceprint recognition model.

[0017] Preferably, the voiceprint recognition model includes a cascaded spatial feature extraction network, a temporal feature enhancement subnetwork, and a statistical pooling layer; the temporal feature enhancement subnetwork compresses the features output by the spatial feature extraction network along its frequency dimension to obtain a temporal feature sequence, inputs the temporal feature sequence into a recurrent neural network to model temporal dependencies, inputs the output of the recurrent neural network into a multi-head self-attention system to enhance the temporal sequence, and performs upsampling on the output of the multi-head self-attention system to restore the shape of the output of the spatial feature extraction network.

[0018] Preferably, the embedding space geometric constraint loss further includes an embedding vector norm constraint loss term to suppress the deviation of the L2 norm of the voiceprint embedding vector from a preset value; the inter-class separation constraint loss term introduces a one-sided penalty for the difference between the minimum value of the pairwise distance between the representative vectors of different identity categories and the preset margin.

[0019] Preferably, the time-frequency representation continuity constraint loss is the sum of the squares of the differences between adjacent elements along the frequency dimension and the mean of the squares of the differences between adjacent elements along the time dimension on the time-frequency feature map.

[0020] Preferably, the voiceprint recognition model further includes an embedding mapping layer and a statistical pooling layer disposed before the embedding mapping layer; the statistical pooling layer calculates first-order and second-order statistics along the time dimension for the intermediate features in the voiceprint recognition model located before the embedding mapping layer, and concatenates the first-order and second-order statistics along the channel dimension as the input of the embedding mapping layer.

[0021] Preferably, the spatial feature extraction network is a residual network with channel attention.

[0022] This invention also discloses a voiceprint recognition method, which uses a voiceprint recognition model trained using the above-described voiceprint recognition model training method. The voiceprint recognition method includes:

[0023] The time-frequency feature map to be identified is input into the voiceprint recognition model to output the voiceprint embedding vector to be identified.

[0024] Calculate the similarity between the voiceprint embedding vector to be identified and at least one registered voiceprint embedding vector.

[0025] The identity determination is output based on the comparison result between the similarity and the preset threshold.

[0026] This invention also discloses a voiceprint recognition model training system, comprising:

[0027] The input acquisition unit is used to acquire multiple sets of time-frequency feature maps with identity category labels.

[0028] The model inference unit is used to carry the voiceprint recognition model and calculates the voiceprint embedding vector by forward processing each group of time-frequency feature maps.

[0029] The loss calculation unit is used to calculate the classification loss, the embedding space geometric constraint loss, and the time-frequency representation continuity constraint loss based on the voiceprint embedding vector and the identity category label; wherein, the embedding space geometric constraint loss includes at least an intra-class compactness constraint loss term and an inter-class separation constraint loss term, the inter-class separation constraint loss term restricts the distance between each pair of representative vectors of different identity categories to be no less than a preset lower bound, and the time-frequency representation continuity constraint loss suppresses the difference magnitude of adjacent elements along the frequency dimension and along the time dimension of the time-frequency feature map.

[0030] The parameter update unit is used to weight and combine the classification loss, the embedding space geometric constraint loss and the time-frequency representation continuity constraint loss into a total loss, and backpropagate it to update the parameters of the voiceprint recognition model.

[0031] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described voiceprint recognition model training method or the above-described voiceprint recognition method.

[0032] The present invention also discloses a voiceprint recognition electronic device, including a processor and a memory, wherein the memory stores a voiceprint recognition model and computer instructions; wherein the voiceprint recognition model is a model trained using the above-mentioned voiceprint recognition model training method, and the computation graph of the voiceprint recognition model is a fixed-shape static computation graph without dynamic operators; when the computer instructions are executed by the processor, the above-mentioned voiceprint recognition method is implemented.

[0033] Beneficial effects

[0034] 1. The intra-class compactness constraint and inter-class separation constraint are treated as independent explicit loss terms and jointly optimized with the classification loss. The inter-class separation constraint is applied to the pairwise distance level of the representative vectors, so that the embedded vectors can still maintain intra-class consistency and inter-class discrimination under out-of-domain samples and cross-domain acquisition conditions. Specifically, this is reflected in the improvement of error rate in speaker confirmation tasks, the increase in the rejection rate of unregistered speakers, and the reduction of the accuracy decay under non-ideal acquisition conditions such as short-term speech and noisy environments.

[0035] 2. After introducing the time-frequency representation continuity constraint loss term, the difference magnitude between adjacent elements in the frequency dimension and the time dimension of the time-frequency feature map of the training samples is explicitly suppressed at the training target level; the model is driven to learn stable feature representations for small time-frequency fluctuations during the training phase, and has stronger robustness to disturbances such as environmental noise, speech rate changes, device differences, and speech variations.

[0036] 3. By using a cascaded structure of spatial feature extraction network, temporal feature enhancement subnetwork, statistical pooling layer and embedding mapping layer, spatial features and temporal features are fused together while maintaining shape alignment, which improves the ability to capture temporal relationships between speech frames without significantly increasing the end-side inference burden.

[0037] 4. The voiceprint recognition model can be constructed as a fixed-shape static computation graph without dynamic operators. Because the continuity constraint of time-frequency representation during the training phase has driven the model to form a stable internal representation of time-frequency features, the model can still maintain recognition accuracy under the disturbance introduced by quantization noise after being compiled and quantized (e.g., converted into a target hardware proprietary format model) on the edge processor. Attached Figure Description

[0038] Figure 1 This is a flowchart illustrating a preferred embodiment of the voiceprint recognition model training method provided by the present invention.

[0039] Figure 2 This is a schematic diagram of the structure of a voiceprint recognition model provided in another preferred embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram of the temporal feature enhancement subnet in the voiceprint recognition model provided in another preferred embodiment of the present invention;

[0041] Figure 4 This is a schematic diagram of the structure of a voiceprint recognition model training system provided in a preferred embodiment of the present invention. Detailed Implementation

[0042] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The implementation details disclosed in this invention are only used to illustrate the technical solutions of this invention and should not be construed as limiting the scope of protection of this invention; those skilled in the art can make changes and substitutions based on the loss structure and network structure forms disclosed in this invention without departing from the spirit of this invention.

[0043] Example 1

[0044] like Figure 1 As shown, this embodiment provides a voiceprint recognition model training method, including steps S1 to S5.

[0045] Step S1: Obtain multiple sets of time-frequency feature maps with identity category labels, and input each set of time-frequency feature maps into the voiceprint recognition model to output a voiceprint embedding vector.

[0046] This step completes the preparation of training samples and forward computation. The time-frequency feature map is a two-dimensional time-frequency representation after Mel transform and normalization, with a fixed number of frequency bands in the frequency dimension and a fixed number of frames in the time dimension; the identity category label is a discrete identifier of the speaker's identity, associated with each time-frequency feature. Figure 1 One-to-one correspondence.

[0047] The original speech signal, after being loaded, sampled at a uniform rate, normalized in amplitude, subjected to Mel transform, logarithmic compression, and cepstral mean-variance normalization, yields a two-dimensional real number array distributed along the frequency and time dimensions. This array is then trimmed or padded to achieve a fixed length in the time dimension, and an additional empty dimension representing the number of channels is added, resulting in a time-frequency feature map with a fixed shape. In one specific embodiment, the time-frequency feature map has 80 frequency bands and 300 time frames, and is used as the input to the voiceprint recognition model in the form of a four-dimensional array with the shape (1, 1, 80, 300), where the first dimension is the batch dimension, the second is the channel dimension, the third is the frequency dimension, and the fourth is the time dimension. This invention does not impose unique limitations on the format, sampling rate, number of Mel frequency bands, number of time frames, or normalization form of the original speech signal; those skilled in the art can make selections based on the actual application scenario, for example, a sampling rate of 16000Hz.

[0048] To improve the model's robustness to time-frequency perturbations, data augmentation operations using frequency and time masks can be performed on the time-frequency feature map. In one specific embodiment, the upper limit of the frequency mask bandwidth is set to 8, and the upper limit of the time mask frame width is set to 20; data augmentation is not performed during the verification and inference stages.

[0049] The voiceprint recognition model is used to map the time-frequency feature map into a fixed-dimensional voiceprint embedding vector. This invention does not impose a unique limitation on the specific network structure of the voiceprint recognition model; any neural network structure that can map the time-frequency feature map into a fixed-dimensional embedding vector can be used as the voiceprint recognition model.

[0050] In one specific embodiment, the voiceprint recognition model includes a cascaded spatial feature extraction network, a temporal feature enhancement subnetwork, a dual-branch statistical pooling layer, and an embedding mapping layer. For example... Figure 2 As shown, the voiceprint recognition model consists of an initial convolutional layer, four residual blocks, a temporal feature enhancement subnet, a dual-branch statistical pooling layer, and an embedding mapping layer cascaded in sequence.

[0051] The initial convolutional layer expands the single-channel time-frequency feature map to multi-channel spatial features. In one specific embodiment, the initial convolutional layer includes a convolution with a 3×3 kernel, a stride of 2, padding of 1, an input channel of 1, and an output channel of 64, as well as a batch normalization layer, a ReLU activation function, and a two-dimensional Dropout operation concatenated therewith.

[0052] The spatial feature extraction network consists of four residual blocks connected in series. In one specific embodiment, the four residual blocks sequentially expand the number of channels from 64 to 64, 128, 256, and 512, and downsampling is performed in the second, third, and fourth residual blocks through convolutions with a stride of 2. Each residual block embeds a channel attention mechanism, which weights the importance of each channel through global information aggregation, dimensionality reduction linear projection, activation, dimensionality increase linear projection, and gating weight generation, with a compression ratio of 8.

[0053] The spatial feature extraction network is not limited to a residual network with channel attention. In other embodiments, the spatial feature extraction network can also be any convolutional structure capable of extracting spatial features from a time-frequency feature map, such as a conventional residual network without channel attention, a densely connected convolutional network, or a hybrid convolutional-attention network. This embodiment uses a residual network with channel attention, which can assign learnable importance weights to features in different frequency bands while maintaining a moderate parameter scale.

[0054] The temporal feature enhancement subnetwork is cascaded after the spatial feature extraction network. The features output by the spatial feature extraction network are compressed along their frequency dimension to obtain a temporal feature sequence. This temporal feature sequence is input into a recurrent neural network to model temporal dependencies. The output of the recurrent neural network is then input into a multi-head self-attention system to enhance the temporal sequence. The output of the multi-head self-attention system is upsampled to restore the shape to that of the spatial feature extraction network output. Figure 3As shown, the temporal feature enhancement subnetwork includes four stages: frequency-dimensional compression convolution, bidirectional recurrent neural network, multi-head self-attention, and upsampling restoration. In a specific embodiment, the frequency-dimensional compression convolution uses a 5×1 kernel with 512 input and output channels to compress the residual frequency dimension (i.e., the remaining dimension after downsampling along the frequency direction) from 5 to 1, obtaining a temporal feature sequence distributed along the time dimension; the recurrent neural network uses bidirectional gated recurrent units with a hidden layer dimension of 512; the multi-head self-attention uses 8 attention heads with an attention embedding dimension of 1024; the upsampling restoration uses bilinear interpolation to simultaneously upsample the features output by the multi-head self-attention along both the frequency and time dimensions back to the original shape output by the spatial feature extraction network.

[0055] Compared to existing schemes that use only pure spatial convolutional structures as the main body of voiceprint recognition models, the temporal feature enhancement subnetwork first compresses spatial features into a temporal feature sequence with a single channel thickness using frequency-dimensional compression convolution, then passes it to a recurrent neural network to model temporal dependencies frame by frame, and then assigns high weights to the positions of strongly correlated frames in the temporal sequence using multi-head self-attention. Finally, it is upsampled to restore the feature map to the shape consistent with the output of the spatial feature extraction network. This achieves the concatenated fusion of features, including local time-frequency texture discrimination, long-range temporal dependency modeling, and key frame position weighting.

[0056] The statistical pooling layer is cascaded after the temporal feature enhancement subnet. It calculates first-order and second-order statistics along the time dimension for the intermediate features in the voiceprint recognition model that are located before the embedding mapping layer. The first-order and second-order statistics are then concatenated along the channel dimension as the input of the embedding mapping layer.

[0057] In existing solutions, if only single pooling with the mean along the time dimension is used, the resulting statistics can only reflect the central trend of the feature in the time dimension, losing information representing the fluctuation of the feature. This step calculates the first-order and second-order statistics along the time dimension and concatenates them along the channel dimension, so that the resulting statistical vector carries both the central position information and fluctuation information of the feature, resulting in higher statistical information density. In one specific embodiment, the first-order statistic is the mean along the time dimension, and the second-order statistic is the standard deviation along the time dimension. When the number of channels of the output feature of the time-series feature enhancement subnet is 512, the mean and standard deviation along the time dimension are both 512, and after concatenation along the channel dimension, a 1024-dimensional statistical vector is obtained. In other embodiments, the first-order and second-order statistics can also be other statistics that can characterize the central trend and fluctuation of the feature, such as a combination of median and mean absolute deviation.

[0058] The embedding mapping layer is cascaded after the statistical pooling layer, mapping the statistical vector output by the statistical pooling layer to a fixed-dimensional voiceprint embedding vector. In one specific embodiment, the embedding mapping layer includes a series of fully connected layers (input dimension 1024, output dimension 512), a batch normalization layer, a ReLU activation function, a Dropout operation, a fully connected layer (input dimension 512, output dimension 256), and a final batch normalization layer, ultimately outputting a 256-dimensional voiceprint embedding vector. This voiceprint embedding vector is then L2 normalized to ensure a uniform scale in Euclidean space. The dimension of the voiceprint embedding vector is not limited to 256; in other embodiments, other dimensions such as 128 or 512 dimensions, which are convenient for implementation on the edge hardware, can also be used.

[0059] Step S2: Calculate the classification loss based on the voiceprint embedding vector and the identity category label.

[0060] The classification loss is calculated based on the voiceprint embedding vector and the identity category label. Its function is to drive the voiceprint recognition model in a supervised manner to map samples of different identity categories to different separable regions in the embedding space.

[0061] This invention does not impose a unique limitation on the specific form of the classification loss. In one specific embodiment, the classification loss adopts an angle-margin-based classification loss, which introduces a preset angle margin on the angle between the embedding vector and each weight column of the classification layer, thereby expanding the interval between different categories in the angle space. In one specific embodiment, the classification loss adopts the ArcFace form and is calculated according to the following formula:

[0062] ;

[0063] Where N represents the number of samples in a training batch; i represents the index of the sample in that batch; This represents the real speaker category label for the i-th sample; This represents the voiceprint embedding vector of the i-th sample and its true speaker category. The angle between the corresponding classification layer weight columns; The angle between the voiceprint embedding vector of the i-th sample and the classification layer weight column corresponding to the j-th speaker category is represented; C represents the total number of speaker categories in the training set; s represents the scaling factor; and m represents the angle margin. In a specific embodiment, s = 32.0 and m = 0.45 can be taken.

[0064] The classification loss is not limited to the specific form described above. In other embodiments, the classification loss may also be any form of loss that can discriminate the voiceprint embedding vector based on identity category labels, such as temperature-scaling-based log-likelihood loss or contrastive learning-based discriminative loss.

[0065] Step S3: Calculate the embedded space geometric constraint loss.

[0066] The embedding space geometric constraint loss includes at least an intra-class compactness constraint loss term and an inter-class separation constraint loss term; wherein, the intra-class compactness constraint loss term is used to reduce the distance between the voiceprint embedding vector of the same identity category and the representative vector of the same identity category, and the inter-class separation constraint loss term is used to limit the pairwise distance between representative vectors of different identity categories to no less than a preset lower bound. The representative vector is used to characterize the statistical center of the voiceprint embedding vector of the same identity category in the embedding space.

[0067] In existing training schemes that rely solely on a single classification loss, the classification loss bears the entire implicit regulatory burden of intra-class compactness and inter-class separability, making it difficult to separately regulate the geometry of the embedding space. This step models intra-class compactness and inter-class separability as two independent explicit loss terms: the intra-class compactness constraint loss term acts on the distance between the embedding vector and the representative vector, attracting embedding vectors of the same class to their representative vectors; the inter-class separability constraint loss term acts on the pairwise distance between representative vectors of different classes, causing them to move away from each other. This differs from existing schemes where inter-class separability is implicitly achieved through the angular spacing mechanism within the classification loss and acts on the angular difference between the embedding vector and the classification layer weight column, differing in its target, mechanism, and independence of loss terms.

[0068] The intra-class compactness constraint loss term is defined as follows:

[0069] ;

[0070] Where N represents the number of samples in a training batch; i represents the sample index; This represents the voiceprint embedding vector of the i-th sample; This represents the true speaker category label for the i-th sample; This represents the representative vector corresponding to the speaker category. Let L2 norm represent the vector. This loss term suppresses the distance between all voiceprint embedding vectors of the same speaker category and their representative vectors in a squared L2 manner, thereby driving multiple utterances of the same speaker to cluster toward their representative vectors in the embedding space.

[0071] The inter-class separation constraint loss term is defined as follows:

[0072] ;

[0073] Where K represents the number of different speaker categories involved in a training batch; k and l are the indices of the speaker category in that batch, and k ≠ l; and These represent the representative vectors of the k-th and l-th speaking human types, respectively; The distance lower bound of the inter-class separation constraint is used as a preset margin in the one-sided penalty; max(0,·) represents the one-sided penalty operator, which is applied when the pairwise distance between the represented vectors is greater than or equal to 0. No penalty for not contributing, only when it is below The time contributes a positive loss. In one specific embodiment, it can be taken as... =1.0.

[0074] This invention does not impose a unique limitation on the specific method for generating the representative vector. In one specific embodiment, the representative vector is obtained using an intra-batch mean update method: within each training batch, the voiceprint embedding vectors of all samples belonging to the same speaker category are averaged, and the resulting mean vector is used as the representative vector for that speaker category in that batch. This method is simple to implement, does not introduce additional trainable parameters, and is suitable for training scenarios where each speaker category has multiple samples in a batch. In other embodiments, the representative vector can also be obtained using a global momentum update method: a global representative vector cache is maintained across batches, which is merged and updated with the mean vector within that batch in a momentum-weighted manner after each training batch (the momentum coefficient is an adjustable value such as 0.9), so that the representative vector maintains a stable change across batches and avoids drastic fluctuations in the representative vector caused by sample imbalance within a single batch. Those skilled in the art can implement this step based on any of the above embodiments.

[0075] As a preferred embodiment, the embedding space geometric constraint loss may further include an embedding vector norm constraint loss term, which suppresses the deviation of the L2 norm of the voiceprint embedding vector from a preset value; and the inter-class separation constraint loss term may further introduce a one-sided penalty for the difference between the minimum pairwise distance of representative vectors of different identity categories and a preset margin. This preferred embodiment addresses the shortcomings of existing solutions, namely, the unstable embedding vector norm scale (which leads to the relative comparison of intra-class and inter-class geometric distances being contaminated by norm differences) and the fact that inter-class separation only targets the average pairwise distance (which cannot actively locate the worst pair when there are extremely close intra-class representative vectors). It makes the geometric relationship of the embedding vectors at a uniform scale easier to be controlled by the loss function, and the closest representative vector pairs in the embedding space receive stronger priority optimization pressure.

[0076] The embedding vector norm constraint loss term is calculated as follows:

[0077] ;

[0078] Where N represents the number of samples in a training batch; i represents the index of the sample in the batch, i∈[1,N]; The voiceprint embedding vector of the i-th sample is represented;

[0079] express The L2 norm; express The loss term is the squared deviation between the L2 norm and the preset value of 1. This loss term uses the preset value of 1 as the L2 norm target and the squared deviation as the loss, ensuring that the norm of the voiceprint embedding vector stably converges to around 1 during training. This guarantees that the distance quantity in the embedding space geometric constraint loss and the angle quantity in the classification loss will not mismatch due to norm scale drift. The target value of the embedding vector norm constraint loss term is not limited to 1; other convenient constants can be used in other embodiments, and those skilled in the art can make adjustments according to the actual scenario.

[0080] Step S4: Calculate the continuity constraint loss of the time-frequency representation to suppress the difference magnitude of the time-frequency feature map along the frequency dimension and along the time dimension of adjacent elements.

[0081] The time-frequency representation continuity constraint loss is based on the magnitude of the difference between adjacent elements along the frequency dimension and the difference between adjacent elements along the time dimension of the time-frequency feature map.

[0082] In existing training schemes that use time-frequency feature maps as input without contributing to the loss calculation, the model's stability against minute time-frequency fluctuations relies entirely on the inductive bias of the network structure itself. This step introduces the prior knowledge of the physical continuity of the speech signal in the time-frequency domain into the training loss, enabling the model to learn feature representations stable against minute time-frequency fluctuations during the training phase. The continuity constraint introduced in this step acts at the time-frequency feature layer level, differing from physical modeling losses based on partial differential equation residuals (such as wave equation residual loss in sound field reconstruction) in both its object and form of action.

[0083] The time-frequency representation of the continuity constraint loss is defined as follows:

[0084] ;

[0085] in, and These represent the amplitude suppression components of the difference between adjacent elements along the frequency dimension and along the time dimension, respectively.

[0086] The frequency component is calculated using the following formula:

[0087] ;

[0088] The time dimension component is calculated using the following formula:

[0089] ;

[0090] Where N represents the number of samples in a training batch; i represents the sample index; The time-frequency feature map (a two-dimensional array after removing the channel dimension) corresponding to the i-th sample has a shape of (number of frequency bands, number of time frames), which is (80, 300) in a specific embodiment. and These represent slices shifted one position backward along the frequency dimension and slices in their original position, respectively. The difference between the two is the element-wise difference matrix for each pair of adjacent frequency points in the frequency dimension. and These represent slices shifted one position backward along the time dimension and slices in their original position, respectively. The difference between the two is the element-wise difference matrix for each pair of adjacent time points in the time dimension. This represents the summation of the absolute values ​​of all elements in the difference matrix.

[0091] According to the above definition, the time-frequency representation continuity constraint loss simultaneously suppresses the magnitude of the difference between adjacent elements along the frequency dimension and along the time dimension of the time-frequency feature map; when the time-frequency feature map shows a sharp jump along the frequency dimension or the time dimension, the loss term contributes more; conversely, when the time-frequency feature map remains smooth in the frequency dimension and the time dimension, the loss term contributes less.

[0092] The specific calculation form of the time-frequency representation continuity constraint loss is not limited to the form based on the sum of first-order absolute differences described above. As a preferred implementation, the sum of the squares of the differences between adjacent elements along the frequency dimension and the squares of the differences between adjacent elements along the time dimension on the time-frequency feature map can be used as the time-frequency representation continuity constraint loss. This form exerts stronger optimization pressure on sporadic strong abrupt changes, making it easier to balance the loss with other loss terms in terms of numerical magnitude. The time-frequency representation continuity constraint loss can also adopt the Huber form (using squares for small differences and absolute values ​​for large differences) to combine the characteristics of both absolute and square forms.

[0093] Step S5: The classification loss, the embedding space geometric constraint loss, and the time-frequency representation continuity constraint loss are weighted and combined as the total loss, and backpropagated to update the parameters of the voiceprint recognition model.

[0094] This step completes the parameter update during the training phase. This step integrates the three types of loss terms into a single scalar total loss using a weighted combination, then obtains the gradients of each learnable parameter of the voiceprint recognition model through backpropagation, and updates the parameters of the voiceprint recognition model using a gradient optimization algorithm. The total loss is calculated using the following formula:

[0095] ;

[0096] in, Indicates the total loss; This represents the classification loss; This represents the composite regularization loss, which is a weighted synthesis of the embedded spatial geometric constraint loss and the time-frequency representation continuity constraint loss. This represents the weighting coefficient of the composite regularization loss relative to the classification loss.

[0097] In one specific embodiment, the composite regularization loss is synthesized according to the following formula:

[0098] ;

[0099] in, , , These are the loss terms calculated according to the definitions of intra-class compactness constraint, inter-class separation constraint, and embedding vector norm constraint, respectively, which together constitute the embedding space geometric constraint loss. The loss term is calculated according to the definition of the continuity constraint in time-frequency representation mentioned above; , , , These are the weighting coefficients for each loss term. In a specific embodiment, they can be taken as... =0.05, and take =0.8、 =1.2、 =0.1、 =0.02.

[0100] The above weights are set based on the following criteria: The value of 0.05 is used to keep the gradient magnitude of the contribution of the composite regularization loss to the model parameters on the same order of magnitude as the gradient magnitude of the contribution of the classification loss, so as to avoid either one having too much weight in the parameter update process. ,make Slightly larger This puts priority optimization pressure on inter-class separation failure (i.e., there are extremely close pairs of representative vectors between each pair of representative vectors) compared to intra-class dispersion failure (i.e., samples of the same identity category do not sufficiently cluster to their representative vectors); Taking a smaller value of 0.02 allows the embedding vector norm constraint loss term to participate as an auxiliary stabilizing term rather than dominating the optimization direction; Setting it to 0.1 makes the numerical contribution of the time-frequency representation continuity constraint loss term comparable to that of each term in the embedded space geometric constraint loss term.

[0101] In other embodiments, The values ​​can also be taken in the range of [0.01, 0.1], and those skilled in the art can make adjustments within this range according to the actual training scenario; the weights of other loss terms can also be appropriately adjusted while maintaining the above basic order of magnitude relationship.

[0102] The weighted combination as the total loss described in this invention is defined as follows: in each backpropagation, the classification loss, the embedding space geometric constraint loss, and the time-frequency representation continuity constraint loss are weighted and combined into a single scalar total loss, which drives the parameter update of the voiceprint recognition model. This weighted joint optimization method has the following technical advantages compared to two-stage alternating optimization (i.e., first training the model to convergence using classification loss, and then fine-tuning the model in a later stage using geometric constraint loss or continuity constraint loss): In two-stage alternating optimization, the optimization objective of the later stage may cover, dilute, or even cancel the optimization results formed in the previous stage, leading to a tug-of-war between the optimization objectives of the two stages; while in weighted joint optimization, the optimization pressure of the three loss terms is applied synchronously in each parameter update, and the model simultaneously bears the gradient contributed by all loss terms in each backpropagation step, avoiding the optimization objective degradation problem inherent in two-stage alternating optimization.

[0103] As a preferred implementation, the training of the voiceprint recognition model may further include the following training strategy: using the AdamW optimizer with an initial learning rate of 1e-5 and a weight decay of 5e-4; using a linear learning rate for the first 10 training rounds to avoid gradient oscillations in the initial stage; and using cosine annealing for learning rate scheduling in subsequent training rounds. (Take 4990); enable mixed-precision training to accelerate training and reduce GPU memory usage; save training breakpoints after each training round to support resume training from breakpoints; evaluate recognition accuracy on the validation set to save the optimal model. In other embodiments, those skilled in the art can select other optimizers, learning rate scheduling strategies, and training acceleration methods according to the training data scale and training hardware resources.

[0104] In some preferred embodiments, the voiceprint recognition model training method further includes step S6.

[0105] Step S6: Export the trained voiceprint recognition model as a fixed-shape static computation graph without dynamic operators, and convert it into a target hardware proprietary format model via a compilation and quantization toolchain, and deploy it to the edge processor to perform inference.

[0106] This step is an optional implementation step that coordinates the training method with the edge deployment stage. The voiceprint recognition model is derived from its training form (including batch dimensions with variable shapes and possible dynamic operators) into an intermediate static computation graph (e.g., ONNX intermediate format) with a fixed input shape (e.g., fixed as (1,1,80,300)) and no dynamic operators. Then, the intermediate static computation graph is converted into a target hardware-specific format model (e.g., an RKNN format model adapted to a certain type of embedded SoC, with FP16 quantization) using a compilation and quantization toolchain for the target processor. Finally, the target hardware-specific format model is deployed to the processor of the edge device (e.g., the NPU of a certain type of embedded SoC) to perform subsequent voiceprint recognition inference.

[0107] The static computation graph deployment described in this step has the following synergistic effect with the time-frequency representation continuity constraint loss term mentioned in the training phase: the time-frequency representation continuity constraint loss term has already driven the voiceprint recognition model to form a stable internal representation of time-frequency features during the training phase, making the model insensitive to small perturbations in the time-frequency feature graph; when the voiceprint recognition model is converted into a target hardware proprietary format model through quantization methods such as FP16 and inferred on the edge processor, the perturbation introduced by quantization can be regarded as a small perturbation to the intermediate features of the model. Since there is already a robust constraint against such perturbations during the training phase, the loss of recognition accuracy of the voiceprint recognition model in edge quantization inference is smaller, thereby realizing the transfer of continuity constraints in the training phase to the stability of edge quantization accuracy.

[0108] The target hardware-specific format model is not limited to the specific examples described above. In other embodiments, the target hardware-specific format model may be a processor-specific format model adapted to various embedded SoCs; the compilation and quantization toolchain is also not limited to a specific toolchain; this invention does not impose a unique limitation on the edge hardware platform.

[0109] Example 2

[0110] like Figure 4 As shown, this embodiment provides a voiceprint recognition model training system for implementing the voiceprint recognition model training method described in Embodiment 1, including an input acquisition unit, a model inference unit, a loss calculation unit, and a parameter update unit.

[0111] The input acquisition unit is used to acquire multiple sets of time-frequency feature maps with identity category labels. The input acquisition unit reads the original speech signal from the training dataset, and sequentially performs sampling rate unification, amplitude normalization, Mel transform, logarithmic compression, cepstral mean-variance normalization, and clipping / padding to obtain the time-frequency feature maps. The time-frequency feature maps and their corresponding identity category labels are then output as a pair of training samples. In one specific embodiment, the input acquisition unit may further include a data augmentation subunit, which performs frequency and time masking on the time-frequency feature maps during the training phase to improve model robustness.

[0112] The model inference unit carries the voiceprint recognition model and performs forward computation on each set of time-frequency feature maps to obtain the voiceprint embedding vector. The model inference unit loads the current parameters of the voiceprint recognition model, performs forward computation on the input time-frequency feature maps, and outputs the voiceprint embedding vector and intermediate features required for loss calculation to the loss calculation unit. In one specific embodiment, the voiceprint recognition model carried by the model inference unit adopts the cascaded spatial feature extraction network, temporal feature enhancement subnetwork, dual-branch statistical pooling layer, and embedding mapping layer structure as described in Embodiment 1.

[0113] The loss calculation unit calculates the classification loss based on the voiceprint embedding vector and the identity category label, and calculates the embedding space geometric constraint loss and the time-frequency representation continuity constraint loss. The embedding space geometric constraint loss includes at least an intra-class compactness constraint loss term and an inter-class separation constraint loss term. The inter-class separation constraint loss term restricts the distance between each pair of representative vectors of different identity categories to be no less than a preset lower bound. The time-frequency representation continuity constraint loss suppresses the magnitude of the difference between adjacent elements along the frequency dimension and the difference between adjacent elements along the time dimension of the time-frequency feature map.

[0114] The loss calculation unit includes a classification loss calculation submodule, an embedding space geometric constraint calculation submodule, and a time-frequency representation continuity constraint calculation submodule. The embedding space geometric constraint calculation submodule may further include an intra-class compactness constraint calculation submodule, an inter-class separation constraint calculation submodule, and an optional embedding vector norm constraint calculation submodule, which calculate each loss term according to the definitions of the aforementioned intra-class compactness constraint, inter-class separation constraint, and embedding vector norm constraint, respectively. The loss calculation unit synchronously completes the calculation of all the above loss terms within each training batch and outputs each loss term and its weighted sum.

[0115] The parameter update unit weights and combines the classification loss, the embedding space geometric constraint loss, and the time-frequency representation continuity constraint loss into a total loss, and backpropagates this combination to update the parameters of the voiceprint recognition model. The parameter update unit receives the total loss from the loss calculation unit, calculates the gradient for each learnable parameter of the voiceprint recognition model, and updates the parameters of the voiceprint recognition model according to a preset optimizer and learning rate scheduling strategy. In one specific embodiment, the parameter update unit uses the AdamW optimizer, combined with a learning rate warm-up and cosine annealing scheduling strategy. The parameter update unit may also include a breakpoint training continuation submodule to support the interruption and resumption of the training process.

[0116] The above division of functional units is only one feasible division method in an embodiment of the system of the present invention. In other embodiments, the data augmentation subunit in the input acquisition unit can also be set as an independent data augmentation unit; each loss calculation submodule in the loss calculation unit can also be split into mutually independent loss calculation units; the parameter update unit can also be physically merged with the model inference unit into an integrated training runtime; the present invention does not impose a unique limitation on the physical implementation form and software module division form of each functional unit.

[0117] The voiceprint recognition model training system can also be combined with the edge-side inference subsystem to form a complete voiceprint recognition end-to-end system. The edge-side inference subsystem includes an audio preprocessing unit, a feature extraction unit (equipped with the trained voiceprint recognition model, deployed on the edge processor in a target hardware proprietary format model), and a similarity matching and determination unit; the edge-side inference subsystem receives the audio to be recognized and sequentially completes preprocessing, feature extraction, and similarity matching and determination.

[0118] In some other preferred embodiments, the present invention also provides a voiceprint recognition method (implemented in the end-side inference subsystem), comprising the following steps:

[0119] S1. Input the time-frequency feature map to be identified into the voiceprint recognition model to output the voiceprint embedding vector to be identified;

[0120] S2. Calculate the similarity between the voiceprint embedding vector to be identified and at least one registered voiceprint embedding vector;

[0121] S3. Output the identity determination based on the comparison result between the similarity and the preset threshold.

[0122] In one specific embodiment, the registered voiceprint embedding vector is obtained as follows: During the registration phase, several speech segments are collected from each registered speaker and several time-frequency feature maps are generated through the preprocessing procedure described in Embodiment 1. These maps are then input into the voiceprint recognition model to obtain corresponding voiceprint embedding vectors. The average of all voiceprint embedding vectors for the same registered speaker is used as the registered voiceprint embedding vector for that speaker. The registered voiceprint embedding vector and the corresponding registered speaker identity information are stored together in the voiceprint database. During the recognition phase, the edge-side inference subsystem loads all registered voiceprint embedding vectors from the voiceprint database.

[0123] The similarity can be calculated using cosine similarity. In one specific embodiment, the preset threshold is 0.55. When the similarity between the voiceprint embedding vector to be identified and at least one registered voiceprint embedding vector is greater than or equal to the preset threshold, the identity of the registered speaker corresponding to the most similar registered voiceprint embedding vector is output as the identity determination result; otherwise, the determination result of unknown identity is output. In other embodiments, the preset threshold can be adjusted according to the actual application scenario to balance the recognition accuracy and the rejection rate; the similarity can also be calculated using other forms such as Euclidean distance-based similarity.

[0124] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the voiceprint recognition model training method described in Embodiment 1 or the aforementioned voiceprint recognition method. In one specific embodiment, the computer-readable storage medium includes, but is not limited to, non-volatile storage media such as hard disks, solid-state drives, optical disks, and USB flash drives, as well as storage devices containing the aforementioned media.

[0125] This invention also discloses a voiceprint recognition electronic device, including a processor and a memory; the memory stores computer instructions and the voiceprint recognition model trained using the training method described in Embodiment 1, wherein the computational graph of the voiceprint recognition model is a fixed-shape static computational graph without dynamic operators; when the computer instructions are executed by the processor, the above-described voiceprint recognition method is implemented. In one specific embodiment, the processor is an NPU on a certain type of embedded SoC; in other embodiments, the processor may also be other dedicated hardware units with neural network inference acceleration capabilities. The stability of the recognition accuracy of the voiceprint recognition electronic device under edge-side quantization inference conditions comes from the transfer of the continuity constraint of the training phase described in step S6 to the edge-side quantization accuracy.

[0126] Experimental Example

[0127] The following is an experimental configuration and verification result using the voiceprint recognition model training method, voiceprint recognition method and voiceprint recognition electronic device described in this invention, to illustrate the implementation effect of this invention.

[0128] The training side uses a publicly available Chinese speaker recognition dataset (containing a large-scale Chinese speaker corpus and its corresponding identity category labels). Training samples and validation samples are randomly divided at a 9:1 ratio. The training samples are preprocessed using the procedure described in Example 1 to generate time-frequency feature maps of shape (1,1,80,300), and frequency and time masks are added for data augmentation. Validation samples are not augmented. The training hardware uses a graphics processor that supports mixed precision. The inference side uses a processing board equipped with an embedded SoC NPU for edge-side verification.

[0129] The model structure is built according to the cascaded structure described in Example 1. The loss function is configured according to the weighted combination form described in Example 1, specifically: the classification loss adopts the ArcFace example (scaling factor s is 32.0, angle margin m is 0.45), and the weights in the composite regularization loss are... =0.05、 =0.8、 =1.2、 =0.1、 =0.02; where the lower bound of the distance for the inter-class separation constraint is 0.02. The value is set to 1.0. The optimizer used is AdamW, with an initial learning rate of 1e-5 and a weight decay of 5e-4. Linear learning rate is used for the first 10 rounds as a warm-up, followed by cosine annealing for learning rate scheduling. Set the value to 4990; batch size to 32; number of iterations to 5000; enable mixed precision training. After each training round, evaluate the recognition accuracy on the validation set. Save the current model only when the accuracy is higher than the historical best value, and save the training breakpoint to support resuming training from breakpoint.

[0130] After training with the above configuration, the voiceprint recognition model achieves an accuracy of over 98.5% on the validation set. The mean cosine similarity between voiceprint embedding vectors from different speakers is no less than 0.85, and the mean cosine similarity between voiceprint embedding vectors from different speakers is no greater than 0.4. Intra-class compactness and inter-class separation are significantly better than the control model trained with only a single classification loss. In complex noise environments, the method of this invention improves the recognition accuracy by more than 15% compared to the control method trained with only a single classification loss; in short-duration speech (duration no more than 3 seconds), the recognition accuracy is improved by more than 20%; intra-class compactness is improved by more than 30%, and inter-class discrimination is improved by more than 25%.

[0131] The trained voiceprint recognition model is exported as a static computation graph in the ONNX intermediate format with a fixed input shape of (1,1,80,300) and no dynamic operators. Then, a compilation and quantization toolchain for the target processor (RKNN-Toolkit2 v2.3.2 in one specific embodiment) is used to convert this ONNX intermediate format static computation graph into a target hardware-specific format model (RKNN format in one specific embodiment, FP16 quantization). This target hardware-specific format model is deployed to the embedded SoC NPU on the processing board and its runtime is initialized. During the edge-side inference stage, the processing board reads the local audio file and generates a (1,1,80,300) time-frequency feature map using the preprocessing procedure described in Embodiment 1. The processor executes model inference to obtain a 256-dimensional voiceprint embedding vector, which is then compared with the pre-registered voiceprint embedding vectors in the voiceprint library to calculate cosine similarity, and identity determination is performed using a preset threshold of 0.55. Under this edge-side deployment condition, the end-to-end inference latency is no higher than 50 milliseconds, and the accuracy loss relative to the unquantized inference results on the training side is negligible.

[0132] The specific dataset, hardware platform, compilation and quantization toolchain, and hyperparameter values ​​used in the above experimental examples are merely one implementation of the present invention. In other embodiments, those skilled in the art can make appropriate adjustments to the training dataset, training hardware, edge hardware, compilation and quantization toolchain, and various hyperparameters according to specific application scenarios, and the present invention does not impose a unique limitation on these aspects.

[0133] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A method for training a voiceprint recognition model, characterized in that, include: Input the time-frequency feature map with identity category label into the voiceprint recognition model, and output the voiceprint embedding vector; Calculate the classification loss based on the voiceprint embedding vector and the identity category label; The embedding space geometric constraint loss is calculated, including at least an intra-class compactness constraint loss term and an inter-class separation constraint loss term; wherein the intra-class compactness constraint loss term makes the voiceprint embedding vector of the same identity category approach the representative vector of that identity category, and the inter-class separation constraint loss term restricts the pairwise distance between the representative vectors of different identity categories to be no less than a preset lower bound; the representative vector is used to characterize the statistical center of the voiceprint embedding vector of the same identity category in the embedding space. Calculate the continuity constraint loss of the time-frequency representation and suppress the difference magnitude of the time-frequency feature map along the frequency dimension and along the time dimension of adjacent elements; The classification loss, the embedding space geometric constraint loss, and the time-frequency representation continuity constraint loss are weighted and combined into a total loss, which is then used to backpropagate and update the parameters of the voiceprint recognition model.

2. The voiceprint recognition model training method according to claim 1, characterized in that, The voiceprint recognition model includes a cascaded spatial feature extraction network, a temporal feature enhancement subnetwork, and a statistical pooling layer. The temporal feature enhancement subnetwork compresses the features output by the spatial feature extraction network along its frequency dimension to obtain a temporal feature sequence. The temporal feature sequence is then input into a recurrent neural network to model temporal dependencies. The output of the recurrent neural network is input into a multi-head self-attention system to enhance the temporal sequence. Finally, the output of the multi-head self-attention system is upsampled to restore the shape of the output of the spatial feature extraction network.

3. The voiceprint recognition model training method according to claim 2, characterized in that, The spatial feature extraction network is a residual network with channel attention.

4. The voiceprint recognition model training method according to claim 1, characterized in that, The embedding space geometric constraint loss also includes an embedding vector norm constraint loss term, which suppresses the deviation of the L2 norm of the voiceprint embedding vector from the preset value; the inter-class separation constraint loss term introduces a one-sided penalty for the difference between the minimum value of the pairwise distance between the representative vectors of different identity categories and the preset margin.

5. The voiceprint recognition model training method according to claim 1, characterized in that, The continuity constraint loss of the time-frequency representation is the sum of the squares of the differences between adjacent elements along the frequency dimension and the mean of the squares of the differences between adjacent elements along the time dimension on the time-frequency feature map.

6. The voiceprint recognition model training method according to claim 2, characterized in that, The voiceprint recognition model further includes an embedding mapping layer and a statistical pooling layer disposed before the embedding mapping layer; the statistical pooling layer calculates first-order and second-order statistics along the time dimension for the intermediate features in the voiceprint recognition model located before the embedding mapping layer, and concatenates the first-order and second-order statistics along the channel dimension as the input of the embedding mapping layer.

7. A voiceprint recognition method, characterized in that, include: Using the voiceprint recognition model trained according to the method described in claim 1, the time-frequency feature map to be recognized is processed to output the voiceprint embedding vector to be recognized. Calculate the similarity between the voiceprint embedding vector to be identified and at least one registered voiceprint embedding vector; The identity determination is output based on the comparison result between the similarity and the preset threshold.

8. A voiceprint recognition model training system, characterized in that, include: The input acquisition unit is used to acquire time-frequency feature maps with identity category labels; The model inference unit carries the voiceprint recognition model and performs forward calculation on the time-frequency feature map to output the voiceprint embedding vector. The loss calculation unit calculates the classification loss based on the voiceprint embedding vector and the identity category label, and calculates the embedding space geometric constraint loss and the time-frequency representation continuity constraint loss; the embedding space geometric constraint loss includes at least an intra-class compactness constraint loss term and an inter-class separation constraint loss term, the inter-class separation constraint loss term restricts the pairwise distance between the representative vectors of different identity categories to be no less than a preset lower bound; the time-frequency representation continuity constraint loss suppresses the difference magnitude of the time-frequency feature map along the frequency dimension and along the time dimension of adjacent elements; The parameter update unit weights and combines the classification loss, embedding space geometric constraint loss, and time-frequency representation continuity constraint loss into a total loss, and then backpropagates to update the parameters of the voiceprint recognition model.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the voiceprint recognition model training method as described in any one of claims 1 to 6 or the voiceprint recognition method as described in claim 7.

10. A voiceprint recognition electronic device, characterized in that, It includes a processor and a memory; the memory stores computer instructions and a voiceprint recognition model trained using the method described in claim 1, wherein the computational graph of the voiceprint recognition model is a fixed-shape static computational graph without dynamic operators; when the computer instructions are executed by the processor, they implement the voiceprint recognition method described in claim 7.