Speech synthesis method and apparatus, and electronic device and storage medium
By predicting and adjusting the prosodic feature distribution information of phonemes in the speech synthesis model, the problem of mechanization of speech data in the existing technology is solved, the expressiveness and quality of speech data are improved, and a more natural speech synthesis effect is achieved.
Patent Information
- Application Number
- PCT/CN2023/130687
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-27
- Filing Date
- 2023-11-09
- Publication Date
- 2024-10-03
AI Technical Summary
In existing speech synthesis technology, when the end-to-end model generates speech data, the generated speech data sounds mechanical due to fixed prosodic expressions, which reduces the expressiveness and quality of the speech data.
By predicting the prosodic feature distribution information of each phoneme in the speech synthesis model, and adjusting the language features based on this, more diverse and stable speech data is generated, and the problem of over-smoothing of prosodic prediction is avoided.
It improves the expressiveness and quality of speech data, enables the same phoneme to have contextually appropriate prosodic expressions in different contexts, alleviates the problem of over-smoothing of prosody, and enhances the prosodic modeling ability of the speech synthesis model.
Smart Images

Figure CN2023130687_03102024_PF_FP_ABST
Abstract
Description
Speech synthesis method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese invention patent application number 202310309011.7, entitled “Speech synthesis method, device, electronic device and storage medium” and filed on March 27, 2023, and the entire application is incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of speech processing technology, and in particular to a speech synthesis method, device, electronic device, and storage medium. Background Art
[0004] With the development of deep learning, neural network models can generate high-quality speech data from text. Traditional neural network models consist of two sub-models: the first sub-model generates an intermediate speech representation, such as a mel-spectrogram, from the input text. The second sub-model uses a vocoder to synthesize speech data using the generated intermediate speech representation. Because two-stage neural network models require separate training of the two sub-models, existing technologies have proposed end-to-end speech synthesis models that can directly generate corresponding speech data from input text.
[0005] However, in the prior art, a fixed prosodic expression is generated for each phoneme, which causes the generated voice data to sound more mechanical, reduces the expressiveness of the generated voice data, and results in lower quality of the generated voice data.
[0006] Summary of the Invention
[0007] The embodiments of the present disclosure provide a speech synthesis method, apparatus, electronic device, and storage medium, which can improve the expressiveness of synthesized speech data and improve the quality of synthesized speech data.
[0008] In a first aspect, an embodiment of the present disclosure provides a speech synthesis method, comprising:
[0009] Obtaining a text to be processed, and inputting the text to be processed into a speech synthesis model;
[0010] Predicting, by the speech synthesis model, distribution information of the prosodic features of each phoneme in the text to be processed according to the language features of the text to be processed;
[0011] Adjusting the language features of the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed;
[0012] According to the adjusted language features of the text to be processed, speech data corresponding to the text to be processed is generated.
[0013] In a second aspect, an embodiment of the present disclosure provides a speech synthesis device, including:
[0014] A text acquisition unit, configured to acquire a text to be processed and input the text to be processed into a speech synthesis model;
[0015] a distribution prediction unit, configured to predict, by using the speech synthesis model and according to the language features of the text to be processed, distribution information of the prosodic features of each phoneme in the text to be processed;
[0016] a feature adjustment unit, configured to adjust the language feature of the text to be processed based on the distribution information of the prosodic feature of each phoneme in the text to be processed;
[0017] The data generating unit is configured to generate speech data corresponding to the text to be processed according to the adjusted language features of the text to be processed.
[0018] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.
[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0020] In one or more embodiments of the present disclosure, a text to be processed is obtained and input into a speech synthesis model. The speech synthesis model predicts the distribution information of the prosodic features of each phoneme in the text to be processed based on the language features of the text to be processed. Based on the distribution information of the prosodic features of each phoneme in the text to be processed, the language features of the text to be processed are adjusted. Based on the adjusted language features of the text to be processed, speech data corresponding to the text to be processed is generated. The speech synthesis model in this embodiment can predict the distribution information of the prosodic features of each phoneme in the text to be processed, thereby improving the prosodic modeling capability of the speech synthesis model based on the prosodic features of the text, enabling the speech synthesis model to obtain more diverse prosodic changes, so that the prosody of the same phoneme in different contexts is different and conforms to the context of the context, thereby improving the diversity and stability of the prosody, thereby improving the expressiveness of the synthesized speech data and improving the quality of the synthesized speech data. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate one or more embodiments of the present disclosure or technical solutions in the prior art, the following briefly introduces the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only some embodiments described in the present disclosure. Those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0022] FIG1 is a flow chart of a speech synthesis method according to an embodiment of the present disclosure;
[0023] FIG2a is a schematic diagram of the structure of a speech synthesis model provided by an embodiment of the present disclosure;
[0024] FIG2b is a schematic diagram of the speech synthesis principle of the speech synthesis model corresponding to FIG2a;
[0025] FIG3 is a flow chart of a speech synthesis method according to another embodiment of the present disclosure;
[0026] FIG4a is a schematic diagram of the structure of a speech synthesis network provided by an embodiment of the present disclosure;
[0027] FIG4b is a schematic diagram of the training principle of the speech synthesis network corresponding to FIG4a;
[0028] FIG5 is a schematic diagram of a training process of a speech synthesis model provided by an embodiment of the present disclosure;
[0029] FIG6 is a schematic diagram showing the principles of a posterior encoder and an acoustic encoder provided in one embodiment of the present disclosure;
[0030] FIG7 is a schematic diagram of a training process of a speech synthesis model provided by another embodiment of the present disclosure;
[0031] FIG8 is a schematic diagram of the structure of a speech synthesis device provided by an embodiment of the present disclosure;
[0032] FIG9 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in one or more embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on one or more embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0034] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0035] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0036] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0037] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0038] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0039] The embodiments of the present disclosure provide a speech synthesis method that can improve the expressiveness of synthesized speech data and improve the quality of synthesized speech data. The speech synthesis method can be applied to a terminal device and executed by the terminal device, and the terminal device generates corresponding speech data based on the text information input by the user. The terminal device includes but is not limited to a mobile phone, a tablet computer, a car computer, a wearable device, etc. The speech synthesis method provided by the embodiments of the present disclosure can be applied to a variety of scenarios, such as smart home, intelligent voice interaction scenarios of intelligent customer service, literary audio reading scenarios, game task broadcasting scenarios, intelligent voice navigation scenarios, etc., and the embodiments of the present disclosure are not limited to this. For example, in the scenario of literary audio reading, for example, for an article on a web page, by responding to the user's trigger operation for audio reading, the text on the web page can be obtained, and then the text on the web page can be processed using the speech synthesis method provided by the embodiments of the present disclosure to obtain the speech data corresponding to the text, thereby enabling the audio reading of the article on the web page.
[0040] FIG1 is a flow chart of a speech synthesis method according to an embodiment of the present disclosure. As shown in FIG1 , the flow chart includes:
[0041] Step S102: obtaining a text to be processed and inputting the text to be processed into a speech synthesis model;
[0042] Step S104, using a speech synthesis model, based on the language features of the text to be processed, predicting the distribution information of the prosodic features of each phoneme in the text to be processed;
[0043] Step S106, adjusting the language features of the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed;
[0044] Step S108 : generating speech data corresponding to the text to be processed according to the adjusted language features of the text to be processed.
[0045] In this embodiment, a text to be processed is obtained and input into a speech synthesis model. The speech synthesis model predicts, based on the language features of the text to be processed, the distribution information of the prosodic features of each phoneme in the text to be processed. Based on the distribution information of the prosodic features of each phoneme in the text to be processed, the language features of the text to be processed are adjusted. Then, based on the adjusted language features of the text to be processed, speech data corresponding to the text to be processed is generated. The speech synthesis model in this embodiment is capable of predicting the distribution information of the prosodic features of each phoneme in the text to be processed, thereby improving the prosodic modeling capability of the speech synthesis model based on the prosodic features of the text, enabling the speech synthesis model to obtain more diverse prosodic variations, such that the prosody of the same phoneme in different contexts is different and consistent with the context, thereby improving the diversity and stability of the prosody, thereby improving the expressiveness and quality of the synthesized speech data.
[0046] In a specific embodiment, the distribution information of the prosodic features of each phoneme in the text to be processed obtained by the above prediction is no longer assumed to conform to the standard normal distribution, that is, the variance of the predicted distribution information is not necessarily equal to the variance of the standard normal distribution, and / or, the mean of the predicted distribution information is not necessarily equal to the mean of the standard normal distribution. By predicting the distribution information of the prosodic features that does not necessarily conform to the standard normal distribution, compared with the prior art that assumes the prosodic distribution to be a standard normal distribution, not only the over-smoothing problem during prosodic prediction is alleviated, but also the prosodic modeling capability is increased, and more diverse prosodic changes can be obtained, so that the rhythm of the same phoneme in different contexts is different and conforms to the context of the context, thereby improving the diversity and stability of the prosody, thereby improving the expressiveness of the synthesized speech data and improving the quality of the synthesized speech data.
[0047] To facilitate understanding of the speech synthesis method in this embodiment, some basic concepts are first introduced here.
[0048] Text: Refers to the written language in the form of characters. For example, a passage of novel text on the Internet is a piece of text. The simplest text can be exemplified as "Hello".
[0049] Phoneme: The smallest speech unit divided according to the natural attributes of speech. Analyzing based on the pronunciation actions in a syllable, one pronunciation action constitutes one phoneme. For example, the phonemes corresponding to the text "Hello" are: n, i, h, ao. Among them, since ao corresponds to one pronunciation action, it appears as one phoneme.
[0050] Prosody: Includes but is not limited to information such as the pronunciation duration of each phoneme, the pause duration between each phoneme, and the pitch of each phoneme. A complete speech data includes three elements: text, timbre, and prosody. All the information in the speech data heard by the human ear except for the text and timbre elements can be classified as prosody elements.
[0051] In the above step S102, the text to be processed is obtained. The text to be processed is the text for which corresponding speech data needs to be generated. For example, the text to be processed is a piece of video narration edited by the user. The text to be processed is input into a pre-trained speech synthesis model. In this embodiment, there is a pre-trained speech synthesis model, which can process the input text and output the corresponding speech data. After the speech data is played, it can achieve the effect of broadcasting the input text.
[0052] Fig. 2a is a schematic structural diagram of a speech synthesis model provided by an embodiment of the present disclosure. As shown in Fig. 2a, the model includes: a text encoder, a prosody predictor, a duration predictor, an acoustic encoder, and a waveform decoder. The text encoder is respectively connected to the prosody predictor and the duration predictor. The duration predictor is connected to the acoustic encoder, and the acoustic encoder is connected to the waveform decoder.
[0053] Fig. 2b is a schematic diagram of the speech synthesis principle of the speech synthesis model corresponding to Fig. 2a. As shown in Fig. 2b, the speech synthesis principle of the speech synthesis model is as follows:
[0054] 1. Input the text into the speech synthesis model. The text encoder extracts the language feature c` of the input text and outputs it to the prosody predictor and the duration predictor;
[0055] 2. The prosody prediction unit in the prosody predictor can predict the distribution information μ of the prosody features of each phoneme in the text according to the language feature c` of the text. pp μ represents the mean vector in the distribution information, and σ ppRepresents the variance vector in the distribution information. The reparameterization unit in the prosody predictor reparameterizes the distribution information to obtain the phoneme-level prosody latent variable z corresponding to the text, and outputs the phoneme-level prosody latent variable z corresponding to the text to the duration predictor;
[0056] 3. The duration prediction unit in the duration predictor predicts the pronunciation duration d of each phoneme in the text based on the corresponding phoneme-level prosodic latent variable z and the language feature c' of the text. The amplification unit in the duration predictor amplifies the length of the language feature c' of the text based on the pronunciation duration d of each phoneme in the text to obtain the adjusted language feature c of the text, and outputs the adjusted language feature c of the text to the acoustic encoder.
[0057] 4. The acoustic encoder acoustically encodes the adjusted language feature c of the text to obtain the intermediate representation corresponding to the text and intermediate representation Output to waveform decoder;
[0058] 5. Waveform decoder for intermediate representation Decode the text to get the voice data corresponding to the text.
[0059] When the speech synthesis model is applied to this embodiment, the text input to the speech synthesis model is the text to be processed in step S102.
[0060] In step S104, the speech synthesis model predicts the distribution information of the prosodic features of each phoneme in the text to be processed based on the language features of the text to be processed. In one embodiment, the distribution information does not necessarily conform to the standard normal distribution.
[0061] Specifically, the speech synthesis model of this embodiment can predict the distribution information of the prosodic features of each phoneme in the text to be processed. Taking the text to be processed as a sentence and including 10 phonemes as an example, each phoneme has its own prosodic feature, and therefore has 10 prosodic features. Each prosodic feature can be represented in the form of a vector, so there are 10 prosodic feature vectors. Through statistical distribution, each prosodic feature vector can be converted into a mean vector and a variance vector. The mean vector and the variance vector constitute the distribution information of each prosodic feature. Therefore, the distribution information of the prosodic features of each phoneme in the text to be processed predicted by the speech synthesis model includes the mean vector and variance vector of the prosodic features of each phoneme in the text to be processed.
[0062] For example, for the text "你好", the distribution information of the prosodic features of each phoneme can be exemplified as: (mean n1, variance n2), (mean i1, variance i2), (mean h1, variance h2), (mean ao1, variance ao2), which respectively represent the mean vector and variance vector of the prosodic features of the phonemes n, i, h, and ao.
[0063] Traditional speech synthesis models assume that the distribution information of the prosodic features of each phoneme in the text conforms to the standard normal distribution, that is, the mean vector and variance vector of the prosodic features of each phoneme are the mean vector and variance vector of the standard normal distribution. However, this assumption has the problem of over-smoothing in prosody prediction. In the embodiments of the present disclosure, the distribution information of the prosodic features of each phoneme in the text is no longer assumed to necessarily conform to the standard normal distribution, and can be abstracted as a non-standard normal distribution, that is, the variance of the predicted distribution information is not necessarily equal to the variance of the standard normal distribution, and / or, the mean of the predicted distribution information is not necessarily equal to the mean of the standard normal distribution. By predicting the distribution information of the prosodic features that do not necessarily conform to the standard normal distribution, the prosodic variations can be included in the mean and variance of the predicted distribution information, so that the corresponding prosody can be determined by predicting the mean and variance, avoiding the over-smoothing of prosody prediction. Compared with the standard normal distribution, the predicted distribution information is more complex, and the prosody modeling ability is also increased to obtain diverse prosodic variations.
[0064] In one embodiment, as shown in FIGS. 2a and 2b, the speech synthesis model includes a text encoder and a prosody predictor. Correspondingly, through the speech synthesis model, according to the language features of the text to be processed, the distribution information of the prosodic features of each phoneme in the text to be processed is predicted, including:
[0065] Through the text encoder, the language features of the text to be processed are extracted;
[0066] Through the prosody predictor, according to the language features of the text to be processed, the distribution information of the prosodic features of each phoneme in the text to be processed is predicted.
[0067] Specifically, after the text to be processed is input into the speech synthesis model, the text encoder in the speech synthesis model can extract the language features of the text to be processed and input the language features of the text to be processed into the prosody predictor. The prosody predictor can predict the distribution information of the prosodic features of each phoneme in the text to be processed according to the language features of the text to be processed.
[0068] Among them, the language features of the text to be processed are used to represent linguistic information and are the intermediate states output by the neural network. The language features include high-dimensional feature vectors of each phoneme in the text to be processed, and the high-dimensional feature vector represents the features of each phoneme. For example, for the text "你好", its language features can be exemplified as: (the high-dimensional vector representation of n), (the high-dimensional vector representation of i), (the high-dimensional vector representation of h), (the high-dimensional vector representation of ao).
[0069] It can be seen that through this embodiment, the distribution information of the prosodic features of each phoneme in the text to be processed can be predicted simply, efficiently and accurately through the interconnected text encoder and prosody predictor, and the distribution information does not necessarily conform to the standard normal distribution, avoiding the over-smoothing of prosody prediction. Compared with the standard normal distribution, the predicted distribution information is more complex, and the prosody modeling ability is also increased to obtain diverse prosody variations.
[0070] In the above step S106, based on the distribution information of the prosodic features of each phoneme in the text to be processed, the language features of the text to be processed are adjusted. In one embodiment, based on the distribution information of the prosodic features of each phoneme in the text to be processed, adjusting the language features of the text to be processed includes: [[ID=Y]]
[0071] Predicting the pronunciation duration of each phoneme in the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed and the language features of the text to be processed;
[0072] Amplifying the length of the language features of the text to be processed according to the pronunciation duration of each phoneme in the text to be processed to obtain the adjusted language features of the text to be processed.
[0073] First, when the text to be processed is played in voice form, each phoneme in the text to be processed has a certain pronunciation duration. For example, the pronunciation duration of "n" in "你好" may be 1 millisecond. Therefore, here, the pronunciation duration of each phoneme in the text to be processed is predicted first based on the distribution information of the prosodic features of each phoneme in the text to be processed and the language features of the text to be processed. The pronunciation duration is a kind of prosodic feature. [[ID=1Y]]
[0074] Since the prosodic information also determines the pronunciation duration of phonemes, in addition to the language features, the distribution information of the prosodic features of each phoneme in the text to be processed is also used as a condition for predicting the pronunciation duration of phonemes, so as to generate a more stable and natural pronunciation duration of phonemes.
[0075] Then, according to the pronunciation duration of each phoneme in the text to be processed, the length of the language features of the text to be processed is amplified to obtain the adjusted language features of the text to be processed. For example, the language features of the text to be processed are: (high-dimensional vector representation of n), (high-dimensional vector representation of i), (high-dimensional vector representation of h), (high-dimensional vector representation of ao), where phoneme n is pronounced for 1 millisecond, phoneme i is pronounced for 2 milliseconds, phoneme h is pronounced for 3 milliseconds, and phoneme ao is pronounced for 4 milliseconds. Based on the pronunciation duration, the high-dimensional vector of each phoneme is amplified in length to obtain the adjusted language features: (high-dimensional vector representation of n), (high-dimensional vector representation of i), (high-dimensional vector representation of i), (high-dimensional vector representation of h), (high-dimensional vector representation of h), (high-dimensional vector representation of ao), (high-dimensional vector representation of ao), (high-dimensional vector representation of ao), (high-dimensional vector representation of ao). In simple terms, amplifying the length of the language features of the text to be processed can be understood as copying multiple copies of the language features corresponding to the phonemes according to the pronunciation duration of each phoneme in the text to be processed.
[0076] It can be seen that through this embodiment, in addition to the language features of the text to be processed, the pronunciation duration of each phoneme in the text to be processed is predicted based on the distribution information of the rhythmic features of each phoneme in the text to be processed, and a more stable and natural pronunciation duration of the phoneme can be generated; then, according to the pronunciation duration of each phoneme in the text to be processed, the length of the language features of the text to be processed is amplified to obtain the adjusted language features of the text to be processed, thereby achieving the effect of optimizing the language features of the text to be processed, so that high-quality speech data can be obtained based on the adjusted language features.
[0077] As shown in Figures 2a and 2b, the speech synthesis model includes a duration predictor. Based on this, the pronunciation duration of each phoneme in the text to be processed is predicted based on the distribution information of the prosodic features of each phoneme in the text to be processed and the language features of the text to be processed, including:
[0078] Reparameterize the distribution information of the prosodic features of each phoneme in the text to be processed to obtain the prosodic latent variables at the phoneme level corresponding to the text to be processed;
[0079] The duration predictor is used to predict the pronunciation duration of each phoneme in the text to be processed based on the prosodic latent variables at the phoneme level corresponding to the text to be processed and the language features of the text to be processed.
[0080] Specifically, the prosody predictor can be used to reparameterize the distribution information of the prosody features of each phoneme in the text to be processed, thereby obtaining a phoneme-level prosody latent variable corresponding to the text to be processed. The prosody predictor can implement the reparameterization process by any means. Reparameterization is an algorithm that samples from the distribution information to obtain latent variables. It can be simply understood as the process of combining the distribution information of the prosody features of each phoneme in the text to be processed (i.e., the mean vector and the variance direction) into a vector, thereby obtaining a prosody latent variable for each phoneme in the text to be processed. This vector is the prosody latent variable. In this embodiment, when performing the reparameterization operation, the input parameter is the distribution information of the prosody features of each phoneme in the text to be processed, and the output is the prosody latent variable for each phoneme in the text to be processed. Since what is obtained is the prosodic latent variable of each phoneme in the text to be processed, for example, for the text "hello", we get (the prosodic latent variable of n, the prosodic latent variable of i, the prosodic latent variable of h, the prosodic latent variable of ao), the prosodic latent variable of each phoneme in the text to be processed can also be called the prosodic latent variable at the phoneme level corresponding to the text to be processed.
[0081] Next, the phoneme-level prosodic latent variables corresponding to the text to be processed and the language features of the text to be processed are input into the duration predictor, which predicts and outputs the pronunciation duration of each phoneme in the text to be processed.
[0082] Since the prosodic information also determines the duration of the pronunciation of a phoneme, in addition to the language features of the text to be processed output by the text encoder, the prosodic latent variables at the phoneme level corresponding to the text to be processed are also used as the condition of the duration predictor, that is, in represents the duration predictor, c′ is the language feature of the text to be processed output by the text encoder, and z represents the prosodic latent variable at the phoneme level corresponding to the text to be processed, so as to generate a more stable and natural phoneme pronunciation duration.
[0083] In one embodiment, the above-mentioned process of amplifying the length of the language features of the text to be processed according to the pronunciation duration of each phoneme in the text to be processed to obtain the adjusted language features of the text to be processed can be implemented in the duration predictor in the speech synthesis model.
[0084] It can be seen that through this embodiment, when predicting the pronunciation duration of each phoneme in the text to be processed, in addition to the language features of the text to be processed output by the text encoder, the prosodic latent variables at the phoneme level corresponding to the text to be processed are also used as the conditions of the duration predictor, thereby generating a more stable and natural phoneme pronunciation duration.
[0085] In step S108, speech data corresponding to the text to be processed is generated based on the adjusted language features of the text to be processed. As shown in Figures 2a and 2b, the speech synthesis model includes an acoustic encoder and a waveform decoder. Based on this, the speech data corresponding to the text to be processed is generated based on the adjusted language features of the text to be processed, including:
[0086] The adjusted language features of the text to be processed are acoustically encoded by an acoustic encoder to obtain an intermediate representation corresponding to the text to be processed;
[0087] The intermediate representation is decoded through the waveform decoder to obtain the speech data corresponding to the text to be processed.
[0088] Specifically, the adjusted language features of the text to be processed are input into an acoustic encoder, which includes a dilated convolutional neural network (CNN). The adjusted language features are acoustically encoded through the dilated convolutional neural network to obtain an intermediate representation corresponding to the text to be processed.
[0089] Next, the intermediate representation is input into the waveform decoder, which decodes the intermediate representation. The waveform obtained after decoding is then encoded by the vocoder to obtain the speech data corresponding to the text to be processed.
[0090] It can be seen that through this embodiment, the adjusted language features of the text to be processed can be acoustically encoded by the acoustic encoder to obtain the intermediate representation corresponding to the text to be processed, and then the intermediate representation can be decoded by the waveform decoder to obtain the speech data corresponding to the text to be processed, thereby efficiently and quickly obtaining high-quality and highly expressive speech data based on the adjusted language features.
[0091] FIG3 is a flow chart of a speech synthesis method according to another embodiment of the present disclosure. As shown in FIG3 , the flow chart includes:
[0092] Step S302: obtaining a text to be processed and inputting the text to be processed into a pre-trained speech synthesis model;
[0093] Step S304: extracting language features of the text to be processed through the text encoder in the speech synthesis model;
[0094] Step S306: using the prosody predictor in the speech synthesis model, the distribution information of the prosody features of each phoneme in the text to be processed is predicted based on the language features of the text to be processed; the distribution information is no longer assumed to conform to the standard normal distribution;
[0095] Step S308: re-parameterize the distribution information of the prosodic features of each phoneme in the text to be processed by the prosodic predictor in the speech synthesis model to obtain a phoneme-level prosodic latent variable corresponding to the text to be processed;
[0096] Step S310, using a duration predictor in the speech synthesis model, predicting the pronunciation duration of each phoneme in the text to be processed based on the prosodic latent variables at the phoneme level corresponding to the text to be processed and the language features of the text to be processed;
[0097] Step S312: using a duration predictor in the speech synthesis model, the language features of the text to be processed are length-amplified according to the pronunciation duration of each phoneme in the text to be processed, thereby obtaining adjusted language features of the text to be processed.
[0098] Step S314: acoustically encode the adjusted language features of the text to be processed by an acoustic encoder in the speech synthesis model to obtain an intermediate representation corresponding to the text to be processed;
[0099] Step S316: decode the intermediate representation through the waveform decoder in the speech synthesis model to obtain speech data corresponding to the text to be processed.
[0100] The specific process of FIG3 can be referred to the previous description, which will not be repeated here. The training process of the speech synthesis model is described in detail below.
[0101] The speech synthesis model in this embodiment is obtained by training the speech synthesis network. Figure 4a is a schematic diagram of the structure of the speech synthesis network provided by one embodiment of the present disclosure. As shown in Figure 4a, the network includes: a text encoder, a prosody predictor, a duration predictor, a posterior encoder, an acoustic encoder, a posterior waveform encoder, a waveform decoder, and a stream processing module. The text encoder is respectively connected to the prosody predictor and the duration predictor, the duration predictor is respectively connected to the acoustic encoder and the posterior encoder, the posterior encoder is also connected to the acoustic encoder, the waveform decoder is respectively connected to the acoustic encoder and the posterior waveform encoder, and the stream processing module is connected to the posterior encoder.
[0102] FIG4 b is a schematic diagram of the training principle of the speech synthesis network corresponding to FIG4 a . As shown in FIG4 b , the training principle of the speech synthesis network is:
[0103] 1. The sample text and the linear spectrogram of the sample speech data corresponding to the sample text are input into the speech synthesis network. The text encoder extracts the language features c' of the sample text and passes them to the prosody predictor and duration predictor respectively.
[0104] 2. The prosody prediction unit in the prosody predictor predicts the distribution information of the prosody features of each phoneme in the sample text based on the language features c' of the sample text output by the text encoder. pp Represents the mean vector in the distribution information, σ pp Represents the variance vector in the distribution information.
[0105] 3. The amplification unit in the duration predictor amplifies the language features of the sample text according to the language features c` of the sample text output by the text encoder and the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text (that is, the actual pronunciation duration), adjusts the language features of the sample text, obtains the adjusted language features c, and outputs the adjusted language features c to the acoustic encoder and the posterior encoder.
[0106] 4. The linear spectrogram x is input into the posterior encoder. The posterior encoding unit in the posterior encoder generates an approximate posterior distribution of the prosodic features of each phoneme in the sample text based on the linear spectrogram x and the adjusted language features c. represents the mean vector in the approximate posterior distribution, Represents the variance vector in the approximate posterior distribution. The reparameterization unit in the posterior encoder reparameterizes the approximate posterior distribution to obtain the phoneme-level prosodic latent variable z' of the sample text, and outputs the prosodic latent variable z' to the duration predictor and acoustic encoder respectively.
[0107] 5. The duration prediction unit in the duration predictor predicts the pronunciation duration d of each phoneme in the sample text based on the language feature c` and the prosodic latent variable z` output by the text encoder. The predicted pronunciation duration d can be combined with the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text (that is, the actual pronunciation duration) to train the duration prediction unit of the duration predictor.
[0108] 6. The acoustic encoder generates the first intermediate representation of the sample text based on the prosodic latent variable z' and the adjusted language feature c
[0109] 7. The posterior waveform encoder generates a second intermediate representation ir of the sample text based on the linear spectrogram.
[0110] 8. First Intermediate Representation The and the second intermediate representation ir are respectively input into the waveform decoder and decoded to obtain the first waveform and the second waveform.
[0111] 9. The prosodic latent variable z' is also input into the stream processing module, which performs normalized stream processing on the prosodic latent variable z' to obtain the prior distribution of the prosodic features of each phoneme in the sample text.
[0112] 10. The parameters of the speech synthesis network can be reversely adjusted based on the first waveform, the second waveform, the approximate posterior distribution, the prior distribution, and the distribution information of the prosodic features of each phoneme in the sample text output by the prosody predictor. Specifically, based on the approximate posterior distribution, the prior distribution, and the likelihood function of the linear spectrogram, the marginal log-likelihood lower bound of the fitted distribution of the linear spectrogram is determined, the similarity between the first and second waveforms is determined, and the divergence between the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text output by the prosody predictor is determined. The parameters of the speech synthesis network are then adjusted through feedback with the goals of maximizing the similarity, minimizing the divergence, and maximizing the marginal log-likelihood lower bound.
[0113] 11. After the parameters of the speech synthesis network are adjusted, the posterior encoder, posterior waveform encoder and stream processing module in the speech synthesis network are removed, and a reparameterization unit is added to the prosody predictor to obtain the speech synthesis model.
[0114] As can be seen from Figures 4a and 4b, the acoustic encoder, the posterior waveform encoder, and the waveform decoder form a dual parallel autoencoder (DPA). In DPA, two parallel encoders, the acoustic encoder and the posterior waveform encoder, generate intermediate representations, which are optimized using a dual training method. The acoustic encoder generates the predicted intermediate representation. The posterior waveform encoder converts the linear spectrogram into an intermediate representation ir. During training, the waveform decoder acts as the decoder of the DPA and extracts And ir generate waveforms. In addition, for dual training, ir and The mean absolute error (MAE) between the two is close to each other, so Regularized by ir.
[0115] By setting up DPA, the search space for waveform modeling can be narrowed, solving the problem of poor modeling capability of high-frequency information.
[0116] In one example, the same adversarial training method as HiFi-GAN is used to improve the resolution of synthesized speech. Two discriminators are used for joint adversarial training, namely MPD and MBD in HiFi-GAN. MBD uses a pseudo-orthogonal mirror filter bank (Pseudo-QMF) to divide the waveform into N subbands. These N subbands with one full band are sent to the N+1 scale discriminators in MelGAN respectively. By applying different discriminators to different frequency bands of the synthesized audio, MBD can significantly improve the generation quality of the high-frequency part, enabling the speech synthesis model to generate high-fidelity audio at a high sampling rate.
[0117] Based on the above principles, FIG5 is a schematic diagram of the training process of the speech synthesis model provided by an embodiment of the present disclosure. As shown in FIG5 , in one embodiment, the speech synthesis model is trained by the following steps:
[0118] Step S502: Obtain sample data and input the sample data into a speech synthesis network; the sample data includes a sample text and a linear spectrogram of the sample speech data corresponding to the sample text;
[0119] Step S504: Generate an approximate posterior distribution of the prosodic features of each phoneme in the sample text based on the sample data through the speech synthesis network; the approximate posterior distribution does not necessarily conform to the standard normal distribution;
[0120] Step S506: Based on the approximate posterior distribution, feedback is used to adjust the parameters of the speech synthesis network to generate a speech synthesis model.
[0121] Specifically, the model first acquires sample data for training. The sample data includes sample text and a linear spectrogram of the sample speech data corresponding to the sample text. The sample speech data corresponding to the sample text can be considered the standard speech data of the sample text. By performing a short-time Fourier transform (STFT) on the sample speech data, a linear spectrogram of the sample speech data can be obtained. The sample text and the linear spectrogram of the sample speech data corresponding to the sample text are input into a pre-built speech synthesis network.
[0122] Based on the sample data, the speech synthesis network generates an approximate posterior distribution of the prosodic features of each phoneme in the sample text. As explained in the previous principle, this approximate posterior distribution is output by the posterior encoder. Since the entire speech generation network is equivalent to a conditional variational autoencoder, the distribution information (i.e., the mean vector and variance vector) of the prosodic features of each phoneme in the sample text output by the posterior encoder is called the approximate posterior distribution. This approximate posterior distribution does not necessarily conform to a standard normal distribution.
[0123] Finally, based on the approximate posterior distribution, feedback is applied to adjust the parameters of the speech synthesis network. After the parameters of the speech synthesis network are adjusted, the posterior encoder, posterior waveform encoder, and stream processing module in the speech synthesis network are removed, and a reparameterization unit is added to the prosody predictor to obtain the speech synthesis model. The feedback adjustment of the parameters of the speech synthesis network described throughout this embodiment refers to the feedback adjustment of the parameters of each module, encoder, decoder, and internal network and units in the speech synthesis network.
[0124] As can be seen, through this embodiment, when training a speech synthesis network, an approximate posterior distribution of the prosodic features of each phoneme in the sample text can be generated based on sample data. This approximate posterior distribution may or may not conform to a standard normal distribution. Based on this approximate posterior distribution, feedback is used to adjust the parameters of the speech synthesis network to generate a speech synthesis model. Since the approximate posterior distribution is assumed to not conform to a standard normal distribution, compared to the prior art that assumes a standard normal distribution for the prosodic distribution, this not only alleviates the problem of oversmoothing during prosodic prediction but also enhances prosodic modeling capabilities, enabling more diverse prosodic variations and improving both prosodic diversity and stability. This in turn enhances the expressiveness and quality of the synthesized speech data.
[0125] As can be seen from the preceding principles, the speech synthesis network includes a posterior encoder. In one embodiment, the speech synthesis network generates an approximate posterior distribution of the prosodic features of each phoneme in the sample text based on the sample data, including:
[0126] Generate the phoneme-level prosodic features of the sample text based on the linear spectrogram and the language features of the sample text through the posterior encoder;
[0127] The phoneme-level prosodic features of the sample text are linearly transformed through the posterior encoder to obtain the approximate posterior distribution of the prosodic features of each phoneme in the sample text.
[0128] Specifically, the linear spectrogram and the language features of the sample text are input into the posterior encoder. The language features input into the posterior encoder are the adjusted language features obtained by amplifying the language features of the sample text output by the text encoder by the amplification unit in the duration predictor. The posterior encoding unit in the posterior encoder generates phoneme-level prosodic features of the sample text based on the linear spectrogram and the adjusted language features, and performs a linear transformation on the phoneme-level prosodic features of the sample text to obtain an approximate posterior distribution of the prosodic features of each phoneme in the sample text.
[0129] It can be seen that through this embodiment, the posterior encoder can generate the prosodic features of the sample text at the phoneme level based on the linear spectrogram and the language features of the sample text, and then perform a linear transformation on the prosodic features of the sample text at the phoneme level to obtain the approximate posterior distribution of the prosodic features of each phoneme in the sample text, which has the advantage of high accuracy of the obtained approximate posterior distribution.
[0130] In one embodiment, a posterior encoder is used to generate phoneme-level prosodic features of a sample text based on a linear spectrogram and language features of the sample text, including:
[0131] Generate the first prosodic feature of the sample text at the frame level according to the linear spectrogram and the language features of the sample text through the posterior encoder;
[0132] The first prosodic features of the sample text at the frame level are matrix-converted by the posterior encoder to obtain the prosodic features of the sample text at the phoneme level.
[0133] Figure 6 is a schematic diagram of the principles of the a posteriori encoder and acoustic encoder provided by an embodiment of the present disclosure. As shown in Figure 6, the a posteriori encoder includes a posterior encoding unit and a reparameterization unit, wherein the posterior encoding unit includes a dilated convolutional neural network, a feature conversion unit, and a linear network.
[0134] After the adjusted language features and linear spectrogram of the sample text are input into the posterior encoding unit, the dilated convolutional neural network can generate the frame-level prosodic features of the sample text, that is, the first prosodic features at the frame level, based on the adjusted language features and linear spectrogram of the sample text. Then, the first prosodic features at the frame level of the sample text are output to the feature conversion unit, which can perform matrix conversion on the first prosodic features at the frame level of the sample text to obtain the prosodic features at the phoneme level of the sample text. The specific principle of the feature conversion unit can be expressed by the following formula: PF phone =diag(s)*A*PF frame
[0135] Since the prosody at the phoneme level has appropriate granularity and stability, the prosody at the phoneme level is modeled. Since the input linear spectrogram is at the frame level, the prosody features at the frame level are converted to the prosody features at the phoneme level. In the formula, and Respectively represent the prosodic features of the sample text at the phoneme level and the prosodic features of the sample text at the frame level, It represents the hard alignment matrix, which indicates the correspondence between language features and linear spectrograms. It is calculated by the actual pronunciation duration of each phoneme in the sample text. The reciprocal of the actual pronunciation duration of each phoneme in the sample text T p It's PF phone The length of time, T f It's PF frame The length of time, d is PF phone and PF frame The vector dimension of is a real number. ij is the i-th row and j-th column of the hard alignment matrix A.
[0136] The phoneme-level prosodic features of the sample text can be understood as the prosodic features of each phoneme in the sample text. For example, if the sample text is "你好" (Hello in Chinese), its phoneme-level prosodic features can be expressed as: (the feature vector of the prosodic features of n, the feature vector of the prosodic features of i, the feature vector of the prosodic features of h, the feature vector of the prosodic features of ao),
[0137] Next, the feature conversion unit outputs the phoneme-level prosodic features of the sample text to the linear network. The linear network performs a linear transformation on the phoneme-level prosodic features of the sample text to obtain an approximate posterior distribution of the prosodic features of each phoneme in the sample text. The approximate posterior distribution of the prosodic features of each phoneme in the sample text is the distribution information (i.e., the mean vector and the variance vector) of the prosodic features of each phoneme in the sample text. Since the entire speech generation network is equivalent to a conditional variational autoencoder, the distribution information (i.e., the mean vector and the variance vector) of the prosodic features of each phoneme in the sample text output by the posterior encoder is called the approximate posterior distribution. This approximate posterior distribution does not necessarily conform to the standard normal distribution.
[0138] It can be seen that through this embodiment, the posterior encoder can generate the first prosodic features at the frame level of the sample text according to the linear spectrogram and the language features of the sample text. Through the posterior encoder, the first prosodic features at the frame level of the sample text are matrix-transformed to obtain the phoneme-level prosodic features of the sample text, so as to accurately transform the first prosodic features at the frame level of the sample text into the phoneme-level prosodic features of the sample text by means of matrix transformation. The phoneme-level prosody has appropriate granularity and stability, which can improve the quality of the synthesized speech data.
[0139] In one embodiment, based on the approximate posterior distribution, the parameters of the speech synthesis network are feedback-regulated to generate a speech synthesis model, specifically including:
[0140] Perform reparameterization on the approximate posterior distribution to obtain the phoneme-level prosodic latent variables corresponding to the sample text;
[0141] Based on the prosodic latent variables and the approximate posterior distribution, the parameters of the speech synthesis network are feedback-regulated to generate a speech synthesis model.
[0142] First, the approximate posterior distribution is reparameterized to obtain the prosodic latent variable at the phoneme level corresponding to the sample text. Figure 6 is a schematic diagram of the principles of the posterior encoder and the acoustic encoder provided by an embodiment of the present disclosure. As shown in Figure 6, the posterior encoder includes a posterior encoding unit and a reparameterization unit, wherein the posterior encoding unit outputs the approximate posterior distribution to the reparameterization unit, and the reparameterization unit reparameterizes the approximate posterior distribution to obtain the prosodic latent variable at the phoneme level corresponding to the sample text. Reparameterization can be simply understood as the process of synthesizing the distribution information of the prosodic features of each phoneme in the sample text (that is, the approximate posterior distribution, including the mean vector and the variance direction) into a vector, thereby obtaining the prosodic latent variable of each phoneme in the sample text, and this vector is the prosodic latent variable. Since what is obtained is the prosodic latent variable of each phoneme in the sample text, for example, for the text "hello", we get (the prosodic latent variable of n, the prosodic latent variable of i, the prosodic latent variable of h, the prosodic latent variable of ao), the prosodic latent variable of each phoneme in the sample text can also be called the prosodic latent variable at the phoneme level corresponding to the sample text.
[0143] Then, based on the prosodic latent variables and the approximate posterior distribution, the parameters of the speech synthesis network are adjusted through feedback to generate a speech synthesis model.
[0144] It can be seen that through this embodiment, the approximate posterior distribution can be reparameterized to obtain the prosodic latent variables at the phoneme level corresponding to the sample text. Based on the prosodic latent variables and the approximate posterior distribution, the parameters of the speech synthesis network can be accurately feedback-adjusted to generate a speech synthesis model. With the help of the prosodic latent variables, the speech synthesis quality of the speech synthesis model can be improved.
[0145] As we have seen from the previous introduction to the structure and training principles of the speech synthesis network, the speech synthesis network includes a prosody predictor. Accordingly, based on the prosody latent variables and the approximate posterior distribution, the parameters of the speech synthesis network are adjusted through feedback to generate a speech synthesis model, including:
[0146] Determining the distribution information of the prosodic features of each phoneme in the sample text by a prosodic predictor;
[0147] Based on the prosodic latent variables, the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text, the parameters of the speech synthesis network are adjusted through feedback to generate a speech synthesis model.
[0148] Specifically, after obtaining a sample text, the sample text is input into a text encoder to obtain the sample text's linguistic features. Based on the linguistic features of the sample text output by the text encoder, the prosody prediction unit in the prosody predictor predicts the distribution information of the prosodic features of each phoneme in the sample text. Because the prosody predictor has not yet been trained, this distribution information may be arbitrary. A trained prosody predictor can generate distribution information of the prosodic features of each phoneme in the text, which may not necessarily conform to a standard normal distribution.
[0149] Then, based on the prosodic latent variables, the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text, the parameters of the speech synthesis network are adjusted through feedback to generate a speech synthesis model.
[0150] It can be seen that through this embodiment, the parameters of the speech synthesis network can be feedback-adjusted based on the prosodic latent variables, the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text, thereby generating a speech synthesis model. The prosodic latent variables, the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text cooperate with each other to improve the speech synthesis quality of the speech synthesis model and the expressiveness of the speech data.
[0151] As we can see from the previous introduction to the structure and training principles of the speech synthesis network, the speech synthesis network includes a posterior waveform encoder. Accordingly, based on the prosodic latent variables, the approximate posterior distribution, and the distribution information of the prosodic features of each phoneme in the sample text, the parameters of the speech synthesis network are adjusted through feedback to generate a speech synthesis model, including:
[0152] Generate a first intermediate representation corresponding to the sample text and a prior distribution of the prosodic features of each phoneme in the sample text according to the prosodic latent variable;
[0153] Encode the linear spectrogram through the posterior waveform encoder to obtain the second intermediate representation corresponding to the sample text;
[0154] According to the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the prior distribution, the parameters of the speech synthesis network are feedback-adjusted to generate a speech synthesis model.
[0155] Specifically, based on the prosodic latent variables, a first intermediate representation corresponding to the sample text and a prior distribution of the prosodic features of each phoneme in the sample text are generated. The specific generation process will be described later. Then, the linear spectrogram in the sample data is input into a posterior waveform encoder, which encodes the linear spectrogram to obtain a second intermediate representation of the sample text. Finally, based on the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the prior distribution, feedback is used to adjust the parameters of the speech synthesis network to generate a speech synthesis model.
[0156] It can be understood that the speech synthesis network has a better speech synthesis effect when the first intermediate representation and the second intermediate representation are close to each other, and the distribution information of the prosodic features of each phoneme in the approximate posterior distribution and the sample text is also similar.
[0157] It can be seen that through this embodiment, the parameters of the speech synthesis network are feedback-adjusted according to the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the rhythmic features of each phoneme in the sample text, and the prior distribution, and a speech synthesis model is generated. This can achieve the effect of comprehensively training the speech synthesis network by combining multiple factors and improving the speech synthesis quality of the speech synthesis model.
[0158] As we can see from the previous introduction to the structure and training principles of the speech synthesis network, the speech synthesis network includes an acoustic encoder. Accordingly, based on the prosodic latent variables, the first intermediate representation corresponding to the sample text is generated, including:
[0159] The acoustic encoder is used to convert the phoneme-level prosodic latent variables corresponding to the sample text to obtain the second prosodic features of the sample text at the frame level;
[0160] The acoustic encoder acoustically encodes the language features of the sample text according to the second prosodic features of the sample text at the frame level to obtain a first intermediate representation corresponding to the sample text.
[0161] Based on the training principles of the speech synthesis network described above, the amplification unit in the duration predictor amplifies the linguistic features of the sample text output by the text encoder and the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text (i.e., the actual pronunciation duration). This amplifies and adjusts the linguistic features of the sample text, obtaining adjusted linguistic features and outputting them to the acoustic encoder. The acoustic encoder generates a first intermediate representation of the sample text based on the prosodic latent variables and the adjusted linguistic features.
[0162] Figure 6 is a schematic diagram of the principles of the posterior encoder and acoustic encoder provided in one embodiment of the present disclosure. As shown in Figure 6, the acoustic encoder includes a conversion unit and a dilated convolutional neural network. The conversion unit's input is a prosodic latent variable. The conversion unit converts the phoneme-level prosodic latent variable corresponding to the sample text to obtain the frame-level prosodic features of the sample text, which are also called second prosodic features.
[0163] In one embodiment, the conversion unit may convert the phoneme-level prosodic latent variable corresponding to the sample text using the following formula to obtain the frame-level second prosodic feature of the sample text:
[0164] In the formula, z′ is the phoneme-level prosodic latent variable corresponding to the sample text, which represents the phoneme-level prosody of the speech. Represents the second prosodic feature of the sample text at the frame level, A T is the transposed matrix of the above matrix A. By converting the prosodic latent variable at the phoneme level corresponding to the sample text into the second prosodic feature at the frame level, the length of the prosodic feature can be made to match the length of the adjusted language feature.
[0165] The conversion unit outputs the second prosodic features of the sample text at the frame level to a dilated convolutional neural network. The dilated convolutional neural network also receives the adjusted language features of the sample text as input. The dilated convolutional neural network acoustically encodes the adjusted language features of the sample text based on the second prosodic features of the sample text at the frame level, generating a first intermediate representation corresponding to the sample text. This first intermediate representation is then output to a waveform decoder.
[0166] It can be seen that through this embodiment, the prosodic latent variables at the phoneme level corresponding to the sample text can be converted through the acoustic encoder to obtain the second prosodic features at the frame level of the sample text, so that the length of the prosodic features matches the length of the adjusted language features, and based on the second prosodic features at the frame level of the sample text, the language features of the sample text are acoustically encoded to obtain the first intermediate representation corresponding to the sample text, thereby outputting an accurate first intermediate representation.
[0167] As we have seen from the previous introduction to the structure and training principles of the speech synthesis network, the speech synthesis network includes a stream processing module. Accordingly, based on the prosodic latent variables, a prior distribution of the prosodic features of each phoneme in the sample text is generated, including:
[0168] The prosodic latent variables are processed with normalized flow to obtain the prior distribution of the prosodic features of each phoneme in the sample text.
[0169] Specifically, the prosodic latent variables are input into the stream processing module, which performs normalized stream processing on the prosodic latent variables to obtain the prior distribution of the prosodic features of each phoneme in the sample text. In a specific embodiment, since it is assumed that the above-mentioned approximate posterior distribution is not necessarily a standard normal distribution, that is, Among them, z′ represents the prosodic latent variable, x represents any data point in the linear spectrogram, and c represents the language feature after adjustment of the sample text. represents the mean vector in the approximate posterior distribution, represents the variance vector in the approximate posterior distribution, Denotes the approximate posterior distribution. In order to transform the approximate posterior distribution into a standard normal distribution, the unconditional normalization process is applied as follows:
[0170] Among them, f ψ Indicates the parameters of the normalized flow processing module flow. ψ (z′) represents the prior distribution of the prosodic features of each phoneme in the sample text.
[0171] It can be seen that through this embodiment, the prosodic latent variables can be normalized by the stream processing module to obtain the prior distribution of the prosodic features of each phoneme in the sample text, so as to adjust the parameters of the speech synthesis network with the help of prior distribution feedback.
[0172] Furthermore, in one embodiment, feedback adjustment of parameters of a speech synthesis network is performed based on the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the prior distribution to generate a speech synthesis model, including:
[0173] Determine the lower bound of the marginal log-likelihood of the fitted distribution of the linear spectrogram based on the approximate posterior distribution, the prior distribution, and the likelihood function of the linear spectrogram;
[0174] According to the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound, the parameters of the speech synthesis network are adjusted through feedback to generate a speech synthesis model.
[0175] First, based on the approximate posterior distribution, the prior distribution, and the likelihood function of the linear spectrogram, the marginal log-likelihood lower bound of the fitted distribution of the linear spectrogram in the sample data is determined. The formula for the marginal log-likelihood lower bound of the fitted distribution of the linear spectrogram in the sample data is as follows:
[0176] In this formula, D kl (q φ (z′|x,c)||p ψ(z′)) are as follows:
[0177] in, is the approximate posterior distribution of the adjusted language feature c of the given data point x in the linear spectrogram of the sample data and the sample text, p θ (x|z′,c) is the likelihood function of x of the prosodic latent variables z′ and c of each phoneme in the sample text, that is, the likelihood function of the linear spectrogram in the sample data, p ψ (z′) is the prior distribution of z′.
[0178] Then, based on the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound, the parameters of the speech synthesis network are feedback-adjusted to generate a speech synthesis model.
[0179] It can be seen that through this embodiment, the parameters of the speech synthesis network can be adjusted by feedback based on multiple phonemes such as the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, the marginal log-likelihood lower bound, etc., thereby improving the speech synthesis quality of the generated speech synthesis model.
[0180] As previously described, the speech synthesis network includes a waveform decoder. The first intermediate representation and the second intermediate representation are respectively input into the waveform decoder and decoded to obtain the first waveform and the second waveform. Based on this, the parameters of the speech synthesis network are adjusted by feedback based on the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound to generate a speech synthesis model, including:
[0181] Decoding the first intermediate representation and the second intermediate representation respectively by a waveform decoder to obtain a first waveform and a second waveform;
[0182] According to the first waveform and the second waveform, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound, the parameters of the speech synthesis network are feedback-adjusted to generate a speech synthesis model.
[0183] It can be seen that in this embodiment, the first intermediate representation and the second intermediate representation are decoded respectively to obtain the first waveform and the second waveform. Based on the first waveform and the second waveform, the approximate posterior distribution, the distribution information of the rhythmic features of each phoneme in the sample text, the lower bound of the marginal log-likelihood and other factors, the parameters of the speech synthesis network are adjusted by feedback, thereby improving the expressiveness of the speech data of the generated speech synthesis model.
[0184] In one embodiment, feedback is provided to adjust parameters of a speech synthesis network based on the first waveform and the second waveform, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound to generate a speech synthesis model, including:
[0185] determining a similarity between the first waveform and the second waveform;
[0186] determining a divergence between the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text;
[0187] According to the similarity, divergence and marginal log-likelihood lower bound, the parameters of the speech synthesis network are adjusted through feedback to generate a speech synthesis model.
[0188] Specifically, the similarity between the first waveform and the second waveform can be determined by formula calculation or manual means. Furthermore, the KL divergence between the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text is calculated. By calculating the divergence, the distribution information of the prosodic features of each phoneme in the sample text can be brought closer to the approximate posterior distribution, and by calculating the similarity, the first waveform and the second waveform can be brought closer to each other. Finally, based on the similarity, divergence, and marginal log-likelihood lower bound, the parameters of the speech synthesis network are feedback-adjusted to generate a speech synthesis model.
[0189] For example, based on maximizing similarity, minimizing divergence, and maximizing the lower bound of the marginal log-likelihood, feedback is used to adjust the parameters of the speech synthesis network to generate a speech synthesis model. During the process of adjusting the parameters of the speech synthesis network, the similarity between the speech data corresponding to the first and second waveforms and the sample speech data corresponding to the sample text can be manually listened to, or the similarity between the speech data corresponding to the first and second waveforms and the sample speech data corresponding to the sample text can be observed by observing a linear spectrogram. In addition, the rhythm of the speech data corresponding to the first and second waveforms can be manually listened to. When both the similarity and rhythm meet the requirements, the model training is considered complete.
[0190] In this embodiment, by minimizing the divergence between the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text, excessive smoothing of the prosodic prediction by the speech synthesis model can be avoided, and the diversity of the prosody predicted by the prosody predictor can be ensured.
[0191] It can be seen that through this embodiment, based on the similarity between the first waveform and the second waveform, the divergence between the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text, and the lower bound of the marginal log-likelihood, a speech synthesis model with higher speech synthesis quality and better speech expressiveness can be obtained.
[0192] As described above, the speech synthesis network also includes a duration predictor. In one embodiment, the duration predictor is trained in the following manner:
[0193] The duration predictor is used to predict the duration of each phoneme in the sample text based on the prosodic latent variables.
[0194] According to the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text and the predicted pronunciation duration, the parameters of the duration predictor are reversely adjusted.
[0195] According to the previous introduction, the linear spectrogram is input into the posterior encoder. The posterior encoding unit in the posterior encoder generates an approximate posterior distribution of the prosodic features of each phoneme in the sample text based on the linear spectrogram and the adjusted language features. The reparameterization unit in the posterior encoder reparameterizes the approximate posterior distribution based on the approximate posterior distribution to obtain the prosodic latent variables at the phoneme level of the sample text, and outputs the prosodic latent variables to the duration predictor respectively.
[0196] The duration prediction unit in the duration predictor predicts the pronunciation duration of each phoneme in the sample text based on the language features and prosodic latent variables output by the text encoder. The predicted pronunciation duration can be combined with the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text (that is, the actual pronunciation duration) to train the duration prediction unit of the duration predictor.
[0197] Since the prosodic information also determines the duration of the pronunciation of a phoneme, in addition to the language features of the sample text output by the text encoder, the prosodic latent variables at the phoneme level corresponding to the sample text are also used as the condition of the duration predictor, that is, in represents the duration predictor, c' is the language feature of the sample text output by the text encoder, z' represents the phoneme-level prosodic latent variable corresponding to the sample text, Indicates duration, thereby generating a more stable and natural pronunciation duration of phonemes.
[0198] It can be seen that, through this embodiment, the training conditions of the duration predictor include prosodic latent variables in addition to language features, so that the duration predictor can generate more stable and natural phoneme pronunciation durations.
[0199] FIG7 is a schematic diagram of a training process of a speech synthesis model provided by another embodiment of the present disclosure. As shown in FIG7 , the process includes:
[0200] Step S702: Obtain sample data for model training and input the sample data into a pre-built speech synthesis network; the sample data includes a sample text and a linear spectrogram of the sample speech data corresponding to the sample text;
[0201] Step S704, generating adjusted language features of the sample text by using a duration predictor;
[0202] Step S706, determining the distribution information of the prosodic features of each phoneme in the sample text by a prosodic predictor;
[0203] Step S708: generating, by a posterior encoder, an approximate posterior distribution of the prosodic features of each phoneme in the sample text and a phoneme-level prosodic latent variable corresponding to the sample text based on the linear spectrogram and the adjusted language features of the sample text;
[0204] Step S710: using a duration predictor to predict the pronunciation duration of each phoneme in the sample text based on the prosodic latent variable, and inversely adjusting the parameters of the duration predictor according to the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text and the predicted pronunciation duration;
[0205] Step S712: Generate a first intermediate representation corresponding to the sample text by using an acoustic encoder based on the phoneme-level prosodic latent variables corresponding to the sample text and the adjusted language features of the sample text;
[0206] Step S714: Encode the linear spectrogram using a posterior waveform encoder to obtain a second intermediate representation corresponding to the sample text;
[0207] Step S716, performing normalization flow processing on the prosodic latent variables to obtain a prior distribution of the prosodic features of each phoneme in the sample text;
[0208] Step S718, based on the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the prior distribution, feedback is used to adjust the parameters of the speech synthesis network to generate a speech synthesis model.
[0209] In summary, the embodiments of the present disclosure provide a speech synthesis model, also known as CLONE, which can be understood as a conditional variational autoencoder, which has at least the following technical effects:
[0210] 1. The speech synthesis model is an end-to-end speech synthesis system that can generate high-quality waveforms directly from text in parallel. It can solve the problem of the same phoneme having different prosody in different texts, ensuring that the same phoneme has a prosodic expression that fits the context in different texts, improving the expressiveness of speech data and alleviating the problem of excessive prosody smoothing.
[0211] 2. The prosody predictor can improve the diversity and stability of prosody by predicting the prosody distribution as not necessarily conforming to the standard normal distribution;
[0212] 3. Combining rhythmic features to train the duration predictor can make the duration predicted by the duration predictor diverse and stable;
[0213] 4. By setting up a dual parallel autoencoder DPA, the search space for waveform modeling can be narrowed, solving the problem of poor high-frequency information modeling capability.
[0214] The present disclosure also provides a speech synthesis device for implementing the above-mentioned speech synthesis method. FIG8 is a schematic diagram of the structure of the speech synthesis device provided in one embodiment of the present disclosure. As shown in FIG8 , the device includes:
[0215] A text acquisition unit 81 is used to acquire a text to be processed and input the text to be processed into a speech synthesis model;
[0216] a distribution prediction unit 82 for predicting, by using the speech synthesis model and according to the language features of the text to be processed, the distribution information of the prosodic features of each phoneme in the text to be processed;
[0217] a feature adjustment unit 83 for adjusting the language feature of the text to be processed based on the distribution information of the prosodic feature of each phoneme in the text to be processed;
[0218] The data generating unit 84 is configured to generate speech data corresponding to the text to be processed according to the adjusted language features of the text to be processed.
[0219] Optionally, the speech synthesis model includes a text encoder and a prosody predictor; the distribution prediction unit 82 is specifically configured to:
[0220] Extracting language features of the text to be processed by the text encoder;
[0221] The prosody predictor predicts the distribution information of the prosody feature of each phoneme in the text to be processed according to the language feature of the text to be processed.
[0222] Optionally, the feature adjustment unit 83 is specifically configured to:
[0223] Predicting the pronunciation duration of each phoneme in the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed and the language features of the text to be processed;
[0224] According to the pronunciation duration of each phoneme in the text to be processed, the language feature of the text to be processed is length-expanded to obtain the adjusted language feature of the text to be processed.
[0225] Optionally, the speech synthesis model includes a duration predictor; and the feature adjustment unit 83 is further specifically configured to:
[0226] Re-parameterizing the distribution information of the prosodic features of each phoneme in the text to be processed to obtain a phoneme-level prosodic latent variable corresponding to the text to be processed;
[0227] The duration predictor is used to predict the pronunciation duration of each phoneme in the text to be processed based on the prosodic latent variables at the phoneme level corresponding to the text to be processed and the language features of the text to be processed.
[0228] Optionally, the speech synthesis model includes an acoustic encoder and a waveform decoder; the data generation unit 84 is specifically configured to:
[0229] Performing acoustic encoding on the adjusted language features of the text to be processed by the acoustic encoder to obtain an intermediate representation corresponding to the text to be processed;
[0230] The intermediate representation is decoded by the waveform decoder to obtain speech data corresponding to the text to be processed.
[0231] Optionally, a training unit is further included, configured to:
[0232] Acquire sample data and input the sample data into a speech synthesis network; the sample data includes a sample text and a linear spectrogram of sample speech data corresponding to the sample text;
[0233] generating, by the speech synthesis network, an approximate posterior distribution of the prosodic features of each phoneme in the sample text based on the sample data;
[0234] Based on the approximate posterior distribution, the parameters of the speech synthesis network are adjusted through feedback to generate the speech synthesis model.
[0235] Optionally, the speech synthesis network includes a posterior encoder; and the training unit is specifically configured to:
[0236] generating, by the posterior encoder, a phoneme-level prosodic feature of the sample text based on the linear spectrogram and the language features of the sample text;
[0237] The posterior encoder linearly transforms the prosodic features of the phoneme level of the sample text to obtain an approximate posterior distribution of the prosodic features of each phoneme in the sample text.
[0238] Optionally, the training unit is further specifically configured to:
[0239] generating, by the posterior encoder, a first prosodic feature of the sample text at a frame level according to the linear spectrogram and the language features of the sample text;
[0240] The posterior encoder performs matrix conversion on the first prosodic feature of the sample text at the frame level to obtain the prosodic feature of the sample text at the phoneme level.
[0241] Optionally, the training unit is specifically configured to:
[0242] Reparameterizing the approximate posterior distribution to obtain a phoneme-level prosodic latent variable corresponding to the sample text;
[0243] Based on the prosodic latent variables and the approximate posterior distribution, the parameters of the speech synthesis network are feedback-adjusted to generate the speech synthesis model.
[0244] Optionally, the speech synthesis network includes a prosody predictor; and the training unit is further specifically configured to:
[0245] Determining, by the prosody predictor, distribution information of the prosodic features of each phoneme in the sample text;
[0246] Based on the prosodic latent variables, the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text, the parameters of the speech synthesis network are adjusted through feedback to generate the speech synthesis model.
[0247] Optionally, the speech synthesis network includes a posterior waveform encoder; and the training unit is further specifically configured to:
[0248] generating, according to the prosodic latent variable, a first intermediate representation corresponding to the sample text and a prior distribution of the prosodic features of each phoneme in the sample text;
[0249] encoding the linear spectrogram by the posterior waveform encoder to obtain a second intermediate representation corresponding to the sample text;
[0250] The parameters of the speech synthesis network are feedback-adjusted based on the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the prior distribution to generate the speech synthesis model.
[0251] Optionally, the speech synthesis network includes an acoustic encoder; and the training unit is further specifically configured to:
[0252] Converting the phoneme-level prosodic latent variable corresponding to the sample text by the acoustic encoder to obtain a frame-level second prosodic feature of the sample text;
[0253] The acoustic encoder acoustically encodes the language features of the sample text according to the second prosodic features of the sample text at the frame level to obtain a first intermediate representation corresponding to the sample text.
[0254] Optionally, the training unit is further specifically configured to:
[0255] Normalized flow processing is performed on the prosodic latent variables to obtain a prior distribution of the prosodic features of each phoneme in the sample text.
[0256] Optionally, the training unit is further specifically configured to:
[0257] determining a marginal log-likelihood lower bound of a fitted distribution of the linear spectrogram based on the approximate posterior distribution, the prior distribution, and a likelihood function of the linear spectrogram;
[0258] According to the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound, the parameters of the speech synthesis network are feedback-adjusted to generate the speech synthesis model.
[0259] Optionally, the speech synthesis network includes a waveform decoder; and the training unit is further specifically configured to:
[0260] Decoding the first intermediate representation and the second intermediate representation respectively by the waveform decoder to obtain a first waveform and a second waveform;
[0261] The parameters of the speech synthesis network are feedback-adjusted based on the first waveform and the second waveform, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound to generate the speech synthesis model.
[0262] Optionally, the training unit is further specifically configured to:
[0263] determining a similarity between the first waveform and the second waveform;
[0264] determining a divergence between the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text;
[0265] According to the similarity, the divergence and the marginal log-likelihood lower bound, the parameters of the speech synthesis network are adjusted through feedback to generate the speech synthesis model.
[0266] Optionally, the speech synthesis network includes a duration predictor; and the training unit is further specifically configured to:
[0267] Predicting the pronunciation duration of each phoneme in the sample text based on the prosodic latent variable by the duration predictor;
[0268] According to the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text and the predicted pronunciation duration, the parameters of the duration predictor are reversely adjusted.
[0269] The speech synthesis device in the embodiment of the present disclosure can implement each process of the above-mentioned speech synthesis method embodiment and achieve the same effects and functions, which will not be repeated here.
[0270] An embodiment of the present disclosure also provides an electronic device. FIG9 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG9 , the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and a memory 902. One or more applications or data may be stored in the memory 902. Among them, the memory 902 may be a temporary storage or a persistent storage. The application stored in the memory 902 may include one or more modules (not shown in the figure), each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 901 may be configured to communicate with the memory 902 and execute a series of computer executable instructions in the memory 902 on the electronic device. The electronic device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input or output interfaces 905, one or more keyboards 906, etc.
[0271] In a specific embodiment, the electronic device includes a processor; and a memory configured to store computer-executable instructions, wherein when the computer-executable instructions are executed, the processor implements the following process:
[0272] Obtaining a text to be processed, and inputting the text to be processed into a speech synthesis model;
[0273] Predicting, by the speech synthesis model, distribution information of the prosodic features of each phoneme in the text to be processed according to the language features of the text to be processed;
[0274] Adjusting the language features of the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed;
[0275] According to the adjusted language features of the text to be processed, speech data corresponding to the text to be processed is generated.
[0276] The electronic device in the embodiment of the present disclosure can implement each process of the above-mentioned speech synthesis method embodiment and achieve the same effects and functions, which will not be repeated here.
[0277] Another embodiment of the present disclosure further provides a computer-readable storage medium for storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the following process is implemented:
[0278] Obtaining a text to be processed, and inputting the text to be processed into a speech synthesis model;
[0279] Predicting, by the speech synthesis model, distribution information of the prosodic features of each phoneme in the text to be processed according to the language features of the text to be processed;
[0280] Adjusting the language features of the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed;
[0281] According to the adjusted language features of the text to be processed, speech data corresponding to the text to be processed is generated.
[0282] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned speech synthesis method embodiment and achieve the same effects and functions, which will not be repeated here.
[0283] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0284] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0285] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
[0286] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0287] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0288] Those skilled in the art will appreciate that one or more embodiments of the present disclosure may be provided as a method, system, or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0289] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0290] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0291] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0292] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0293] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0294] The various embodiments of this disclosure are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so their description is relatively simple. For relevant portions, refer to the description of the method embodiments.
[0295] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.
Claims
1. A speech synthesis method, characterized in that: include: Obtaining a text to be processed, and inputting the text to be processed into a speech synthesis model; Predicting, by means of the speech synthesis model, distribution information of the prosodic features of each phoneme in the text to be processed according to the language features of the text to be processed; Adjusting the language features of the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed; According to the adjusted language features of the text to be processed, speech data corresponding to the text to be processed is generated.
2. The method according to claim 1, characterized in that The speech synthesis model includes a text encoder and a prosody predictor; the speech synthesis model predicts the distribution information of the prosody feature of each phoneme in the text to be processed according to the language features of the text to be processed, including: Extracting language features of the text to be processed by the text encoder; The prosody predictor predicts the distribution information of the prosody feature of each phoneme in the text to be processed according to the language feature of the text to be processed.
3. The method according to claim 1, characterized in that The adjusting the language feature of the text to be processed based on the distribution information of the prosodic feature of each phoneme in the text to be processed comprises: Predicting the pronunciation duration of each phoneme in the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed and the language features of the text to be processed; According to the pronunciation duration of each phoneme in the text to be processed, the length of the language feature of the text to be processed is expanded to obtain the adjusted language feature of the text to be processed.
4. The method according to claim 3, characterized in that The speech synthesis model includes a duration predictor; the prediction of the pronunciation duration of each phoneme in the text to be processed based on the distribution information of the prosodic features of each phoneme in the text to be processed and the language features of the text to be processed includes: Re-parameterizing the distribution information of the prosodic features of each phoneme in the text to be processed to obtain a phoneme-level prosodic latent variable corresponding to the text to be processed; The duration predictor is used to predict the pronunciation duration of each phoneme in the text to be processed according to the prosodic latent variables at the phoneme level corresponding to the text to be processed and the language features of the text to be processed.
5. The method according to claim 1, characterized in that The speech synthesis model includes an acoustic encoder and a waveform decoder; the generating speech data corresponding to the text to be processed according to the adjusted language features of the text to be processed includes: By means of the acoustic encoder, acoustic encoding is performed on the adjusted language features of the text to be processed to obtain an intermediate representation corresponding to the text to be processed; The intermediate representation is decoded by the waveform decoder to obtain speech data corresponding to the text to be processed.
6. The method according to any one of claims 1 to 5, characterized in that: The speech synthesis model is trained by the following steps: Acquire sample data, and input the sample data into a speech synthesis network; the sample data includes a sample text and a linear spectrogram of sample speech data corresponding to the sample text; Generate, by the speech synthesis network, an approximate posterior distribution of the prosodic features of each phoneme in the sample text based on the sample data; Based on the approximate posterior distribution, the parameters of the speech synthesis network are feedback-adjusted to generate the speech synthesis model.
7. The method according to claim 6, characterized in that The speech synthesis network includes a posterior encoder; the method of generating an approximate posterior distribution of the prosodic features of each phoneme in the sample text based on the sample data through the speech synthesis network includes: Generate, by the posterior encoder, a prosodic feature of the sample text at the phoneme level based on the linear spectrogram and the language features of the sample text; The prosodic features of the phoneme level of the sample text are linearly transformed by the posterior encoder. Transformation is performed to obtain an approximate posterior distribution of the prosodic features of each phoneme in the sample text.
8. The method according to claim 7, characterized in that The generating, by the posterior encoder, a prosodic feature of the phoneme level of the sample text based on the linear spectrogram and the language feature of the sample text comprises: Generate, by the posterior encoder, a first prosodic feature of the frame level of the sample text according to the linear spectrogram and the language features of the sample text; The first prosodic features of the sample text at the frame level are matrix-converted by the posterior encoder to obtain the prosodic features of the sample text at the phoneme level.
9. The method according to claim 6, characterized in that The step of feedback-adjusting the parameters of the speech synthesis network based on the approximate posterior distribution to generate the speech synthesis model comprises: Reparameterizing the approximate posterior distribution to obtain a phoneme-level prosodic latent variable corresponding to the sample text; Based on the prosodic latent variables and the approximate posterior distribution, the parameters of the speech synthesis network are feedback-adjusted to generate the speech synthesis model.
10. The method according to claim 9, characterized in that The speech synthesis network includes a prosody predictor; the feedback adjustment of the parameters of the speech synthesis network based on the prosody latent variables and the approximate posterior distribution to generate the speech synthesis model includes: Determining, by the prosody predictor, distribution information of the prosody feature of each phoneme in the sample text; Based on the prosodic latent variables, the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text, the parameters of the speech synthesis network are adjusted through feedback to generate the speech synthesis model.
11. The method according to claim 10, characterized in that The speech synthesis network includes a posterior waveform encoder; the feedback adjustment of the parameters of the speech synthesis network based on the prosodic latent variable, the approximate posterior distribution and the distribution information of the prosodic features of each phoneme in the sample text to generate the speech synthesis model includes: Generate, according to the prosodic latent variable, a first intermediate representation corresponding to the sample text and a prior distribution of the prosodic features of each phoneme in the sample text; Encoding the linear spectrogram by the a posteriori waveform encoder to obtain a second intermediate representation corresponding to the sample text; According to the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text and the prior distribution, the parameters of the speech synthesis network are feedback-adjusted to generate the speech synthesis model.
12. The method according to claim 11, characterized in that The speech synthesis network includes an acoustic encoder; the step of generating a first intermediate representation corresponding to the sample text according to the prosodic latent variable includes: The acoustic encoder is used to convert the prosodic latent variable at the phoneme level corresponding to the sample text to obtain a second prosodic feature at the frame level of the sample text; The acoustic encoder acoustically encodes the language features of the sample text according to the second prosodic features of the sample text at the frame level to obtain a first intermediate representation corresponding to the sample text.
13. The method according to claim 11, characterized in that According to the prosodic latent variable, a prior distribution of the prosodic features of each phoneme in the sample text is generated, including: The prosodic latent variables are subjected to normalized flow processing to obtain a prior distribution of the prosodic features of each phoneme in the sample text.
14. The method according to claim 11, characterized in that The step of feedback-adjusting the parameters of the speech synthesis network according to the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic feature of each phoneme in the sample text, and the prior distribution to generate the speech synthesis model comprises: Determining a marginal log-likelihood lower bound of a fitted distribution of the linear spectrogram based on the approximate posterior distribution, the prior distribution, and a likelihood function of the linear spectrogram; According to the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic feature of each phoneme in the sample text, and the marginal log-likelihood lower bound, The parameters of the speech synthesis network are adjusted by feedback to generate the speech synthesis model.
15. The method according to claim 14, characterized in that The speech synthesis network includes a waveform decoder; the feedback adjustment of the parameters of the speech synthesis network based on the first intermediate representation, the second intermediate representation, the approximate posterior distribution, the distribution information of the prosodic feature of each phoneme in the sample text, and the marginal log-likelihood lower bound to generate the speech synthesis model includes: Decoding the first intermediate representation and the second intermediate representation respectively by the waveform decoder to obtain a first waveform and a second waveform; According to the first waveform and the second waveform, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound, the parameters of the speech synthesis network are feedback-adjusted to generate the speech synthesis model.
16. The method according to claim 15, characterized in that The method of feedback-adjusting the parameters of the speech synthesis network according to the first waveform and the second waveform, the approximate posterior distribution, the distribution information of the prosodic features of each phoneme in the sample text, and the marginal log-likelihood lower bound to generate the speech synthesis model comprises: determining a similarity between the first waveform and the second waveform; Determining a divergence between the approximate posterior distribution and the distribution information of the prosodic feature of each phoneme in the sample text; According to the similarity, the divergence and the marginal log-likelihood lower bound, the parameters of the speech synthesis network are feedback-adjusted to generate the speech synthesis model.
17. The method according to claim 9, characterized in that The speech synthesis network includes a duration predictor; the duration predictor is trained in the following manner: Predicting the pronunciation duration of each phoneme in the sample text based on the prosodic latent variable by the duration predictor; According to the pronunciation duration of each phoneme in the sample speech data corresponding to the sample text and the predicted pronunciation duration, the parameters of the duration predictor are reversely adjusted.
18. A speech synthesis device, characterized in that: include: A text acquisition unit, used for acquiring the text to be processed and inputting the text to be processed into the speech synthesis model; A distribution prediction unit, configured to predict the distribution information of the prosodic features of each phoneme in the text to be processed according to the language features of the text to be processed by using the speech synthesis model; A feature adjustment unit, configured to adjust the language feature of the text to be processed based on the distribution information of the prosodic feature of each phoneme in the text to be processed; The data generating unit is used to generate speech data corresponding to the text to be processed according to the adjusted language features of the text to be processed.
19. An electronic device, characterized in that: include: processor; as well as, A memory configured to store computer executable instructions, which, when executed, cause the processor to implement the steps of the method according to any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method described in any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
Speech synthesis method and device thereof
CN113488022A
Voice generation method and device, electronic equipment and storage medium
CN114373445A
Rhythm boundary labeling method and device, equipment, medium and program product
CN115116428A
Speech synthesis method, speech synthesis device, electronic equipment and storage medium
CN115620702A
Prediction of parameterized vocoder parameters from rhythm features
CN115943460A
Cited By
Speech synthesis method and device, equipment and storage medium
CN119811363A
Text-to-voice hardware acceleration system supporting dynamic input adaptation
CN120977286A
