A speech synthesis method and device for improving the accuracy of phoneme pronunciation duration

By introducing timing prediction and bias prediction networks into the speech synthesis model, the deviation caused by external alignment tools is corrected, the problem of inaccurate pronunciation duration in the existing technology is solved, and the quality of audio generation is improved.

CN118430512BActive Publication Date: 2024-10-22厦门蝉羽网络科技有限公司
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202410873940.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-22
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

When existing speech synthesis models align text and audio, internal alignment cannot accurately control the position of pronunciation and is prone to inaccurate alignment. External alignment relies on tools that are not trained on TTS data, resulting in inaccurate pronunciation timing predictions and word swallowing. Missing characters.

Method used

Using an external alignment-based method, by obtaining the acoustic cues and the audio to be synthesized, using the audio codec and G2P model for conversion processing, combined with the timing prediction network and the bias prediction network, the time series is corrected to improve the accuracy of the pronunciation duration and ensure The model relies on external alignment results.

Benefits of technology

It effectively improves the accuracy of phoneme pronunciation duration, improves the quality of generated audio, enables the model to rely more on external alignment results, avoids the phenomenon of swallowing and missing words, and does not require retraining external alignment tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118430512B_ABST
    Figure CN118430512B_ABST
Patent Text Reader

Abstract

The present invention provides a speech synthesis method and device for improving the accuracy of phoneme pronunciation duration, and relates to the field of speech synthesis technology. The method proposes a text pronunciation duration correction scheme based on external alignment, so that the pronunciation of each word is more accurate, thereby helping the model to better rely on the results of external alignment. This method does not require retraining an external alignment tool, and can be embedded in different TTS synthesis models as a universal module, so that the generated audio quality is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of speech synthesis, and in particular to a speech synthesis method and device for improving the accuracy of phoneme pronunciation duration. Background Art

[0002] Currently, existing text-to-speech (TTS) models usually use the following two methods to align text and audio: internal alignment or external alignment. Internal alignment refers to alignment within the TTS model using certain structures within the model, such as using Monotonic Alignment Search (MAS) within the network to search for the most likely monotonic alignment relationship using the potential representation of text and speech. External alignment refers to aligning text and speech data using external tools or models (such as forced alignment tools) before training the TTS model to generate explicit alignment tags.

[0003] The advantage of internal alignment is that it does not require a pre-alignment step, which simplifies the preparation of training data and can realize an end-to-end speech synthesis model. Its disadvantage is that the position of pronunciation cannot be accurately controlled, and inaccurate or unstable alignment may occur easily.

[0004] The advantage of external alignment is that it simplifies the learning process of the model, because the model does not need to pay attention to the alignment relationship and speech generation at the same time, making the training more stable and efficient. However, the disadvantage is that the alignment effect is overly dependent on external alignment tools, and these external alignment tools are generally not trained under TTS data, so it is easy to have inaccurate alignment. The error introduced by the external alignment tool will lead to inaccurate timing prediction of each word, which will cause the model to be unable to rely 100% on the timing information of each word during the training process. Therefore, the model has the probability of free play in the inference stage, resulting in the phenomenon of swallowing and missing words in the synthesized audio.

[0005] In view of this, this application is filed. Summary of the invention

[0006] The present invention provides a speech synthesis method and device for improving the accuracy of phoneme pronunciation duration, which can at least partially improve the above-mentioned problem.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] A speech synthesis method for improving the accuracy of phoneme pronunciation duration, comprising:

[0009] Acquiring acoustic cues, audio to be synthesized, and text to be synthesized, and converting the acoustic cues, audio to be synthesized, and text to be synthesized using an audio codec and a G2P model to obtain discrete codes and phoneme codes;

[0010] The discrete code corresponding to the acoustic prompt is converted into a continuous vector by using a codebook , the discrete code corresponding to the synthesized audio is converted into a continuous vector , phoneme encoding is converted into a continuous vector , and input the continuous vector into a preset neural network to obtain the latent vector corresponding to the continuous vector and ;

[0011] The pronunciation duration of each word in the audio to be synthesized is obtained according to the preset time series prediction network, and the time series c of the text to be synthesized and the audio to be synthesized is obtained according to the information, and the latent vector corresponding to the text to be synthesized is converted into The time series c is input into the preset bias prediction network to obtain the bias of the time series, and is used to correct the time series;

[0012] The time series c after bias correction is converted into the latent vector corresponding to the text to be synthesized , the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , and decode the synthesized speech code according to the audio codec to obtain the speech to be synthesized.

[0013] The present invention also provides a speech synthesis device for improving the accuracy of phoneme pronunciation duration, which comprises:

[0014] An encoding unit, used to obtain acoustic cues, audio to be synthesized, and text to be synthesized, and to convert the acoustic cues, audio to be synthesized, and text to be synthesized using an audio codec and a G2P model to obtain discrete codes and phoneme codes;

[0015] Hidden vector unit, used to convert the discrete code corresponding to the acoustic prompt into a continuous vector through a codebook , the discrete code corresponding to the synthesized audio is converted into a continuous vector , phoneme encoding is converted into a continuous vector , and input the continuous vector into a preset neural network to obtain the latent vector corresponding to the continuous vector and ;

[0016] The modified time series bias unit is used to obtain the pronunciation duration of each word in the audio to be synthesized according to the preset time series prediction network, obtain the time series c of the text to be synthesized and the audio according to the information, and convert the latent vector corresponding to the text to be synthesized into The time series c is input into the preset bias prediction network to obtain the bias of the time series, and is used to correct the time series;

[0017] After the bias-corrected time series c, the latent vector corresponding to the text to be synthesized , the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , and decode the synthesized speech code according to the audio codec to obtain the speech to be synthesized.

[0018] In summary, the speech synthesis method for improving the accuracy of phoneme pronunciation duration is based on external alignment, and proposes a text pronunciation duration correction scheme to make the pronunciation of each word more accurate, thereby helping the model to better rely on the results of external alignment. This method does not require retraining an external alignment tool, and can be embedded in different TTS synthesis models as a universal module, so that the generated audio quality is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of a speech synthesis method for improving the accuracy of phoneme pronunciation duration provided by the first embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of a time series bias correction process provided by the first embodiment of the present invention;

[0021] Figure 3 It is a module schematic diagram of a speech synthesis device for improving the accuracy of phoneme pronunciation duration provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0023] refer to Figure 1 As shown, the first embodiment of the present invention discloses a speech synthesis method for improving the accuracy of phoneme pronunciation duration, which can be performed by a speech synthesis device for improving the accuracy of phoneme pronunciation duration (hereinafter referred to as a speech synthesis device), and in particular, is performed by one or more processors in the speech synthesis device to implement the following method:

[0024] S101, obtaining an acoustic prompt, an audio to be synthesized, and a text to be synthesized, and converting the acoustic prompt, the audio to be synthesized, and the synthesized text using an audio codec and a G2P model to obtain a discrete code and a phoneme code;

[0025] Specifically, step S101 includes: obtaining acoustic cues and audio to be synthesized, and converting the acoustic cues and audio to be synthesized into discrete codes through an audio codec. , where T represents the down-sampled audio step size, and k represents the number of codebooks;

[0026] Obtain the text to be synthesized, convert the text to be synthesized into phonemes through a preset G2P model, and convert the phonemes into phoneme codes through a mapping dictionary ,in, Indicates the length of the phoneme code.

[0027] In this embodiment, the acoustic prompt and the audio to be synthesized are converted into discrete codes of audio through an audio codec. , where T represents the downsampled audio step size, and k represents the number of codebooks.

[0028] The text to be synthesized is converted into phonemes through the G2P (Grapheme-to-Phoneme) model, and then converted into phoneme encoding through a mapping dictionary ,in Indicates the length of the phoneme code.

[0029] S102, converting the discrete code corresponding to the acoustic prompt into a continuous vector using a codebook , the discrete code corresponding to the synthesized audio is converted into a continuous vector , phoneme encoding is converted into a continuous vector , and input the continuous vector into a preset neural network to obtain the latent vector corresponding to the continuous vector and ;

[0030] In this embodiment, the discrete codes corresponding to the acoustic prompts and the phoneme codes corresponding to the text to be synthesized are converted into continuous vectors through a codebook, and are further input into a neural network to obtain their corresponding latent vectors Z.

[0031] S103, obtaining the pronunciation duration of each word in the audio to be synthesized according to the preset time series prediction network, obtaining the time series c of the text to be synthesized and the audio according to the information, and converting the latent vector corresponding to the text to be synthesized into The time series c is input into the preset bias prediction network to obtain the bias of the time series, and is used to correct the time series;

[0032] S104: The time series c after the offset correction is converted into the latent vector corresponding to the text to be synthesized. , the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , and decode the synthesized speech code according to the audio codec to obtain the speech to be synthesized.

[0033] Specifically, step S103 includes: obtaining the pronunciation range of each phoneme in the text to be synthesized obtained by the external alignment tool, converting the pronunciation of each phoneme into a corresponding time point, and obtaining a time point sequence t;

[0034] Convert the audio to be synthesized into a time index sequence a according to the audio step length;

[0035] The time point sequence t and the time index sequence a are combined to obtain a combined time sequence c.

[0036] Preferably, when the latent vector corresponding to the text to be synthesized is The time series c is input into a preset bias prediction network to obtain the bias of the time series, and before being used to correct the time series, an additional bias prediction network is trained with the true value information of the audio to assist in correcting the time point sequence of the phoneme, specifically:

[0037] The latent vectors corresponding to the text to be synthesized and the audio to be synthesized and Combine them to get the corresponding latent vector Z;

[0038] The latent vector Z and time series c are used as inputs of the preset bias prediction network to obtain the bias label of the time series c ;

[0039] The part of the latent vector Z related to the true value of the audio is shielded, and only the latent vector related to the phoneme encoding is input ;

[0040] The latent vector associated with the phoneme encoding And time series c as the input of the preset bias prediction network to obtain the predicted time series bias ;

[0041] The bias label and the predicted time series bias Calculate and get the bias correction loss caused by the bias prediction of the time series. The calculation formula is:

[0042]

[0043] Among them, sg means there is no gradient in the back propagation calculation, M is a mask matrix, Represents element-wise multiplication, the text-related part of the mask matrix is ​​1, and the audio-related part is 0;

[0044] Through calculation, the corrected phoneme-related time series is obtained, and the calculation formula is:

[0045]

[0046] Among them, r represents The probability of correcting time series information, 1- The probability does not correct the time series information.

[0047] Preferably, it also includes: obtaining a latent vector according to the text to be synthesized by using the time series c after the bias correction , and the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , calculate the relevant training losses according to different speech synthesis model training methods.

[0048] In this embodiment, the pronunciation range of each phoneme in the text to be synthesized is obtained according to the external alignment tool, and the pronunciation of each phoneme is converted into a corresponding time point, thereby obtaining a time point sequence t. The audio to be synthesized is converted into a time index sequence a according to the audio step length. The time point sequence t corresponding to the phoneme and the time index sequence a corresponding to the audio are combined to obtain a combined time sequence c.

[0049] See also Figure 2 In this embodiment, since the external alignment information has not been trained on the text synthesized by TTS, there is a certain error in the time point sequence of the phonemes in c, which causes the model to be unable to rely 100% on the timing information during the training process. Therefore, during the training phase, an additional bias prediction network is trained with the help of the true value information of the audio to assist in correcting the time point sequence of the phonemes.

[0050] The discrete codes corresponding to the text and audio to be synthesized are combined and converted into a continuous vector X according to the codebook, and the corresponding latent vector Z is obtained through the neural network. The input of the bias prediction network is the latent vector Z and the time series c. Through this network, the bias label of the time series is further obtained , due to time series bias It is obtained based on the text to be synthesized and the corresponding audio true value, so it can be used as the label of bias prediction. Afterwards, in order to be consistent with the inference stage, the part of Z related to the audio true value is shielded, that is, only the latent vector related to the phoneme encoding is input , and use it and the time series c as the input of the bias prediction network again, and then get the predicted time series bias According to the following formula, the bias correction loss is composed of the time series bias label obtained based on the text and audio true value and the time series bias prediction based on text information only:

[0051]

[0052] Among them, sg means that there is no gradient in the back propagation calculation, because The purpose is to serve as the target value. Where M is a mask matrix, Represents element-wise multiplication, the text-related part of the mask matrix is ​​1, and the audio-related part is 0, because only the time series information related to the phoneme needs to be corrected.

[0053] After obtaining the offset of the time series, the corrected phoneme-related time series is obtained by the following formula:

[0054]

[0055] Among them, r represents The probability of correcting time series information, 1- The probability of not correcting the time series information. This allows the model to still access the original time series information during the training process, ensuring that the model can understand and retain the original meaning of the time series.

[0056] In the inference stage, a time series prediction network is used to obtain the pronunciation duration of each word in the audio to be synthesized, and the time series c of the text to be synthesized and the audio to be synthesized is obtained based on this information. Since the true value of the audio to be synthesized cannot be obtained in the inference stage, the latent vector and time series c corresponding to the text to be synthesized are directly input into the bias prediction network to obtain the bias of the time series, and then the bias of the time series can be directly corrected. The overall process is as follows: Figure 2 shown.

[0057] In this embodiment, in the training phase, the time series c after bias correction is used to obtain the latent vector according to the text to be synthesized. , and the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , calculate the relevant training losses according to different speech synthesis model training methods.

[0058] In this embodiment, the common Encodec codec is used as an example to explain the method, and the acoustic prompt and the speech to be synthesized are converted into discrete codes through the audio codec. A 5s audio segment is converted into the corresponding For Encodec, the length of the audio discrete code and the audio duration (s) correspond to 1:75.

[0059] Convert the audio into an audio-related position encoding identifier according to the discrete encoding length of the audio; specifically, the four characters "含辛茹苦" are converted into corresponding phonemes: [['含', ['h', 'an2']],['辛', ['x', 'in1']],['茹', ['ʒ', 'uu2']],['苦', ['k', 'uu3']]]; the corresponding phonemes are converted into discrete encodings through a dictionary: G = [46,22,105, 43,154, 90, 37, 131].

[0060] Convert the corresponding discrete encoding of the acoustic prompt into a continuous vector through a codebook, and further input it into a neural network to obtain its hidden vector . Specifically, assume that the dimension of the discrete encoding corresponding to a 5s acoustic prompt is , then it is converted into a continuous vector with a dimension of [75*5, 1024] according to the codebook, and then converted into a hidden vector through a neural network composed of a Transformer encoder and a forward propagation layer , and its dimension is [75*5, 2048].

[0061] Obtain the time point sequence t of the phonemes according to an external alignment tool, obtain the time index sequence a corresponding to the audio according to the audio length, and obtain the combined time sequence c. For example: for the four characters "含辛茹苦", the time stamps corresponding to their phonemes are: [['含', ['h', 'an2'], 0.0, 0.240],['辛', ['x', 'in1'], 0.34, 0.580],['茹', ['ʒ', 'uu2'], 0.6, 0.84],['苦', ['k', 'uu3'],0.84, 1.08]]. Then the time stamps corresponding to the phonemes are converted into the time point sequence: t = [0.0, 0.059, 0.179, 0.24,0.34 0.39 0.519, 0.58, 0.6, 0.659 0.779, 0.84, 0.84, 0.899, 1.019,1.08].

[0062] Convert the audio to be synthesized into a time index sequence a according to the audio step size. Combine the time point sequence t corresponding to the phonemes and the time index sequence corresponding to the audio to obtain the combined time sequence c. For example, assume that the discrete encoding length of an audio is 160, then according to , ai=i, obtain its time index sequence as a=[0,1,2,...159]. The combined time sequence is expressed as c = [a, t].

[0063] The time series of the synthesized text and the corresponding audio are combined and converted into a continuous vector. and a fixed layer of discrete audio coding Concatenate and convert it into a continuous vector through the codebook , f is the dimension of the codebook. Then it is converted into the corresponding latent vector Z through the neural network, and Z and c are used as the input of the bias prediction network, and the corresponding bias label is output :

[0064]

[0065] Where E represents a bias prediction network consisting of multiple layers of Transformer encoders and forward propagation layers, where The dimension of is consistent with the dimension of the position encoding identifier c.

[0066] Furthermore, in order to be consistent with the inference stage, only the phoneme-related information in the latent vector is input , and c as the input of the bias prediction network:

[0067]

[0068] Afterwards, the mean squared error loss is used to reduce the difference between the bias prediction of the position encoding and the true value of the position encoding:

[0069]

[0070] Among them, sg means that there is no gradient in the back propagation calculation, because The purpose is to serve as the target value. Where M is a mask matrix, Represents element-wise multiplication, where the text-related part of the mask matrix is ​​1 and the audio-related part is 0, because we only need to correct the time series information related to the phoneme.

[0071]

[0072] Where r represents The probability of correcting time series information, 1- The probability does not correct the time series information.

[0073] Finally, in the training phase, the bias-corrected time series c is transformed into the latent vector corresponding to the text. , and the latent vector corresponding to the acoustic cue , and are input into a neural network composed of a multi-layer Transformer decoder and a forward propagation layer to obtain the speech code to be synthesized , calculate the relevant training losses according to different speech synthesis model training methods.

[0074]

[0075]

[0076] Where Y represents the true value of the audio to be synthesized, and loss represents different training losses according to different speech synthesis tasks.

[0077] In summary, the speech synthesis method for improving the accuracy of phoneme pronunciation duration introduces a bias prediction network to correct the deviation caused by an external alignment tool, thereby effectively improving the accuracy of pronunciation; and can be embedded in different TTS synthesis models as a universal module to make the generated audio quality higher.

[0078] See also Figure 3 The second embodiment of the present invention further provides a speech synthesis device for improving the accuracy of phoneme pronunciation duration, which includes:

[0079] The encoding unit 201 is used to obtain acoustic prompts, audio to be synthesized and text to be synthesized, and use the audio codec and the G2P model to convert the acoustic prompts, audio to be synthesized and text to obtain discrete codes and phoneme codes;

[0080] Hidden vector unit 202, used to convert the discrete code corresponding to the acoustic prompt into a continuous vector through a codebook , the discrete code corresponding to the synthesized audio is converted into a continuous vector , phoneme encoding is converted into a continuous vector , and input the continuous vector into a preset neural network to obtain the latent vector corresponding to the continuous vector and ;

[0081] The time series bias correction unit 203 is used to obtain the pronunciation duration of each word in the audio to be synthesized according to the preset time series prediction network, obtain the time series c of the text to be synthesized and the audio according to the information, and convert the latent vector corresponding to the text to be synthesized into The time series c is input into the preset bias prediction network to obtain the bias of the time series, and is used to correct the time series;

[0082] The speech unit to be synthesized 204 is used to obtain a latent vector c according to the text to be synthesized by using the time series c after the bias correction. , and the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , calculate the relevant training losses according to different speech synthesis model training methods.

[0083] Preferably, the encoding unit is specifically used for:

[0084] Acquire acoustic cues and the audio to be synthesized, and convert the acoustic cues and the audio to be synthesized into discrete codes through an audio codec , where T represents the down-sampled audio step size, and k represents the number of codebooks;

[0085] Obtain the text to be synthesized, convert the text to be synthesized into phonemes through a preset G2P model, and convert the phonemes into phoneme codes through a mapping dictionary ,in, Indicates the length of the phoneme code.

[0086] Preferably, the time series correction bias unit is specifically used for:

[0087] Obtaining the pronunciation range of each phoneme in the text to be synthesized obtained by the external alignment tool, converting the pronunciation of each phoneme into a corresponding time point, and obtaining a time point sequence t;

[0088] Convert the audio to be synthesized into a time index sequence a according to the audio step length;

[0089] The time point sequence t and the time index sequence a are combined to obtain a combined time sequence c.

[0090] Preferably, the latent vector corresponding to the text to be synthesized The time series c is input into a preset bias prediction network to obtain the bias of the time series, and before being used to correct the time series, an additional bias prediction network is trained with the true value information of the audio to assist in correcting the time point sequence of the phoneme, specifically:

[0091] The latent vectors corresponding to the text to be synthesized and the audio to be synthesized and Combine them to get the corresponding latent vector Z;

[0092] The latent vector Z and time series c are used as inputs of the preset bias prediction network to obtain the bias label of the time series c ;

[0093] The part of the latent vector Z related to the true value of the audio is shielded, and only the latent vector related to the phoneme encoding is input ;

[0094] The latent vector associated with the phoneme encoding And time series c as the input of the preset bias prediction network to obtain the predicted time series bias ;

[0095] The bias label and the predicted time series bias Calculate and get the bias correction loss caused by the bias prediction of the time series. The calculation formula is:

[0096]

[0097] Among them, sg means there is no gradient in the back propagation calculation, M is a mask matrix, Represents element-wise multiplication, the text-related part of the mask matrix is ​​1, and the audio-related part is 0;

[0098] Through calculation, the corrected phoneme-related time series is obtained, and the calculation formula is:

[0099]

[0100] Among them, r represents The probability of correcting time series information, 1- The probability does not correct the time series information.

[0101] Preferably, it also includes:

[0102] The time series c after bias correction is used to obtain the latent vector according to the text to be synthesized , and the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , calculate the relevant training losses according to different speech synthesis model training methods.

[0103] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A speech synthesis method for improving the accuracy of phoneme pronunciation duration, It is characterized in that include: Acquiring acoustic cues, audio to be synthesized, and text to be synthesized, and converting the acoustic cues, audio to be synthesized, and text to be synthesized using an audio codec and a G2P model to obtain discrete codes and phoneme codes; The discrete code corresponding to the acoustic prompt is converted into a continuous vector by using a codebook , the discrete code corresponding to the synthesized audio is converted into a continuous vector , phoneme encoding is converted into a continuous vector , and input the continuous vector into a preset neural network to obtain the latent vector corresponding to the continuous vector and ; The pronunciation duration of each word in the audio to be synthesized is obtained according to the preset time series prediction network, and the time series c of the text to be synthesized and the audio to be synthesized is obtained according to the pronunciation duration. The time series c is input into the preset bias prediction network to obtain the bias of the time series, and is used to correct the time series; The time series c after bias correction is converted into the latent vector corresponding to the text to be synthesized , the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , and decoding the synthesized speech code according to the audio codec to obtain the speech to be synthesized; The pronunciation duration of each word in the audio to be synthesized is obtained according to the preset time series prediction network, and the time series c of the text and audio to be synthesized is obtained according to the pronunciation duration, specifically: Obtaining the pronunciation range of each phoneme in the text to be synthesized obtained by the external alignment tool, converting the pronunciation of each phoneme into a corresponding time point, and obtaining a time point sequence t; Convert the audio to be synthesized into a time index sequence a according to the audio step length; Combining the time point sequence t and the time index sequence a to obtain a combined time series c; In the hidden vector corresponding to the text to be synthesized The time series c is input into a preset bias prediction network to obtain the bias of the time series, and before being used to correct the time series, an additional bias prediction network is trained with the true value information of the audio to assist in correcting the time point sequence of the phoneme, specifically: The latent vectors corresponding to the text to be synthesized and the audio to be synthesized and Combine them to get the corresponding latent vector Z; The latent vector Z and time series c are used as inputs of the preset bias prediction network to obtain the bias label of the time series c ; The part of the latent vector Z related to the true value of the audio is shielded, and only the latent vector related to the phoneme encoding is input ; The latent vector associated with the phoneme encoding And time series c as the input of the preset bias prediction network to obtain the predicted time series bias ; The bias label and the predicted time series bias Calculate and get the bias correction loss caused by the bias prediction of the time series. The calculation formula is: Among them, sg means there is no gradient in the back propagation calculation, M is a mask matrix, Represents element-wise multiplication, the text-related part of the mask matrix is ​​1, and the audio-related part is 0; Through calculation, the corrected phoneme-related time series is obtained, and the calculation formula is: Among them, r represents The probability of correcting time series information, 1- The probability does not correct the time series information.

2. A method for speech synthesis for improving the accuracy of phoneme pronunciation duration according to claim 1, It is characterized in that Acoustic prompts, audio to be synthesized, and text to be synthesized are obtained, and the acoustic prompts, audio to be synthesized, and synthesized text are converted using an audio codec and a G2P model to obtain discrete codes and phoneme codes, specifically: Acquire acoustic cues and the audio to be synthesized, and convert the acoustic cues and the audio to be synthesized into discrete codes through an audio codec , where T represents the down-sampled audio step size, and k represents the number of codebooks; Obtain the text to be synthesized, convert the text to be synthesized into phonemes through a preset G2P model, and convert the phonemes into phoneme codes through a mapping dictionary ,in, Indicates the length of the phoneme code.

3. A method for speech synthesis for improving the accuracy of phoneme pronunciation duration according to claim 1, It is characterized in that Also includes: The bias-corrected time series c, the latent vector corresponding to the text to be synthesized and the acoustic prompt are input into the decoder composed of the neural network to obtain the speech code to be synthesized. , calculate the relevant training losses according to different speech synthesis model training methods.

4. A speech synthesis device for improving the accuracy of phoneme pronunciation duration, It is characterized in that include: An encoding unit, used to obtain acoustic cues, audio to be synthesized, and text to be synthesized, and to convert the acoustic cues, audio to be synthesized, and text to be synthesized using an audio codec and a G2P model to obtain discrete codes and phoneme codes; Hidden vector unit, used to convert the discrete code corresponding to the acoustic prompt into a continuous vector through a codebook , the discrete code corresponding to the synthesized audio is converted into a continuous vector , phoneme encoding is converted into a continuous vector , and input the continuous vector into a preset neural network to obtain the latent vector corresponding to the continuous vector and ; The time series bias correction unit is used to obtain the pronunciation duration of each word in the audio to be synthesized according to the preset time series prediction network, obtain the time series c of the text to be synthesized and the audio according to the pronunciation duration, and convert the latent vector corresponding to the text to be synthesized into The time series c is input into the preset bias prediction network to obtain the bias of the time series, and is used to correct the time series; The speech unit to be synthesized is used to convert the time series c after bias correction into the latent vector corresponding to the text to be synthesized , the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , and decoding the synthesized speech code according to the audio codec to obtain the speech to be synthesized; The corrected time series bias unit is specifically used for: Obtaining the pronunciation range of each phoneme in the text to be synthesized obtained by the external alignment tool, converting the pronunciation of each phoneme into a corresponding time point, and obtaining a time point sequence t; Convert the audio to be synthesized into a time index sequence a according to the audio step length; Combining the time point sequence t and the time index sequence a to obtain a combined time series c; In the hidden vector corresponding to the text to be synthesized The time series c is input into a preset bias prediction network to obtain the bias of the time series, and before correcting the time series bias, an additional bias prediction network is trained with the true value information of the audio to assist in correcting the time point sequence of the phoneme, specifically: The latent vectors corresponding to the text to be synthesized and the audio to be synthesized and Combine them to get the corresponding latent vector Z; The latent vector Z and time series c are used as inputs of the preset bias prediction network to obtain the bias label of the time series c ; The part of the latent vector Z related to the true value of the audio is shielded, and only the latent vector related to the phoneme encoding is input ; The latent vector associated with the phoneme encoding And time series c as the input of the preset bias prediction network to obtain the predicted time series bias ; The bias label and the predicted time series bias Calculate and get the bias correction loss caused by the bias prediction of the time series. The calculation formula is: Among them, sg means there is no gradient in the back propagation calculation, M is a mask matrix, Represents element-wise multiplication, the text-related part of the mask matrix is ​​1, and the audio-related part is 0; Through calculation, the corrected phoneme-related time series is obtained, and the calculation formula is: Among them, r represents The probability of correcting time series information, 1- The probability does not correct the time series information.

5. A speech synthesis device for improving the accuracy of phoneme pronunciation duration according to claim 4, It is characterized in that The coding unit is specifically used for: Acquire acoustic cues and the audio to be synthesized, and convert the acoustic cues and the audio to be synthesized into discrete codes through an audio codec , where T represents the down-sampled audio step size, and k represents the number of codebooks; Obtain the text to be synthesized, convert the text to be synthesized into phonemes through a preset G2P model, and convert the phonemes into phoneme codes through a mapping dictionary ,in, Indicates the length of the phoneme code.

6. A speech synthesis device for improving the accuracy of phoneme pronunciation duration according to claim 4, It is characterized in that Also includes: The time series c after bias correction is used to obtain the latent vector according to the text to be synthesized , and the latent vector corresponding to the acoustic cue , and are input into the decoder composed of the neural network to obtain the speech code to be synthesized , calculate the relevant training losses according to different speech synthesis model training methods.

Citation Information

Patent Citations

  • Multi-speaker voice synthesis method based on variational auto-encoder

    CN112289304A

  • Speech synthesis method and system for new tone generation

    CN112802448A

  • Speech synthesis model training method, speech synthesis method and device

    CN113823260A

  • Generating audio data using misaligned text input using adversarial networks

    CN115427973A

  • Reading controllable speech synthesis method and device based on speech self-supervised learning representation

    CN117672176A