Training method, use method, device, equipment and medium of speech coding model

By introducing the momentum encoder and model coding error training method into the speech coding model, the problem of reduced speech data encoding performance of the speech coding model outside specific audio scenes is solved, and high-quality speech data coding and model versatility are achieved.

CN114333792BActive Publication Date: 2024-09-03TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111528718.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-09-03
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

The performance of existing speech coding models decreases when faced with speech data outside specific audio scenes, and there is an over-fitting problem, making it difficult to encode with high quality.

Method used

The momentum encoder and model coding error training method are introduced. The momentum encoder is used to extract speech data features that are easy to transmit, and the model coding error is used for backward error propagation training, which enriches the speech data coding method.

Benefits of technology

It improves the coding quality of the speech coding model when facing speech data outside specific audio scenes, avoids performance degradation, and enhances the versatility and adaptability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114333792B
    Figure CN114333792B
Patent Text Reader

Abstract

The present application discloses a training method, a method of using, an apparatus, a device and a medium for a speech coding model, and belongs to the field of artificial intelligence technology. The method includes: obtaining first sample speech data; inputting the first sample speech data into a first speech encoder to obtain a first feature representation; inputting the first sample speech data into a momentum encoder to obtain a second feature representation; determining the model coding error based on the first feature representation and the second feature representation; and performing backward error propagation training on the speech coding model using the model coding error to obtain a trained speech coding model. The present application enriches the method for encoding speech data by adding a momentum encoder to encode speech data; the momentum encoder extracts speech data features that are easy to transmit, so that the speech coding model can also perform high-quality speech coding when facing speech data outside of specific audio scenes. The present application can be applied to the field of intelligent transportation technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a training method, use method, device, equipment and medium for a speech coding model. Background Art

[0002] Speaker Recognition (SRE) technology is an important part of biometric recognition technology. It is a technology that automatically identifies the identity of a speaker based on the feature representation in speech data that can reflect the speaker's physiological and behavioral characteristics.

[0003] In related technologies, SRE technology extracts feature representations that reflect the speaker's physiological and behavioral characteristics from speech data through deep neural networks, and completes the speaker recognition task based on the degree of similarity between different speech data.

[0004] However, there is an overfitting problem in the process of extracting feature representations that reflect the speaker's physiological and behavioral characteristics from speech data. That is, the performance is excellent only when extracting feature representations of speech data in a specific audio scene. When faced with speech data outside of a specific audio scene, the performance of extracting feature representations is seriously affected. Summary of the invention

[0005] The present application provides a training method, use method, device, equipment and medium of a speech coding model, and the technical solution is as follows:

[0006] According to one aspect of the present application, a method for training a speech coding model is provided, wherein the speech coding model comprises: a first speech encoder and a momentum encoder; the method comprises:

[0007] Acquire first sample voice data;

[0008] Inputting the first sample speech data into the first speech encoder to obtain a first feature representation of the first sample speech data;

[0009] Inputting the first sample speech data into the momentum encoder to obtain a second feature representation of the first sample speech data, wherein at least one network parameter of the momentum encoder is determined based on the network parameter of the first speech encoder;

[0010] determining a model encoding error based on the first feature representation and the second feature representation;

[0011] The speech coding model is trained by backward error propagation using the model coding error to obtain a trained speech coding model.

[0012] According to another aspect of the present application, a method for using a speech coding model is provided, the method being applied to a computer device, the computer device running a speech coding model, the speech coding model being obtained according to the training method of the speech coding model;

[0013] The method comprises:

[0014] Get input voice data;

[0015] Acquire a reference feature representation, wherein the reference feature representation is a feature representation of speech data of a target recognition object, wherein the reference feature representation is obtained by inputting reference speech data into a speech coding model, wherein the reference speech data is speech data of the target recognition object;

[0016] Inputting the input speech data into the first speech encoder in the speech coding model to obtain a sixth feature representation of the input speech data;

[0017] Based on the sixth feature representation and the reference feature representation, the input voice data is judged to obtain a judgment result of the input voice data, and the judgment result is used to indicate whether the input voice data is the voice data of the target recognition object.

[0018] According to another aspect of the present application, a training device for a speech coding model is provided, wherein the speech coding model comprises: a first speech encoder and a momentum encoder; the device comprises:

[0019] An acquisition module, used for acquiring first sample voice data;

[0020] An input module, configured to input the first sample speech data into the first speech encoder to obtain a first feature representation of the first sample speech data;

[0021] The input module is further used to input the first sample speech data into the momentum encoder to obtain a second feature representation of the first sample speech data, wherein at least one network parameter of the momentum encoder is determined based on the network parameter of the first speech encoder;

[0022] a processing module, configured to determine a model encoding error based on the first feature representation and the second feature representation;

[0023] A training module is used to perform backward error propagation training on the speech coding model using the model coding error to obtain a trained speech coding model.

[0024] In an optional design of the present application, the speech coding model further includes: a first coding projector, the coding projector being used to reduce the gradient of the feature representation;

[0025] The processing module is also used for:

[0026] Inputting the first feature representation into the first encoding projector to obtain a third feature representation, where the third feature representation is obtained by mapping the first feature representation;

[0027] The model encoding error between the third feature representation and the second feature representation is calculated.

[0028] In an optional design of the present application, the processing module is also used to: calculate a mean square error loss function between the third feature representation and the second feature representation, and determine the mean square error loss function as a model coding error.

[0029] In an optional design of the present application, the speech coding model further includes: a classifier, the classifier being used to predict a classification label of the speech data;

[0030] The acquisition module is further used to acquire a first classification label of the first sample voice data;

[0031] The input module is further used to input the first feature representation of the first sample speech data into the classifier to obtain a first predicted label of the first sample speech data;

[0032] The processing module is further used to calculate a first classification error between the first classification label and the first prediction label;

[0033] The training module is further used to perform backward error propagation training on the speech coding model using the model coding error and the first classification error to obtain a trained speech coding model.

[0034] In an optional design of the present application, the speech coding model further includes: a classifier and a second speech encoder, the classifier is used to predict the classification label of the speech data; the second speech encoder shares network parameters with the first speech encoder;

[0035] The acquisition module is further used to acquire second sample voice data and a second classification label of the second sample voice data;

[0036] The input module is further used to input the second sample speech data into the second speech encoder to obtain a fourth feature representation of the second sample speech data;

[0037] The input module is further used to input the fourth feature representation of the second sample speech data into the classifier to obtain a second predicted label of the second sample speech data;

[0038] The processing module is further used to calculate a second classification error between the second classification label and the second predicted label;

[0039] The training module is further used to perform backward error propagation training on the speech coding model using the model coding error and the second classification error to obtain a trained speech coding model.

[0040] In an optional design of the present application, the speech coding model further includes: a second coding projector, the second coding projector being used to reduce the gradient of the feature representation;

[0041] The input module is also used for:

[0042] Inputting the fourth feature representation of the second sample speech data into the second coding projector to obtain a fifth feature representation, where the fifth feature representation is obtained by mapping the fourth feature representation;

[0043] The fifth feature representation is input into the classifier to obtain a second predicted label for the second sample speech data.

[0044] In an optional design of the present application, the input module is also used for:

[0045] Preprocessing the first sample voice data in a first manner to obtain first voice data;

[0046] The first speech data is input into the first speech encoder to obtain the first feature representation of the first sample speech data.

[0047] In an optional design of the present application, the input module is also used for:

[0048] At least one preprocessing method is randomly selected from n preprocessing methods as the first method; the n preprocessing methods include at least two of the following: adding additive noise; adding reverberation; adding masking effect; harmonization enhancement processing; adding audio track disturbance.

[0049] In an optional design of the present application, the input module is also used for:

[0050] Preprocessing the first sample voice data in a second manner to obtain second voice data;

[0051] The second speech data is input into a momentum encoder to obtain the second feature representation of the first sample speech data.

[0052] In an optional design of the present application, the input module is also used for:

[0053] At least one preprocessing method is randomly selected from n preprocessing methods as the second method; the n preprocessing methods include at least two of the following: adding additive noise; adding reverberation; adding masking effect; harmonic enhancement processing; adding audio track disturbance.

[0054] In an optional design of the present application, the processing module is further used for:

[0055] The network parameters of the first speech encoder are subjected to exponential moving average (EMA) processing to obtain at least one network parameter of the momentum encoder.

[0056] In an optional design of the present application, the acquisition module is further used to acquire input speech data and a reference feature representation, wherein the reference feature representation is a feature representation of speech data of a target recognition object;

[0057] The input module is further used to input the input speech data into the first speech encoder in the trained speech encoding model to obtain a sixth feature representation of the input speech data;

[0058] A determination module is used to determine the input voice data based on the sixth feature representation and the reference feature representation to obtain a determination result of the input voice data, wherein the determination result is used to indicate whether the input voice data is the voice data of the target recognition object.

[0059] In an optional design of the present application, the device further includes:

[0060] The input module is also used to input reference speech data into the first speech encoder in the trained speech coding model to obtain the reference feature representation of the reference speech data, and the reference speech data is the speech data of the target recognition object.

[0061] According to another aspect of the present application, there is provided a device for using a speech coding model, the device being applied to a computer device, the computer device running a speech coding model, the speech coding model being obtained according to the training device for the speech coding model;

[0062] The device comprises:

[0063] An acquisition module, used to acquire input voice data;

[0064] The acquisition module is further used to acquire a reference feature representation, wherein the reference feature representation is a feature representation of speech data of a target recognition object, wherein the reference feature representation is obtained by inputting reference speech data into a speech coding model, wherein the reference speech data is speech data of the target recognition object;

[0065] An input module, configured to input the input speech data into the first speech encoder in the speech coding model to obtain a sixth feature representation of the input speech data;

[0066] A determination module is used to determine the input voice data based on the sixth feature representation and the reference feature representation to obtain a determination result of the input voice data, wherein the determination result is used to indicate whether the input voice data is the voice data of the target recognition object.

[0067] According to another aspect of the present application, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the training method of the speech coding model and / or the method of using the speech coding model as described above.

[0068] According to another aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the training method of the speech coding model and / or the method of using the speech coding model as described above.

[0069] According to another aspect of the present application, a computer program product or a computer program is provided, wherein the computer program product or the computer program comprises computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the training method of the speech coding model and / or the method of using the speech coding model as described above.

[0070] The beneficial effects of the technical solution provided by this application include at least:

[0071] By adding a momentum encoder to encode speech data and training the speech coding model through model coding error, the method of encoding speech data is enriched; the momentum encoder extracts speech data features that are easy to transmit, so that the speech coding model can also perform high-quality speech coding when faced with speech data outside of specific audio scenarios, avoiding the problem that the performance of the speech coding model is seriously affected when faced with speech data outside of audio scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0073] Figure 1 is a block diagram of a computer system used for training a speech coding model provided by one embodiment of the present application;

[0074] Figure 2 is a structural diagram of a speech coding model provided by an exemplary embodiment of the present application;

[0075] Figure 3 is a structural diagram of a speech coding model provided by an exemplary embodiment of the present application;

[0076] Figure 4 is a structural diagram of a speech coding model provided by an exemplary embodiment of the present application;

[0077] Figure 5 is a schematic diagram of the structure of a trained speech coding model provided by an exemplary embodiment of the present application;

[0078] Figure 6 is a flow chart of a method for training a speech coding model provided by an exemplary embodiment of the present application;

[0079] Figure 7 is a flow chart of a method for training a speech coding model provided by an exemplary embodiment of the present application;

[0080] Figure 8 is a flow chart of a method for training a speech coding model provided by an exemplary embodiment of the present application;

[0081] Fig. 9 is a flow chart of a method for training a speech coding model provided by an exemplary embodiment of the present application;

[0082] Fig.10 is a flow chart of a method for training a speech coding model provided by an exemplary embodiment of the present application;

[0083] Fig.11 is a schematic diagram of a method for training a speech coding model provided by an exemplary embodiment of the present application;

[0084] Fig.12 is a flow chart of a method for training a speech coding model provided by an exemplary embodiment of the present application;

[0085] Fig.13is a flow chart of a method for using a speech coding model provided by an exemplary embodiment of the present application;

[0086] Fig.14 is a flow chart of a voiceprint payment method provided by an exemplary embodiment of the present application;

[0087] Fig.15 is a schematic diagram of a method for using a speech coding model provided by an exemplary embodiment of the present application;

[0088] Fig.16 is a flow chart of an intelligent transportation method provided by an exemplary embodiment of the present application;

[0089] Fig.17 is a structural block diagram of a training device for a speech coding model provided by an exemplary embodiment of the present application;

[0090] Fig.18 is a structural block diagram of a device for using a speech coding model provided by an exemplary embodiment of the present application;

[0091] Fig.19 It is a structural block diagram of a server provided by an exemplary embodiment of the present application.

[0092] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION

[0093] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0094] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0095] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0096] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, a first network parameter may also be referred to as a second network parameter, and similarly, a second network parameter may also be referred to as a first network parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0097] Figure 1 A schematic diagram of a computer system provided by an embodiment of the present application is shown. The computer system can be implemented as a system architecture of a training method for a speech coding model. The computer system may include: a terminal 100 and a server 200.

[0098] The terminal 100 can be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle computer), a wearable device, a PC (Personal Computer), an access control device, an unmanned vending terminal, etc. The terminal 100 can be installed with a client that runs the target application. The target application can be a speech recognition application, or other applications that provide a training function for a speech coding model, which is not limited in this application. In addition, this application does not limit the form of the target application, including but not limited to App (Application, application) installed in the terminal 100, applets, etc., and can also be in the form of a web page. The server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The server 200 can be the background server of the above-mentioned target application, used to provide background services for the client of the target application.

[0099] In the speech coding model training method provided in the embodiment of the present application, the execution subject of each step may be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. Figure 1 Taking the implementation environment of the scheme shown as an example, the training method of the speech coding model can be executed by the terminal 100 (such as the client of the target application installed and running in the terminal 100 executes the training method of the speech coding model), or the training method of the speech coding model can be executed by the server 200, or the terminal 100 and the server 200 can interact and cooperate to execute it, and this application does not limit this.

[0100] In addition, the technical solution of the present application can be combined with blockchain technology. For example, the training method of the speech coding model disclosed in the present application, some data involved (such as three-dimensional medical images, predicted instance segmentation results, etc.) can be stored on the blockchain. The terminal 100 and the server 200 can communicate through a network, such as a wired or wireless network.

[0101] Next, the speech coding model is introduced:

[0102] The speech coding model is used to encode speech data. In the embodiment of the present application, the speech coding model has at least three implementation methods according to different training methods, which are specifically described as follows:

[0103] Implementation method 1: Unsupervised speech coding model training;

[0104] Figure 2 A schematic diagram of the structure of a speech coding model 400 provided by an exemplary embodiment of the present application is shown.

[0105] The speech coding model 400 includes: a first speech encoder 410 and a momentum encoder 420;

[0106] The first sample speech data 302 is preprocessed to obtain preprocessed speech data: first speech data 304 and second speech data 306. The preprocessing methods of the two speech data are usually different, but the same preprocessing method is not excluded.

[0107] The first speech data 304 is input into a first speech encoder 410 to obtain a first feature representation 312; the second speech data 306 is input into a momentum encoder 420 to obtain a second feature representation 314. A model encoding error 322 between the first feature representation 312 and the second feature representation 314 is calculated.

[0108] Implementation method 2: supervised speech coding model training;

[0109] Figure 3 A structural diagram of a speech coding model 400 provided by an exemplary embodiment of the present application is shown.

[0110] The speech coding model 400 includes: a first speech encoder 410, a momentum encoder 420, a first coding projector 430 and a classifier 440;

[0111] The first sample speech data 302 is preprocessed to obtain preprocessed speech data: first speech data 304 and second speech data 306. The preprocessing methods of the two speech data are usually different, but the same preprocessing method is not excluded.

[0112] The first speech data 304 is input into the first speech encoder 410 to obtain the first feature representation 312. The first feature representation 312 is input into the first coding projector 430 to obtain the third feature representation 316. The second speech data 306 is input into the momentum encoder 420 to obtain the second feature representation 314. The model coding error 322 between the second feature representation 314 and the third feature representation 316 is calculated.

[0113] The third feature representation 316 is input into the classifier 440 to obtain the first predicted label 302b of the first sample speech data 302; and the first classification error 324 between the first predicted label 302b and the first classification label 302a of the first sample speech data 302 is calculated.

[0114] The speech coding model 400 is trained by backward error propagation using the model coding error 322 and the first classification error 324 .

[0115] Implementation method 3: Semi-supervised speech coding model training;

[0116] Figure 4 A structural diagram of a speech coding model 400 provided by an exemplary embodiment of the present application is shown.

[0117] The speech coding model 400 includes: a first speech encoder 410, a momentum encoder 420, a first coding projector 430, a classifier 440, a second speech encoder 450 and a second coding projector 460;

[0118] The first sample voice data 302 is preprocessed to obtain preprocessed voice data: the first voice data 304 and the second voice data 306; the second sample voice data 332 is preprocessed to obtain the third voice data 334; the preprocessing methods of the above three voice data are usually different, but the same preprocessing method is not excluded.

[0119] The first speech data 304 is input into the first speech encoder 410 to obtain the first feature representation 312. The first feature representation 312 is input into the first coding projector 430 to obtain the third feature representation 316. The second speech data 306 is input into the momentum encoder 420 to obtain the second feature representation 314. The model coding error 322 between the second feature representation 314 and the third feature representation 316 is calculated.

[0120] The third speech data 334 is input into the second speech encoder 450 to obtain the fourth feature representation 342; the fourth feature representation 342 is input into the second coding projector 460 to obtain the fifth feature representation 344. The fifth feature representation 344 is input into the classifier 440 to obtain the second predicted label 332b of the second sample speech data 332; and the second classification error 326 between the second predicted label 332b and the second classification label 332a of the second sample speech data 332 is calculated.

[0121] The speech coding model 400 is trained by back-propagation using the model coding error 322 and the second classification error 326 .

[0122] Figure 5 A schematic diagram of the structure of a trained speech coding model 400a provided by an exemplary embodiment of the present application is shown.

[0123] The trained speech coding model 400a is obtained after the speech coding model 400 is trained by backward error propagation.

[0124] The input speech data 352 and the reference speech data 354 are respectively input into the first speech encoder 410 in the trained speech coding model 400a to obtain the sixth feature representation 362 of the input speech data 352 and the reference feature representation 364 of the reference speech data 354; the reference speech data 354 is the speech data of the target recognition object, and the reference feature representation 364 is the feature representation of the speech data of the target recognition object.

[0125] Based on the sixth feature representation 362 and the reference feature representation 364, the input voice data 352 is judged to obtain a judgment result 370 of the input voice data 352, and the judgment result 370 is used to indicate whether the input voice data 352 is the voice data of the target recognition object.

[0126] Figure 6 A flowchart of a method for training a speech coding model provided by an exemplary embodiment of the present application is shown. The method can be executed by a computer device. The method includes:

[0127] Step 510: Obtain first sample voice data;

[0128] In an embodiment of the present application, the first sample data may be annotated speech data or unannotated speech data; the classification label of the annotated speech data is used to mark the source of the speech data; illustratively, the same classification label is added to the speech data of the same speaker.

[0129] Step 520: inputting the first sample speech data into a first speech encoder to obtain a first feature representation of the first sample speech data;

[0130] The first feature representation is used to describe the features of the first sample speech data; in the embodiment of the present application, the feature representation is usually a feature vector or a feature matrix;

[0131] Exemplarily, the structure of the first speech encoder includes but is not limited to at least one of the following networks: Residual Network (ResNet), Hierarchical Residual-like Network (Res2Net), Time Delay Neural Networks (TDNN), Emphasized Channel Attention Propagation and Aggregation in TDNN (ECAPA-TDNN), Visual Geometry Group Network (VGG), Fast End-to-End Neural Vocoder, Convolutional Neural Networks (CNN), Recurrent Neural Network (RNN).

[0132] Step 530: input the first sample speech data into a momentum encoder to obtain a second feature representation of the first sample speech data;

[0133] In an embodiment of the present application, the structure of the momentum encoder and the structure of the first speech encoder have at least one identical part; at least one network parameter of the momentum encoder is determined based on the network parameters of the first speech encoder. Exemplarily, the network parameters of the momentum encoder can be directly the same as the network parameters of the first speech encoder, or can be obtained by calculating the network parameters of the first speech encoder. For example: the network parameters of the momentum encoder are obtained by performing an exponential moving average (EMA) on the network parameters of the first speech encoder. During the speech coding model training process, the update process of the network parameters of the momentum encoder is as follows:

[0134] ξ t+1 =τ·ξ t +(1-τ)·θ t ;

[0135] Among them, ξ represents the network parameters of the momentum encoder, τ is used to control the network parameter update weights of the momentum encoder, and optionally, the value range of τ is greater than or equal to 0 and less than or equal to 1; θ represents the network parameters of the first speech encoder, t represents the number of iterations of the speech coding model training, and the value range of t is an integer greater than or equal to 1.

[0136] Step 540: Determine a model encoding error based on the first feature representation and the second feature representation;

[0137] In an embodiment of the present application, the model coding error can be directly determined by the first feature representation and the second feature representation; exemplarily, the model coding error includes but is not limited to at least one of the following: mean squared error (MSE) loss function, Jensen-Shannon divergence (JS divergence) loss function, Kullback-Leibler divergence (KL divergence) loss function.

[0138] The model coding error can also be indirectly determined through the first feature representation and the second feature representation; for example: mapping the first feature representation, and calculating the model coding error through the mapped first feature representation and the second feature representation; or, mapping the second feature representation, and calculating the model coding error through the first feature representation and the mapped second feature representation; or, mapping the first feature representation and the second feature representation respectively, and calculating the model coding error through the mapped first feature representation and the mapped second feature representation.

[0139] Step 550: Performing backward error propagation training on the speech coding model using the model coding error to obtain a trained speech coding model;

[0140] Based on the model coding error, a back propagation algorithm is used to update the network parameters of the speech coding model. Multiple groups of first sample speech data are used to compare the model coding errors multiple times and update the network parameters of the speech coding model to improve the accuracy of speech data coding.

[0141] In summary, the method provided in this embodiment enriches the method of encoding speech data by adding a momentum encoder to encode speech data and training the speech coding model through model coding error; the momentum encoder extracts speech data features that are easy to transmit, so that the speech coding model can also perform high-quality speech coding when facing speech data outside of specific audio scenes, avoiding the problem that the performance of the speech coding model is seriously affected when the speech coding model faces speech data outside of audio scenes.

[0142] In an optional embodiment based on the above embodiment, Figure 7 As shown, step 540 can be implemented as two sub-steps, step 540a and step 540b:

[0143] Step 540a: Input the first feature representation into the first code projector to obtain a third feature representation;

[0144] The third feature representation is obtained by mapping the first feature representation; the first coding projector is used to map the first feature representation to a continuous vector space to obtain the third feature representation; the first coding projector can avoid obtaining a trivial solution, such as a constant representation.

[0145] Step 540b: Calculate the model encoding error between the third feature representation and the second feature representation;

[0146] In an embodiment of the present application, the model encoding error includes but is not limited to at least one of the following: MSE loss function, JS divergence loss function, KL divergence loss function.

[0147] Exemplarily, a mean square error loss function between the third feature representation and the second feature representation is calculated, and the mean square error loss function is determined as the model coding error. The mean square error loss function is the L2-norm mean square error of the third feature representation and the second feature representation, and the model coding error is:

[0148]

[0149] Among them, L mcr represents the model encoding error, MSE represents the mean square error, g θ represents the first coding projector, z θ represents the first feature representation, g θ (z θ ) represents the third characteristic representation, z' ξ represents the second feature representation, and ||||2 represents the L2-norm operation.

[0150] To summarize, the method provided in this embodiment reduces the gradient of the first feature representation by adding a first coding projector to map the first feature representation; determines the mean square error loss function as the model coding error, and trains the speech coding model through the model coding error, thereby enriching the method of encoding speech data; and realizes that the speech coding model can perform high-quality speech coding when facing speech data outside of specific audio scenarios.

[0151] In an optional embodiment based on the above embodiment, Figure 8As shown, the embodiment may further include three steps: step 512, step 522 and step 532. In this embodiment, step 550 may be implemented as step 552; in step 540, the model encoding error is introduced in detail.

[0152] Step 540: Determine a model encoding error based on the first feature representation and the second feature representation;

[0153] Exemplarily, a mean square error loss function between the first feature representation and the second feature representation is calculated, and the mean square error loss function is determined as the model coding error. The mean square error loss function is the L2-norm mean square error of the first feature representation and the second feature representation, and the model coding error is:

[0154]

[0155] Among them, L mcr represents the model encoding error, MSE represents the mean square error, z θ represents the first characteristic representation, z' ξ represents the second feature representation, and ||||2 represents the L2-norm operation.

[0156] Step 512: Obtain a first classification label of the first sample speech data;

[0157] The first classification label is used to indicate the source of the first sample speech data; illustratively, the same first classification label is added to the first sample speech data of the same speaker.

[0158] Step 522: inputting the first feature representation of the first sample speech data into the classifier to obtain a first predicted label of the first sample speech data;

[0159] The classifier is used to predict the classification label of the speech data, and the classification label is used to indicate the speaker data in the speech data. Exemplarily, the classifier structure includes but is not limited to at least one of the following: Convolutional Neural Networks (CNN), Recurrent Neural Network (RNN), Network In Network (NIN), Linear Prediction Neural Network (LPC Net).

[0160] Step 532: Calculate a first classification error between the first classification label and the first predicted label;

[0161] The first classification label is used to indicate speaker data in the first sample speech data, and the first prediction label is used to indicate speaker data in the speech data predicted by the classifier.

[0162] Exemplarily, the first classification error may be a loss function based on a classification label or a loss function based on metric learning. The first classification error includes but is not limited to at least one of the following: normalized index (Softmax), angle normalized index (Angular Softmax, A-Softmax), normalized index of added difference (Additive Margin Softmax, AM-Softmax), generalized end-to-end loss function (Generalized End-to-End Loss, GE2E), triplet loss function (Triplet Loss).

[0163] It should be noted that, in this embodiment, no restrictive provisions are made on the execution timing of the first branch and the second branch, that is, any step in the first branch can be executed before, after or simultaneously with any step in the second branch; the first branch includes: step 510, step 520, step 530, step 540; the second branch includes: step 512, step 522, step 532.

[0164] Step 552: Performing backward error propagation training on the speech coding model using the model coding error and the first classification error to obtain a trained speech coding model;

[0165] Based on the model coding error and the first classification error, a back propagation algorithm is used to update the network parameters of the speech coding model. Multiple groups of first sample speech data are used to compare the model coding error and the first classification error multiple times, and the network parameters of the speech coding model are updated to improve the accuracy of speech data coding.

[0166] Optionally, there is a weight coefficient between the model coding error and the first classification error, and the speech coding model is trained by backward error propagation using a joint error determined based on the model coding error and the first classification error to obtain a trained speech coding model; the joint error is:

[0167] L joint =L sup1 +λ·L mcr ;

[0168] Among them, L joint represents the joint error, L sup1 represents the first classification error, L mcr represents the model encoding error, and λ represents the weight coefficient; optionally, the value range of λ is greater than or equal to 0 and less than or equal to 1.

[0169] To sum up, the method provided in this embodiment, by obtaining the first classification label of the first sample speech data, increases the training basis of the speech coding model from the dimension of the classification label, enriches the training method of the speech coding model, and uses a supervised method to train the speech coding model; it improves the ability of the speech coding model to perform speech encoding when facing speech data outside of specific audio scenarios.

[0170] In an optional embodiment based on the above embodiment, Fig. 9 As shown, the embodiment may further include four steps: step 514, step 524, step 534 and step 544. In this embodiment, step 550 may be implemented as step 554; in step 540, the model encoding error is introduced in detail.

[0171] Step 540: Determine a model encoding error based on the first feature representation and the second feature representation;

[0172] Exemplarily, a mean square error loss function between the first feature representation and the second feature representation is calculated, and the mean square error loss function is determined as the model coding error. The mean square error loss function is the L2-norm mean square error of the first feature representation and the second feature representation, and the model coding error is:

[0173]

[0174] Among them, L mcr represents the model encoding error, MSE represents the mean square error, z θ represents the first characteristic representation, z' ξ represents the second feature representation, and ||||2 represents the L2-norm operation.

[0175] Step 514: Acquire second sample speech data and a second classification label of the second sample speech data;

[0176] The second classification label is used to indicate the source of the second sample voice data; illustratively, the same second classification label is added to the second sample voice data of the same speaker. It should be noted that the first sample voice data and the second sample voice data may be the same or different.

[0177] Step 524: input the second sample speech data into the second speech encoder to obtain a fourth feature representation of the second sample speech data;

[0178] The fourth feature representation is used to describe the characteristics of the second sample speech data; in the embodiments of the present application, the feature representation is generally a feature vector or a feature matrix; it should be noted that the second speech encoder shares network parameters with the first speech encoder; the second speech encoder can directly use the network parameters of the first speech encoder, or calculate the network parameters of the first speech encoder to obtain the network parameters of the second speech encoder.

[0179] Step 534: input the fourth feature representation of the second sample speech data into the classifier to obtain a second predicted label of the second sample speech data;

[0180] The classifier is used to predict the classification label of the speech data, and the classification label is used to indicate the speaker data in the speech data. Exemplarily, the classifier structure includes but is not limited to at least one of the following: CNN, RNN, NIN, LPC Net.

[0181] Optional, such as Fig.10 As shown, step 534 includes two sub-steps, step 534a and step 534b:

[0182] Step 534a: input the fourth feature representation of the second sample speech data into the second coding projector to obtain a fifth feature representation;

[0183] The fifth characteristic representation is obtained by mapping the fourth characteristic representation; the second coding projector is used to map the fourth characteristic representation to a continuous vector space to obtain the fifth characteristic representation; the second coding projector can avoid obtaining a trivial solution, such as a constant representation.

[0184] Step 534b: input the fifth feature representation into the classifier to obtain a second predicted label for the second sample speech data;

[0185] The fifth feature representation is used to describe the features of the second sample speech data; the classifier is used to predict the classification label of the speech data.

[0186] Step 544: Calculate a second classification error between the second classification label and the second predicted label;

[0187] The second classification label is used to indicate the speaker data in the second sample speech data, and the second prediction label is used to indicate the speaker data in the speech data predicted by the classifier.

[0188] Exemplarily, the second classification error may be a loss function based on a classification label or a loss function based on metric learning. The second classification error includes but is not limited to at least one of the following: normalized index, A-Softmax, AM-Softmax, GE2E, triplet loss function.

[0189] It should be noted that, in this embodiment, there are no restrictive provisions on the execution timing of the first branch and the third branch, that is, any step in the first branch can be executed before, after or simultaneously with any step in the third branch; the first branch includes: step 510, step 520, step 530, step 540; the third branch includes: step 514, step 524, step 534, step 544.

[0190] Step 554: Performing backward error propagation training on the speech coding model using the model coding error and the second classification error to obtain a trained speech coding model;

[0191] Based on the model coding error and the second classification error, a back propagation algorithm is used to update the network parameters of the speech coding model. Multiple groups of first sample speech data are used to compare the model coding error and the second classification error multiple times, and the network parameters of the speech coding model are updated to improve the accuracy of speech data encoding.

[0192] Optionally, there is a weight coefficient between the model coding error and the second classification error, and the speech coding model is trained by backward error propagation using a joint error determined based on the model coding error and the second classification error to obtain a trained speech coding model; the joint error is:

[0193] L joint =L sup2 +λ·L mcr ;

[0194] Among them, L joint represents the joint error, L sup2 represents the second classification error, L mcr represents the model encoding error, and λ represents the weight coefficient; optionally, the value range of λ is greater than or equal to 0 and less than or equal to 1.

[0195] To sum up, the method provided in this embodiment, by obtaining the second sample speech data and the second classification label of the second sample speech data, increases the training basis of the speech coding model from the dimension of the classification label, enriches the training method of the speech coding model, and uses a semi-supervised method to train the speech coding model; and improves the ability of the speech coding model to perform speech encoding when facing speech data outside of specific audio scenes.

[0196] Fig.11 A schematic diagram of a method for training a speech coding model provided by an exemplary embodiment of the present application is shown.

[0197] The speech coding model includes: a first encoder f1, a second encoder f1', and a momentum encoder f2;

[0198] The unlabeled speech data 302a is subjected to a first preprocessing method T1 and a second preprocessing method T2, respectively, and the preprocessed speech data is input into a first encoder f1 and a momentum encoder f2, respectively, to obtain a first feature representation 312 and a second feature representation 314. An unsupervised consistency regularization between the first feature representation 312 and the second feature representation 314 is calculated.

[0199] The labeled speech data 304a is input into the second encoder f1' to obtain a third feature representation 316, and supervised learning is performed based on the third feature representation 316 and the classification label 304b of the labeled speech data 304a.

[0200] Backward error propagation training is performed on the speech coding model based on the supervised learning results and unsupervised consistency regularization results.

[0201] Next, the preprocessing process of the first sample speech data is introduced:

[0202] In an optional embodiment of the present application, Figure 6 Step 520 shown in FIG. 5 can be implemented as the following two sub-steps:

[0203] Preprocessing the first sample voice data in a first manner to obtain first voice data;

[0204] The first sample speech data is preprocessed to enhance the first sample speech data.

[0205] Inputting the first speech data into a first speech encoder to obtain a first feature representation of the first sample speech data;

[0206] The first feature representation is used to describe the features of the first sample speech data; in the embodiment of the present application, the feature representation is usually a feature vector or a feature matrix.

[0207] Optionally, step 520 further includes the following sub-step:

[0208] Randomly select at least one preprocessing method from n preprocessing methods as a first method; wherein the value range of n is an integer greater than 1.

[0209] Exemplarily, the n preprocessing methods include but are not limited to at least two of the following:

[0210] Add additive noise; for example: thermal noise, shot noise;

[0211] Add reverb; for example: ambient, convolution, hall;

[0212] Add masking effects; for example: time domain masking, frequency domain masking;

[0213] Blending enhancement processing; for example: Mixup, CutMix, PatchUp;

[0214] Add audio track perturbations; for example: volume perturbations, speed perturbations.

[0215] To sum up, the method provided in this embodiment, by preprocessing the first sample speech data and performing data enhancement on the first sample speech data, improves the coding effect when the speech coding model extracts the feature representation of the speech data, and lays a foundation for improving the speech coding capability when facing speech data outside of specific audio scenes.

[0216] In an optional embodiment of the present application, Figure 6 The step 530 shown in FIG. 5 can be implemented as the following two sub-steps:

[0217] Preprocessing the first sample voice data in a second manner to obtain second voice data;

[0218] The first sample speech data is preprocessed to enhance the first sample speech data.

[0219] Input the second speech data into the momentum encoder to obtain a second feature representation of the first sample speech data;

[0220] The second feature representation is used to describe the features of the first sample speech data; in the embodiment of the present application, the feature representation is usually a feature vector or a feature matrix.

[0221] Optionally, step 530 further includes the following sub-step:

[0222] At least one preprocessing method is randomly selected from n preprocessing methods as the second method, wherein the value range of n is an integer greater than 1. The n preprocessing methods include at least two of the following: adding additive noise, adding reverberation, adding masking effect, harmonic enhancement processing, and adding track disturbance.

[0223] To sum up, the method provided in this embodiment, by preprocessing the first sample speech data and performing data enhancement on the first sample speech data, improves the coding effect when the speech coding model extracts the feature representation of the speech data, and lays the foundation for the momentum encoder to extract easy-to-transmit speech data features when facing speech data outside of specific audio scenes.

[0224] It should be noted that the preprocessing process shown above can be performed in one embodiment, that is, there is an embodiment in the present application, and step 520 and step 530 in the embodiment are both implemented as the implementation method shown above. Those skilled in the art can understand that when step 520 and step 530 are both implemented as the implementation method shown above, the first method and the second method can be the same or different.

[0225] Fig.12 A flowchart of a method for training a speech coding model provided by an exemplary embodiment of the present application is shown. The method can be executed by a computer device. The method includes:

[0226] Step 510: Obtain first sample voice data;

[0227] Step 520: inputting the first sample speech data into a first speech encoder to obtain a first feature representation of the first sample speech data;

[0228] Step 530: input the first sample speech data into a momentum encoder to obtain a second feature representation of the first sample speech data;

[0229] The details of step 510, step 520, and step 530 have been introduced above. Figure 5 Step 510, step 520, and step 530 in the illustrated embodiment.

[0230] Step 540: Determine a model encoding error based on the first feature representation and the second feature representation;

[0231] Exemplarily, a mean square error loss function between the first feature representation and the second feature representation is calculated, and the mean square error loss function is determined as the model coding error. The mean square error loss function is the L2-norm mean square error of the first feature representation and the second feature representation, and the model coding error is:

[0232]

[0233] Among them, L mcr represents the model encoding error, MSE represents the mean square error, z θ represents the first characteristic representation, z' ξ represents the second feature representation, and ||||2 represents the L2-norm operation.

[0234] Step 550: Performing backward error propagation training on the speech coding model using the model coding error to obtain a trained speech coding model;

[0235] Based on the model coding error, a back propagation algorithm is used to update the network parameters of the speech coding model. Multiple groups of first sample speech data are used to compare the model coding errors multiple times and update the network parameters of the speech coding model to improve the accuracy of speech data coding.

[0236] Step 560: Obtain input speech data and reference feature representation;

[0237] The reference feature representation is a feature representation of the speech data of the target recognition object; in the embodiment of the present application, the feature representation is usually a feature vector or a feature matrix;

[0238] Optionally, this embodiment further includes: inputting reference speech data into a first speech encoder in a trained speech coding model to obtain a reference feature representation of the reference speech data, wherein the reference speech data is speech data of a target recognition object.

[0239] Step 570: input the input speech data into the first speech encoder in the trained speech encoding model to obtain a sixth feature representation of the input speech data;

[0240] In this embodiment, the trained speech coding model is used to encode the input speech data, laying a foundation for determining whether the input speech data is speech data of a target recognition object.

[0241] Step 580: Based on the sixth feature representation and the reference feature representation, the input speech data is judged to obtain a judgment result of the input speech data;

[0242] The determination result is used to indicate whether the input voice data is the voice data of the target recognition object. Exemplarily, the basis for determining whether the input voice data is the voice data of the target recognition object is whether the distance between the sixth feature representation and the reference feature representation exceeds the target threshold. When the distance exceeds the target threshold, it is determined that the input voice data is not the voice data of the target recognition object; otherwise, it is determined that the input voice data is the voice data of the target recognition object. Exemplarily, the method for calculating the distance between the sixth feature representation and the reference feature representation includes but is not limited to at least one of the following distance calculation methods: Euclidean distance, Manhattan distance, Chebyshev distance, angle cosine, Hamming distance, and Jaccard Similarity Coefficient. In this embodiment, the target threshold can be set based on experience or can be predicted by an artificial neural network.

[0243] In summary, the method provided in this embodiment enriches the method of encoding speech data by adding a momentum encoder to encode speech data and training the speech coding model through model coding error; extracts speech data features that are easy to transmit, solves the overfitting problem in the speech data encoding process, and uses the first speech encoder in the trained speech coding model to realize the judgment of input speech data; and realizes that the speech coding model can also perform high-quality speech encoding when facing speech data outside of specific audio scenes.

[0244] Fig.13 A flowchart of a method for using a speech coding model provided by an exemplary embodiment of the present application is shown. The method can be executed by a computer device. The computer device runs a speech coding model, and the speech coding model is obtained according to the training method of the above-mentioned speech coding model; the method includes:

[0245] Step 610: Obtain input voice data;

[0246] The input speech data may be speech data of a target recognition object or speech data of a non-target recognition object. The target recognition object is a speaker of the reference speech data.

[0247] Step 620: Obtain reference feature representation;

[0248] The reference feature representation is a feature representation of the speech data of the target recognition object. The reference feature representation is obtained by inputting the reference speech data into the speech coding model. The reference speech data is the speech data of the target recognition object. In an embodiment of the present application, the feature representation is usually a feature vector or a feature matrix.

[0249] It should be noted that, in this embodiment, no restrictive provisions are made on the execution sequence of step 610 and step 620, that is, step 610 can be executed before, after or simultaneously with step 620.

[0250] Step 630: input the input speech data into the first speech encoder in the speech coding model to obtain a sixth feature representation of the input speech data;

[0251] In this embodiment, the speech coding model is used to encode the input speech data, laying a foundation for determining whether the input speech data is speech data of a target recognition object.

[0252] Step 640: Based on the sixth feature representation and the reference feature representation, the input speech data is judged to obtain a judgment result of the input speech data, and the judgment result is used to indicate whether the input speech data is speech data of a target recognition object.

[0253] The determination result is used to indicate whether the input voice data is the voice data of the target recognition object. Exemplarily, the basis for determining whether the input voice data is the voice data of the target recognition object is whether the distance between the sixth feature representation and the reference feature representation exceeds the target threshold. When the distance exceeds the target threshold, it is determined that the input voice data is not the voice data of the target recognition object; otherwise, it is determined that the input voice data is the voice data of the target recognition object.

[0254] In summary, the method provided in this embodiment realizes the judgment of input speech data by using the first speech encoder in the speech coding model; and realizes that the speech coding model can also perform high-quality speech coding when facing speech data outside of specific audio scenes.

[0255] Next, refer to Fig.14 The flowchart shown is used to introduce the application of the speech coding model to voiceprint payment as an example:

[0256] Step 612: Acquire voice data to be verified and obtain payment reference voice data;

[0257] The speech recognition model includes a first speech encoder, which is used to encode speech data to obtain feature representation of the speech data.

[0258] Step 622: inputting the payment reference voice data into the first voice encoder in the voice recognition model to obtain a payment reference feature representation of the payment reference voice data;

[0259] The payment reference feature representation is used to describe the features of the payment reference voice data; in the embodiments of the present application, the feature representation is generally a feature vector or a feature matrix; illustratively, the payment reference voice data is the voice data input by the target payment object when activating the voiceprint payment function; for example, the payment reference voice data is three segments of voice data input by the target payment object when activating the voiceprint payment function, and the content of the above voice data is all "confirm payment".

[0260] Step 632: inputting the speech data to be verified into the first speech encoder in the speech recognition model to obtain a feature representation to be verified of the speech data to be verified;

[0261] The feature representation to be verified is used to describe the features of the voice data to be verified; in the embodiments of the present application, the feature representation is usually a feature vector or a feature matrix; illustratively, the voice data to be verified is the voice data input when the voiceprint payment function is triggered; the voice data to be verified can be the voice data of the target payment object, or it can be the voice data of a non-target payment object. For example, the voice data to be verified is a piece of voice data input by the target payment object when the voiceprint payment function is triggered, and the content of the above voice data is "confirm payment".

[0262] Step 642: Calculate the Euclidean distance between the feature representation to be verified and the payment reference feature representation to determine the judgment result of the voice data to be verified;

[0263] The determination result is used to indicate whether the voice data to be verified is the voice data of the target payment object.

[0264] The basis for determining whether the voice data to be verified is the voice data of the target payment object is whether the Euclidean distance between the feature representation to be verified and the payment reference feature representation exceeds the target threshold. If the Euclidean distance exceeds the target threshold, it is determined that the voice data to be verified is not the voice data of the target payment object; otherwise, it is determined that the voice data to be verified is the voice data of the target payment object.

[0265] For example, Fig.15 A schematic diagram showing a method for using a speech coding model provided by an exemplary embodiment of the present application is shown.

[0266] The test speech 352a and the registration speech 354a are respectively input into the voiceprint model 400b, which is the first speech encoder input into the speech recognition model. The test speech 352a and the registration speech 354a are scored and judged to obtain the judgment result of the test speech 352a, which is used to indicate whether the test speech 352a is the speech data of the target recognition object. The registration speech 354a is the speech data of the target recognition object.

[0267] In summary, the method provided in this embodiment can determine whether the voice data to be verified is the voice data of the target payment object by applying the voice coding model to voiceprint payment. Applying voice data as a biometric feature to voiceprint payment expands the application scenarios of voice data.

[0268] Next, refer to Fig.16 The flowchart shown is used to introduce the application of the speech coding model to intelligent transportation as an example:

[0269] Step 614: Acquire the voice data to be verified and obtain the driving reference voice data;

[0270] The speech recognition model includes a first speech encoder, which is used to encode speech data to obtain feature representation of the speech data.

[0271] Step 624: input the driving reference speech data into the first speech encoder in the speech recognition model to obtain a driving reference feature representation of the driving reference speech data;

[0272] The driving reference feature representation is used to describe the features of the driving reference voice data; in an embodiment of the present application, the feature representation is generally a feature vector or a feature matrix; illustratively, the driving reference voice data is the voice data input by the target driving object when activating the voiceprint driving function; for example, the driving reference voice data is three segments of voice data input by the target driving object when activating the voiceprint driving function, and the content of the above voice data is all "confirm to start the vehicle".

[0273] Step 634: input the speech data to be verified into the first speech encoder in the speech recognition model to obtain a feature representation to be verified of the speech data to be verified;

[0274] The feature representation to be verified is used to describe the features of the voice data to be verified; in the embodiment of the present application, the feature representation is usually a feature vector or a feature matrix; illustratively, the voice data to be verified is the voice data input when the voiceprint driving function is triggered; the voice data to be verified may be the voice data of the target driving object, or may not be the voice data of the target driving object. For example, the voice data to be verified is a piece of voice data input by the target driving object when the voiceprint driving function is triggered, and the content of the voice data is "confirming the start of the vehicle".

[0275] Step 644: Calculate the Euclidean distance between the feature representation to be verified and the driving reference feature representation to determine the determination result of the voice data to be verified;

[0276] The determination result is used to indicate whether the voice data to be verified is the voice data of the target driving object.

[0277] The basis for determining whether the speech data to be verified is the speech data of the target driving object is whether the Euclidean distance between the feature representation to be verified and the driving reference feature representation exceeds the target threshold. If the Euclidean distance exceeds the target threshold, it is determined that the speech data to be verified is not the speech data of the target driving object; otherwise, it is determined that the speech data to be verified is the speech data of the target driving object.

[0278] In summary, the method provided in this embodiment can determine whether the voice data to be verified is the voice data of the target driver by applying the voice coding model to voiceprint driving. Applying voice data as a biometric feature to intelligent transportation expands the application scenarios of voice data.

[0279] Those skilled in the art can understand that the speech coding model can be applied to, but is not limited to, any of the following scenarios: voiceprint unlocking, voiceprint control, and conference speaker confirmation.

[0280] Those skilled in the art will appreciate that the above embodiments may be implemented independently, or the above embodiments may be freely combined to form new embodiments to implement the speech coding model training method of the present application.

[0281] Fig.17 A block diagram of a training device for a speech coding model provided by an exemplary embodiment of the present application is shown. The device comprises:

[0282] An acquisition module 710 is used to acquire first sample voice data;

[0283] An input module 720, configured to input the first sample speech data into the first speech encoder to obtain a first feature representation of the first sample speech data;

[0284] The input module 720 is further configured to input the first sample speech data into the momentum encoder to obtain a second feature representation of the first sample speech data, wherein at least one network parameter of the momentum encoder is determined based on a network parameter of the first speech encoder;

[0285] A processing module 730, configured to determine a model encoding error based on the first feature representation and the second feature representation;

[0286] The training module 740 is used to perform backward error propagation training on the speech coding model using the model coding error to obtain a trained speech coding model.

[0287] In an optional design of this embodiment, the speech coding model further includes: a first coding projector, the coding projector being used to reduce the gradient of the feature representation;

[0288] The processing module 730 is further configured to:

[0289] Inputting the first feature representation into the first encoding projector to obtain a third feature representation, where the third feature representation is obtained by mapping the first feature representation;

[0290] The model encoding error between the third feature representation and the second feature representation is calculated.

[0291] In an optional design of this embodiment, the processing module 730 is further used to: calculate a mean square error loss function between the third feature representation and the second feature representation, and determine the mean square error loss function as a model coding error.

[0292] In an optional design of this embodiment, the speech coding model further includes: a classifier, the classifier being used to predict a classification label of the speech data;

[0293] The acquisition module 710 is further configured to acquire a first classification label of the first sample voice data;

[0294] The input module 720 is further configured to input the first feature representation of the first sample speech data into the classifier to obtain a first predicted label of the first sample speech data;

[0295] The processing module 730 is further configured to calculate a first classification error between the first classification label and the first predicted label;

[0296] The training module 740 is further configured to perform backward error propagation training on the speech coding model using the model coding error and the first classification error to obtain a trained speech coding model.

[0297] In an optional design of this embodiment, the speech coding model further includes: a classifier and a second speech encoder, the classifier is used to predict the classification label of the speech data; the second speech encoder shares network parameters with the first speech encoder;

[0298] The acquisition module 710 is further configured to acquire second sample speech data and a second classification label of the second sample speech data;

[0299] The input module 720 is further configured to input the second sample speech data into the second speech encoder to obtain a fourth feature representation of the second sample speech data;

[0300] The input module 720 is further configured to input the fourth feature representation of the second sample speech data into the classifier to obtain a second predicted label of the second sample speech data;

[0301] The processing module 730 is further configured to calculate a second classification error between the second classification label and the second predicted label;

[0302] The training module 740 is further configured to perform backward error propagation training on the speech coding model using the model coding error and the second classification error to obtain a trained speech coding model.

[0303] In an optional design of this embodiment, the speech coding model further includes: a second coding projector, the second coding projector being used to reduce the gradient of the feature representation;

[0304] The input module 720 is also used for:

[0305] Inputting the fourth feature representation of the second sample speech data into the second coding projector to obtain a fifth feature representation, where the fifth feature representation is obtained by mapping the fourth feature representation;

[0306] The fifth feature representation is input into the classifier to obtain a second predicted label for the second sample speech data.

[0307] In an optional design of this embodiment, the input module 720 is further used for:

[0308] Preprocessing the first sample voice data in a first manner to obtain first voice data;

[0309] The first speech data is input into the first speech encoder to obtain the first feature representation of the first sample speech data.

[0310] In an optional design of this embodiment, the input module 720 is further used for:

[0311] At least one preprocessing method is randomly selected from n preprocessing methods as the first method; the n preprocessing methods include at least two of the following: adding additive noise; adding reverberation; adding masking effect; harmonization enhancement processing; adding audio track disturbance.

[0312] In an optional design of this embodiment, the input module 720 is further used for:

[0313] Preprocessing the first sample voice data in a second manner to obtain second voice data;

[0314] The second speech data is input into a momentum encoder to obtain the second feature representation of the first sample speech data.

[0315] In an optional design of this embodiment, the input module 720 is further used for:

[0316] At least one preprocessing method is randomly selected from n preprocessing methods as the second method; the n preprocessing methods include at least two of the following: adding additive noise; adding reverberation; adding masking effect; harmonic enhancement processing; adding audio track disturbance.

[0317] In an optional design of this embodiment, the processing module 730 is further used for:

[0318] The network parameters of the first speech encoder are processed by exponential moving average (EMA) to obtain at least one network parameter of the momentum encoder.

[0319] In an optional design of this embodiment, the acquisition module 710 is further used to acquire input speech data and a reference feature representation, where the reference feature representation is a feature representation of the speech data of the target recognition object;

[0320] The input module 720 is further configured to input the input speech data into the first speech encoder in the trained speech encoding model to obtain a sixth feature representation of the input speech data;

[0321] The determination module 750 is used to determine the input speech data based on the sixth feature representation and the reference feature representation to obtain a determination result of the input speech data, wherein the determination result is used to indicate whether the input speech data is speech data of the target recognition object.

[0322] In an optional design of this embodiment, the device further includes:

[0323] The input module 720 is further used to input reference speech data into the first speech encoder in the trained speech coding model to obtain the reference feature representation of the reference speech data, where the reference speech data is the speech data of the target recognition object.

[0324] Fig.18 A block diagram of a device for using a speech coding model provided by an exemplary embodiment of the present application is shown. The device is applied to a computer device, the computer device runs a speech coding model, and the speech coding model is obtained according to the training device of the speech coding model;

[0325] The device comprises:

[0326] An acquisition module 760, used to acquire input voice data;

[0327] The acquisition module is further used to acquire a reference feature representation, wherein the reference feature representation is a feature representation of speech data of a target recognition object, wherein the reference feature representation is obtained by inputting reference speech data into a speech coding model, wherein the reference speech data is speech data of the target recognition object;

[0328] An input module 770, configured to input the input speech data into the first speech encoder in the speech coding model to obtain a sixth feature representation of the input speech data;

[0329] The determination module 780 is used to determine the input voice data based on the sixth feature representation and the reference feature representation to obtain a determination result of the input voice data, wherein the determination result is used to indicate whether the input voice data is the voice data of the target recognition object.

[0330] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0331] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as those in the embodiment of the method, and will not be elaborated here.

[0332] An embodiment of the present application also provides a computer device, which includes: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the training method of the speech coding model provided in the above-mentioned method embodiments.

[0333] The computer device may be a terminal or a server; illustratively, in this embodiment, the computer device is taken as a server as an example for detailed description: Fig.19 It is a structural block diagram of a server provided by an exemplary embodiment of the present application.

[0334] Typically, the server 2300 includes: a processor 2301 and a memory 2302 .

[0335] The processor 2301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 2301 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 2301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2301 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2301 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0336] The memory 2302 may include one or more computer-readable storage media, which may be non-transitory. The memory 2302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2302 is used to store at least one instruction, which is used to be executed by the processor 2301 to implement the video data tracking method provided in the method embodiment of the present application.

[0337] In some embodiments, the server 2300 may also optionally include: an input interface 2303 and an output interface 2304. The processor 2301, the memory 2302, the input interface 2303, and the output interface 2304 may be connected via a bus or a signal line. Each peripheral device may be connected to the input interface 2303 and the output interface 2304 via a bus, a signal line, or a circuit board. The input interface 2303 and the output interface 2304 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 2301 and the memory 2302. In some embodiments, the processor 2301, the memory 2302, the input interface 2303, and the output interface 2304 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2301, the memory 2302, the input interface 2303, and the output interface 2304 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.

[0338] Those skilled in the art will appreciate that the above structure does not constitute a limitation on the server 2300 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0339] In an exemplary embodiment, a chip is also provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the training method of the speech coding model described in the above aspects.

[0340] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the training method of the speech coding model provided by the above-mentioned method embodiments.

[0341] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one program code is stored. When the program code is loaded and executed by a processor of a computer device, the training method of the speech coding model provided by the above-mentioned method embodiments is implemented.

[0342] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0343] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0344] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for training a speech coding model, characterized in that: The speech coding model includes a first speech encoder and a momentum encoder; the method includes: Acquire first sample voice data; Inputting the first sample speech data into the first speech encoder to obtain a first feature representation of the first sample speech data; Inputting the first sample speech data into the momentum encoder to obtain a second feature representation of the first sample speech data, wherein at least one network parameter of the momentum encoder is determined based on the network parameter of the first speech encoder; determining a model encoding error based on the first feature representation and the second feature representation; The speech coding model is trained by backward error propagation using the model coding error to obtain a trained speech coding model.

2. The method according to claim 1, characterized in that The speech coding model further includes: a first coding projector, the coding projector being used to reduce the gradient of the feature representation; The determining of a model coding error based on the first feature representation and the second feature representation includes: Inputting the first feature representation into the first encoding projector to obtain a third feature representation, where the third feature representation is obtained by mapping the first feature representation; The model encoding error between the third feature representation and the second feature representation is calculated.

3. The method according to claim 2, characterized in that The calculating the model encoding error between the third feature representation and the second feature representation comprises: A mean square error loss function between the third feature representation and the second feature representation is calculated, and the mean square error loss function is determined as a model encoding error.

4. The method according to any one of claims 1 to 3, characterized in that: The speech coding model further includes: a classifier, the classifier being used to predict a classification label of the speech data; The method further comprises: Obtaining a first classification label for the first sample voice data; Inputting the first feature representation of the first sample speech data into the classifier to obtain a first predicted label of the first sample speech data; Calculating a first classification error between the first classification label and the first predicted label; The using the model coding error to perform backward error propagation training on the speech coding model to obtain a trained speech coding model includes: The speech coding model is trained by backward error propagation using the model coding error and the first classification error to obtain a trained speech coding model.

5. The method according to any one of claims 1 to 3, characterized in that: The speech coding model further includes: a classifier and a second speech encoder, the classifier being used to predict the classification label of the speech data; the second speech encoder and the first speech encoder share network parameters; The method further comprises: Acquire second sample voice data and a second classification label of the second sample voice data; Inputting the second sample speech data into the second speech encoder to obtain a fourth feature representation of the second sample speech data; Inputting the fourth feature representation of the second sample speech data into the classifier to obtain a second predicted label of the second sample speech data; Calculating a second classification error between the second classification label and the second predicted label; The using the model coding error to perform backward error propagation training on the speech coding model to obtain a trained speech coding model includes: The speech coding model is trained by backward error propagation using the model coding error and the second classification error to obtain a trained speech coding model.

6. The method according to claim 5, characterized in that The speech coding model further includes: a second coding projector, the second coding projector being used to reduce the gradient of the feature representation; The step of inputting the fourth feature representation of the second sample speech data into the classifier to obtain a second predicted label of the second sample speech data includes: Inputting the fourth feature representation of the second sample speech data into the second coding projector to obtain a fifth feature representation, where the fifth feature representation is obtained by mapping the fourth feature representation; The fifth feature representation is input into the classifier to obtain a second predicted label for the second sample speech data.

7. The method according to any one of claims 1 to 3, characterized in that: The step of inputting the first sample speech data into the first speech encoder to obtain a first feature representation of the first sample speech data includes: Preprocessing the first sample voice data in a first manner to obtain first voice data; The first speech data is input into the first speech encoder to obtain the first feature representation of the first sample speech data.

8. The method according to claim 7, characterized in that The method further comprises: At least one preprocessing method is randomly selected from n preprocessing methods as the first method; the n preprocessing methods include at least two of the following: Add additive noise; add reverb; add masking effects; harmonically enhance processing; add track perturbations.

9. The method according to any one of claims 1 to 3, characterized in that: The step of inputting the first sample speech data into the momentum encoder to obtain a second feature representation of the first sample speech data includes: Preprocessing the first sample voice data in a second manner to obtain second voice data; The second speech data is input into a momentum encoder to obtain the second feature representation of the first sample speech data.

10. The method according to claim 9, characterized in that The method further comprises: At least one preprocessing method is randomly selected from n preprocessing methods as the second method; the n preprocessing methods include at least two of the following: Add additive noise; add reverb; add masking effects; harmonically enhance processing; add track perturbations.

11. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The network parameters of the first speech encoder are processed by exponential moving average (EMA) to obtain at least one network parameter of the momentum encoder.

12. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Acquire input speech data and a reference feature representation, wherein the reference feature representation is a feature representation of speech data of a target recognition object; Inputting the input speech data into the first speech encoder in the trained speech coding model to obtain a sixth feature representation of the input speech data; Based on the sixth feature representation and the reference feature representation, the input voice data is judged to obtain a judgment result of the input voice data, and the judgment result is used to indicate whether the input voice data is the voice data of the target recognition object.

13. The method according to claim 12, characterized in that The method further comprises: Reference speech data is input into the first speech encoder in the trained speech coding model to obtain the reference feature representation of the reference speech data, wherein the reference speech data is the speech data of the target recognition object.

14. A method for using a speech coding model, characterized in that: The method is applied to a computer device, the computer device running a speech coding model, the speech coding model being obtained according to the training method of the speech coding model according to any one of claims 1 to 13; The method comprises: Get input voice data; Acquire a reference feature representation, wherein the reference feature representation is a feature representation of speech data of a target recognition object, wherein the reference feature representation is obtained by inputting reference speech data into a speech coding model, wherein the reference speech data is speech data of the target recognition object; Inputting the input speech data into the first speech encoder in the speech coding model to obtain a sixth feature representation of the input speech data; Based on the sixth feature representation and the reference feature representation, the input voice data is judged to obtain a judgment result of the input voice data, and the judgment result is used to indicate whether the input voice data is the voice data of the target recognition object.

15. A training device for a speech coding model, characterized in that: The speech coding model comprises: a first speech encoder and a momentum encoder; the device comprises: An acquisition module, used for acquiring first sample voice data; An input module, configured to input the first sample speech data into the first speech encoder to obtain a first feature representation of the first sample speech data; The input module is further used to input the first sample speech data into the momentum encoder to obtain a second feature representation of the first sample speech data, wherein at least one network parameter of the momentum encoder is determined based on the network parameter of the first speech encoder; a processing module, configured to determine a model encoding error based on the first feature representation and the second feature representation; A training module is used to perform backward error propagation training on the speech coding model using the model coding error to obtain a trained speech coding model.

16. A device for using a speech coding model, characterized in that: The device is applied to a computer device, the computer device runs a speech coding model, and the speech coding model is obtained according to the training device of the speech coding model according to claim 15; The device comprises: An acquisition module, used for acquiring input voice data; The acquisition module is further used to acquire a reference feature representation, wherein the reference feature representation is a feature representation of speech data of a target recognition object, wherein the reference feature representation is obtained by inputting reference speech data into a speech coding model, wherein the reference speech data is speech data of the target recognition object; An input module, configured to input the input speech data into the first speech encoder in the speech coding model to obtain a sixth feature representation of the input speech data; A determination module is used to determine the input voice data based on the sixth feature representation and the reference feature representation to obtain a determination result of the input voice data, wherein the determination result is used to indicate whether the input voice data is the voice data of the target recognition object.

17. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute the at least one program in the memory to implement the training method of the speech coding model as described in any one of claims 1 to 13 and / or the method for using the speech coding model as described in claim 14.

18. A computer-readable storage medium, characterized in that: The readable storage medium stores executable instructions, which are loaded and executed by a processor to implement the training method of the speech coding model as described in any one of claims 1 to 13 and / or the method of using the speech coding model as described in claim 14.

19. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor reads and executes the computer instructions from the computer-readable storage medium to implement the training method of the speech coding model as described in any one of claims 1 to 13 and / or the method for using the speech coding model as described in claim 14.