Low-resource emotional speech synthesis device and method fusing text semantic features
By extracting emotional features from text and integrating them into the fastspeech2 model, the problem of low-resource emotional speech synthesis is solved and the effect of generating high-quality emotional speech with a small amount of data is achieved.
Patent Information
- Application Number
- CN202410956741.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional emotional speech synthesis methods are difficult to generate high-quality emotionally expressive speech under low resource conditions, and obtaining large-scale annotated emotional speech synthesis data sets is an expensive and time-consuming task.
By extracting emotional features from text and integrating them into the fastspeech2 speech synthesis model, the pitch predictor, energy predictor and duration predictor trained with a small amount of training data are transferred to a speech synthesis model without emotion, generating Speech that contains emotional expression.
It achieves high-quality emotional speech synthesis under low resource conditions, reduces the difficulty of data acquisition, and enables the synthesized audio to have emotional expression while retaining the quality of the original model-synthesized audio.
Smart Images

Figure CN118711565A
Abstract
Description
Technical Field
[0001] The invention relates to a low-resource emotional speech synthesis device and method integrating text semantic features, and belongs to the technical field of natural language processing and speech synthesis. Background Art
[0002] With the rapid development of artificial intelligence technology, text-to-speech (TTS) technology has made significant progress and has been widely used in many fields. Traditional speech synthesis systems mainly focus on generating clear and natural speech from text. However, with the increasing importance of emotional computing in human-computer interaction, how to generate emotional speech has become one of the current research hotspots. As an important research direction in the field of human-computer interaction and intelligent speech applications, emotional speech synthesis has attracted widespread attention. Emotional speech synthesis aims to make the synthesized speech have realistic emotional expression, thereby enhancing the naturalness of speech interaction and the effect of emotional transmission. However, traditional emotional speech synthesis methods often rely on large-scale training data and face difficulties and challenges in low-resource situations. In practical application scenarios, obtaining large-scale annotated emotional speech synthesis datasets is an expensive and time-consuming task. How to achieve high-quality emotional speech synthesis with limited data remains a challenging problem. Summary of the invention
[0003] In order to overcome the shortcomings of existing research, the present invention provides a low-resource emotional speech synthesis device and method that integrates text semantic features, and realizes speech synthesis with emotional expression by extracting emotional features from text and integrating them into a speech synthesis model with fastspeech2 as the backbone framework. In order to cope with the challenges under low-resource conditions, a strategy based on a small amount of training data is adopted to migrate the pitch predictor, energy predictor and duration predictor trained with a small amount of emotional audio to the synthesis model without emotion pre-trained with fastspeech2, so that high-quality speech with emotional expression can be generated.
[0004] A low-resource emotional speech synthesis device integrating text semantic features, comprising:
[0005] Variable extraction module: used to extract the true values of audio pitch, energy, duration, and spectrogram from the training data set, which is used to calculate the loss between the predicted value and the true value during the training process;
[0006] Input module: During the model training process, it is used to input the text into the semantic extraction module, text embedding, and synthesis module respectively, and input the extracted pitch, energy, duration, and spectrogram into the synthesis module. When the trained model is used for training, it is only necessary to input the text into the semantic extraction module and the text embedding module respectively;
[0007] Semantic extraction module: used to extract text semantic features C from text emotion ;
[0008] The semantic extraction module is specifically used for:
[0009] Input the text into the text semantic extractor;
[0010] Extract semantic features of text;
[0011] The semantic features are linearly transformed to convert the feature dimension from 768 dimensions to 256 dimensions to obtain C emotion , which is consistent with the output dimension of the text encoder, so that the two features can be fused;
[0012] Text embedding module: used to convert text into phoneme embedding sequence and obtain text encoding feature C through encoder text ;
[0013] Fusion module: used to combine text semantic features C emotion and text encoding feature C text Adopt the additive fusion strategy to obtain the fusion feature sequence C fusion ;
[0014] The fusion module is specifically used for:
[0015] The text semantic feature C emotion The sequence length and text embedding obtain the text encoding feature C text The lengths of the sequences are compared. If the lengths are inconsistent, a zero-filling strategy is implemented. After processing, the two sequences are equal in length.
[0016] The processed text is encoded into features C text and text semantic features C emotion Adopt the addition strategy to fuse and obtain the fusion feature sequence C fusion ;
[0017] Sentiment prediction module: by fusing feature sequence C fusion Prediction duration P duration , Pitch C pitch Energy C energy , and the predicted C pitch , C energy Embedded in C fusion Get C fpe, and according to P duration The value of is copied and concatenated on each phoneme to obtain C fped ;
[0018] The sentiment prediction module is specifically used for:
[0019] The fused feature sequence is input into the duration predictor for duration prediction P duration ;
[0020] Input the fused feature sequence into the pitch predictor to obtain the pitch embedding C pitch ;
[0021] The pitch embedding is added to the fusion feature sequence;
[0022] C fp =C fusion +C pitch
[0023] And the result C fp Input into the energy predictor to obtain the energy embedding C energy ;
[0024] Energy Embedding and C fp Add together to get C fpe ;
[0025] C fpe =C fp +C energy
[0026] The feature sequence C embedded with pitch and energy fpe According to P duration The value of is copied and concatenated on each phoneme to obtain C fped ; Used to control the duration of each phoneme in the audio;
[0027] Synthesis module: used to convert C fped The spectrogram is input into the decoder to synthesize the spectrogram, and the spectrogram is input into the vocoder to synthesize audio with emotion.
[0028] A low-resource emotional speech synthesis method integrating text semantic features comprises the following steps:
[0029] Step 1: Create a speech data set: The total length of the emotional speech data set is no less than 10 minutes. The data set contains audio files and text files. The text file contains the audio file path, the speaker, and the text content corresponding to the audio file under the path;
[0030] Step 2: Build a text semantic extractor: Use the pre-trained RoBERTa model for fine-tuning training to obtain an English text sentiment classification model that can effectively identify five types of emotions: neutral, happy, sad, angry, and surprise. From this model, semantic features related to emotions can be obtained;
[0031] Step 3: Preprocess the data set: Process the data set produced in step 1. For the audio files in the data set, extract the pitch, energy, duration, and spectrogram of each audio file. For the text files in the data set, extract the semantic features of the text.
[0032] Step 4: Build a low-resource emotional speech synthesis model: The low-resource emotional speech synthesis model includes a text semantic extractor, an encoder, a variable adapter, and a decoder. The purpose of training this model is to train the duration, pitch, and energy predictors contained in the variable adapter through text and text semantic features, thereby obtaining the duration, pitch, and energy corresponding to the text semantic features;
[0033] Step 5: Perform speech synthesis: Input the text input by the user into the text semantic extractor to extract the semantic features in the text, convert the text into a phoneme sequence and input it into the encoder of the speech synthesis model without emotion to generate a 256-dimensional text embedding feature. The semantic feature is fused with the text embedding feature and then input into the variable adapter to add the pitch, energy and duration predicted by the low-resource emotional speech synthesis model in step 4. Finally, the decoder generates a spectrogram and the vocoder outputs the synthesized audio.
[0034] The step 2 specifically includes:
[0035] S2.1: Input the text into the text semantic extractor;
[0036] S2.2: Extract semantic features of text;
[0037] S2.3: Perform a linear transformation on the semantic features to convert the feature dimension from 768 to 256 to obtain C emotion , which is consistent with the output dimension of the text encoder, so that the two features can be fused.
[0038] The step three specifically includes:
[0039] S3.1: Unify the audio files into WAV format with a sampling rate of 22050 Hz. Unifying the sampling rate and format can improve the efficiency of extracting pitch, energy, duration and spectrogram from the audio later.
[0040] S3.2: For each audio in the dataset, the pitch, energy, duration and spectrogram are extracted, and each piece of extracted information is saved as a separate array file. This step calculates the loss between the predicted value and the actual value when training the low-resource emotional speech synthesis model later, so that the model can be continuously optimized during the iterative training process.
[0041] The step 4 specifically includes:
[0042] S4.1: Input the text into the encoder to obtain the text embedding feature C text ;
[0043] S4.2: Compare the sequence length of the semantic features of the corresponding text content obtained in step 3 with the sequence length of the text embedding. If the lengths are inconsistent, implement a zero-filling strategy.
[0044] S4.3: Fuse the processed text embedding features with the semantic features to obtain the fused feature sequence C fusion ;
[0045] S4.4: Input the fused feature sequence into the variable adapter for pitch and energy embedding, and predict the synthesized audio duration.
[0046] The step five specifically includes:
[0047] S5.1: Input the text into the text semantic extractor to obtain the semantic features C of the text emotion ;
[0048] S5.2: Load the trained low-resource emotional speech synthesis model M emotion ;
[0049] S5.3: Enter text into M emotion Get the text embedding feature C from the encoder text ;
[0050] S5.4: C emotion With C text Implement a zero-filling strategy for the sequence length;
[0051] S5.5: Embed the processed text into feature C text With semantic feature C emotion Fusion is performed to obtain the fusion feature sequence C fusion ;
[0052] S5.6: C fusion Input to M emotion The predicted duration P in the variable adapter duration , Pitch C pitch Energy C energy ;
[0053] S5.7: Loading the normal emotionless speech synthesis model M normal ;
[0054] S5.8: Enter text into M normal In the encoder, we get the text embedding feature E text ;
[0055] S5.9: The duration P obtained in S5.6 duration , Pitch C pitch Energy C energy Embedded in E text Get E dpe , duration, pitch, and energy are provided by variable adapter A;
[0056] S5.10: E dpe Input into the decoder to obtain the spectrogram;
[0057] S5.11: Input the spectrogram into the vocoder to synthesize audio. At this time, the synthesized audio retains the M normal The quality of the synthesized audio is based on M emotion The predicted duration P duration , Pitch C pitch Energy C energy And the emotions that it has.
[0058] The S4.4 specifically includes:
[0059] S4.4.1: The fused feature sequence is input into the duration predictor for duration prediction P duration ;
[0060] S4.4.2: The fused feature sequence is input into the pitch predictor to obtain the pitch embedding C pitch ;
[0061] S4.4.3: Pitch embedding is added to the fusion feature sequence;
[0062] C fp =C fusion +C pitch
[0063] And the result C fp Input into the energy predictor to obtain the energy embedding C energy ;
[0064] S4.4.4: Energy Embedding and C fp Add together to get C fpe ;
[0065] C fpe =C fp +Cenergy
[0066] S4.4.5: The feature sequence C embedded with pitch and energy fpe According to P duration The value of is copied and concatenated on each phoneme to obtain C fped , used to control the duration of each phoneme in the audio;
[0067] S4.4.6: C fped Input to the decoder, and synthesize the spectrogram through the decoder;
[0068] S4.4.7: Calculate the predicted duration and pitch C pitch Energy C energy The loss between the spectrogram and the duration, pitch, energy, and spectrogram obtained in step 2 is continuously reduced through iterative training, and the model is saved as M emotion .
[0069] Compared with the prior art, the present invention has the following beneficial effects:
[0070] The present invention proposes a low-resource emotional speech synthesis device and method that integrates text semantic features, extracts semantic features from text, and the trained synthesis model can learn the different semantic features contained in different texts, and then synthesize audio with different emotions.
[0071] The present invention uses a small amount of emotional speech data set to train the speech synthesis model, mainly training the duration, pitch, and energy related to audio emotion. Different combinations of these three parameters can make the audio have different emotional expressions. By migrating these three parameters to the speech synthesis model without emotion, the synthesized audio can have emotional expression while retaining the quality of the synthesized audio of the original model. The use of a small amount of emotional speech data set reduces the difficulty of data acquisition, and the predicted duration, pitch, and energy are migrated to achieve the purpose of synthesizing high-quality emotional speech. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0073] Figure 1 It is a schematic diagram of the overall process of the low-resource emotional speech synthesis device and method integrating text semantic features of the present invention;
[0074] Figure 2 A schematic diagram of a process of extracting semantic features according to the present invention;
[0075] Figure 3 A schematic diagram of a flow chart of a variable adapter in a low-resource emotional speech synthesis model of the present invention;
[0076] Figure 4 A schematic diagram of a flow chart of a variable adapter in a speech synthesis model of the present invention;
[0077] Figure 5 It is a structural schematic diagram of a low-resource emotional speech synthesis device integrating text semantic features according to the present invention. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0079] Reference Figure 5 , a low-resource emotional speech synthesis device 50 integrating text semantic features, comprising:
[0080] Variable extraction module 501: used to extract the true value of the audio pitch, energy, duration, and spectrogram from the training data set, which is used to calculate the loss between the predicted value and the true value during the training process;
[0081] Input module 502: during the training model, it is used to input the text into the semantic extraction module, text embedding, synthesis module, and input the extracted pitch, energy, duration, and spectrogram into the synthesis module. When the trained model is used for training, it is only necessary to input the text into the semantic extraction module and the text embedding module respectively.
[0082] Semantic extraction module 503: used to extract text semantic features C from the text emotion ;
[0083] In a possible implementation, the semantic extraction module 503 is specifically used to:
[0084] Input the text into the text semantic extractor;
[0085] Extract semantic features of text;
[0086] The semantic features are linearly transformed to convert the feature dimension from 768 dimensions to 256 dimensions to obtain C emotion , which is consistent with the output dimension of the text encoder, so that the two features can be fused;
[0087] Text embedding module 504: used to convert text into phoneme embedding sequence and obtain text encoding feature C through encoder text ;
[0088] Fusion module 505: used to combine text semantic features C emotion and text encoding feature C text Adopt the additive fusion strategy to obtain the fusion feature sequence C fusion ;
[0089] In a possible implementation, the fusion module 505 is specifically used for:
[0090] The text semantic feature C emotion The sequence length and text embedding obtain the text encoding feature C text The lengths of the sequences are compared. If the lengths are inconsistent, a zero-filling strategy is implemented. After processing, the two sequences are equal in length.
[0091] The processed text encoding feature C text and text semantic features C emotion Adopt the addition strategy to fuse and obtain the fusion feature sequence C fusion ;
[0092] Emotion prediction module 506: by fusing feature sequence C fusion Prediction duration P duration , Pitch C pitch Energy C energy , and the predicted C pitch , C energy Embedded in C fusion Get C fpe , and according to P duration The value of is copied and concatenated on each phoneme to obtain C fped ;
[0093] In a possible implementation, the emotion prediction module 506 is specifically used to:
[0094] The fused feature sequence is input into the duration predictor for duration prediction P duration ;
[0095] Input the fused feature sequence into the pitch predictor to obtain the pitch embedding C pitch ;
[0096] The pitch embedding is added to the fusion feature sequence;
[0097] C fp =C fusion +C pitch
[0098] And the result C fpInput into the energy predictor to obtain the energy embedding C energy ;
[0099] Energy Embedding and C fp Add together to get C fpe ;
[0100] C fpe =C fp +C energy
[0101] The feature sequence C embedded with pitch and energy fpe According to P duration The value of is copied and concatenated on each phoneme to obtain C fped ; Used to control the duration of each phoneme in the audio;
[0102] Synthesis module 507: used to convert C fped The spectrogram is input into the decoder to synthesize the spectrogram, and the spectrogram is input into the vocoder to synthesize audio with emotion.
[0103] A low-resource emotional speech synthesis method integrating text semantic features comprises the following steps:
[0104] Step 1: Create a speech data set: The total length of the emotional speech data set is no less than 10 minutes. The data set contains audio files and text files. The text file contains the audio file path, the speaker, and the text content corresponding to the audio file under the path;
[0105] Step 2: Build a text semantic extractor: Use the pre-trained RoBERTa model for fine-tuning training to obtain an English text sentiment classification model that can effectively identify five types of emotions: neutral, happy, sad, angry, and surprise. From this model, semantic features related to emotions can be obtained;
[0106] In a specific implementation, the step 2 specifically includes:
[0107] S2.1: Input the text into the text semantic extractor;
[0108] S2.2: Extract semantic features of text;
[0109] S2.3: Perform a linear transformation on the semantic features to convert the feature dimension from 768 to 256 to obtain C emotion , which is consistent with the output dimension of the text encoder, so that the two features can be fused.
[0110] The text semantic extractor uses the pre-trained RoBERTa model for fine-tuning training. RoBERTa is a pre-trained language model based on the Transformer architecture, consisting of multiple layers of encoders, each of which contains a self-attention mechanism and a feedforward neural network. This structure enables the model to capture long-range dependencies in the text and learn rich language features at different levels.
[0111] A notable feature of RoBERTa is that it uses a dynamic masking strategy. A new masking pattern is generated each time a sequence is input. This strategy enables the model to gradually adapt to different masking strategies as a large amount of data is continuously input, thereby learning richer language representations.
[0112] The core idea of the dynamic masking strategy is to enhance the model's ability to adapt to language changes by constantly changing the masking mode during training. This strategy enables the model to not only rely on a fixed masking mode, but also learn effective language features under different masking modes.
[0113] In this way, the RoBERTa model can capture more language information during the training process, thereby achieving better performance in downstream tasks. By fine-tuning the RoBERTa model on the text sentiment classification task, a classification model that can effectively identify five types of emotions: neutral, happy, sad, angry, and surprise is obtained.
[0114] Step 3: Preprocess the data set: Process the data set produced in step 1. For the audio files in the data set, extract the pitch, energy, duration, and spectrogram of each audio file. For the text files in the data set, extract the semantic features of the text.
[0115] In a specific implementation, the step three specifically includes:
[0116] S3.1: Unify the audio files into WAV format with a sampling rate of 22050 Hz. Unifying the sampling rate and format can improve the efficiency of extracting pitch, energy, duration and spectrogram from the audio later.
[0117] S3.2: For each audio in the dataset, the pitch, energy, duration and spectrogram are extracted, and each piece of extracted information is saved as a separate array file. This step calculates the loss between the predicted value and the actual value when training the low-resource emotional speech synthesis model later, so that the model can be continuously optimized during the iterative training process.
[0118] Step 4: Build a low-resource emotional speech synthesis model: The low-resource emotional speech synthesis model includes a text semantic extractor, an encoder, a variable adapter, and a decoder. The purpose of training this model is to train the duration, pitch, and energy predictors contained in the variable adapter through text and text semantic features, thereby obtaining the duration, pitch, and energy corresponding to the text semantic features;
[0119] In a specific implementation, the step 4 specifically includes:
[0120] S4.1: Input the text into the encoder to obtain the text embedding feature C text ;
[0121] S4.2: Compare the sequence length of the semantic features of the corresponding text content obtained in step 3 with the sequence length of the text embedding. If the lengths are inconsistent, implement a zero-filling strategy.
[0122] S4.3: Fuse the processed text embedding features with the semantic features to obtain the fused feature sequence C fusion ;
[0123] S4.4: Input the fused feature sequence into the variable adapter for pitch and energy embedding, and predict the synthesized audio duration.
[0124] Reference Figure 3 In a specific implementation, S4.4 specifically includes:
[0125] S4.4.1: The fused feature sequence is input into the duration predictor for duration prediction P duration ;
[0126] S4.4.2: The fused feature sequence is input into the pitch predictor to obtain the pitch embedding C pitch ;
[0127] S4.4.3: Pitch embedding is added to the fusion feature sequence;
[0128] C fp =C fusion +C pitch
[0129] And the result C fp Input into the energy predictor to obtain the energy embedding C energy ;
[0130] S4.4.4: Energy Embedding and C fp Add together to get C fpe ;
[0131] C fpe =C fp +C energy
[0132] S4.4.5: The feature sequence C embedded with pitch and energy fpe According to P duration The value of is copied and concatenated on each phoneme to obtain C fped , used to control the duration of each phoneme in the audio;
[0133] S4.4.6: C fped Input to the decoder, and synthesize the spectrogram through the decoder;
[0134] S4.4.7: Calculate the predicted duration and pitch C pitch Energy C energy The loss between the spectrogram and the duration, pitch, energy, and spectrogram obtained in step 2 is continuously reduced through iterative training, and the model is saved as M emotion .
[0135] Step 5: Perform speech synthesis: Input the text input by the user into the text semantic extractor to extract the semantic features in the text, convert the text into a phoneme sequence and input it into the encoder of the speech synthesis model without emotion to generate a 256-dimensional text embedding feature. The semantic feature is fused with the text embedding feature and then input into the variable adapter to add the pitch, energy and duration predicted by the low-resource emotional speech synthesis model in step 4. Finally, the decoder generates a spectrogram and the vocoder outputs the synthesized audio.
[0136] In a specific implementation, the step five specifically includes:
[0137] S5.1: Input the text into the text semantic extractor to obtain the semantic features C of the text emotion ;
[0138] S5.2: Load the trained low-resource emotional speech synthesis model M emotion ;
[0139] S5.3: Enter text into M emotion Get the text embedding feature C from the encoder text ;
[0140] S5.4: C emotion With C text Implement a zero-filling strategy for the sequence length;
[0141] S5.5: Embed the processed text into feature C text With semantic feature C emotion Fusion is performed to obtain the fusion feature sequence C fusion ;
[0142] S5.6: C fusion Input to Memotion The predicted duration P in the variable adapter duration , Pitch C pitch Energy C energy ;
[0143] S5.7: Loading the normal emotionless speech synthesis model M normal ;
[0144] S5.8: Enter text into M normal In the encoder, we get the text embedding feature E text ;
[0145] S5.9: The duration P obtained in S5.6 duration , Pitch C pitch Energy C energy Embedded in E text Get E dpe , duration, pitch, and energy are provided by variable adapter A;
[0146] S5.10: E dpe Input into the decoder to obtain the spectrogram;
[0147] S5.11: Input the spectrogram into the vocoder to synthesize audio. At this time, the synthesized audio retains the M normal The quality of the synthesized audio is based on M emotion The predicted duration P duration , Pitch C pitch Energy C energy And the emotions that it has.
[0148] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.
Claims
1. A low-resource emotional speech synthesis device integrating text semantic features, Features: include: Variable extraction module: used to extract the true values of audio pitch, energy, duration, and spectrogram from the training data set, which is used to calculate the loss between the predicted value and the true value during the training process; Input module: during the model training process, it is used to input the text into the semantic extraction module, text embedding, and synthesis module respectively, and input the extracted pitch, energy, duration, and spectrogram into the synthesis module. When the trained model is used for training, the text is input into the semantic extraction module and the text embedding module respectively; Semantic extraction module: used to extract text semantic features C from text emotion ; Text embedding module: used to convert text into phoneme embedding sequence and obtain text encoding feature C through encoder text ; Fusion module: used to combine text semantic features C emotion and text encoding feature C text Adopt the additive fusion strategy to obtain the fusion feature sequence C fusion ; Sentiment prediction module: by fusing feature sequence C fusion Prediction duration P duration , Pitch C pitch Energy C energy , and the predicted C pitch , C energy Embedded in C fusion Get C fpe , and according to P duration The value of is copied and concatenated on each phoneme to obtain C fped ; Synthesis module: used to convert C fped The spectrogram is input into the decoder to synthesize the spectrogram, and the spectrogram is input into the vocoder to synthesize audio with emotion.
2. A synthesis method of a low-resource emotional speech synthesis device integrating text semantic features according to claim 1, Features: The following steps are involved: Step 1: Create a speech data set: The data set contains audio files and text files. The text file contains the audio file path, the speaker, and the text content corresponding to the audio file in the path. Step 2: Build a text semantic extractor: Use the pre-trained RoBERTa model for fine-tuning training to obtain an English text sentiment classification model that can effectively identify five types of emotions: neutral, happy, sad, angry, and surprise, and obtain semantic features related to emotions; Step 3: Preprocess the data set: Process the data set produced in step 1, extract the pitch, energy, duration, and spectrogram of each audio file in the data set, and extract the semantic features of the text in the text file in the data set; Step 4: Build a low-resource emotional speech synthesis model: The low-resource emotional speech synthesis model includes a text semantic extractor, an encoder, a variable adapter, and a decoder. The purpose of training this model is to train the duration, pitch, and energy predictors contained in the variable adapter through text and text semantic features to obtain the duration, pitch, and energy corresponding to the text semantic features; Step 5: Perform speech synthesis: Input the text input by the user into the text semantic extractor to extract the semantic features in the text, convert the text into a phoneme sequence and input it into the encoder of the speech synthesis model without emotion to generate a 256-dimensional text embedding feature. The semantic feature is fused with the text embedding feature and then input into the variable adapter to add the pitch, energy and duration predicted by the low-resource emotional speech synthesis model in step 4. The decoder generates a spectrogram and the vocoder outputs the synthesized audio.
3. According to the low-resource emotional speech synthesis method integrating text semantic features according to claim 2, Features: The step 2 specifically includes: S2.1: Input the text into the text semantic extractor; S2.2: Extract semantic features of text; S2.3: Perform a linear transformation on the semantic features to convert the feature dimension from 768 to 256 to obtain C emotion , which is consistent with the output dimension of the text encoder, so that the two features can be fused.
4. According to the low-resource emotional speech synthesis method integrating text semantic features according to claim 2, Features: The step three specifically includes: S3.1: Unify the audio files into WAV format with a sampling rate of 22050 Hz. Unifying the sampling rate and format can improve the efficiency of extracting the pitch, energy, duration and spectrogram in the audio. S3.2: For each audio in the dataset, the pitch, energy, duration and spectrogram are extracted, and each piece of extracted information is saved as a separate array file. When training the low-resource emotional speech synthesis model later, the loss between the predicted value and the actual value is calculated, so that the model can be continuously optimized during the iterative training process.
5. According to claim 2, a low-resource emotional speech synthesis method integrating text semantic features, Features: The step 4 specifically includes: S4.1: Input the text into the encoder to obtain the text embedding feature C text ; S4.2: Compare the sequence length of the semantic features of the corresponding text content obtained in step 3 with the sequence length of the text embedding. If the lengths are inconsistent, implement a zero-filling strategy. S4.3: Fuse the processed text embedding features with the semantic features to obtain the fused feature sequence C fusion ; S4.4: Input the fused feature sequence into the variable adapter for pitch and energy embedding, and predict the synthesized audio duration.
6. A low-resource emotional speech synthesis device integrating text semantic features according to claim 1, Features: The step five specifically includes: S5.1: Input the text into the text semantic extractor to obtain the semantic features C of the text emotion ; S5.2: Load the trained low-resource emotional speech synthesis model M emotion ; S5.3: Enter text into M emotion Get the text embedding feature C from the encoder text ; S5.4: C emotion With C text Implement a zero-filling strategy for the sequence length; S5.5: Embed the processed text into feature C text With semantic feature C emotion Fusion is performed to obtain the fusion feature sequence C fusion ; S5.6: C fusion Input to M emotion The predicted duration P in the variable adapter duration , Pitch C pitch Energy C energy ; S5.7: Loading the normal emotionless speech synthesis model M normal ; S5.8: Enter text into M normal In the encoder, we get the text embedding feature E text ; S5.9: The duration P obtained in S5.6 duration , Pitch C pitch Energy C energy Embedded in E text Get E dpe , duration, pitch, and energy are provided by variable adapter A; S5.10: E dpe Input into the decoder to obtain the spectrogram; S5.11: Input the spectrogram into the vocoder to synthesize audio. At this time, the synthesized audio retains the M normal The quality of the synthesized audio is based on M emotion The predicted duration P duration , Pitch C pitch Energy C energy And the emotions that it has.
7. A low-resource emotional speech synthesis device integrating text semantic features according to claim 1, Features: The S4.4 specifically includes: S4.4.1: The fused feature sequence is input into the duration predictor for duration prediction P duration ; S4.4.2: The fused feature sequence is input into the pitch predictor to obtain the pitch embedding C pitch ; S4.4.3: Pitch embedding is added to the fusion feature sequence; C fp =C fusion +C pitch And the result C fp Input into the energy predictor to obtain the energy embedding C energy ; S4.4.4: Energy Embedding and C fp Add together to get C fpe ; C fpe =C fp +C energy S4.4.5: The feature sequence C embedded with pitch and energy fpe According to P duration The value of is copied and concatenated on each phoneme to obtain C fped , used to control the duration of each phoneme in the audio; S4.4.6: C fped Input to the decoder, and synthesize the spectrogram through the decoder; S4.4.7: Calculate the predicted duration and pitch C pitch Energy C energy The loss between the spectrogram and the duration, pitch, energy, and spectrogram obtained in step 2 is continuously reduced through iterative training, and the model is saved as M emotion .
