End-to-end speech synthesis method and device, equipment and medium

Through the end-to-end speech synthesis method, using modules such as emotion scorers, text encoders, and random time predictors, the problem of fine-grained emotion control in the existing technology is solved, and more refined emotional expression and speech synthesis effects are improved.

CN118645084APending Publication Date: 2024-09-13PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410841365.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Existing speech synthesis technology is difficult to control the emotion of synthesized speech at a fine-grained level, resulting in an imperfect user experience.

Method used

Using an end-to-end speech synthesis method, through modules such as emotion scorer, text encoder, random time predictor and monotonic alignment search, the text and audio data to be converted are obtained, and emotion recognition, feature extraction, duration prediction and feature alignment are performed. Generate target speech data to increase the expression of emotional intensity.

Benefits of technology

It achieves more refined emotional expression in speech synthesis and improves the speech synthesis effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118645084A
    Figure CN118645084A
Patent Text Reader

Abstract

The invention discloses an end-to-end speech synthesis method, and the method comprises the steps: obtaining a to-be-converted text and audio data, and inputting the to-be-converted text and audio data into a speech synthesis model; the speech synthesis model comprises an emotion scoring device, a text encoder, a random time predictor and a monotonic alignment search and synthesis decoder; performing emotion recognition on the audio data through an emotion scoring device to obtain emotion intensity; performing feature extraction on the to-be-converted text and the emotion intensity through a text encoder to obtain text features; performing duration prediction on the text features through a random time predictor to obtain phoneme duration distribution; performing feature alignment on the phoneme duration distribution and the text feature through monotone alignment search to obtain an aligned feature; and performing voice synthesis on the alignment features through a synthesis decoder to obtain target voice data. According to the invention, expression of emotional intensity is increased in speech synthesis, so that the speech synthesis effect is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech processing technology, and in particular to an end-to-end speech synthesis method, device, equipment and medium. Background Art

[0002] In traditional technical speech synthesis systems, audio emotion features are extracted from reference audio and added to the system, so that the emotion of the synthesized audio is controlled to be close to the emotion of the reference audio; however, in the current speech synthesis process, people often only pay more attention to whether the speech synthesis results are clear and accurate, and often fail to adjust the synthesized speech according to the speaker's emotions, lacking emotional expression, which makes users feel that the speech synthesis effect is not perfect and the emotional expression granularity is not fine enough. In recent years, speech synthesis models based on attention mechanisms have achieved better performance than traditional speech synthesis models, and have achieved better performance in style disentanglement and emotion transfer, but they still cannot control the emotion of the synthesized speech at a fine granularity. Summary of the invention

[0003] The embodiments of the present invention provide an end-to-end speech synthesis method, apparatus, device and medium to solve the problem in the prior art that the end-to-end speech synthesis network cannot obtain spatial information.

[0004] An end-to-end speech synthesis method, comprising:

[0005] Acquire a text to be converted and audio data corresponding to the text to be converted, and input the text to be converted and the audio data into a speech synthesis model; the speech synthesis model includes a sentiment scorer, a text encoder, a random time predictor, a monotone alignment search and a synthesis decoder;

[0006] Performing emotion recognition on the audio data by using an emotion scorer to obtain the emotion intensity corresponding to the text to be converted;

[0007] Extracting features of the text to be converted and the sentiment intensity through a text encoder to obtain text features;

[0008] Performing duration prediction on the text feature by a random time predictor to obtain a phoneme duration distribution;

[0009] Performing feature alignment on the phoneme duration distribution and the text feature through monotone alignment search to obtain an alignment feature;

[0010] The alignment features are subjected to speech synthesis by a synthesis decoder to obtain target speech data corresponding to the text to be converted.

[0011] An end-to-end speech synthesis device, comprising:

[0012] A data input module, used to obtain the text to be converted and the audio data corresponding to the text to be converted, and input the text to be converted and the audio data into a speech synthesis model; the speech synthesis model includes a sentiment scorer, a text encoder, a random time predictor, a monotone alignment search and a synthesis decoder;

[0013] An emotion recognition module, used to perform emotion recognition on the audio data through an emotion scorer to obtain the emotion intensity corresponding to the text to be converted;

[0014] A feature extraction module, used for extracting features of the text to be converted and the sentiment intensity through a text encoder to obtain text features;

[0015] A time prediction module, used for predicting the duration of the text feature by a random time predictor to obtain a phoneme duration distribution;

[0016] A feature alignment module, used for performing feature alignment on the phoneme duration distribution and the text feature through monotone alignment search to obtain an alignment feature;

[0017] The speech synthesis module is used to perform speech synthesis on the alignment features through a synthesis decoder to obtain target speech data corresponding to the text to be converted.

[0018] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned end-to-end speech synthesis method when executing the computer program.

[0019] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the end-to-end speech synthesis method is implemented.

[0020] The present invention provides an end-to-end speech synthesis method, device, equipment and medium. The method performs emotion recognition on audio data through an emotion scorer to achieve the determination of emotion intensity. The text to be converted and the emotion intensity are extracted by a text encoder to achieve the fusion of emotion intensity, thereby achieving the acquisition of text features. The duration of text features is predicted by a random time predictor to achieve the determination of the duration of each phoneme, thereby achieving the acquisition of the phoneme duration distribution. The phoneme duration distribution and text features are aligned by monotone alignment search to achieve the alignment of phonemes and text, thereby achieving the acquisition of alignment features, thereby achieving the acquisition of target speech data. Furthermore, the expression of emotion intensity is added in speech synthesis, so that the effect of speech synthesis is better. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 is a schematic diagram of an application environment of an end-to-end speech synthesis method in one embodiment of the present invention;

[0023] Figure 2 is a flow chart of an end-to-end speech synthesis method in one embodiment of the present invention;

[0024] Figure 3 is a flow chart of step S50 of an end-to-end speech synthesis method in one embodiment of the present invention;

[0025] Figure 4 is a flow chart of step S60 of an end-to-end speech synthesis method in one embodiment of the present invention;

[0026] Figure 5 is a principle block diagram of an end-to-end speech synthesis device in one embodiment of the present invention;

[0027] Figure 6 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0028] 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 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.

[0029] The end-to-end speech synthesis method provided by the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the end-to-end speech synthesis method is applied in an end-to-end speech synthesis device, and the end-to-end speech synthesis device includes Figure 1The client and server shown in the figure communicate with each other through the network to solve the problem that the end-to-end speech synthesis network in the prior art cannot obtain spatial information. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The client, also known as the user end, refers to a program that corresponds to the server and provides classification services to customers. The client can be installed on, but not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices.

[0030] In one embodiment, if Figure 2 As shown, an end-to-end speech synthesis method is provided, and the method is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps:

[0031] S10: Obtain the text to be converted and the audio data corresponding to the text to be converted, and input the text to be converted and the audio data into a speech synthesis model; the speech synthesis model includes a sentiment scorer, a text encoder, a random time predictor, a monotonic alignment search and a synthesis decoder.

[0032] Understandably, the text to be converted refers to the text whose content needs to be converted into speech. Audio data is used to characterize speech with varying emotional intensity. The speech synthesis model refers to a neural network for speech synthesis obtained by training with a large amount of data, and in this embodiment, it is improved based on the VITS (Variational Integral Text to Speech) model. The speech synthesis model includes an emotional scorer, a text encoder, a random time predictor, a monotone alignment search, and a synthesis decoder. The emotional scorer is used to identify the emotional intensity in the speech. The text encoder is used to encode the text and the emotional intensity. The random time predictor is used to evaluate the duration of each phoneme in the text. The monotone alignment search is used to align phonemes and text. The synthesis decoder is used to convert acoustic features into speech data. The text to be converted and the audio data corresponding to the text to be converted are obtained from a database or a client, and the text to be converted and the audio data are input into the speech synthesis model to perform speech synthesis on the text to be converted.

[0033] S20: Performing emotion recognition on the audio data through an emotion scorer to obtain the emotion intensity corresponding to the text to be converted.

[0034] Understandably, emotional intensity refers to the degree of variation in the expression of emotion.

[0035] Specifically, audio emotion features for expressing emotions are first extracted from audio data, for example, Mel frequency cepstral coefficients are extracted. Then, the audio emotion features are input into an emotion scorer, and the intensity of the audio emotion features is identified by the emotion scorer's ability to recognize the degree of emotion expression learned during training, thereby obtaining the emotion intensity, and the emotion intensity is determined as the emotion intensity required to be expressed by the text to be converted. The emotion intensity can be a sequence or a set corresponding to the emotion intensity changes corresponding to all text contents.

[0036] S30, extracting features of the text to be converted and the sentiment intensity through a text encoder to obtain text features.

[0037] Understandably, text features are used to characterize the characteristics of text-integrated sentiment intensity.

[0038] Specifically, the sentiment intensity and the text to be converted are input into the text encoder, and the text encoder is used to embed the text to be converted, that is, the word vector, sentence vector and position vector are calculated and added to obtain the input vector. Then, the attention layer in the text encoder is used to process the input vector, that is, the context of the text is captured to obtain the attention vector, and then the text advance feature is obtained by processing through the feedforward neural network, layer normalization and residual connection. The sentiment intensity is encoded by the encoding module of the text encoder to obtain the intensity feature, and the intensity feature and the text extraction feature are fused to obtain the text feature.

[0039] S40: Perform duration prediction on the text feature by using a random time predictor to obtain a phoneme duration distribution.

[0040] Understandably, the random time predictor is used to estimate the duration distribution of each phoneme. The phoneme duration distribution refers to the duration of each phoneme. A phoneme refers to the smallest speech unit divided according to the natural properties of speech.

[0041] Specifically, the text features are converted into phoneme features through pronunciation rules and phoneme libraries. Then, the duration of the phoneme features is predicted by the random time predictor, that is, the duration of each phoneme in the phoneme features is predicted by the prediction ability learned by the random time predictor during training, and the duration of each phoneme is rounded up to get the phoneme duration distribution.

[0042] S50: performing feature alignment on the phoneme duration distribution and the text feature through monotone alignment search to obtain an alignment feature.

[0043] It can be understood that the aligned feature refers to the alignment of each phoneme duration and each unit in the text feature.

[0044] Specifically, the phoneme distribution and text features are initially mapped to obtain an alignment matrix. Then, a dynamic programming algorithm is used to find an optimal alignment path in all cases to determine the text and the corresponding phoneme, thereby obtaining the optimal alignment matrix. The phoneme duration distribution corresponding to the phoneme and the text feature correspondence are determined through the optimal alignment matrix to obtain the alignment feature. Among them, random variables u and v with the same time resolution and dimension as the duration series are introduced to simulate the randomness of the phoneme duration.

[0045] S60: Performing speech synthesis on the aligned features through a synthesis decoder to obtain target speech data corresponding to the text to be converted.

[0046] It can be understood that the target speech data refers to the speech converted after the text to be converted is integrated with the emotion intensity.

[0047] Specifically, the alignment features are input into the synthesis decoder, and the alignment features are converted into hidden state transformation features through the flow model in the synthesis decoder. Then, the transformation features are upsampled to a higher time resolution through the transposed convolution in the synthesis decoder so that continuous speech signals can be generated. Next, the upsampled features are extracted at different scales through the multi-receptive field fusion module, and the features at different scales are fused. Finally, the fused features are synthesized through the vocoder to obtain the target speech data.

[0048] In an embodiment of the present invention, an end-to-end speech synthesis method is provided. The method performs emotion recognition on audio data through an emotion scorer to achieve the determination of emotion intensity. The text to be converted and the emotion intensity are extracted by a text encoder to achieve the fusion of emotion intensity, thereby achieving the acquisition of text features. The duration of text features is predicted by a random time predictor to achieve the determination of the duration of each phoneme, thereby achieving the acquisition of the phoneme duration distribution. The phoneme duration distribution and text features are aligned by monotone alignment search to achieve the alignment of phonemes and text, thereby achieving the acquisition of alignment features, thereby achieving the acquisition of target speech data. Furthermore, the expression of emotion intensity is added to speech synthesis, so that the effect of speech synthesis is better.

[0049] In one embodiment, in step S20, that is, performing emotion recognition on the audio data by using an emotion scorer to obtain the emotion intensity corresponding to the text to be converted, includes:

[0050] S201, extracting features from the audio data to obtain audio extraction features.

[0051] S202, performing intensity identification on the audio extraction feature by the emotion scorer to obtain emotion intensity.

[0052] Understandably, the emotion scorer is obtained by training the neural network through unsupervised training methods. Emotion intensity refers to the intensity of emotional expression in the audio, for example, {happy, 0.8}, {sad, 0.5}, {surprised, 1}. Audio feature extraction refers to extracting key information that can describe the emotion of the sound from the audio data.

[0053] Specifically, the audio data is first pre-emphasized, that is, to enhance the high-frequency part of the audio data, so that the audio data can use the same signal-to-noise ratio to calculate the spectrum in the entire frequency band from low frequency to high frequency. The audio data is then framed, that is, the audio data is divided into fixed time periods (such as 25 milliseconds) to obtain multiple frame units. In order to avoid excessive changes in adjacent frame units, there is an overlapping area between two adjacent frame units. Each frame unit is multiplied by a window function so that the discontinuous audio signal after division becomes continuous and exhibits the characteristics of a periodic function, and the left and right ends of each frame unit are continuous to obtain a continuous time window signal, thereby obtaining a continuous signal.

[0054] Perform fast Fourier transform on the continuous time window signal, transform the signal distribution in the time domain into energy distribution in the frequency domain, and then obtain the spectrum corresponding to the target speech data. Input the spectrum into the Mel filter, and convert the spectrum through the Mel filter to obtain the Mel spectrum, that is, convert the linear natural spectrum into the Mel spectrum that reflects the human auditory characteristics. Obtain the logarithm of the Mel spectrum to obtain the logarithmic energy of the Mel spectrum, and perform inverse transformation on the logarithmic energy according to the discrete cosine transform, and take the second to thirteenth coefficients after the discrete cosine transform as the Mel frequency cepstrum coefficients, and determine the Mel frequency cepstrum coefficients as the audio extraction features.

[0055] Furthermore, the intensity of the audio extracted features is identified through the emotion scorer, that is, the intensity of the emotional expression in the audio extracted features is identified through the recognition ability learned during training, so as to obtain the emotion intensity corresponding to the audio data, and determine it as the intensity of the emotion expression required for the text to be converted.

[0056] The embodiment of the present invention extracts features from audio data, thereby extracting key information from the audio data, and further determining the audio extraction features. The emotional scorer identifies the intensity of the audio extraction features, thereby identifying the degree of emotional expression in the audio data, and further determining the emotional intensity.

[0057] In one embodiment, in step S30, feature extraction is performed on the text to be converted and the sentiment intensity by a text encoder to obtain text features, including:

[0058] S301, converting the text to be converted through the input layer of the text encoder to obtain an input vector.

[0059] S302, performing attention processing on the input vector through the attention layer of the text encoder to obtain an attention result.

[0060] S303, performing feature extraction on the attention result through the prediction network of the text encoder to obtain text extraction features.

[0061] S304, encoding the emotion intensity through the encoding module of the text encoder to obtain an intensity feature, and fusing the intensity feature with the text extraction feature to obtain a text feature.

[0062] It can be understood that the input vector is obtained by vectorizing the text to be converted. The attention result is the feature obtained by performing attention processing on the input vector. Text extraction features refer to extracting attributes used to characterize the text from the text to be converted.

[0063] Specifically, a text encoder is obtained, and the text to be converted is input into the text encoder, and the text to be converted is converted through the input layer of the text encoder, that is, the word vector of the text to be converted is first determined, and then two special flags, namely CLS and SEP, are added to the beginning and end of the text to be converted. Then, the word vectors are weighted fused, that is, the semantic vector of a sentence is added to each word vector to obtain the sentence vector. Finally, the position vectors of the word vectors and sentence vectors are determined by the position function learned by the text encoder. Then, the word vectors, sentence vectors and position vectors corresponding to the same text to be converted are added to obtain an embedded vector. Among them, the emotional intensity is encoded to determine the intensity vector, and the embedded vector and the intensity vector are added to obtain the input vector.

[0064] The attention mechanism of the attention layer in the text encoder is used to process the input vector, that is, the Q vector, K vector, and V vector in the input vector are calculated through multiple groups of attention mechanisms, that is, the correlation score between the Q vector and the K vector in the input vector is calculated using the dot product method, that is, the dot product is calculated with each input vector in Q and each input vector in K, and the correlation score between the Q vector and the K vector is normalized. Then, the scores between the input vectors are converted into a probability distribution between [0, 1] through the softmax function, and the corresponding Values ​​vector is multiplied according to the probability distribution between the input vectors to obtain the attention vector. Multiple groups of attention vectors are concatenated, and the residuals are summed and normalized to obtain the attention result. The attention result is feature extracted through the prediction network of the text encoder, that is, the attention result is predicted through the feedforward neural network in the prediction layer, that is, the attention result is calculated with different weights through multiple layers of hidden units, and the residuals are summed and normalized to obtain the text extraction feature.

[0065] Furthermore, the emotion intensity is encoded by the encoding module of the text encoder, that is, all emotion intensities are vectorized to obtain intensity features, and then, the intensity features and text extraction features are fused to obtain text features.

[0066] The embodiment of the present invention converts the text to be converted by a text encoder, thereby obtaining an input vector. By performing attention processing on the input vector, important content is determined, thereby obtaining an attention result. By performing feature extraction on the attention result, text extraction features are obtained, thereby determining text features.

[0067] In one embodiment, in step S40, that is, performing duration prediction on the text feature by a random time predictor to obtain a phoneme duration distribution includes:

[0068] S401, performing variable conversion on the text features through variational dequantization in the random time predictor to obtain a positive real number sequence.

[0069] S402, performing data enhancement on the text features through variational data enhancement in the random time predictor to obtain high-dimensional features.

[0070] S403, sampling and rounding the positive real number sequence and the high-dimensional feature to obtain a phoneme duration distribution.

[0071] It can be understood that variational dequantization is used to introduce the first random variable. Variational data enhancement is used to introduce the second random variable. The positive real number sequence refers to the sequence obtained by transforming the text feature by the first random variable, and the positive real number is used to characterize the duration of the phoneme. High-dimensional features refer to features of high latitude.

[0072] Specifically, after obtaining the text features, the text features are converted into a phoneme sequence and input into a random time predictor. Then, the phoneme sequence is converted into a variable through variational dequantization in the random time predictor, that is, the first random variable in the variational dequantization is limited to [0, 1), and the first random variable is used to convert the phoneme sequence into a positive real number sequence, that is, the phoneme sequence is converted into a positive real number sequence through the ability learned during training. Next, the positive real number sequence is time-predicted through variational data enhancement in the random time predictor, that is, the phoneme sequence is converted into a higher-dimensional potential representation through the ability learned during training by the second random variable in the variational data enhancement, thereby obtaining a high-dimensional feature. Finally, the two variables are sampled and rounded up to obtain the phoneme duration, and the predicted phoneme duration is sorted to obtain the phoneme duration distribution. This is usually a sequence in which each element represents the predicted duration of a phoneme.

[0073] In this embodiment, two variables are introduced to achieve conversion of the phoneme sequence and acquisition of the positive real number sequence, thereby achieving determination of the phoneme duration distribution.

[0074] In one embodiment, in step S50, feature alignment is performed on the phoneme duration distribution and the text feature through monotone alignment search to obtain an alignment feature, including:

[0075] S501, performing probability processing on the audio distribution corresponding to the phoneme duration distribution and the text features through a dynamic programming algorithm to obtain an optimal alignment matrix.

[0076] S502, aligning the phoneme duration distribution and the text feature using the optimal alignment matrix to obtain an alignment feature.

[0077] Understandably, the alignment matrix refers to the matching of each phoneme with each unit (such as phoneme or word) in the text feature. The optimal alignment matrix refers to the most likely correspondence between the phoneme and the text unit.

[0078] Specifically, after obtaining the phoneme duration distribution, the phoneme duration distribution and the text feature are mapped, that is, the starting point of the text feature sequence is aligned with the starting point of the phoneme duration distribution, so as to obtain an initial alignment matrix. Then, a dynamic programming algorithm (such as the Viterbi algorithm or the forward-backward algorithm) is used to find the alignment path with the highest probability. The dynamic programming algorithm traverses the initial alignment matrix and calculates the optimal path of each state based on the previous state and the current alignment probability. The dynamic programming algorithm generates an optimal alignment matrix that only retains the alignment path with the highest probability. Among them, starting from the first feature of the text feature sequence, the entire sequence is traversed, and for each text feature, the phoneme aligned with it is found. Since the search is monotonous, the current text feature is only matched with the phoneme that has not been aligned. A certain similarity or distance between the text feature and the phoneme is calculated to select the best phoneme for alignment. The aligned text feature and phoneme duration pair are added to the alignment result list. The position of the current text feature is updated, and the aligned phoneme of the next text feature is continued to be searched. Furthermore, the phoneme duration distribution corresponding to the phoneme sequence and the text sequence are aligned according to the optimal alignment matrix, that is, each word or character in a given text sequence is associated with the phoneme duration in the corresponding phoneme duration distribution, thereby obtaining an alignment feature.

[0079] In this embodiment, the alignment matrix is ​​probabilistically processed through a dynamic programming algorithm, so as to obtain the optimal alignment matrix and further obtain the alignment features.

[0080] In one embodiment, in step S60, that is, performing speech synthesis on the alignment features by a synthesis decoder to obtain target speech data corresponding to the text to be converted includes:

[0081] S601, converting the alignment features through a flow model in the synthesis decoder to obtain conversion features.

[0082] S602, upsampling the conversion features through transposed convolution in the synthetic decoder to obtain upsampled features.

[0083] S603, performing speech synthesis on the up-sampled features through a multi-receptive field fusion module in the synthesis decoder to obtain target speech data.

[0084] Understandably, transforming features refers to transforming aligned features into complex features. Upsampling features refers to features of higher dimensions.

[0085] Specifically, after obtaining the alignment features, the alignment features are transformed through the flow model in the synthesis decoder, that is, the alignment features are inversely transformed through the flow model to transform the simple distribution into the hidden state of the complex distribution, thereby obtaining the transformation features. Then, the transformation features are upsampled through the transposed convolution in the synthesis decoder, that is, the transformation features are upsampled to a higher dimension through the transposed convolution in the synthesis decoder so that a continuous speech signal can be generated, thereby obtaining the upsampled features. Then, the upsampled features are extracted from information of different lengths through multiple MRFs (multi-receptive field fusions), that is, the upsampled features are extracted through multiple CNNs (convolutional neural networks), and the outputs of multiple residual blocks are added to obtain the target speech data. Among them, each CNN has a different kernel size (convolution kernel size) and dilation rate (expansion rate). By setting different dilation rates, the receptive field changes and multi-scale information is obtained.

[0086] The embodiment of the present invention realizes the extraction of up-sampling features, thereby realizing the acquisition of multi-scale information by changing the receptive field, thereby realizing the determination of target speech data, and thereby realizing the conversion of the to-be-converted text into speech data.

[0087] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0088] In one embodiment, an end-to-end speech synthesis device is provided, and the end-to-end speech synthesis device corresponds one-to-one to the end-to-end speech synthesis method in the above embodiment. Figure 5 As shown, the end-to-end speech synthesis device includes a data input module 10, an emotion recognition module 20, a feature extraction module 30, a time prediction module 40, a feature alignment module 50 and a speech synthesis module 60. The functional modules are described in detail as follows:

[0089] A data input module 10 is used to obtain the text to be converted and the audio data corresponding to the text to be converted, and input the text to be converted and the audio data into a speech synthesis model; the speech synthesis model includes a sentiment scorer, a text encoder, a random time predictor, a monotone alignment search and a synthesis decoder;

[0090] The emotion recognition module 20 is used to perform emotion recognition on the audio data through an emotion scorer to obtain the emotion intensity corresponding to the text to be converted;

[0091] A feature extraction module 30 is used to extract features of the text to be converted and the sentiment intensity through a text encoder to obtain text features;

[0092] A time prediction module 40, configured to predict the duration of the text feature by using a random time predictor to obtain a phoneme duration distribution;

[0093] A feature alignment module 50, configured to perform feature alignment on the phoneme duration distribution and the text feature through a monotone alignment search to obtain an alignment feature;

[0094] The speech synthesis module 60 is used to perform speech synthesis on the alignment features through a synthesis decoder to obtain target speech data corresponding to the text to be converted.

[0095] In one embodiment, the emotion recognition module 20 includes:

[0096] An audio feature extraction unit, used to extract features from the audio data to obtain audio extraction features;

[0097] The intensity recognition unit is used to perform intensity recognition on the audio extraction feature through the emotion scorer to obtain the emotion intensity.

[0098] In one embodiment, the feature extraction module 30 includes:

[0099] A conversion processing unit, used for performing conversion processing on the text to be converted through the input layer of the text encoder to obtain an input vector;

[0100] An attention processing unit, configured to perform attention processing on the input vector through an attention layer of the text encoder to obtain an attention result;

[0101] A text extraction feature unit, used for performing feature extraction on the attention result through the prediction network of the text encoder to obtain text extraction features;

[0102] The feature fusion unit is used to encode the emotion intensity through the encoding module of the text encoder to obtain an intensity feature, and fuse the intensity feature with the text extraction feature to obtain a text feature.

[0103] In one embodiment, the time prediction module 40 includes:

[0104] A variable conversion unit, used for performing variable conversion on the text feature through variational dequantization in the random time predictor to obtain a positive real number sequence;

[0105] A data enhancement unit, used for performing data enhancement on the text feature through variational data enhancement in the random time predictor to obtain a high-dimensional feature;

[0106] The sampling and rounding unit is used to sample and round the positive real number sequence and the high-dimensional feature to obtain a phoneme duration distribution.

[0107] In one embodiment, the feature alignment module 50 includes:

[0108] A probability processing unit, configured to perform probability processing on the audio distribution corresponding to the phoneme duration distribution and the text features through a dynamic programming algorithm to obtain an optimal alignment matrix;

[0109] A feature alignment unit is used to perform feature alignment on the phoneme duration distribution and the text feature through the optimal alignment matrix to obtain an alignment feature.

[0110] In one embodiment, the speech synthesis module 60 includes:

[0111] A conversion processing unit, used for performing conversion processing on the alignment features through a flow model in the synthesis decoder to obtain conversion features;

[0112] An upsampling processing unit, configured to perform upsampling processing on the conversion feature through transposed convolution in the synthetic decoder to obtain an upsampled feature;

[0113] The synthetic speech unit is used to perform speech synthesis on the up-sampled features through the multi-receptive field fusion module in the synthetic decoder to obtain target speech data.

[0114] For the specific definition of the end-to-end speech synthesis device, please refer to the definition of the end-to-end speech synthesis method above, which will not be repeated here. Each module in the above-mentioned end-to-end speech synthesis device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0115] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data used in the end-to-end speech synthesis method in the above embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an end-to-end speech synthesis method is implemented.

[0116] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned end-to-end speech synthesis method when executing the computer program.

[0117] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the end-to-end speech synthesis method is implemented.

[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0119] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0120] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. An end-to-end speech synthesis method, characterized in that: include: Acquire a text to be converted and audio data corresponding to the text to be converted, and input the text to be converted and the audio data into a speech synthesis model; the speech synthesis model includes a sentiment scorer, a text encoder, a random time predictor, a monotone alignment search and a synthesis decoder; Performing emotion recognition on the audio data by using an emotion scorer to obtain the emotion intensity corresponding to the text to be converted; Extracting features of the text to be converted and the sentiment intensity through a text encoder to obtain text features; Performing duration prediction on the text feature by a random time predictor to obtain a phoneme duration distribution; Performing feature alignment on the phoneme duration distribution and the text feature through monotone alignment search to obtain an alignment feature; The alignment features are subjected to speech synthesis by a synthesis decoder to obtain target speech data corresponding to the text to be converted.

2. The end-to-end speech synthesis method according to claim 1, characterized in that: The step of performing emotion recognition on the audio data by using an emotion scorer to obtain the emotion intensity corresponding to the text to be converted includes: Performing feature extraction on the audio data to obtain audio extraction features; The emotion scorer performs intensity identification on the audio extraction features to obtain the emotion intensity.

3. The end-to-end speech synthesis method according to claim 1, characterized in that: The step of extracting features of the text to be converted and the sentiment intensity by a text encoder to obtain text features includes: The text to be converted is converted through the input layer of the text encoder to obtain an input vector; Performing attention processing on the input vector through the attention layer of the text encoder to obtain an attention result; Performing feature extraction on the attention result through the prediction network of the text encoder to obtain text extraction features; The emotion intensity is encoded by the encoding module of the text encoder to obtain an intensity feature, and the intensity feature is fused with the text extraction feature to obtain a text feature.

4. The end-to-end speech synthesis method according to claim 1, characterized in that: The step of performing duration prediction on the text feature by a random time predictor to obtain a phoneme duration distribution includes: Performing variable conversion on the text features by variational dequantization in the random time predictor to obtain a positive real number sequence; Performing data enhancement on the text features through variational data enhancement in the random time predictor to obtain high-dimensional features; The positive real number sequence and the high-dimensional feature are sampled and rounded to obtain a phoneme duration distribution.

5. The end-to-end speech synthesis method according to claim 1, characterized in that: The step of performing feature alignment on the phoneme duration distribution and the text feature through monotone alignment search to obtain an alignment feature includes: Probabilistically processing the audio distribution corresponding to the phoneme duration distribution and the text features through a dynamic programming algorithm to obtain an optimal alignment matrix; The phoneme duration distribution and the text feature are aligned using the optimal alignment matrix to obtain an alignment feature.

6. The end-to-end speech synthesis method according to claim 1, characterized in that: The step of performing speech synthesis on the aligned features by using a synthesis decoder to obtain target speech data corresponding to the text to be converted includes: Performing conversion processing on the alignment features through the flow model in the synthetic decoder to obtain conversion features; Upsampling the conversion features by transposed convolution in the synthetic decoder to obtain upsampled features; The up-sampled features are subjected to speech synthesis by a multi-receptive field fusion module in the synthesis decoder to obtain target speech data.

7. An end-to-end speech synthesis device, characterized in that: include: A data input module, used to obtain the text to be converted and the audio data corresponding to the text to be converted, and input the text to be converted and the audio data into a speech synthesis model; the speech synthesis model includes a sentiment scorer, a text encoder, a random time predictor, a monotone alignment search and a synthesis decoder; An emotion recognition module, used to perform emotion recognition on the audio data through an emotion scorer to obtain the emotion intensity corresponding to the text to be converted; A feature extraction module, used for extracting features of the text to be converted and the sentiment intensity through a text encoder to obtain text features; A time prediction module, used for predicting the duration of the text feature by a random time predictor to obtain a phoneme duration distribution; A feature alignment module, used for performing feature alignment on the phoneme duration distribution and the text feature through monotone alignment search to obtain an alignment feature; The speech synthesis module is used to perform speech synthesis on the alignment features through a synthesis decoder to obtain target speech data corresponding to the text to be converted.

8. The end-to-end speech synthesis device according to claim 7, characterized in that: The speech synthesis module comprises: A conversion processing unit, used for performing conversion processing on the alignment features through a flow model in the synthesis decoder to obtain conversion features; An upsampling processing unit, configured to perform upsampling processing on the conversion feature through transposed convolution in the synthetic decoder to obtain an upsampled feature; The synthetic speech unit is used to perform speech synthesis on the up-sampled features through the multi-receptive field fusion module in the synthetic decoder to obtain target speech data.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the end-to-end speech synthesis method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the end-to-end speech synthesis method according to any one of claims 1 to 7 is implemented.