WO2023134067A1 - 语音分类模型的训练方法、装置、设备及存储介质 - Google Patents

语音分类模型的训练方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023134067A1
WO2023134067A1 PCT/CN2022/089869 CN2022089869W WO2023134067A1 WO 2023134067 A1 WO2023134067 A1 WO 2023134067A1 CN 2022089869 W CN2022089869 W CN 2022089869W WO 2023134067 A1 WO2023134067 A1 WO 2023134067A1
Authority
WO
WIPO (PCT)
Prior art keywords
speech
sample
classification model
training
encoder
Prior art date
Application number
PCT/CN2022/089869
Other languages
English (en)
French (fr)
Inventor
司世景
王健宗
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023134067A1 publication Critical patent/WO2023134067A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/06Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/18Speech classification or search using natural language modelling

Definitions

  • the present application relates to the field of artificial intelligence, in particular to a training method, device, equipment and storage medium for a speech classification model.
  • DNN Deep Neural Networks
  • CNN Convolutional Neural Networks
  • speech classification tasks a simple CNN can often achieve good classification results.
  • Most CNN networks mark the voice during training, and establish a connection between the voice information and the target label, so as to train the CNN model, but the inventors found that this training method is limited by the accuracy of the label and the amount of sample data As well as the sample distribution, the labeling cost is high, and overfitting is prone to occur.
  • the present application provides a training method, device, equipment and storage medium of a speech classification model, so as to reduce the occurrence of over-fitting phenomenon.
  • the application provides a method for training a speech classification model, the method comprising:
  • sample data including a sample voice and a sample label corresponding to the sample voice
  • the present application also provides a training device for a speech classification model, the device comprising:
  • a sample acquisition module configured to acquire sample data, the sample data including sample voice and sample labels corresponding to the sample voice;
  • a preprocessing module configured to preprocess the sample speech to obtain a vector matrix corresponding to the sample speech
  • the bottleneck processing module is used to input the vector matrix into the variational information bottleneck processing network of the initial speech classification model to obtain the sentence representation corresponding to the sample speech;
  • a model training module configured to input the sentence representation into the classification network of the initial speech classification model to obtain a prediction label, and perform iterative training on the initial speech classification model according to the sample label and the prediction label to obtain training Good speech classification model.
  • the present application also provides a computer device, the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and execute the When a computer program implements:
  • sample data including a sample voice and a sample label corresponding to the sample voice
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor realizes:
  • sample data including a sample voice and a sample label corresponding to the sample voice
  • the present application discloses a training method, device, equipment and storage medium for a speech classification model.
  • the sample data includes sample speech and sample labels corresponding to the sample speech; preprocessing the sample speech , obtain the vector matrix corresponding to the sample speech; input the vector matrix into the variational information bottleneck processing network of the initial speech classification model, obtain the sentence representation corresponding to the sample speech; input the sentence representation into the classification network of the initial speech classification model
  • the prediction label is obtained, and then the initial speech classification model is iteratively trained according to the sample label and the prediction label, so as to obtain the trained speech classification model.
  • the variational information bottleneck processing network is added to the speech classification model, which compresses the sample information and suppresses useless information, thereby reducing the occurrence of over-fitting phenomenon.
  • Fig. 1 is the schematic flowchart of the steps of the training method of the speech classification model that the embodiment of the application provides;
  • Fig. 2 is the schematic flow chart of the step that the sample speech is preprocessed to obtain the vector matrix provided by the embodiment of the present application;
  • FIG. 3 is a schematic flowchart of steps for training an encoder provided in an embodiment of the present application.
  • FIG. 4 is a schematic block diagram of a training device for a speech classification model provided in an embodiment of the present application
  • Fig. 5 is a schematic structural block diagram of a computer device provided by an embodiment of the present application.
  • Embodiments of the present application provide a training method, device, computer equipment and storage medium for a speech classification model.
  • the training method of the speech classification model utilizes the neural network in the field of artificial intelligence, and obtains the speech classification model through iterative training of the neural network.
  • the trained speech classification model can be used in classification scenarios such as classification of speech emotion types to improve classification performance.
  • FIG. 1 is a schematic flowchart of a method for training a speech classification model provided by an embodiment of the present application.
  • the training method of the speech classification model realizes the compression of useless information by adding a variational information bottleneck processing layer, and enters more important information into the classification model to participate in classification, thereby improving the classification accuracy of the model and reducing the occurrence of overfitting.
  • the training method of the speech classification model specifically includes: Step S101 to Step S104.
  • the sample data includes a sample voice and a sample label corresponding to the sample voice.
  • a small sample data set can be obtained to participate in the training of the model, where the small sample data set can be expressed as sample speech
  • the sample label corresponding to the sample speech may be an emotion label representing the emotion type of the sample speech.
  • the sample speech in the sample data needs to be preprocessed, wherein the preprocessing may include performing fixed-length segmentation, feature extraction, and vector extraction on the sample speech.
  • the sample speeches in the sample data may be intercepted into fixed-length speech signals, and then feature extraction and vector extraction are performed on these fixed-length speech signals.
  • the step of preprocessing the sample speech to obtain a vector matrix includes: S1021, performing feature extraction on the sample speech to obtain a digital signal corresponding to the sample speech; S1022, the The digital signal is input into a pre-trained encoder to obtain a vector matrix corresponding to the digital signal.
  • the sample speech can be passed through the feature extraction layer to obtain the feature distribution map of the Mel Frequency Cepstral Coefficients (MFCCs) corresponding to the sample speech, and then obtain the corresponding MFCCs of the sample speech Digital signal. Then input the obtained digital signal into the encoder to obtain the vector matrix corresponding to the digital signal.
  • MFCCs Mel Frequency Cepstral Coefficients
  • the concept of self-supervised contrastive learning can be used to construct a contrastive loss function to pre-train the encoder, thereby improving the encoder's ability to capture speech features and providing a good model basis for classification tasks.
  • the step of training the encoder may include: S201, obtain the training speech, and perform augmentation processing on the training speech, and obtain the first augmentation matrix and the second augmentation matrix corresponding to the training speech Two augmented matrices; S202. Input the first augmented matrix into an encoder to obtain a first eigenvector corresponding to the first augmented matrix, and input the second augmented matrix into the encoder to obtain A second eigenvector corresponding to the second augmented matrix; S203. Perform comparative training on the encoder according to the first eigenvector and the second eigenvector to obtain a pre-trained encoder.
  • the training voice can use the sample voice in the sample data, or find other voice data as the training voice. Using the sample voice in the sample data as the training voice can not increase additional training costs.
  • the training process of the encoder is described below by taking sample speech as the training speech as an example.
  • Perform data augmentation on multiple training voices that is, add some noise to the training voice, such as adjusting the speed of the training voice, covering a certain frequency in the training voice, etc., and transform the training voice to obtain the training voice The corresponding augmented matrix.
  • t 1 (xi ) , t 2 ( xi ) represent different augmented matrices obtained by using different augmentation methods for the same training speech i, for example, t 1 ( xi ) is the i-th
  • the first augmentation matrix obtained after data augmentation using the first augmentation method, t 2 ( xi ) is the second augmentation matrix obtained after the i-th article in the training speech is augmented with the second augmentation method broad matrix. then respectively correspond to the feature vectors of t 1 ( xi ) and t 2 ( xi ) after passing through the encoder.
  • the encoder After obtaining the first eigenvector corresponding to the first augmented matrix t 1 ( xi ) respectively and the second eigenvector corresponding to the second augmented matrix t 2 (xi ) After that, the encoder can be iteratively trained, and the specific steps include:
  • the encoder is iteratively trained.
  • L NCE represents the loss function
  • v (2) represents the set of the second eigenvector
  • s represents the first eigenvector and the second eigenvector
  • the similarity, N represents the total number of training speech.
  • contrastive loss can also be used, and the loss function of contrastive loss includes:
  • S SimCLR represents the first eigenvector and the second eigenvector The inner product of , that is, the first eigenvector and the second eigenvector The similarity between the inner products of .
  • the parameters of the encoder are updated according to the loss function value of the encoder, so as to maximize the ability of the encoder to extract useful information in the speech signal.
  • the vector matrix of the sample speech represents the feature distribution map of the sample speech, and the vector matrix is input into the variational information bottleneck processing network of the initial speech classification model, and the information is compressed to obtain the sentence representation.
  • the compressed feature representation Z is a K-dimensional Gaussian distribution
  • the mean value ⁇ x and variance ⁇ x can be obtained.
  • Known compressed feature representation That is, Z is a random sampling on the p ⁇ (z
  • x) distribution. According to the reparameterization method, the final compressed sentence representation Z ⁇ (x)+ ⁇ (x) ⁇ , ⁇ N(0,I) can be obtained.
  • a certain amount of noise is introduced through the Gaussian distribution, which reduces the ability of the sentence representation to represent the sample speech to a certain extent, thereby preventing the final classification model from learning some useless features.
  • the sentence representation is input into the classification network of the initial speech classification model, and the classification network predicts according to the sentence representation to obtain the prediction label output by the classification network, and then according to the sample label and the prediction label, the classification network in the initial speech classification model and
  • the variational information bottleneck processing network is iteratively trained to obtain a trained speech classification model. For example, when the value of the loss function is minimum or reaches the preset number of training times, the trained variational information bottleneck processing network and the classification network are used as the trained speech classification model to classify the speech to be classified.
  • the classification network includes a multi-layer perceptron network and a classifier, and the sentence representation is input into the multi-layer perceptron network, and then the output of the multi-layer perceptron network is used as the input of the classifier, so that the classifier is based on The input features generate the predicted predicted labels.
  • the step of iteratively training the initial speech classification model includes: calculating the loss function of the initial speech classification model according to the predicted label and the sample label based on the loss function formula of the initial speech classification model value, and iteratively train the initial speech classification model based on the loss function value.
  • the loss function value of the initial speech classification model is calculated according to the predicted label and sample label output by the classification network.
  • the loss function formula of the initial speech classification model includes:
  • the model parameters of the classification network and the variational information bottleneck processing network are updated and optimized, thereby completing the training task of the initial speech classification model,
  • the trained speech classification model can be obtained, and the trained speech classification model can be used to perform speech classification tasks.
  • the speech classification process may include:
  • the speech to be classified is obtained, and then the speech to be classified is preprocessed to obtain a vector matrix corresponding to the speech to be classified.
  • the speech to be classified can be intercepted as a fixed-length speech signal, and then the digital signal of the speech to be classified is obtained through the feature extraction layer, and then through the aforementioned trained encoder, finally Obtain the vector matrix corresponding to the speech to be classified.
  • the speech to be classified first passes through the variational information bottleneck processing network, and the expected value of the sentence representation corresponding to the compressed speech to be classified is obtained through the information bottleneck processing network.
  • the output of the variational information bottleneck processing network is used as the input of the multi-layer perceptron network in the classification network, and the output of the multi-layer perceptron network in the classification network is used as the input of the classifier in the classification network to calculate to get the predicted label.
  • the sample data includes sample speech and the sample label corresponding to the sample speech; preprocessing the sample speech to obtain the corresponding sample speech Vector matrix; the vector matrix is input into the variational information bottleneck processing network of the initial speech classification model, and the sentence representation corresponding to the sample speech is obtained; the sentence representation is input into the classification network of the initial speech classification model to obtain a prediction label, and then according to the sample label and predicted labels to iteratively train the initial speech classification model to obtain a trained speech classification model.
  • the variational information bottleneck processing network is added to the speech classification model, which compresses the sample information and suppresses useless information, thereby reducing the occurrence of over-fitting phenomenon.
  • FIG. 4 is a schematic block diagram of an apparatus for training a speech classification model according to an embodiment of the present application.
  • the apparatus for training a speech classification model is used to implement the aforementioned method for training a speech classification model.
  • the training device of the speech classification model can be configured in a server or a terminal.
  • the server may be an independent server or a server cluster.
  • the terminal can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device.
  • an apparatus 300 for training a speech classification model includes: a sample acquisition module 301 , a preprocessing module 302 , a bottleneck processing module 303 and a model training module 304 .
  • the sample acquiring module 301 is configured to acquire sample data, where the sample data includes a sample voice and a sample label corresponding to the sample voice.
  • the preprocessing module 302 is configured to preprocess the sample speech to obtain a vector matrix corresponding to the sample speech.
  • the preprocessing module 302 includes a feature extraction submodule 3021 and a signal encoding submodule 3022 .
  • the feature extraction submodule 3021 is used to extract the features of the sample speech to obtain a digital signal corresponding to the sample speech;
  • the signal encoding submodule 3022 is used to input the digital signal into a pre-trained encoder to obtain The vector matrix corresponding to the digital signal.
  • the concept of self-supervised contrastive learning can be used to construct a contrastive loss function to pre-train the encoder, thereby improving the encoder's ability to capture speech features and providing a good model basis for classification tasks.
  • the training device for the speech classification model may also include: a speech processing module, a vector generation module and a comparison training module.
  • the speech processing module is used to acquire training speech, and perform augmentation processing on the training speech to obtain a first augmentation matrix and a second augmentation matrix corresponding to the training speech.
  • the vector generation module is used to input the first augmented matrix into an encoder to obtain a first eigenvector corresponding to the first augmented matrix, and to input the second augmented matrix into the encoder to obtain the The second eigenvector corresponding to the second augmented matrix.
  • the comparative training module is used for performing comparative training on the encoder according to the first feature vector and the second feature vector to obtain a pre-trained encoder.
  • An augmented matrix corresponds to a first eigenvector and a second augmented matrix corresponds to a second eigenvector.
  • the comparison training module calculates the similarity between the first feature vector and the second feature vector and calculates the loss function value based on the similarity, so as to iteratively train the encoder according to the loss function value to obtain a pre-trained encoder.
  • the bottleneck processing module 303 is configured to input the vector matrix into the variational information bottleneck processing network of the initial speech classification model to obtain the sentence representation corresponding to the sample speech.
  • a model training module 304 configured to input the sentence representation into the classification network of the initial speech classification model to obtain a predicted label, and perform iterative training on the initial speech classification model according to the sample label and the predicted label to obtain A trained speech classification model.
  • the model training module 304 can be used to: based on the loss function formula of the initial speech classification model, calculate the loss function value of the initial speech classification model according to the predicted label and the sample label, and based on The loss function value iteratively trains the initial speech classification model.
  • the above-mentioned training apparatus for the speech classification model can be realized in the form of a computer program, and the computer program can be run on the computer equipment as shown in FIG. 5 .
  • FIG. 5 is a schematic structural block diagram of a computer device provided by an embodiment of the present application.
  • the computer device can be a server or a terminal.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a storage medium and an internal memory.
  • the storage medium may store operating systems and computer programs.
  • the computer program includes program instructions. When the program instructions are executed, the processor can be executed to perform any training method of the speech classification model.
  • the processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
  • the internal memory provides an environment for running the computer program in the non-volatile storage medium.
  • the processor can execute any training method of the speech classification model.
  • This network interface is used for network communication, such as sending assigned tasks, etc.
  • Those skilled in the art can understand that the structure shown in Figure 5 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation to the computer equipment on which the solution of this application is applied.
  • the specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
  • the processor is used to run a computer program stored in the memory to implement the following steps:
  • sample data including a sample voice and a sample label corresponding to the sample voice
  • the processor when the processor implements the preprocessing of the sample speech to obtain the vector matrix corresponding to the sample speech, it is used to realize:
  • the processor when the processor implements iterative training of the initial speech classification model according to the sample label and the predicted label, it is configured to:
  • the loss function formula of the initial speech classification model includes:
  • the processor is configured to:
  • the processor when the processor implements the comparative training of the encoder according to the first feature vector and the second feature vector, it is configured to:
  • the loss function value of the encoder is calculated according to the similarity, and the encoder is iteratively trained according to the loss function value.
  • the loss function of the encoder includes:
  • L NCE represents the loss function of the encoder
  • v (2) represents the set of the second eigenvector
  • s represents the first eigenvector and the second eigenvector
  • N represents the total number of training speech.
  • Embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application.
  • the computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as a hard disk or a memory of the computer device.
  • the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD ) card, flash memory card (Flash Card) etc., described storage medium can be nonvolatile, also can be volatile.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Machine Translation (AREA)

Abstract

一种语音分类模型的训练方法、训练装置,一种计算机设备及计算机可读存储介质。方法包括获取样本数据,样本数据包括样本语音和样本语音对应的样本标签;对样本语音进行预处理,得到样本语音对应的向量矩阵;将向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到样本语音对应的句子表征;将句子表征输入初始语音分类模型的分类网络得到预测标签,然后根据样本标签和预测标签对初始语音分类模型进行迭代训练,从而得到训练好的语音分类模型。

Description

语音分类模型的训练方法、装置、设备及存储介质
本申请要求于2022年01月14日提交中国专利局、申请号为2022100428061,发明名称为“语音分类模型的训练方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种语音分类模型的训练方法、装置、设备及存储介质。
背景技术
目前,以卷积神经网络(Convolutional Neural Networks,CNN)为首的很多深度学习网络(Deep Neural Networks,DNN)在各类下游任务中被广泛应用,例如语音分类任务。在语音分类任务中,通过一个简单的CNN往往就可以达到很好的分类效果。大部分CNN网络在训练时是将语音进行标注,在语音信息和目标标签之间建立联系,从而对CNN模型进行训练,但发明人发现这种训练方式受限于标签的准确度、样本数据量以及样本分布情况,标注成本较高,且容易出现过拟合。
发明内容
本申请提供了一种语音分类模型的训练方法、装置、设备及存储介质,以减少过拟合现象的发生。
第一方面,本申请提供了一种语音分类模型的训练方法,所述方法包括:
获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
第二方面,本申请还提供了一种语音分类模型的训练装置,所述装置包括:
样本获取模块,用于获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
预处理模块,用于对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
瓶颈处理模块,用于将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
模型训练模块,用于将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
第三方面,本申请还提供了一种计算机设备,所述计算机设备包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现:
获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
第四方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现:
获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
本申请公开了一种语音分类模型的训练方法、装置、设备及存储介质,通过获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;将句子表征输入初始语音分类模型的分类网络得到预测标签,然后根据样本标签和预测标签对初始语音分类模型进行迭代训练,从而得到训练好的语音分类模型。在语音分类模型中加入变分信息瓶颈处理网络,压缩了样本信息并抑制了无用信息,从而减小了过拟合现象的发生。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的语音分类模型的训练方法的步骤示意流程图;
图2是本申请实施例提供的对样本语音进行预处理得到向量矩阵的步骤示意流程图;
图3是本申请实施例提供的一种训练编码器的步骤示意流程图;
图4是本申请实施例提供的一种语音分类模型的训练装置的示意性框图;
图5是本申请实施例提供的一种计算机设备的结构示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
本申请的实施例提供了一种语音分类模型的训练方法、装置、计算机设备及存储介质。该语音分类模型的训练方法利用了人工智能领域中的神经网络,通过对神经网络的迭代训练得到语音分类模型。并且训练出的语音分类模型可以用于进行语音情感类型的分类等分类场 景,提高分类性能。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
请参阅图1,图1是本申请实施例提供的一种语音分类模型的训练方法的示意流程图。该语音分类模型的训练方法通过加入变分信息瓶颈处理层来实现对无用信息的压缩,将较为重要的信息进入分类模型中参与分类,从而提高模型分类准确率和减少过拟合情况的发生。
如图1所示,该语音分类模型的训练方法,具体包括:步骤S101至步骤S104。
S101、获取样本数据。
其中,样本数据中包括样本语音和所述样本语音对应的样本标签。在进行模型训练时,可以获取一个小样本数据集来参与模型的训练,其中,小样本数据集可以表示为
Figure PCTCN2022089869-appb-000001
样本语音
Figure PCTCN2022089869-appb-000002
样本语音对应的样本标签
Figure PCTCN2022089869-appb-000003
)。在具体实施过程中,样本标签可以是表示样本语音的情感类型的情感标签。
S102、对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵。
在得到样本数据后,需要对样本数据中的样本语音进行预处理,其中,预处理可以包括对样本语音进行定长分割、特征提取和向量提取等。
当样本数据中的各个样本语音的长度不同时,可以将样本语音分别截取为定长的语音信号,然后再对这些定长的语音信号进行特征提取和向量提取。
在一实施例中,请参阅图2,对样本语音进行预处理得到向量矩阵的步骤包括:S1021、对所述样本语音进行特征提取,得到所述样本语音对应的数字信号;S1022、将所述数字信号输入预先训练的编码器,得到所述数字信号对应的向量矩阵。
在对样本语音进行特征提取时,可以将样本语音通过特征提取层,从而得到样本语音对应的梅尔频率倒谱系数的(Mel Frequency Cepstral Coefficients,MFCCs)的特征分布图,进而得到样本语音对应的数字信号。然后将得到的数字信号输入编码器中,得到数字信号所对应的向量矩阵。
在一实施例中,可以使用自监督对比学习的概念,构造对比损失函数来对编码器进行预训练,从而提高编码器对于语音特征的抓取能力,为分类任务提供良好的模型基础。
在具体实施过程中,请参阅图3,训练编码器的步骤可以包括:S201、获取训练语音,并对所述训练语音进行增广处理,得到所述训练语音对应的第一增广矩阵和第二增广矩阵;S202、将所述第一增广矩阵输入编码器,得到所述第一增广矩阵对应的第一特征向量,以及将所述第二增广矩阵输入所述编码器,得到所述第二增广矩阵对应的第二特征向量;S203、根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,得到预先训练的编码器。
训练语音可以使用样本数据中的样本语音,也可以再寻找其他的语音数据作为训练语音,使用样本数据中的样本语音作为训练语音能够不增加额外的训练成本。下面以使用样本语音作为训练语音为例对编码器的训练过程进行说明。
对多条训练语音进行数据增广,也即在训练语音上增加一些噪音,例如对训练语音进行调速、覆盖训练语音中的某一频率等等,对训练语音进行变换,从而得到该训练语音所对应的增广矩阵。
例如对
Figure PCTCN2022089869-appb-000004
进行数据增广,得到两个独立的增广矩阵,分别为第一增广矩阵t 1(x)和第二增广矩阵t 2(x)。其中,t 1(x i),t 2(x i)表示为同一训练语音i的采用不同的增广方式得到的不同的增广矩阵,比如t 1(x i)为训练语音中的第i条使用第一增广方式进行数据增广后得到的第一增广矩阵,t 2(x i)为训练语音中的第i条使用第二增广方式进行数据增广后得到的第二增广矩阵。
Figure PCTCN2022089869-appb-000005
则分别对应t 1(x i),t 2(x i)在经过编码器以后的特征向量。
在分别得到第一增广矩阵t 1(x i)对应的第一特征向量
Figure PCTCN2022089869-appb-000006
以及第二增广矩阵t 2(x i)对应的第二特征向量
Figure PCTCN2022089869-appb-000007
后,即可对编码器进行迭代训练,具体步骤包括:
计算所述第一特征向量和所述第二特征向量之间的相似度;基于所述编码器的损失函数, 根据所述相似度计算所述编码器的损失函数值,根据所述损失函数值对所述编码器进行迭代训练。
计算第一特征向量
Figure PCTCN2022089869-appb-000008
和第二特征向量
Figure PCTCN2022089869-appb-000009
的内积,通过计算出的内积来表示第一特征向量
Figure PCTCN2022089869-appb-000010
和第二特征向量
Figure PCTCN2022089869-appb-000011
之间的相似度,进而根据损失函数公式来计算损失函数值,其中,损失函数的计算公式为:
Figure PCTCN2022089869-appb-000012
其中,L NCE表示损失函数,
Figure PCTCN2022089869-appb-000013
表示第i条训练语音对应的第一特征向量,v (2)表示第二特征向量的集合,
Figure PCTCN2022089869-appb-000014
表示第i条训练语音对应的第二特征向量,
Figure PCTCN2022089869-appb-000015
表示第j条训练语音对应的第二特征向量,s表示第一特征向量
Figure PCTCN2022089869-appb-000016
和第二特征向量
Figure PCTCN2022089869-appb-000017
的相似度,N表示训练语音的总数量。
另外,还可以使用对比损失,对比损失的损失函数包括:
Figure PCTCN2022089869-appb-000018
其中,L con表示对比损失的损失函数,S SimCLR表示第一特征向量
Figure PCTCN2022089869-appb-000019
和第二特征向量
Figure PCTCN2022089869-appb-000020
的内积,也即第一特征向量
Figure PCTCN2022089869-appb-000021
和第二特征向量
Figure PCTCN2022089869-appb-000022
的内积之间的相似度。
在计算出编码器的损失函数值后,根据编码器的损失函数值来对编码器的参数进行更新,从而最大化编码器对于语音信号中的有用信息的提取能力。
S103、将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征。
样本语音的向量矩阵代表样本语音的特征分布图,将向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络中,进行信息的压缩,从而得到句子表征。
假定压缩后的特征表征Z是一个K维高斯分布,那么向量矩阵经过一个CNN后,再分别经过两个线性模型(Linear Module),就可以得到的均值μ x及方差∑ x。已知压缩后的特征表征
Figure PCTCN2022089869-appb-000023
即Z是在p θ(z|x)分布上的随机取样。根据重新参数化(Reparameterization)方法,可以得到最终压缩后的句子表征Z=μ(x)+Σ(x)⊙ε,ε~N(0,I)。
通过高斯分布引入一定的噪音,从而在一定程度上降低了句子表征对样本语音的表征能力,从而阻止最后的分类模型学习到一些无用的特征。
S104、将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
将句子表征输入到初始语音分类模型的分类网络中,由分类网络根据句子表征进行预测,得到分类网络输出的预测标签,然后再根据样本标签和预测标签来对初始语音分类模型中的分类网络和变分信息瓶颈处理网络进行迭代训练,从而得到训练好的语音分类模型。例如当损失函数值最小或达到预设的训练次数时,将训练好的变分信息瓶颈处理网络和分类网络作为训练好的语音分类模型,来用于对待分类语音进行分类。
在一实施例中,分类网络中包括多层感知器网络和分类器,将句子表征输入多层感知器网络,然后再将多层感知器网络的输出作为分类器的输入,从而使分类器基于输入的特征生成预测出的预测标签。
在一实施例中,对初始语音分类模型进行迭代训练的步骤包括:基于所述初始语音分类模型的损失函数公式,根据所述预测标签和所述样本标签计算所述初始语音分类模型的损失函数值,并基于所述损失函数值对所述初始语音分类模型进行迭代训练。
在得到分类网络的输出后,基于损失函数公式,根据分类网络输出的预测标签和样本标签来计算初始语音分类模型的损失函数值。
在一实施例中,所述初始语音分类模型的损失函数公式,包括:
Figure PCTCN2022089869-appb-000024
其中,
Figure PCTCN2022089869-appb-000025
表示初始语音分类模型的损失函数,x表示样本语音,z表示句子表征,β表示平衡系数,
Figure PCTCN2022089869-appb-000026
分别表示关于变量x,z分布的期望,KL为相对熵,表征两个概率分布之间的差异,θ为变分信息瓶颈处理网络的模型参数,
Figure PCTCN2022089869-appb-000027
为分类网络的模型参数,μ x,μ 0为维度为K的均值向量,∑ x,∑ 0为协方差矩阵,
Figure PCTCN2022089869-appb-000028
是最后输出的预测标签
Figure PCTCN2022089869-appb-000029
通过最小化损失函数
Figure PCTCN2022089869-appb-000030
来更新分类网络和变分信息瓶颈处理网络的模型参数,在完成有限次的迭代后,分类网络和变分信息瓶颈处理网络的模型参数得到更新优化,从而完成对初始语音分类模型的训练任务,得到训练好的语音分类模型,可以使用该训练好的语音分类模型进行语音分类的任务。
在得到训练好的语音分类模型后,即可利用该训练好的语音分类模型来对待分类语音进行语音分类,语音分类的过程可以包括:
首先获取待分类语音,然后对待分类语音进行预处理,得到待分类语音所对应的向量矩阵。在此过程中,若待分类语音的长度不一,则可以将待分类语音截取为定长的语音信号,然后通过特征提取层得到待分类语音的数字信号,再经过前述训练的编码器,最终得到待分类语音所对应的向量矩阵。
然后将待分类语音输入至前述训练的语音分类模型中,进行语音分类,得到预测标签。在此过程中,待分类语音首先经过变分信息瓶颈处理网络,经由信息瓶颈处理网络得到压缩后的待分类语音所对应的句子表征的期望值
Figure PCTCN2022089869-appb-000031
再将变分信息瓶颈处理网络的输出作为分类网络中多层感知器网络的输入,将分类网络中多层感知器网络的输出作为分类网络中分类器的输入来计算
Figure PCTCN2022089869-appb-000032
从而得到预测标签。
上述实施例提供的语音分类模型的训练方法,通过获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;将句子表征输入初始语音分类模型的分类网络得到预测标签,然后根据样本标签和预测标签对初始语音分类模型进行迭代训练,从而得到训练好的语音分类模型。在语音分类模型中加入变分信息瓶颈处理网络,压缩了样本信息并抑制了无用信息,从而减小了过拟合现象的发生。
请参阅图4,图4是本申请的实施例还提供一种语音分类模型的训练装置的示意性框图,该语音分类模型的训练装置用于执行前述的语音分类模型的训练方法。其中,该语音分类模型的训练装置可以配置于服务器或终端中。
其中,服务器可以为独立的服务器,也可以为服务器集群。该终端可以是手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等电子设备。
如图4所示,语音分类模型的训练装置300包括:样本获取模块301、预处理模块302、瓶颈处理模块303和模型训练模块304。
样本获取模块301,用于获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签。
预处理模块302,用于对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵。
在一实施例中,预处理模块302包括特征提取子模块3021和信号编码子模块3022。其中,特征提取子模块3021,用于对所述样本语音进行特征提取,得到所述样本语音对应的数字信号;信号编码子模块3022,用于将所述数字信号输入预先训练的编码器,得到所述数字信号对应的向量矩阵。
在一实施例中,可以使用自监督对比学习的概念,构造对比损失函数来对编码器进行预训练,从而提高编码器对于语音特征的抓取能力,为分类任务提供良好的模型基础。
因此,该语音分类模型的训练装置还可以包括:语音处理模块、向量生成模块和对比训练模块。
其中,语音处理模块用于获取训练语音,并对所述训练语音进行增广处理,得到所述训练语音对应的第一增广矩阵和第二增广矩阵。
向量生成模块用于将所述第一增广矩阵输入编码器,得到所述第一增广矩阵对应的第一特征向量,以及将所述第二增广矩阵输入所述编码器,得到所述第二增广矩阵对应的第二特征向量。
对比训练模块用于根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,得到预先训练的编码器。
通过语音处理模块对训练语音进行数据增广,得到第一增广矩阵和第二增广矩阵,然后由向量生成模块将第一增广矩阵和第二增广矩阵分别输入编码器中,得到第一增广矩阵对应的第一特征向量和第二增广矩阵对应的第二特征向量。对比训练模块计算第一特征向量和第二特征向量之间的相似度并基于相似度计算损失函数值,从而根据损失函数值对编码器进行迭代训练,得到预先训练的编码器。
瓶颈处理模块303,用于将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征。
模型训练模块304,用于将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
在具体实施过程中,模型训练模块304可以用于:基于所述初始语音分类模型的损失函数公式,根据所述预测标签和所述样本标签计算所述初始语音分类模型的损失函数值,并基于所述损失函数值对所述初始语音分类模型进行迭代训练。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的语音分类模型的训练装置和各模块的具体工作过程,可以参考前述语音分类模型的训练方法实施例中的对应过程,在此不再赘述。
上述的语音分类模型的训练装置可以实现为一种计算机程序的形式,该计算机程序可以在如图5所示的计算机设备上运行。
请参阅图5,图5是本申请实施例提供的一种计算机设备的结构示意性框图。该计算机设备可以是服务器或终端。
参阅图5,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口,其中,存储器可以包括存储介质和内存储器。
存储介质可存储操作系统和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行任意一种语音分类模型的训练方法。
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种语音分类模型的训练方法。
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
其中,在一个实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:
获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
在一个实施例中,所述处理器在实现所述对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵时,用于实现:
对所述样本语音进行特征提取,得到所述样本语音对应的数字信号;
将所述数字信号输入预先训练的编码器,得到所述数字信号对应的向量矩阵。
在一个实施例中,所述处理器在实现所述根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练时,用于实现:
基于所述初始语音分类模型的损失函数公式,根据所述预测标签和所述样本标签计算所述初始语音分类模型的损失函数值,并基于所述损失函数值对所述初始语音分类模型络进行迭代训练。
在一个实施例中,所述初始语音分类模型的损失函数公式,包括:
Figure PCTCN2022089869-appb-000033
其中,
Figure PCTCN2022089869-appb-000034
表示初始语音分类模型的损失函数,x表示样本语音,z表示句子表征,β表示平衡系数,
Figure PCTCN2022089869-appb-000035
分别表示关于变量x,z分布的期望,KL为相对熵,表征两个概率分布之间的差异,θ为变分信息瓶颈处理网络的模型参数,
Figure PCTCN2022089869-appb-000036
为分类网络的模型参数,μ x,μ 0为维度为K的均值向量,∑ x,∑ 0为协方差矩阵,
Figure PCTCN2022089869-appb-000037
是分类网络输出的预测标签
Figure PCTCN2022089869-appb-000038
在一个实施例中,所述处理器用于实现:
获取训练语音,并对所述训练语音进行增广处理,得到所述训练语音对应的第一增广矩阵和第二增广矩阵;
将所述第一增广矩阵输入编码器,得到所述第一增广矩阵对应的第一特征向量,以及将所述第二增广矩阵输入所述编码器,得到所述第二增广矩阵对应的第二特征向量;
根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,得到预先训练的编码器。
在一个实施例中,所述处理器在实现所述根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练时,用于实现:
计算所述第一特征向量和所述第二特征向量之间的相似度;
基于所述编码器的损失函数,根据所述相似度计算所述编码器的损失函数值,根据所述损失函数值对所述编码器进行迭代训练。
在一个实施例中,所述编码器的损失函数,包括:
Figure PCTCN2022089869-appb-000039
其中,L NCE表示所述编码器的损失函数,
Figure PCTCN2022089869-appb-000040
表示第i条训练语音对应的第一特征向量,v (2)表示第二特征向量的集合,
Figure PCTCN2022089869-appb-000041
表示第i条训练语音对应的第二特征向量,
Figure PCTCN2022089869-appb-000042
表示第j条训练语音对应的第二特征向量,s表示第一特征向量
Figure PCTCN2022089869-appb-000043
和第二特征向量
Figure PCTCN2022089869-appb-000044
的相似度,N表示训练语音的总数量。
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任一项语音分类模型的训练方法。
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外 部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等,所述存储介质可以是非易失性的,也可以是易失性的。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种语音分类模型的训练方法,其中,所述方法包括:
    获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
    对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
    将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
    将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
  2. 根据权利要求1所述的语音分类模型的训练方法,其中,所述对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵,包括:
    对所述样本语音进行特征提取,得到所述样本语音对应的数字信号;
    将所述数字信号输入预先训练的编码器,得到所述数字信号对应的向量矩阵。
  3. 根据权利要求1所述的语音分类模型的训练方法,其中,所述根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,包括:
    基于所述初始语音分类模型的损失函数公式,根据所述预测标签和所述样本标签计算所述初始语音分类模型的损失函数值,并基于所述损失函数值对所述初始语音分类模型络进行迭代训练。
  4. 根据权利要求3所述的语音分类模型的训练方法,其中,所述初始语音分类模型的损失函数公式,包括:
    Figure PCTCN2022089869-appb-100001
    其中,
    Figure PCTCN2022089869-appb-100002
    表示初始语音分类模型的损失函数,x表示样本语音,z表示句子表征,β表示平衡系数,
    Figure PCTCN2022089869-appb-100003
    分别表示关于变量x,z分布的期望,KL为相对熵,表征两个概率分布之间的差异,θ为变分信息瓶颈处理网络的模型参数,
    Figure PCTCN2022089869-appb-100004
    为分类网络的模型参数,μ x,μ 0为维度为K的均值向量,∑ x,∑ 0为协方差矩阵,
    Figure PCTCN2022089869-appb-100005
    是分类网络输出的预测标签
    Figure PCTCN2022089869-appb-100006
  5. 根据权利要求1所述的语音分类模型的训练方法,其中,所述方法包括:
    获取训练语音,并对所述训练语音进行增广处理,得到所述训练语音对应的第一增广矩阵和第二增广矩阵;
    将所述第一增广矩阵输入编码器,得到所述第一增广矩阵对应的第一特征向量,以及将所述第二增广矩阵输入所述编码器,得到所述第二增广矩阵对应的第二特征向量;
    根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,得到预先训练的编码器。
  6. 根据权利要求5所述的语音分类模型的训练方法,其中,所述根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,包括:
    计算所述第一特征向量和所述第二特征向量之间的相似度;
    基于所述编码器的损失函数,根据所述相似度计算所述编码器的损失函数值,根据所述损失函数值对所述编码器进行迭代训练。
  7. 根据权利要求6所述的语音分类模型的训练方法,其中,所述编码器的损失函数,包括:
    Figure PCTCN2022089869-appb-100007
    其中,L NCE表示所述编码器的损失函数,
    Figure PCTCN2022089869-appb-100008
    表示第i条训练语音对应的第一特征向量,v (2)表示第二特征向量的集合,
    Figure PCTCN2022089869-appb-100009
    表示第i条训练语音对应的第二特征向量,
    Figure PCTCN2022089869-appb-100010
    表示第j条训练语音对应的第二特征向量,s表示第一特征向量
    Figure PCTCN2022089869-appb-100011
    和第二特征向量
    Figure PCTCN2022089869-appb-100012
    的相似度,N表示训练语音的总数量。
  8. 一种语音分类模型的训练装置,其中,包括:
    样本获取模块,用于获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
    预处理模块,用于对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
    瓶颈处理模块,用于将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
    模型训练模块,用于将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
  9. 一种计算机设备,其中,所述计算机设备包括存储器和处理器;
    所述存储器用于存储计算机程序;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现:
    获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
    对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
    将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
    将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
  10. 根据权利要求9所述的计算机设备,其中,所述对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵,包括:
    对所述样本语音进行特征提取,得到所述样本语音对应的数字信号;
    将所述数字信号输入预先训练的编码器,得到所述数字信号对应的向量矩阵。
  11. 根据权利要求9所述的计算机设备,其中,所述根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,包括:
    基于所述初始语音分类模型的损失函数公式,根据所述预测标签和所述样本标签计算所述初始语音分类模型的损失函数值,并基于所述损失函数值对所述初始语音分类模型络进行迭代训练。
  12. 根据权利要求11所述的计算机设备,其中,所述初始语音分类模型的损失函数公式,包括:
    Figure PCTCN2022089869-appb-100013
    其中,
    Figure PCTCN2022089869-appb-100014
    表示初始语音分类模型的损失函数,x表示样本语音,z表示句子表征,β表示平衡系数,
    Figure PCTCN2022089869-appb-100015
    分别表示关于变量x,z分布的期望,KL为相对熵,表征两个概率分布之间的差异,θ为变分信息瓶颈处理网络的模型参数,
    Figure PCTCN2022089869-appb-100016
    为分类网络的模型参数,μ x,μ 0为维度为K的均值向量,∑ x,∑ 0为协方差矩阵,
    Figure PCTCN2022089869-appb-100017
    是分类网络输出的预测标签
    Figure PCTCN2022089869-appb-100018
  13. 根据权利要求9所述的计算机设备,其中,所述方法包括:
    获取训练语音,并对所述训练语音进行增广处理,得到所述训练语音对应的第一增广矩阵和第二增广矩阵;
    将所述第一增广矩阵输入编码器,得到所述第一增广矩阵对应的第一特征向量,以及将所述第二增广矩阵输入所述编码器,得到所述第二增广矩阵对应的第二特征向量;
    根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,得到预先训练的编码器。
  14. 根据权利要求13所述的计算机设备,其中,所述根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,包括:
    计算所述第一特征向量和所述第二特征向量之间的相似度;
    基于所述编码器的损失函数,根据所述相似度计算所述编码器的损失函数值,根据所述损失函数值对所述编码器进行迭代训练。
  15. 根据权利要求14所述的计算机设备,其中,所述编码器的损失函数,包括:
    Figure PCTCN2022089869-appb-100019
    其中,L NCE表示所述编码器的损失函数,
    Figure PCTCN2022089869-appb-100020
    表示第i条训练语音对应的第一特征向量,v (2)表示第二特征向量的集合,
    Figure PCTCN2022089869-appb-100021
    表示第i条训练语音对应的第二特征向量,
    Figure PCTCN2022089869-appb-100022
    表示第j条训练语音对应的第二特征向量,s表示第一特征向量
    Figure PCTCN2022089869-appb-100023
    和第二特征向量
    Figure PCTCN2022089869-appb-100024
    的相似度,N表示训练语音的总数量。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现:
    获取样本数据,所述样本数据包括样本语音和所述样本语音对应的样本标签;
    对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵;
    将所述向量矩阵输入初始语音分类模型的变分信息瓶颈处理网络,得到所述样本语音对应的句子表征;
    将所述句子表征输入所述初始语音分类模型的分类网络得到预测标签,并根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,以得到训练好的语音分类模型。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述对所述样本语音进行预处理,得到所述样本语音对应的向量矩阵,包括:
    对所述样本语音进行特征提取,得到所述样本语音对应的数字信号;
    将所述数字信号输入预先训练的编码器,得到所述数字信号对应的向量矩阵。
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述根据所述样本标签和所述预测标签对所述初始语音分类模型进行迭代训练,包括:
    基于所述初始语音分类模型的损失函数公式,根据所述预测标签和所述样本标签计算所述初始语音分类模型的损失函数值,并基于所述损失函数值对所述初始语音分类模型络进行迭代训练。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述初始语音分类模型的损失函数公式,包括:
    Figure PCTCN2022089869-appb-100025
    其中,
    Figure PCTCN2022089869-appb-100026
    表示初始语音分类模型的损失函数,x表示样本语音,z表示句子表征,β表示平衡系数,
    Figure PCTCN2022089869-appb-100027
    分别表示关于变量x,z分布的期望,KL为相对熵,表征两个概率分布之间的差异,θ为变分信息瓶颈处理网络的模型参数,
    Figure PCTCN2022089869-appb-100028
    为分类网络的模型参数,μ x,μ 0为维度为K的均值向量,∑ x,∑ 0为协方差矩阵,
    Figure PCTCN2022089869-appb-100029
    是分类网络输出的预测标签
    Figure PCTCN2022089869-appb-100030
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述方法包括:
    获取训练语音,并对所述训练语音进行增广处理,得到所述训练语音对应的第一增广矩阵和第二增广矩阵;
    将所述第一增广矩阵输入编码器,得到所述第一增广矩阵对应的第一特征向量,以及将所述第二增广矩阵输入所述编码器,得到所述第二增广矩阵对应的第二特征向量;
    根据所述第一特征向量和所述第二特征向量对所述编码器进行对比训练,得到预先训练的编码器。
PCT/CN2022/089869 2022-01-14 2022-04-28 语音分类模型的训练方法、装置、设备及存储介质 WO2023134067A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210042806.1A CN114360520A (zh) 2022-01-14 2022-01-14 语音分类模型的训练方法、装置、设备及存储介质
CN202210042806.1 2022-01-14

Publications (1)

Publication Number Publication Date
WO2023134067A1 true WO2023134067A1 (zh) 2023-07-20

Family

ID=81091438

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/089869 WO2023134067A1 (zh) 2022-01-14 2022-04-28 语音分类模型的训练方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN114360520A (zh)
WO (1) WO2023134067A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756596A (zh) * 2023-08-17 2023-09-15 智慧眼科技股份有限公司 文本聚类模型训练方法、文本聚类方法、装置及相关设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114360520A (zh) * 2022-01-14 2022-04-15 平安科技(深圳)有限公司 语音分类模型的训练方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178458A (zh) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 分类模型的训练、对象分类方法及装置
CN113327584A (zh) * 2021-05-28 2021-08-31 平安科技(深圳)有限公司 语种识别方法、装置、设备及存储介质
CN113434683A (zh) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 文本分类方法、装置、介质及电子设备
CN113435365A (zh) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 人脸图像迁移方法及装置
CN113593525A (zh) * 2021-01-26 2021-11-02 腾讯科技(深圳)有限公司 口音分类模型训练和口音分类方法、装置和存储介质
CN113869420A (zh) * 2021-09-28 2021-12-31 平安科技(深圳)有限公司 基于对比学习的文本推荐方法及相关设备
CN114360520A (zh) * 2022-01-14 2022-04-15 平安科技(深圳)有限公司 语音分类模型的训练方法、装置、设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178458A (zh) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 分类模型的训练、对象分类方法及装置
CN113593525A (zh) * 2021-01-26 2021-11-02 腾讯科技(深圳)有限公司 口音分类模型训练和口音分类方法、装置和存储介质
CN113327584A (zh) * 2021-05-28 2021-08-31 平安科技(深圳)有限公司 语种识别方法、装置、设备及存储介质
CN113434683A (zh) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 文本分类方法、装置、介质及电子设备
CN113435365A (zh) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 人脸图像迁移方法及装置
CN113869420A (zh) * 2021-09-28 2021-12-31 平安科技(深圳)有限公司 基于对比学习的文本推荐方法及相关设备
CN114360520A (zh) * 2022-01-14 2022-04-15 平安科技(深圳)有限公司 语音分类模型的训练方法、装置、设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756596A (zh) * 2023-08-17 2023-09-15 智慧眼科技股份有限公司 文本聚类模型训练方法、文本聚类方法、装置及相关设备
CN116756596B (zh) * 2023-08-17 2023-11-14 智慧眼科技股份有限公司 文本聚类模型训练方法、文本聚类方法、装置及相关设备

Also Published As

Publication number Publication date
CN114360520A (zh) 2022-04-15

Similar Documents

Publication Publication Date Title
WO2020232867A1 (zh) 唇语识别方法、装置、计算机设备及存储介质
WO2023134067A1 (zh) 语音分类模型的训练方法、装置、设备及存储介质
CN109887484B (zh) 一种基于对偶学习的语音识别与语音合成方法及装置
WO2019169719A1 (zh) 文摘自动提取方法、装置、计算机设备及存储介质
Pushpa et al. Multi-label classification: problem transformation methods in Tamil phoneme classification
CN109360572B (zh) 通话分离方法、装置、计算机设备及存储介质
WO2022121180A1 (zh) 模型的训练方法、装置、语音转换方法、设备及存储介质
CN112613308A (zh) 用户意图识别方法、装置、终端设备及存储介质
CN113434683B (zh) 文本分类方法、装置、介质及电子设备
CN112818861A (zh) 一种基于多模态上下文语义特征的情感分类方法及系统
CN116635934A (zh) 分离的语音内容和风格表示的无监督学习
WO2023273628A1 (zh) 一种视频循环识别方法、装置、计算机设备及存储介质
CN112466314A (zh) 情感语音数据转换方法、装置、计算机设备及存储介质
WO2023065635A1 (zh) 命名实体识别方法、装置、存储介质及终端设备
WO2022257454A1 (zh) 一种合成语音的方法、装置、终端及存储介质
CN114694255B (zh) 基于通道注意力与时间卷积网络的句子级唇语识别方法
JP2021081713A (ja) 音声信号を処理するための方法、装置、機器、および媒体
CN111027681B (zh) 时序数据处理模型训练方法、数据处理方法、装置及存储介质
CN116775873A (zh) 一种多模态对话情感识别方法
CN115544227A (zh) 多模态数据的情感分析方法、装置、设备及存储介质
WO2022199148A1 (zh) 分类模型的训练及图像分类方法、电子设备及存储介质
CN113450764B (zh) 文本语音识别方法、装置、设备及存储介质
CN115270818A (zh) 一种意图识别方法及装置、存储介质、计算机设备
CN113297367A (zh) 用户对话衔接语生成的方法及相关设备
CN113889088A (zh) 训练语音识别模型的方法及装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22919708

Country of ref document: EP

Kind code of ref document: A1