Training method of emotional speech conversion model and emotional speech conversion method
By extracting speech content and emotional features through content encoding networks and emotion extraction networks, and adjusting the emotion speech conversion model by combining a decoder vocoder, the problems of insufficient naturalness and emotional expression in robot speech generation are solved, and more natural emotion speech conversion is achieved.
Patent Information
- Application Number
- CN202510743319.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2045-06-05
AI Technical Summary
While existing technologies can produce clear speech from robots, they still fall short of human speech in terms of naturalness and emotional expression. This makes it difficult to deliver emotionally resonant feedback, limiting the improvement of user experience and satisfaction.
By acquiring an emotional speech training set, the speech content and emotional features are extracted using a content encoding network and an emotion extraction network, respectively. These features are then processed by a decoder vocoder, and the network parameters of the emotional speech conversion model are iteratively adjusted to achieve emotional speech conversion.
It improves the quality of predicted emotional speech information and the ability to express emotions, enhances the naturalness and emotional expression of speech, and brings the interaction closer to human communication.
Smart Images

Figure CN120612965B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech signal processing technology, and more specifically, to a training method for an emotion speech conversion model, an emotion speech conversion method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] As the most direct channel of communication between people, voice can not only transmit knowledge but also convey thoughts and emotions. In addition to basic information, voice also contains rich paralinguistic information, such as the speaker's identity, emotions, and tone. Currently, voice is widely used in the field of human-computer interaction, becoming a new form of communication. Smart homes, voice assistants, and online classes can all capture key information in voice commands to control devices to perform corresponding tasks or complete specific instructions. Furthermore, it can adjust emotions to mask negative feelings in different social situations.
[0003] While robot-generated speech has achieved a high level of clarity, it still falls short of real human speech in terms of naturalness and emotional expression. This limitation makes it difficult for robots to express emotionally resonant feedback, thus restricting further improvements in user experience and satisfaction. This situation reveals a crucial issue facing the field of human-computer interaction: how to improve the naturalness and emotional expression of robot speech while ensuring intelligibility, in order to achieve interactions that more closely resemble human communication. Summary of the Invention
[0004] In view of this, this application provides a training method for an emotion-based speech conversion model, an emotion-based speech conversion method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] One aspect of this application provides a method for training an emotion-based speech conversion model, comprising:
[0006] Obtain an emotional speech training set, which includes multiple emotional speech samples;
[0007] For each of the above emotional speech samples, a content coding network is used to process the emotional speech samples to obtain content coding features. The content coding features represent the speech content and key information related to the speaker corresponding to the above emotional speech samples.
[0008] The above emotional speech samples are processed using an emotion extraction network to obtain emotion extraction features, wherein the above emotion extraction features represent the emotions corresponding to the above emotional speech samples;
[0009] The above-mentioned content encoding features and emotion extraction features are processed by a decoder vocoder to obtain predicted emotional speech information. The initial emotional speech conversion model includes the above-mentioned content encoding network, the above-mentioned emotion extraction network and the above-mentioned decoder vocoder.
[0010] Based on the aforementioned emotional speech samples, content encoding features, and emotion extraction features, the network parameters of the initial emotional speech conversion model are iteratively adjusted to obtain the trained target emotional speech conversion model.
[0011] Another aspect of this application provides an emotional speech conversion method, including:
[0012] Acquire the speech information to be converted and the emotional speech information;
[0013] The aforementioned speech information to be converted and the aforementioned emotional speech information are input into the target emotional speech conversion model, and the emotional speech conversion information is output. The aforementioned emotional speech conversion information represents the speech information formed by the emotion possessed by the aforementioned emotional speech information and the content possessed by the aforementioned speech information to be converted.
[0014] Another aspect of this application provides a training apparatus for an emotion-based speech conversion model, comprising:
[0015] The first acquisition module is used to acquire an emotional speech training set, wherein the emotional speech training set includes multiple emotional speech samples.
[0016] The content encoding module is used to process each of the above-mentioned emotional speech samples using a content encoding network to obtain content encoding features. The content encoding features represent key information related to the speech content and speaker corresponding to the above-mentioned emotional speech samples.
[0017] The emotion extraction module is used to process the above-mentioned emotional speech samples using an emotion extraction network to obtain emotion extraction features, wherein the above-mentioned emotion extraction features represent the emotions corresponding to the above-mentioned emotional speech samples.
[0018] The decoding module is used to process the above-mentioned content encoding features and the above-mentioned emotion extraction features using the decoding vocoder to obtain predicted emotional speech information. The initial emotional speech conversion model includes the above-mentioned content encoding network, the above-mentioned emotion extraction network and the above-mentioned decoding vocoder.
[0019] The adjustment module is used to iteratively adjust the network parameters of the initial emotional speech conversion model based on the above emotional speech samples, the above content encoding features, and the above emotion extraction features, so as to obtain the trained target emotional speech conversion model.
[0020] Another aspect of this application provides an emotion-speech conversion device, comprising:
[0021] The second acquisition module is used to acquire the speech information to be converted and the emotional speech information;
[0022] The speech conversion module is used to input the speech information to be converted and the emotional speech information into the target emotional speech conversion model and output emotional speech conversion information, wherein the emotional speech conversion information represents the speech information formed by the emotion of the emotional speech information and the content of the speech information to be converted.
[0023] Another aspect of this application provides an electronic device comprising:
[0024] One or more processors;
[0025] Memory, used to store one or more programs.
[0026] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described above.
[0027] Another aspect of this application provides a computer-readable storage medium storing computer-executable instructions that, when executed, are used to implement the method described above.
[0028] Another aspect of this application provides a computer program product comprising computer-executable instructions which, when executed, are used to implement the method described above.
[0029] According to embodiments of this application, content-encoded features and sentiment-extracted features are extracted from sentiment speech samples using a content-encoded network and a sentiment extraction network, respectively. Then, a decoder-vocoder is used to process the content-encoded features and sentiment-extracted features to obtain predicted sentiment speech information. Based on the sentiment speech samples, content-encoded features, and sentiment-extracted features, the network parameters of the initial sentiment speech conversion model are adjusted to obtain the target sentiment speech conversion model. By employing a variational encoder (VAE) structure in the content-encoded network, language content and sentiment are decoupled to obtain more accurate content-encoded features. Combined with the sentiment-extracted features extracted by the sentiment extraction network, the reconstruction detail of the predicted sentiment speech information is enhanced, improving the quality and emotional expression capability of the predicted sentiment speech information. Attached Figure Description
[0030] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0031] Figure 1 An exemplary system architecture for training a training method or an emotional speech conversion method that can be applied to an emotional speech conversion model according to embodiments of this application is shown;
[0032] Figure 2 A flowchart illustrating a training method for an emotion-based speech conversion model according to an embodiment of this application is shown;
[0033] Figure 3 A schematic diagram of the model structure of the target emotion speech conversion model according to an embodiment of this application is shown;
[0034] Figure 4 A flowchart of an emotion-based speech conversion method according to an embodiment of this application is shown;
[0035] Figure 5 A block diagram of a training apparatus for an emotion-speech conversion model according to an embodiment of this application is shown;
[0036] Figure 6 A block diagram of an emotion-speech conversion device according to an embodiment of this application is shown;
[0037] Figure 7 A block diagram of an electronic device suitable for implementing the methods described above, according to an embodiment of this application, is shown. Detailed Implementation
[0038] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0039] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0040] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0041] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0042] Emotional speech conversion technology aims to regulate emotions while preserving the content and speaker's identity. A utterance that should express a neutral emotion can be converted to different emotions through this technology, such as happiness, anger, or sadness, thereby enhancing the emotional expressiveness of the speech. For emotion-related research, such as emotional speech recognition and emotional speech conversion, extracting deep emotional features is particularly important, as the quality of emotional feature extraction directly determines the model's performance.
[0043] For feature selection, most related technologies choose to use traditional acoustic features as input, such as fundamental frequency features F0 and Mel frequency cepstral coefficients MFCC, and then further extract emotion-related embeddings through an encoder composed of a convolutional neural network (CNN) and a long short-term memory network (LSTM). Although this extraction method can obtain emotion features and thus complete the emotion conversion task, the obtained features may be unstable, resulting in the retention of other information, such as speaker identity, which leads to incomplete deentanglement of the model and ultimately affects the emotional expression of the converted speech.
[0044] In view of this, embodiments of this application provide a training method for an emotional speech conversion model and an emotional speech conversion method. The training method includes obtaining an emotional speech training set, wherein the emotional speech training set includes multiple emotional speech samples; for each emotional speech sample, processing the emotional speech sample using a content encoding network to obtain content encoding features, wherein the content encoding features represent the speech content corresponding to the emotional speech sample and key information related to the speaker; processing the emotional speech sample using an emotion extraction network to obtain emotion extraction features, wherein the emotion extraction features represent the emotion corresponding to the emotional speech sample; processing the content encoding features and emotion extraction features using a decoder vocoder to obtain predicted emotional speech information, wherein the initial emotional speech conversion model includes a content encoding network, an emotion extraction network, and a decoder vocoder; iteratively adjusting the network parameters of the initial emotional speech conversion model according to the emotional speech samples, content encoding features, and emotion extraction features to obtain a trained target emotional speech conversion model.
[0045] In the embodiments of this application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.
[0046] Figure 1 An exemplary system architecture 100 is shown, according to embodiments of this application, of which a training method for an emotion-based speech conversion model or an emotion-based speech conversion method can be applied. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this application, in order to help those skilled in the art understand the technical content of this application, but do not mean that the embodiments of this application cannot be used in other devices, systems, environments or scenarios.
[0047] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0048] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social media platform software, etc. (for example only).
[0049] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0050] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0051] It should be noted that the training method or emotional speech conversion method of the emotional speech conversion model provided in this application embodiment can generally be executed by server 105. Correspondingly, the training device or emotional speech conversion device of the emotional speech conversion model provided in this application embodiment can generally be located in server 105. The training method or emotional speech conversion method of the emotional speech conversion model provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the training device or emotional speech conversion device of the emotional speech conversion model provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Alternatively, the training method or emotional speech conversion method of the emotional speech conversion model provided in this application embodiment can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the training device or emotional speech conversion device of the emotional speech conversion model provided in this application embodiment can also be disposed in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0052] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the system is only a limited number. Depending on implementation needs, there can be any number of terminal devices, networks, and servers.
[0053] Figure 2 A flowchart illustrating a training method for an emotion-based speech conversion model according to an embodiment of this application is shown.
[0054] like Figure 2 As shown, the training method for this emotional speech conversion model includes operations S201~S205.
[0055] In operation S201, an emotional speech training set is obtained, which includes multiple emotional speech samples.
[0056] In operation S202, for each emotional speech sample, the content coding network is used to process the emotional speech sample to obtain content coding features. The content coding features represent the speech content and key information related to the speaker corresponding to the emotional speech sample.
[0057] In operation S203, the emotion extraction network is used to process the emotional speech samples to obtain emotion extraction features, where the emotion extraction features represent the emotions corresponding to the emotional speech samples.
[0058] In operation S204, the content encoding features and sentiment extraction features are processed by the decoder vocoder to obtain predicted sentiment speech information. The initial sentiment speech conversion model includes a content encoding network, a sentiment extraction network and a decoder vocoder.
[0059] In operation S205, the network parameters of the initial emotional speech conversion model are iteratively adjusted based on the emotional speech samples, content encoding features, and emotion extraction features to obtain the trained target emotional speech conversion model.
[0060] According to embodiments of this application, different emotional speech samples can be speech fragments rich in different emotions. Emotions can include happiness, anger, rage, sadness, fear, etc.
[0061] According to embodiments of this application, for each emotional speech sample, the emotional speech sample is first input into a content encoding network to extract the speech content and key information related to the speaker. For example, if an emotional speech sample is user A's speech "Hello, I am Zhang San," the content encoding network can extract the speech content "Hello, I am Zhang San," and also extract user A's timbre, speech rate, and other information unrelated to emotion. The content encoding network uses a variational encoder (VAE) structure.
[0062] According to an embodiment of this application, the emotional speech sample is input into an emotion extraction network for processing to extract the emotions contained in the emotional speech sample, i.e., emotion extraction features. For example, it can identify the emotion extraction features of user A when user A says "Hello, I am Zhang San" under the happy emotion (or other emotions).
[0063] It should be noted that the inputs to the content encoding network and the sentiment extraction network can be the same sentiment speech sample or different sentiment speech samples.
[0064] According to an embodiment of this application, the identified content encoding features and emotion extraction features are input into a decoder vocoder for fusion to obtain predicted emotion speech information, which is speech content read aloud based on the emotion corresponding to the identified emotion extraction features.
[0065] According to embodiments of this application, content-encoded features and sentiment-extracted features are extracted from sentiment speech samples using a content-encoded network and a sentiment extraction network, respectively. Then, a decoder-vocoder is used to process the content-encoded features and sentiment-extracted features to obtain predicted sentiment speech information. Based on the sentiment speech samples, content-encoded features, and sentiment-extracted features, the network parameters of the initial sentiment speech conversion model are adjusted to obtain the target sentiment speech conversion model. By employing a variational encoder (VAE) structure in the content-encoded network, language content and sentiment are decoupled to obtain more accurate content-encoded features. Combined with the sentiment-extracted features extracted by the sentiment extraction network, the reconstruction detail of the predicted sentiment speech information is enhanced, improving the quality and emotional expression capability of the predicted sentiment speech information.
[0066] Figure 3 A schematic diagram of the model structure of the target emotion speech conversion model according to an embodiment of this application is shown.
[0067] According to embodiments of this application, such as Figure 3 As shown, the content coding network is used to process emotional speech samples to obtain content coding features, including: using an initial vocoder to perform feature extraction processing on the emotional speech samples to obtain fundamental frequency features and harmonic spectrum features; performing feature transformation processing on the harmonic spectrum features to obtain Mel-frequency cepstral coefficients; and using an emotion-independent encoder to process the first input features to obtain content coding features, wherein the first input features include fundamental frequency features and Mel-frequency cepstral coefficients.
[0068] According to embodiments of this application, the initial vocoder can be a source-filter based vocoder, such as the WORLD vocoder, which describes the speech generation process as a series of pulse signals (or white noise) entering a linear time-invariant system.
[0069] According to embodiments of this application, for each emotional speech sample, a fundamental frequency feature F0, harmonic spectral features SP, and an aperiodic signal AP are extracted from the emotional speech sample using an initial vocoder. Based on this, the extracted harmonic spectral features SP are further converted into Mel-frequency cepstral coefficients (MCEPs) through a specific conversion process.
[0070] According to an embodiment of this application, the emotion-independent encoder adopts a variational autoencoder (VAE) structure. The comprehensive feature vector obtained by merging the fundamental frequency feature F0 and Mel-frequency cepstral coefficients (MCEPs) is used as input. The emotion-independent encoder extracts content coding features related to speech content and speaker.
[0071] According to embodiments of this application, such as Figure 3 As shown, the emotion-independent encoder includes L first convolutional normalization layers, each of which includes a first convolutional layer and a first instance normalization layer, where L≥1.
[0072] According to an embodiment of this application, processing the first input feature using an emotion-independent encoder to obtain content-encoded features includes: for the i-th first convolutional normalization layer, performing convolution processing on the second input feature using the i-th first convolutional layer to obtain the i-th first convolutional feature, wherein when i=1, the second input feature includes the first input feature, and when i≠1 and i is greater than or equal to 2, the second input feature includes the (i-1)-th first normalized feature output by the (i-1)-th first convolutional normalization layer; processing the i-th first convolutional feature using the i-th first instance normalization layer to obtain the i-th first normalized feature, wherein when i=L, the i-th first normalized feature represents the content-encoded feature.
[0073] According to an embodiment of this application, for the first convolutional normalization layer, the first convolutional layer performs convolution processing on the fundamental frequency feature F0 and the Mel-frequency cepstral coefficients MCEPs to obtain the first convolutional feature, and processes the first convolutional feature using the first instance normalization layer to obtain the first normalized feature.
[0074] According to an embodiment of this application, for the i-th first convolutional normalization layer from the 2nd to the (L-1th), the i-th first convolutional layer performs convolution processing on the (i-1th)-th first normalized feature to obtain the i-th first convolutional feature, and then processes the i-th first convolutional feature using the i-th first instance normalization layer to obtain the i-th first normalized feature.
[0075] According to an embodiment of this application, for the Lth first convolutional normalization layer, the Lth first convolutional layer performs convolution processing on the (L-1)th first normalized feature to obtain the Lth first convolutional feature. The Lth first instance normalization layer processes the Lth first convolutional feature to obtain the Lth first normalized feature, which is also the content encoding feature.
[0076] According to embodiments of this application, such as Figure 3 As shown, an emotion extraction network is used to process emotional speech samples to obtain emotion extraction features. This includes: processing emotional speech samples using a speech emotion recognition base model to obtain initial emotion features; and processing the initial emotion features using an emotion extractor to obtain emotion extraction features.
[0077] According to embodiments of this application, the speech emotion recognition base model refers to the Emotion2vec model, which employs a self-supervised pre-training method and is trained on 262 hours of open-source emotion data. It uses an online distillation paradigm and comprises two networks: a teacher network and a student network. These two networks have the same architecture, both including a feature extractor composed of multi-layer convolutional neural networks and a backbone network composed of multi-layer Transformers. During pre-training, the model also incorporates sentence-level loss and frame-level loss to better capture emotional information.
[0078] According to an embodiment of this application, the initial emotional features extracted by the speech emotion recognition base model are input into an emotion extractor. This emotion extractor, by combining convolutional layers, gated recurrent networks (GRUs), and feedforward neural networks, can effectively extract emotional features from emotional speech samples and work in conjunction with an emotion-independent encoder to ensure that emotional information is effectively separated from non-emotional features such as speech content and speaker identity. Thus, the emotion extractor can output the emotional extracted features from the emotional speech samples.
[0079] According to embodiments of this application, such as Figure 3 As shown, the training method of the emotional speech conversion model also includes: using multiple linear layers to process the emotional extraction features to obtain emotional linear features; using an emotional classification network to perform emotional classification processing on the emotional linear features to obtain the emotional classification results of the emotional speech samples. The initial emotional speech conversion model also includes an emotional classification network.
[0080] According to embodiments of this application, the emotion classification network can be any type of multi-class network, such as decision tree models, support vector machines, etc. Embodiments of this application can determine the number of classifications in the multi-class network based on the number of emotion categories. For example, when emotions include happiness, sadness, neutrality, and anger, a four-class network can be used. The use of an emotion classifier can ensure the consistency and accuracy of emotion expression.
[0081] According to the embodiments of this application, an N-layer linear transformation is performed. The emotion classification network maps the linear emotion features output by the linear layer to different emotion categories based on the Softmax activation function, thereby accurately predicting the emotion category of the input audio (i.e., the emotion speech sample), which is the emotion classification result.
[0082] According to embodiments of this application, the use of an emotion classification network not only effectively improves the accuracy of emotion-based speech conversion, but also ensures that the converted predicted emotion-based speech information is more consistent with the desired emotion while maintaining the naturalness and intelligibility of the speech.
[0083] According to an embodiment of this application, the initial emotional features are processed using an emotional extractor to obtain emotional extraction features, including: processing the initial emotional features using a second convolutional layer to obtain emotional convolutional features; processing the emotional convolutional features using a gated recurrent network to obtain emotional recurrent features; and processing the emotional recurrent features using a feedforward neural network to obtain emotional extraction features.
[0084] In one specific embodiment, the emotion extractor may employ two second convolutional layers to reduce the dimensionality of the extracted 768-dimensional initial emotion features from 512 to 128 dimensions. Then, it combines a gated recurrent network (GRU) and a feedforward neural network to further obtain deep emotion features, i.e., the emotion extraction features. This structured emotion extractor not only preserves the emotional information in the emotional speech samples but also precisely controls the extraction and expression of emotion features, thereby avoiding emotional interference with the performance of other speech features.
[0085] According to embodiments of this application, a decoder vocoder is used to process content encoding features and emotion extraction features to obtain predicted emotional speech information, including: using a speech decoder to downsample the content encoding features and emotion extraction features to obtain emotional speech decoding features; using a channel convolutional network to process the emotional speech decoding features to obtain channel convolutional features, wherein the channel convolutional network includes m third convolutional layers, wherein the channel dimension of the last third convolutional layer is smaller than the channel dimension of the first m-1 third convolutional layers; and using a speech vocoder to process the emotional speech decoding features and channel convolutional features to obtain predicted emotional speech information.
[0086] According to embodiments of this application, the channel convolutional network is a post-processing network for speech recognition, and can be a PostNet network.
[0087] According to embodiments of this application, a speech decoder is used to downsample and fuse content encoding features and emotion extraction features to obtain emotional speech decoding features.
[0088] In one specific embodiment, the PostNet network consists of five third convolutional layers with a kernel size of k = (5 × 1), whose input is the output of the speech decoder. The first four third convolutional layers have 512 channels, and batch norm and Tanh activation are applied to these layers. The last third convolutional layer has 25 channels to compress the output to have the same size as the input. Finally, the output of the speech decoder and the result processed by the PostNet network are concatenated using a speech vocoder to form the final speech representation, i.e., the predicted emotional speech information. This concatenation mechanism ensures that the output predicted emotional speech information not only matches the target emotion but also achieves further optimization and improvement in intelligibility and naturalness.
[0089] According to embodiments of this application, such as Figure 3 As shown, the speech decoder includes M second convolutional normalization layers, each of which includes a third convolutional layer and a second instance normalization layer, where M ≥ 1.
[0090] According to an embodiment of this application, a speech decoder is used to downsample the content encoding features and the emotion extraction features to obtain the emotional speech decoding features. This includes: for the j-th second convolutional normalization layer, the j-th third convolutional layer is used to perform convolution processing on the third input features to obtain the j-th second convolutional feature. Wherein, when j=1, the third input features include the content encoding features and the emotion extraction features, and when j≠1 and j is greater than or equal to 2, the input features include the (j-1)-th second normalized feature output by the (j-1)-th second convolutional normalization layer; the j-th second instance normalization layer is used to process the j-th second convolutional feature to obtain the j-th second normalized feature. Wherein, when j=M, the j-th second convolutional feature represents the emotional speech decoding features.
[0091] According to embodiments of this application, the speech decoder effectively integrates emotional representation (i.e., emotion extraction features) with speech content (i.e., content encoding features) and speaker information (e.g., timbre in content encoding features), and reconstructs multiple features through a second convolutional layer and a second instance normalization layer (IN) to generate a speech representation with the target emotion, i.e., emotional speech decoding features.
[0092] According to an embodiment of this application, for the first second convolutional normalization layer, the first third convolutional layer performs convolution processing on the content encoding features and sentiment extraction features to obtain the first second convolutional feature, and the first second instance normalization layer processes the first second convolutional feature to obtain the first second normalized feature.
[0093] According to an embodiment of this application, for any j-th second convolutional normalization layer from the 2nd to the (M-1th), the j-th third convolutional layer performs convolution processing on the (j-1th)-th second normalized feature to obtain the j-th second convolutional feature, and the j-th second instance normalization layer processes the j-th second convolutional feature to obtain the j-th second normalized feature.
[0094] According to the embodiments of this application, for the Mth second convolutional normalization layer, the Mth third convolutional layer performs convolution processing on the (M-1)th second normalized feature to obtain the Mth second convolutional feature, and the Mth second instance normalization layer processes the Mth second convolutional feature to obtain the Mth second normalized feature, which is also the emotional speech decoding feature.
[0095] According to embodiments of this application, the synergistic effect of the speech decoder and the channel convolutional network (i.e., the post-net network) significantly improves speech quality, enhances emotional expression, and effectively avoids speech distortion or unnaturalness that may occur during the emotion conversion process. The target emotion speech conversion model not only achieves high accuracy in emotional expression but also maintains the clarity and fluency of the speech.
[0096] According to embodiments of this application, based on emotional speech samples, content encoding features, and emotion extraction features, the network parameters of an initial emotional speech conversion model are iteratively adjusted to obtain a trained target emotional speech conversion model, including:
[0097] The target loss result is calculated based on the emotional speech samples, content encoding features, and emotion extraction features.
[0098] The network parameters of the initial emotional speech conversion model are iteratively adjusted based on the target loss result to obtain the target emotional speech conversion model.
[0099] According to an embodiment of this application, during the training process of the target emotional speech conversion model, a self-supervised approach is used for iterative adjustment. Specifically, based on the emotional speech samples, content encoding features, and emotion extraction features, the target loss result is calculated, and the parameters are adjusted based on the target loss result to obtain the target emotional speech conversion model.
[0100] According to embodiments of this application, calculating a target loss result based on emotional speech samples, content encoding features, and emotion extraction features includes: for each emotional speech sample, calculating the feature mean and feature standard deviation based on multiple feature data in the content encoding features; calculating a divergence loss result based on the feature mean and feature standard deviation; calculating a reconstruction loss result based on the emotional speech sample, the emotional speech decoding features output by the decoder vocoder, and the channel convolution features; calculating a mutual information loss result based on the content encoding features and emotion extraction features; and generating a target loss result based on at least one of the divergence loss result, reconstruction loss result, and mutual information loss result.
[0101] When the initial emotional speech conversion model also includes an emotional classification network, the emotional consistency loss is calculated based on the emotion type and emotional classification label corresponding to the predicted emotional speech information predicted by the emotional classification network. The emotional speech training set also includes the emotional classification label corresponding to each emotional speech sample. The target loss is generated based on the divergence loss, emotional consistency loss, reconstruction loss, and mutual information loss.
[0102] According to embodiments of this application, during training, the emotion-independent encoder uses Kullback-Leibler divergence as a loss function to quantify the difference between the posterior and prior distributions, and guides model learning by minimizing this loss. Therefore, for each emotion-based speech sample, the feature mean is calculated based on multiple feature data from the content-encoded features. and characteristic standard deviation Then based on the characteristic mean and characteristic standard deviation Calculation of divergence loss results As shown in formula (1):
[0103] (1)
[0104] Where d represents the dimension of the content encoding feature z.
[0105] According to embodiments of this application, a channel convolutional network is used to further reconstruct fine details. For this part of the network, the corresponding reconstructed features... As shown in formula (2):
[0106] (2)
[0107] Where x is the emotional speech decoding feature, It is a channel convolution feature. This is the final reconstruction of MCEPs. Therefore, there is an additional reconstruction loss, which consists of two parts: one is the reconstruction loss of the original features and the decoder output features, and the other is the reconstruction loss result of the sum of the original features, decoder features, and PostNet output. As shown in formula (3):
[0108] (3)
[0109] in, This application provides emotional speech samples. By combining a speech decoder and a post-net network, the embodiments of this application improve the detailed representation of reconstructed predicted emotional speech information while ensuring the effective preservation of emotional information and speech content.
[0110] According to embodiments of this application, in order to more thoroughly separate emotional information from emotion-irrelevant information, we use mutual information (MI) to reduce the correlation between content encoding features and emotion extraction features. The result of the mutual information loss is shown in formula (4):
[0111] (4)
[0112] Where c represents the emotion extraction features, z represents the latent variables, K represents the number of emotion categories, i.e., the different emotion categories the model needs to learn. T represents the time steps or length of the sequence, which is usually related to the number of audio frames processed. and Let k represent the sentiment encoding and the corresponding latent variable, respectively. The value at time step t. This represents the set of parameters used in the model to jointly model sentiment features and latent variables. , Refers to emotion extraction features A variational approximation of the posterior distribution of a given latent variable z under sentiment category k or sentiment category l, where the latent variable is a content-encoding feature.
[0113] According to the embodiments of this application, the target loss result as shown in formula (5) is constructed according to formulas (1) to (4):
[0114] (5)
[0115] in These are all weighting coefficients, and their values can be set according to actual needs.
[0116] According to embodiments of this application, when the initial emotional speech conversion model also includes an emotional classification network, a cross-entropy loss function is designed as the emotional consistency loss to ensure sufficient preservation of emotional information throughout the training process. This promotes model untangling while ensuring that the source of emotional information originates from the emotional classification network. Emotional consistency loss results. As shown in formula (6):
[0117] (6)
[0118] in, It is the emotion classification label of the i-th emotional speech sample on the k-th emotion type. K is the predicted probability of the i-th emotional speech sample belonging to the c-th emotion type by the emotion classification network, where K is the total number of emotion types and N is the number of emotional speech samples.
[0119] According to an embodiment of this application, when the initial emotional speech conversion model further includes an emotional classification network, the target loss result is as shown in formula (7):
[0120] (7)
[0121] in, For the outcome of emotional consistency loss The weighting coefficients.
[0122] In one specific embodiment, each was determined through multiple experiments. The optimal parameter values. In the initial stage of the experiment, each The values are set between 0.1 and 100, ultimately determining the specific values for multiple weighting coefficients. , , , These values not only ensure effective emotional separation but also maintain the audio quality of the converted speech.
[0123] In one specific embodiment, the Adam optimizer can be used for parameter optimization during training, with an initial learning rate set to 0.0005 and momentum parameters set to 0.9 and 0.999 to ensure the stability and convergence of the optimization process. The batch size used for model training is 128, randomly selecting 128 frames from the emotional speech training set as individual emotional speech samples to enhance the model's generalization ability to diverse samples. The total number of training steps is set to 200,000 to ensure the model can fully learn emotional features under large-scale training. The dataset construction strictly follows the principles of balance and diversity. For each speaker's data, 300 samples are selected for each emotional category to construct the training set, while 30 samples are reserved as the test set to evaluate the model's generalization performance and emotional conversion effect.
[0124] Figure 4 A flowchart of an emotion-based speech conversion method according to an embodiment of this application is shown.
[0125] like Figure 4 As shown, the emotional speech conversion method includes operations S401~S402.
[0126] The S401 is used to obtain the voice information to be converted and the emotional voice information.
[0127] In operation S402, the speech information to be converted and the emotional speech information are input into the target emotional speech conversion model, and the emotional speech conversion information is output. The emotional speech conversion information represents the speech information formed by the emotion of the emotional speech information and the content of the speech information to be converted.
[0128] According to embodiments of this application, the voice information to be converted and the emotional voice information can have different emotions. For example, the emotion classification of the voice information to be converted is neutral, and the emotion classification of the emotional voice information is happy.
[0129] According to an embodiment of this application, the speech information to be converted and the emotional speech information are input into a pre-trained target emotional speech conversion model to obtain emotional speech conversion information, wherein the emotional speech conversion information is the speech content of the speech information to be converted read aloud with an emotional tone.
[0130] According to embodiments of this application, content-encoding features and emotion-extraction features are extracted from the speech information to be converted and the emotional speech information through the content encoding network and emotion extraction network in the target emotional speech conversion model, respectively. Then, a decoder vocoder is used to process the content-encoding features and emotion-extraction features to obtain the emotional speech conversion information. The target emotional speech conversion model of this application embodiment can enhance the granularity of the reconstructed emotional speech conversion information, and improve the quality and emotional expression ability of the emotional speech conversion information.
[0131] In one specific embodiment, the publicly available Emotional Speech Dataset (ESD) is used as the emotional speech training set. This dataset contains speech samples from four speakers, including two men and two women. To ensure diversity and representativeness, this embodiment selects four emotion categories included in the dataset: anger, happiness, neutrality, and sadness. Each speaker recorded 300 voice recordings for each emotion, totaling 4800 voice recordings, i.e., emotional speech samples.
[0132] First, basic acoustic features such as fundamental frequency feature F0, harmonic spectrum feature SP (spectral envelope), and aperiodic signal AP (pitch envelope) were extracted from each speech segment using a WORLD vocoder (i.e., the initial vocoder). Furthermore, sentiment analysis was performed on each sentence using the Emotion2vec model, extracting 768-dimensional initial sentiment features for each speech segment. These sentiment features play a crucial role in subsequent processing. In terms of feature processing, this embodiment converts the extracted harmonic spectrum feature SP into Mel-frequency cepstral coefficients (MCEPs) for further analysis. Next, to enhance the model's expressive power, the MCEPs were concatenated with the F0 feature to obtain a comprehensive feature vector containing more speech information. The mean of these comprehensive features was then calculated. and characteristic standard deviation Each feature is normalized to ensure that the numerical range of the features is uniform, thereby improving the stability and effectiveness of subsequent processing and model training.
[0133] Using F0 and MCEPs as input to the sentiment-independent encoder, and the initial sentiment features as input to the sentiment extractor, the sentiment-independent encoder consists of six first convolutional normalization layers. The activation of the sentiment-independent encoder guides the removal of sentiment information. The sentiment extractor consists of two second convolutional layers, a GRU, and a feedforward neural network. Its purpose is to extract the main sentiment extraction features. These extracted features are then used by a sentiment classification network to predict the sentiment category, which is then mapped to the actual sentiment category of each sentence, thus better controlling the sentiment expression throughout the entire training process.
[0134] The content encoding features and the extracted sentiment features are combined through a decoder. The speech decoder mainly consists of M second convolutional normalization layers to better reconstruct the speech signal. The reconstructed sentiment speech decoding features are then fed into a channel convolutional network and a speech vocoder to further synthesize predicted sentiment speech information.
[0135] The emotional speech conversion information obtained using the target emotional speech conversion model and related technologies in this embodiment was evaluated from both subjective and objective perspectives. In the subjective evaluation phase, 10 participants (5 men and 5 women) were invited to rate the emotional speech conversion information obtained through different methods. Participants used a 5-point Mean Opinion Rating (MOS) and the XAB test to evaluate speech quality, emotional similarity, and the intensity of emotional expression. The test set used for evaluation contained 360 utterances, covering 4 speakers (2 men and 2 women) and three different emotional states, with 120 utterances for each emotional state. In the objective evaluation, this embodiment used Mel-Cepstral Distortion (MCD) and Root Mean Square Error (F0-RMSE) as evaluation metrics, and used the same test set to ensure consistency in the evaluation. These two metrics are widely used in the field of speech conversion, especially in emotional speech conversion. By measuring the reconstruction quality of the speech spectrum and fundamental frequency, the similarity between the converted speech and the target speech can be evaluated.
[0136] Specifically, MCD mainly reflects the degree of distortion in the spectral characteristics of the speech signal, while F0-RMSE is used to quantify the difference between the converted fundamental frequency curve and the target fundamental frequency curve. The lower the values of these two indicators, the closer the converted speech is to the target speech in terms of spectral characteristics and fundamental frequency profile, thus indicating a better effect of emotion conversion. As can be seen from Table 1, the speech output by the target emotion speech conversion model in this embodiment has a better emotion conversion effect in these two indicators.
[0137] Table 1. MCD [dB] and F0-RMSE [hZ] Results
[0138] N2A, N2H, and N2S are different validation sets used to verify the superiority of the method in this embodiment compared to related technologies such as OneShot EVC, VAW-GAN, and ZEST.
[0139] To evaluate speech quality, emotional similarity, and emotional expression effectiveness, this embodiment designed two subjective evaluation experiments. Speech quality was assessed using the Mean Opinion Rating (MOS). After listening to the converted speech, participants selected a rating from five options based on speech quality, ranging from 1 to 5 (1: [Poor], 2: [Fair], 3: [Average], 4: [Good], 5: [Excellent]). The MOS score was calculated as the average of all listeners' ratings. The results in Table 2 show that the proposed target emotion speech conversion model in this embodiment significantly outperforms the baseline model and other related technologies in terms of speech quality, achieving a higher MOS score.
[0140] Table 2 Naturalness and Understandability MOS Scores
[0141] Among them, OneShot EVC, VAW-GAN, ZEST, and Reference are all commonly used speech conversion models in related technologies.
[0142] Figure 5 A block diagram of a training apparatus for an emotion-speech conversion model according to an embodiment of this application is shown.
[0143] like Figure 5 As shown, the training device 500 for the emotion-speech conversion model includes a first acquisition module 510, a content encoding module 520, an emotion extraction module 530, a decoding module 540, and an adjustment module 550.
[0144] The first acquisition module 510 is used to acquire an emotional speech training set, which includes multiple emotional speech samples.
[0145] The content encoding module 520 is used to process each emotional speech sample using a content encoding network to obtain content encoding features. The content encoding features represent the speech content and key information related to the speaker corresponding to the emotional speech sample.
[0146] The emotion extraction module 530 is used to process emotional speech samples using an emotion extraction network to obtain emotion extraction features, wherein the emotion extraction features represent the emotions corresponding to the emotional speech samples.
[0147] The decoding module 540 is used to process content encoding features and sentiment extraction features using a decoder vocoder to obtain predicted sentiment speech information. The initial sentiment speech conversion model includes a content encoding network, a sentiment extraction network, and a decoder vocoder.
[0148] The adjustment module 550 is used to iteratively adjust the network parameters of the initial emotional speech conversion model based on the emotional speech samples, content encoding features and emotional extraction features, to obtain the trained target emotional speech conversion model.
[0149] According to embodiments of this application, content-encoded features and sentiment-extracted features are extracted from sentiment speech samples using a content-encoded network and a sentiment extraction network, respectively. Then, a decoder-vocoder is used to process the content-encoded features and sentiment-extracted features to obtain predicted sentiment speech information. Based on the sentiment speech samples, content-encoded features, and sentiment-extracted features, the network parameters of the initial sentiment speech conversion model are adjusted to obtain the target sentiment speech conversion model. By employing a variational encoder (VAE) structure in the content-encoded network, language content and sentiment are decoupled to obtain more accurate content-encoded features. Combined with the sentiment-extracted features extracted by the sentiment extraction network, the reconstruction detail of the predicted sentiment speech information is enhanced, improving the quality and emotional expression capability of the predicted sentiment speech information.
[0150] According to an embodiment of this application, the content encoding module 520 includes a feature extraction unit, a feature conversion unit, and a first obtaining unit.
[0151] The feature extraction unit is used to extract features from emotional speech samples using the initial vocoder to obtain fundamental frequency features and harmonic spectrum features.
[0152] The feature conversion unit is used to perform feature conversion processing on the harmonic spectrum features to obtain Mel-frequency cepstral coefficients.
[0153] The first obtaining unit is used to process the first input features using an emotion-independent encoder to obtain content-encoded features, wherein the first input features include fundamental frequency features and Mel-frequency cepstral coefficients.
[0154] According to an embodiment of this application, the emotion-independent encoder includes L first convolutional normalization layers, each first convolutional normalization layer including a first convolutional layer and a first instance normalization layer, where L≥1.
[0155] According to an embodiment of this application, the first obtaining unit includes a first obtaining subunit and a second obtaining subunit.
[0156] The first sub-unit is used to perform convolution processing on the second input feature using the i-th first convolutional normalization layer to obtain the i-th first convolutional feature. When i=1, the second input feature includes the first input feature. When i≠1 and i is greater than or equal to 2, the second input feature includes the (i-1)-th first normalized feature output by the (i-1)-th first convolutional normalization layer.
[0157] The second subunit is used to process the i-th first convolutional feature using the i-th first instance normalization layer to obtain the i-th first normalized feature, wherein the i-th first normalized feature represents the content encoding feature when i=L.
[0158] According to an embodiment of this application, the emotion extraction module 530 includes a first processing unit and a second processing unit.
[0159] The first processing unit is used to process emotional speech samples using the speech emotion recognition base model to obtain initial emotion features.
[0160] The second processing unit is used to process the initial emotion features using an emotion extractor to obtain emotion extraction features.
[0161] According to embodiments of this application, the training device 500 further includes a linear module and a classification module.
[0162] The linear module is used to process sentiment extraction features using multiple linear layers to obtain linear sentiment features.
[0163] The classification module is used to perform emotion classification processing on the linear features of emotion using an emotion classification network to obtain the emotion classification results of the emotion speech samples. The initial emotion speech conversion model also includes an emotion classification network.
[0164] According to an embodiment of this application, the second processing unit includes a first convolution sub-unit, a first processing sub-unit, and a second processing sub-unit.
[0165] The first convolutional subunit is used to obtain emotional convolutional features by applying the initial emotional features to the second convolutional layer.
[0166] The first processing subunit is used to process the sentiment convolutional features using a gated recurrent network to obtain sentiment recurrent features.
[0167] The second processing subunit is used to process the emotional loop features using a feedforward neural network to obtain emotional extraction features.
[0168] According to an embodiment of this application, the decoding module 540 includes a sampling unit, a convolution unit, and a second obtaining unit.
[0169] The sampling unit is used to downsample the content encoding features and emotion extraction features using the speech decoder to obtain the emotion speech decoding features.
[0170] The convolutional unit is used to process emotional speech decoding features using a channel convolutional network to obtain channel convolutional features. The channel convolutional network includes m third convolutional layers, where the channel dimension of the last third convolutional layer is smaller than the channel dimension of the first m-1 third convolutional layers.
[0171] The second unit is used to process the emotional speech decoding features and channel convolution features using a speech vocoder to obtain predicted emotional speech information.
[0172] According to an embodiment of this application, the speech decoder includes M second convolutional normalization layers, each of which includes a third convolutional layer and a second instance normalization layer, where M ≥ 1.
[0173] According to an embodiment of this application, the sampling unit includes a second convolution sub-unit and a normalization sub-unit.
[0174] The second convolutional subunit is used to perform convolution processing on the third input feature using the j-th second convolutional normalization layer to obtain the j-th second convolutional feature. When j=1, the third input feature includes content encoding feature and sentiment extraction feature. When j≠1 and j is greater than or equal to 2, the input feature includes the (j-1)-th second normalized feature output by the (j-1)-th second convolutional normalization layer.
[0175] The normalization subunit is used to process the j-th second convolutional feature using the j-th second instance normalization layer to obtain the j-th second normalized feature, where the j-th second convolutional feature represents the emotional speech decoding feature when j=M.
[0176] According to an embodiment of this application, the adjustment module 550 includes a calculation unit and an adjustment unit.
[0177] The computational unit is used to calculate the target loss result based on the emotional speech samples, content encoding features, and emotion extraction features.
[0178] The adjustment unit is used to iteratively adjust the network parameters of the initial emotional speech conversion model based on the target loss result, so as to obtain the target emotional speech conversion model.
[0179] According to an embodiment of this application, the computing unit includes a first computing subunit, a second computing subunit, a third computing subunit, a fourth computing subunit, a first generating subunit, a fifth computing subunit, and a second generating subunit.
[0180] The first computational subunit is used to calculate the feature mean and feature standard deviation for each emotional speech sample, based on multiple feature data in the content encoding features.
[0181] The second calculation subunit is used to calculate the divergence loss result based on the feature mean and feature standard deviation.
[0182] The third computational subunit is used to calculate the reconstruction loss result based on the emotional speech samples, the emotional speech decoding features output by the decoder vocoder, and the channel convolution features.
[0183] The fourth computational subunit is used to calculate the mutual information loss result based on the content encoding features and sentiment extraction features.
[0184] The first generation subunit is used to generate the target loss result based on at least one of the divergence loss result, reconstruction loss result, and mutual information loss result.
[0185] The fifth computational subunit is used to calculate the emotion consistency loss result based on the emotion type and emotion classification label corresponding to the predicted emotional speech information, when the initial emotional speech conversion model also includes an emotion classification network. The emotional speech training set also includes the emotion classification label corresponding to each emotional speech sample.
[0186] The second generation subunit is used to generate the target loss result based on the divergence loss result, sentiment consistency loss result, reconstruction loss result, and mutual information loss result.
[0187] Figure 6 A block diagram of an emotion-speech conversion device according to an embodiment of this application is shown.
[0188] like Figure 6 As shown, the emotional speech conversion device 600 includes a second acquisition module 610 and a speech conversion module 620.
[0189] The second acquisition module 610 is used to acquire the voice information to be converted and the emotional voice information.
[0190] The speech conversion module 620 is used to input the speech information to be converted and the emotional speech information into the target emotional speech conversion model and output the emotional speech conversion information. The emotional speech conversion information represents the speech information formed by the emotion of the emotional speech information and the content of the speech information to be converted.
[0191] According to embodiments of this application, content-encoding features and emotion-extraction features are extracted from the speech information to be converted and the emotional speech information through the content encoding network and emotion extraction network in the target emotional speech conversion model, respectively. Then, a decoder vocoder is used to process the content-encoding features and emotion-extraction features to obtain the emotional speech conversion information. The target emotional speech conversion model of this application embodiment can enhance the granularity of the reconstructed emotional speech conversion information, and improve the quality and emotional expression ability of the emotional speech conversion information.
[0192] Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or implemented by hardware or firmware in any other reasonable manner by integrating or packaging circuits, or implemented in any one of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0193] It should be noted that the training device and emotional speech conversion device of the emotional speech conversion model in the embodiments of this application correspond to the training method and emotional speech conversion method of the emotional speech conversion model in the embodiments of this application. For a detailed description of the training device and emotional speech conversion device of the emotional speech conversion model, please refer to the training method and emotional speech conversion method of the emotional speech conversion model, which will not be repeated here.
[0194] Figure 7 A block diagram of an electronic device suitable for implementing the methods described above, according to an embodiment of this application, is shown. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0195] like Figure 7 As shown, an electronic device 700 according to an embodiment of this application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0196] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0197] According to embodiments of this application, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0198] According to embodiments of this application, the method flow according to embodiments of this application can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by processor 701, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0199] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0200] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this application. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the methods provided in the embodiments of this application.
[0201] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0202] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0203] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0204] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. This application does not depart from its scope, and those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A training method for an emotion-based speech conversion model, characterized in that, include: Obtain an emotional speech training set, wherein the emotional speech training set includes multiple emotional speech samples; For each of the emotional speech samples, the emotional speech samples are processed using a content coding network to obtain content coding features, which represent key information related to the speech content and speaker corresponding to the emotional speech sample. The emotional speech samples are processed using an emotion extraction network to obtain emotion extraction features, wherein the emotion extraction features represent the emotions corresponding to the emotional speech samples. The emotion extraction network includes a speech emotion recognition base model and an emotion extractor. The speech emotion recognition base model is the Emotion2vec model, and the emotion extractor includes two second convolutional layers, a gated recurrent network, and a feedforward neural network. The content encoding features and the sentiment extraction features are processed by a decoder vocoder to obtain predicted sentiment speech information. The initial sentiment speech conversion model includes the content encoding network, the sentiment extraction network, and the decoder vocoder. The decoder vocoder includes a speech decoder, a channel convolutional network, and a speech vocoder. The channel convolutional network is a PostNet network, which includes five third convolutional layers with a kernel size of (5×1). The first four third convolutional layers have a channel dimension of 512 and apply batch norm and Tanh activation. The last third convolutional layer has a channel dimension of 25. Based on the emotional speech samples, the content encoding features, and the emotion extraction features, the network parameters of the initial emotional speech conversion model are iteratively adjusted to obtain the trained target emotional speech conversion model. Based on the emotional speech samples, the content encoding features, and the emotion extraction features, the network parameters of the initial emotional speech conversion model are iteratively adjusted to obtain the trained target emotional speech conversion model, including: The target loss result is calculated based on the emotional speech sample, the content encoding features, and the emotion extraction features; The network parameters of the initial emotional speech conversion model are iteratively adjusted based on the target loss result to obtain the target emotional speech conversion model; Based on the emotional speech sample, the content encoding features, and the emotion extraction features, the target loss result is calculated, including: For each of the emotional speech samples, the feature mean and feature standard deviation are calculated based on multiple feature data in the content encoding features; The divergence loss is calculated based on the feature mean and the feature standard deviation. The reconstruction loss is calculated based on the emotional speech sample, the emotional speech decoding features output by the decoder vocoder, and the channel convolution features. The mutual information loss result is calculated based on the content encoding features and the sentiment extraction features; The target loss result is generated based on at least one of the divergence loss result, the reconstruction loss result, and the mutual information loss result; When the initial emotional speech conversion model further includes an emotional classification network, the emotional consistency loss result is calculated based on the emotion type and emotional classification label corresponding to the predicted emotional speech information predicted by the emotional classification network. The emotional speech training set also includes an emotional classification label corresponding to each emotional speech sample, and the emotional classification network is based on the Softmax activation function. The emotional consistency loss result is the cross-entropy loss result. Based on the divergence loss result, the sentiment consistency loss result, the reconstruction loss result, and the mutual information loss result, the target loss result is generated. The reconstruction loss result consists of two parts: the first part is the reconstruction loss between the original features of the sentiment speech sample and the sentiment speech decoding features output by the speech decoder; the second part is the reconstruction loss between the original features of the sentiment speech sample and the features obtained by superimposing the sentiment speech decoding features and the channel convolution features.
2. The method according to claim 1, characterized in that, The emotional speech samples are processed using a content coding network to obtain content-coded features, including: The emotional speech sample is processed by an initial vocoder to extract features, resulting in fundamental frequency features and harmonic spectrum features. The harmonic spectrum features are subjected to feature transformation processing to obtain Mel-frequency cepstral coefficients; The first input feature is processed using an emotion-independent encoder to obtain the content encoding feature, wherein the first input feature includes the fundamental frequency feature and the Mel-frequency cepstral coefficients.
3. The method according to claim 2, characterized in that, The emotion-independent encoder includes L first convolutional normalization layers, each of which includes a first convolutional layer and a first instance normalization layer, where L≥1; Specifically, the content-encoded features are obtained by processing the first input features using an emotion-independent encoder, including: For the i-th first convolutional normalization layer, the second input feature is convolved using the i-th first convolutional layer to obtain the i-th first convolutional feature. When i=1, the second input feature includes the first input feature. When i≠1 and i is greater than or equal to 2, the second input feature includes the (i-1)-th first normalized feature output by the (i-1)-th first convolutional normalization layer. The i-th first convolutional feature is processed by the i-th first instance normalization layer to obtain the i-th first normalized feature, wherein the i-th first normalized feature represents the content encoding feature when i=L.
4. The method according to claim 1, characterized in that, The emotional speech samples are processed using an emotion extraction network to obtain emotion extraction features, including: The emotional speech samples are processed using a speech emotion recognition base model to obtain initial emotion features; The initial emotion features are processed using an emotion extractor to obtain the extracted emotion features; The training method further includes: The extracted emotion features are processed using multiple linear layers to obtain linear emotion features; The emotion classification network is used to perform emotion classification processing on the linear emotion features to obtain the emotion classification result of the emotion speech sample. The initial emotion speech conversion model also includes the emotion classification network.
5. The method according to claim 4, characterized in that, The initial emotion features are processed using an emotion extractor to obtain the extracted emotion features, including: The initial sentiment features are processed by a second convolutional layer to obtain sentiment convolutional features; The emotional convolutional features are processed using a gated recurrent network to obtain emotional recurrent features; The emotion loop features are processed using a feedforward neural network to obtain the emotion extraction features.
6. The method according to claim 1, characterized in that, The content encoding features and the emotion extraction features are processed using a decoder vocoder to obtain predicted emotion speech information, including: The content encoding features and the emotion extraction features are downsampled using a speech decoder to obtain the emotion speech decoding features; The emotional speech decoding features are processed using a channel convolutional network to obtain channel convolutional features. The channel convolutional network includes m third convolutional layers, wherein the channel dimension of the last third convolutional layer is smaller than the channel dimension of the first m-1 third convolutional layers. The predicted emotional speech information is obtained by processing the emotional speech decoding features and the channel convolution features using a speech vocoder.
7. The method according to claim 6, characterized in that, The speech decoder includes M second convolutional normalization layers, each of which includes a third convolutional layer and a second instance normalization layer, where M ≥ 1; Specifically, the content encoding features and the emotion extraction features are downsampled using a speech decoder to obtain emotional speech decoding features, including: For the j-th second convolutional normalization layer, the j-th third convolutional layer is used to perform convolution processing on the third input feature to obtain the j-th second convolutional feature. When j=1, the third input feature includes the content encoding feature and the sentiment extraction feature. When j≠1 and j is greater than or equal to 2, the input feature includes the (j-1)-th second normalized feature output by the (j-1)-th second convolutional normalization layer. The j-th second convolutional feature is processed by the j-th second instance normalization layer to obtain the j-th second normalized feature, wherein the j-th second convolutional feature represents the emotional speech decoding feature when j=M.
8. A method for converting emotional speech, characterized in that, include: Acquire the speech information to be converted and the emotional speech information; The speech information to be converted and the emotional speech information are input into the target emotional speech conversion model, and the emotional speech conversion information is output. The emotional speech conversion information represents the speech information formed by the emotion of the emotional speech information and the content of the speech information to be converted. The target emotional speech conversion model is trained using the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Emotional voice data conversion method and device, computer equipment and storage medium
CN112466314A
Multi-emotion multi-speaker speech synthesis method and system
CN117496944A
