Speech synthesis method and device, equipment and storage medium

By using semantic information and phoneme sequences to generate feature vectors, the problem of insufficient prosodic expressiveness in existing speech synthesis technology is solved, and a more natural and vivid speech synthesis effect is achieved.

CN118782018AActive Publication Date: 2024-10-15IFLYTEK CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310364777.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2024-10-15
Estimated Expiration
2043-04-03

AI Technical Summary

Technical Problem

In existing speech synthesis technology, the same text can correspond to multiple speech sounds with different expressions, resulting in weak rhythmic ups and downs of the synthesized speech, poor expressiveness, and the inability to effectively capture the semantic and prosodic information of the text.

Method used

By using the semantic information of the text to be processed to determine the prosodic information, and combining the phoneme sequence to generate a feature vector for speech synthesis, the expressiveness of the synthesized speech is enhanced.

Benefits of technology

Effectively matches text and prosodic information, improves the expressiveness of synthesized speech, and makes the generated speech more natural and vivid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118782018A_ABST
    Figure CN118782018A_ABST
Patent Text Reader

Abstract

The invention provides a speech synthesis method and device, equipment and a storage medium. According to the specific implementation scheme, the method comprises the steps of determining rhythm information of a to-be-processed text by utilizing semantic information of the to-be-processed text; determining a feature vector of the to-be-processed text based on a phoneme sequence of the to-be-processed text and the rhythm information; wherein the feature vector of the to-be-processed text comprises a phoneme sequence of the to-be-processed text and the rhythm information; and synthesizing the target voice by using the feature vector, and according to the technical scheme of the invention, the expressive force of the synthesized voice can be effectively improved and enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a speech synthesis method, apparatus, device and storage medium. Background Art

[0002] Text to Speech (TTS) is a technology that automatically converts text into speech. With the continuous development of deep learning technology and its application in the field of speech synthesis, speech synthesis technology has developed rapidly.

[0003] The current speech synthesis task has a "one-to-many" phenomenon, that is, the same text can correspond to multiple speech with different expressions. Generally, the minimum mean square error (MSE) criterion is used to train the model. In the end, the model can only learn an averaged rhythm, resulting in weak rhythm fluctuations and poor expressiveness of the synthesized speech. Summary of the invention

[0004] In order to solve the above problems, the present application proposes a speech synthesis method, apparatus, device and storage medium, which can enhance the expressiveness of synthesized speech.

[0005] According to a first aspect of an embodiment of the present application, there is provided a speech synthesis method, comprising:

[0006] Determining the prosodic information of the text to be processed by using the semantic information of the text to be processed;

[0007] Determine a feature vector of the text to be processed based on the phoneme sequence and the prosody information of the text to be processed; wherein the feature vector of the text to be processed includes: the phoneme sequence and the prosody information of the text to be processed;

[0008] The target speech is synthesized using the feature vector.

[0009] According to a second aspect of an embodiment of the present application, there is provided a speech synthesis device, characterized in that it includes:

[0010] An acquisition module, used for determining the prosodic information of the text to be processed by using the semantic information of the text to be processed;

[0011] A first processing module, configured to determine a feature vector of the text to be processed based on the phoneme sequence of the text to be processed and the prosody information; wherein the feature vector of the text to be processed includes: the phoneme sequence of the text to be processed and the prosody information;

[0012] The synthesis module is used to synthesize the target speech using the feature vector.

[0013] A third aspect of the present application provides an electronic device, including:

[0014] Memory and processor;

[0015] The memory is connected to the processor and is used to store programs;

[0016] The processor implements the above-mentioned speech synthesis method by running the program in the memory.

[0017] A fourth aspect of the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned speech synthesis method is implemented.

[0018] One embodiment of the above application has the following advantages or beneficial effects:

[0019] The semantic information of the text to be processed is used to determine the prosodic information of the text to be processed, so that the prosodic information can better match the text. Then, based on the phoneme sequence and prosodic information of the text to be processed, a feature vector containing the text, text semantic information and prosody can be determined. In this way, using the above feature vector for speech synthesis can enhance the expressiveness of the synthesized speech. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0021] Figure 1 A flowchart of a speech synthesis method provided in an embodiment of the present application;

[0022] Figure 2 A flowchart of a speech synthesis method S110 provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of determining rhythmic gymnastics information provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of the training of the prosody information extraction model provided in the embodiment of the present application;

[0025] Figure 5 A schematic diagram of joint training of a first encoder and a decoder provided in an embodiment of the present application;

[0026] Figure 6 A schematic diagram of a specific flow chart of a speech synthesis method provided in an embodiment of the present application;

[0027] Figure 7 A schematic diagram of the structure of a speech synthesis device provided in an embodiment of the present application;

[0028] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solution of the embodiment of the present application is applicable to various speech synthesis scenarios, such as animation scenarios, human-computer interaction scenarios, etc. The technical solution of the embodiment of the present application can enhance the expressiveness of synthesized speech.

[0030] The technical solution of the embodiment of the present application can be exemplarily applied to hardware devices such as processors, electronic devices, servers (including cloud servers), or packaged into software programs to be run. When the hardware device executes the processing of the technical solution of the embodiment of the present application, or the above-mentioned software program is run, the purpose of enhancing the expressiveness of the synthesized speech can be achieved. The embodiment of the present application only exemplarily introduces the specific processing of the technical solution of the present application, and does not limit the specific implementation form of the technical solution of the present application. Any technical implementation form that can execute the processing of the technical solution of the present application can be adopted by the embodiment of the present application.

[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0032] Exemplary Methods

[0033] Figure 1 FIG. 1 is a flow chart of a speech synthesis method according to an embodiment of the present application. In an exemplary embodiment, a speech synthesis method is provided, comprising:

[0034] S110, determining the prosodic information of the text to be processed by using the semantic information of the text to be processed;

[0035] S120, determining a feature vector of the text to be processed based on the phoneme sequence and the prosody information of the text to be processed; wherein the feature vector of the text to be processed includes: the phoneme sequence and the prosody information of the text to be processed;

[0036] S130: Synthesize the target speech using the feature vector.

[0037] In step S110, illustratively, the text to be processed is used to represent the text that needs to be converted into voice data. Optionally, the text to be processed can be input directly or indirectly by the user on the terminal device, or it can be a text specified on a web page or in a text library, which is not limited here. Among them, the terminal device can be a device with communication function and input function, such as a mobile phone, a tablet, a handwriting board, etc. The semantic information of the text to be processed represents the text meaning of the text to be processed. Optionally, the text meaning of each sentence can be determined according to the context. Prosody information is used to represent pauses and ups and downs in the text.

[0038] Specifically, the prosodic information corresponding to the semantic information of the to-be-processed text may be determined based on the pre-stored mapping relationship between semantic information and prosodic information, wherein the pre-stored mapping relationship between semantic information and prosodic information may be determined based on a large amount of semantic information sample data and prosodic information sample data.

[0039] In step S120, illustratively, phoneme is the smallest unit of speech divided according to the natural properties of speech. From the perspective of acoustic properties, phoneme is the smallest unit of speech divided from the perspective of sound quality. The phoneme sequence of the text to be processed is used to represent the sequence formed by the phonemes corresponding to the text to be processed. Optionally, the encoding vector of the phoneme sequence of the text to be processed and the encoding vector corresponding to the prosodic information are concatenated to obtain a feature vector containing the text and the prosodic information.

[0040] In step S130, illustratively, the feature vector may be decoded by a decoder to obtain the target speech. Specifically, the decoder may be a vocoder, which decodes the feature vector to obtain a final speech waveform.

[0041] In the technical solution of the present application, the semantic information of the text to be processed is used to determine the prosodic information of the text to be processed, so that the prosodic information can be more closely matched with the text. Then, based on the phoneme sequence and prosodic information of the text to be processed, a feature vector containing the text, text semantic information and prosody can be determined. In this way, speech synthesis using the above-mentioned feature vector can enhance the expressiveness of the synthesized speech.

[0042] In one embodiment, Figure 2 As shown, the step S110 of determining the prosodic information of the text to be processed by using the semantic information of the text to be processed includes:

[0043] S210, extracting semantic information of the text to be processed;

[0044] S220: Determine the prosody information of the text to be processed based on the phoneme sequence of the text to be processed and the semantic information.

[0045] Exemplarily, semantic information can be extracted according to a text semantic encoder, wherein the text semantic encoder can be a BERT (Bidirectional Encoder Representation from Transformers) model, and the BERT model is a pre-trained transformer-based model. The BERT model is pre-trained according to the text training sample and the corresponding semantic information, so that the trained BERT model can perform semantic extraction on the text to be processed. The phoneme sequence of the text to be processed can be fused with semantic information to obtain fusion information. The fusion information is input into a preset model to obtain the rhythmic information of the text to be processed, wherein the preset model can be obtained by training the fusion training data formed according to the semantic training data and its corresponding phoneme sequence. It can be seen that the semantic information is fused with the phoneme sequence of the text to be processed, and the pauses and ups and downs of the text can be fully understood through the semantic information, so that the rhythmic information can be more matched with the text.

[0046] In another embodiment, the determining the prosodic information of the text to be processed by using the semantic information of the text to be processed includes:

[0047] Inputting the text to be processed into a preset prosody information prediction model to obtain prosody information of the text to be processed;

[0048] Among them, the prosody information prediction model includes a text semantic encoder and a prosody information decoder, the text semantic encoder is used to extract the semantic information of the text to be processed; the prosody information decoder is used to determine the prosody information of the text to be processed based on the phoneme sequence of the text to be processed and the semantic information.

[0049] Exemplarily, the prosody information prediction model includes a text semantic encoder and a prosody information decoder, the text semantic encoder can adopt the BERT model, and the prosody information decoder can adopt the Glow decoder. When training the prosody information prediction model, it is necessary to train the text semantic encoder in advance so that the text semantic encoder can recognize the semantics, and then perform semantic extraction on the text training sample based on the trained text semantic encoder, and then use the extracted semantic information and the phoneme sequence of the text training sample as training data to train the prosody information decoder until the model converges to obtain a trained prosody information decoder. In this way, a trained prosody information prediction model is generated through the BERT model and the prosody information decoder, and the additional semantic information brought by the BERT model can help the prosody information prediction model better model the prosody information such as fundamental frequency fluctuations and stress positions, so that the rhythm and text are more matched, so that the trained prosody information prediction model can directly determine the prosody information based on the semantic information.

[0050] In one implementation, the determining the prosodic information of the text to be processed based on the phoneme sequence of the text to be processed and the semantic information, step S220 includes:

[0051] S310, encoding the phoneme sequence and the semantic information of the text to be processed to determine an output sequence; the output sequence includes the phoneme sequence and the semantic information of the text to be processed;

[0052] S320, determining predicted duration information of each phoneme of the phoneme sequence of the text to be processed according to the output sequence;

[0053] S330, determining a corresponding first acoustic feature according to the output sequence and the predicted duration information of each phoneme of the phoneme sequence of the text to be processed;

[0054] S340: Determine the prosodic information of the text to be processed using the first acoustic feature.

[0055] Preferably, step S330 includes: updating the duration of each output vector in the output sequence by using the correspondence between the preset target duration and the predicted duration information of each phoneme in the phoneme sequence of the text to be processed, to obtain an updated output sequence.

[0056] Exemplarily, first, the phoneme sequence of the text to be processed is encoded, that is, the discrete phoneme sequence is mapped to a high-dimensional vector representation. For example, the phoneme sequence is nonlinearly encoded through a multi-layer transformer network to obtain an encoding vector of the phoneme sequence. According to the result of splitting the text to be processed into phonemes, the text corresponding to each phoneme is determined, and the semantic information corresponding to the text (ie, the BERT hidden layer vector) is taken out and spliced ​​with the encoding vector of the phoneme sequence to obtain a splicing result. The splicing result is input into a multi-layer bidirectional long short-term memory network (Bidirectional Long Short Term Memory, BiLSTM) for re-encoding, and a vector (ie, output sequence) containing phoneme pronunciation information and semantic information is output.

[0057] Secondly, the output sequence is predicted according to the duration model to obtain the predicted duration information of each phoneme. Specifically, the output sequence is re-encoded through a multi-layer BiLSTM network (e.g., three layers) so that the encoded hidden vector contains more duration-related information, and then the duration of each phoneme is directly predicted through a forward network. It should be noted that the target duration of the duration model (multi-layer BiLSTM network combined with forward network) is determined in advance, for example, extracted by a hidden Markov model (HMM). During training, the network is updated based on the loss between the target duration and the predicted duration (such as the mean square error loss function). And during training, the target duration is input for subsequent use, while during speech synthesis, the predicted duration is input for subsequent use. In this way, the trained network can predict the predicted duration corresponding to each phoneme, thereby effectively synthesizing speech. Then, the output sequence is replicated and upsampled according to the predicted duration information of each phoneme to obtain the first acoustic feature. For example, the output sequence is [h1,h2,h3], the predicted duration is [1,2,2], and the up-sampled output is [h1,h2,h2,h3,h3]. Finally, the first acoustic feature is decoded to obtain the rhythm information of the text to be processed.

[0058] Furthermore, the step of determining the prosodic information of the text to be processed by using the first acoustic feature comprises:

[0059] The first acoustic feature is processed using a preset prosody information conversion model to obtain the prosody coding vector; wherein the prosody information conversion model is obtained by performing prosody information extraction training on acoustic training samples using training prosody coding vectors as training labels, and the training prosody coding vectors are extracted based on speech training data.

[0060] Exemplarily, the speech training data may be real speech data collected directly or indirectly with the consent of the user, or speech data obtained from an open source speech library, which is not limited here. The acoustic training sample represents the training data formed according to the acoustic features corresponding to different text training data. The prosody information conversion model may use the Glow decoder (Generative Flow), and may also use other decoders without limitation here.

[0061] Specifically, when the prosody information conversion model uses the Glow decoder, the entire Glow decoder consists of multiple blocks, each of which includes an ActNorm layer, a reversible 1*1 convolution layer, and a coupling layer. The training criterion of Glow is maximum likelihood estimation. The acoustic features after upsampling are recorded as x, and the modeling target prosody information (i.e., the training prosody encoding vector) is recorded as y. The training objective function can be expressed as follows:

[0062]

[0063] Among them, p z is a standard normal distribution, and z = f(y|x) is a reversible transformation of y. Since f is a reversible transformation, when synthesizing, we only need to randomly sample z from the standard normal distribution and then inverse transform f -1 Back-propagation generates rhythmic information.

[0064] Furthermore, if Figure 3 As shown, after the training of the Glow decoder is completed, if the text to be processed is obtained, the semantic information of the text to be processed is extracted, and the phoneme sequence of the text to be processed is encoded to obtain the encoding vector of the phoneme sequence of the text to be processed. The semantic information is then concatenated with the encoding vector of the phoneme sequence of the text to be processed to obtain an output sequence. The predicted duration information of each phoneme in the phoneme sequence of the text to be processed is determined according to the output sequence, and the corresponding first acoustic feature is determined according to the output sequence and the predicted duration information of each phoneme in the phoneme sequence of the text to be processed. The first acoustic feature is input into the Glow decoder to obtain the rhythmic information. It can be seen that since the rhythmic information of any distribution can be modeled, the rhythmic information conversion model can accurately identify the rhythmic information in the text.

[0065] Preferably, the training prosody coding vector is extracted based on speech training data, including:

[0066] The speech training data is input into a preset prosody information extraction model to obtain a training prosody coding vector; wherein the preset prosody information extraction model is obtained by performing prosody information extraction training on a preset neural network model according to positive training data and negative training data; the positive training data and negative training data are constructed for each target feature vector in a speech library; the positive training data and negative training data are obtained by performing reverse causal convolution coding on the speech training data in the speech library.

[0067] Exemplarily, the positive training data represents a speech data segment related to the target feature vector. The negative training data represents a speech data segment that is not related to the target feature vector. It should be noted that the target feature vector can be a randomly selected speech data segment in the speech library, or can be selected according to a specific rule, which is not limited here. The prosody information extraction model can use a long short-term memory network, or other models, which are not limited here.

[0068] In related technologies, there are various ways to extract prosodic codes, most of which use predictive learning, such as AE (Auto-Encoder) and VAE (Variational Auto-Encoder). However, predictive learning takes reconstructing input as the training goal, and it is easy to extract too much redundant detail information.

[0069] In the technical solution of the application, optionally, causal convolution encoding is performed on the speech training data in the speech library to obtain a first vector; and time series encoding is performed on the first vector to obtain the target feature vector.

[0070] Specifically, Figure 4 As shown in the figure, the speech training data in the speech library is input into the causal convolutional encoder for complex nonlinear transformation to obtain the encoded first vector. Then, the first vector is temporally encoded according to the long short-term memory network to obtain the target feature vector as the anchor point of the training model. It can be seen that since the causal convolutional encoder can limit the receptive field of the vector so that it cannot see the information of future frames, cheating can be prevented during comparative training due to the overlap of the receptive field of the anchor point (i.e., the target feature vector) and the positive training data.

[0071] Furthermore, the speech training data in the speech library is input into the reverse causal convolutional encoder for complex nonlinear transformation to obtain the encoded second vector, which is used as the positive training data and negative training data required for the comparative training criteria. It can be seen that since the reverse causal convolutional encoder can limit the vector from seeing the information of the historical frame, cheating can be prevented during comparative training. It should be noted that since the large-scale positive example range can better extract abstract rhythmic information while ignoring detailed information, for each anchor point, a frame is randomly selected within the next 400ms as positive training data. Negative training data includes intra-sentence negative examples and global negative examples. The selection range of intra-sentence negative examples is all frames in the current sentence and after the positive training data, which mainly helps to extract some rhythmic change information in the sentence. The global negative example is selected from any frame of other sentences in the speech library, which mainly helps to extract the overall style information of the sentence.

[0072] In this embodiment, the prosody information extraction model adopts a contrastive learning training method to train the anchor point c of each target feature vector. t , construct reasonable positive training data And the counter-example training data set Then, the objective function can be optimized according to a preset training criterion (such as InfoNCE), so that a preset prosody information extraction model can be obtained.

[0073] Among them. The objective function formula is as follows:

[0074]

[0075] Among them, f(c t , z t ) = exp(c′ t ·z t ).

[0076] In one implementation, determining the feature vector of the text to be processed based on the phoneme sequence of the text to be processed and the prosody information includes:

[0077] Determining a second acoustic feature of a frame level of the text to be processed according to the phoneme sequence of the text to be processed and the predicted duration information of each phoneme in the phoneme sequence of the text to be processed;

[0078] The second acoustic feature is concatenated with the prosodic information to obtain a feature vector of the text to be processed.

[0079] Exemplarily, after the predicted duration information of each phoneme in the phoneme sequence of the text to be processed can be obtained when the prosody information is obtained, the encoding vector of the phoneme sequence of the text to be processed and the predicted duration information of each phoneme in the phoneme sequence are upsampled to obtain the second acoustic feature at the frame level. The prosody information and the second acoustic feature at the frame level are then concatenated, and the concatenated result is encoded. In this way, the prosody information is added to the second acoustic feature at the frame level to obtain a feature vector containing text and prosody information, which helps to better determine the speech waveform.

[0080] In one embodiment, determining a feature vector of the text to be processed based on the phoneme sequence of the text to be processed and the prosody information; and synthesizing a target speech using the feature vector comprises:

[0081] Inputting the phoneme sequence of the text to be processed and the prosody information into a preset first encoder to obtain a feature vector of the text to be processed;

[0082] Inputting the feature vector of the text to be processed into a preset decoder, and outputting the target speech;

[0083] The decoder is obtained by performing speech decoding training according to the training feature vector output by the second encoder, and the second encoder is used to encode the linear spectrum to obtain the training feature vector.

[0084] Preferably, the training method of the decoder and the first encoder comprises:

[0085] Determine a first loss function according to an output result of the first encoder and an output result of the second encoder;

[0086] The decoder and the first encoder are jointly optimized using the first loss function and a second loss function corresponding to the decoding result of the decoder to obtain a trained decoder and first encoder.

[0087] Exemplarily, the preset first encoder is used to predict the prior distribution of the feature vector. The preset second encoder is used to obtain the posterior distribution of the feature vector from the linear spectrum. The linear spectrum is obtained by Fourier transforming the expected speech data. It is understandable that when training the decoder, the training data of the decoder includes the linear spectrum of the speech training data and the speech training data, and the speech training data is obtained from the speech library.

[0088] Specifically, in related technologies, the acoustic model and the vocoder are usually modeled separately, and the acoustic features are used as an intermediate bridge between the two models, which will bring two problems. First, the acoustic feature used as a bridge between models is not a perfect intermediate feature. It is independent of the current synthesis model and extracted according to certain rules. Therefore, it may contain information that the synthesis model does not need, and it may also lose information that the synthesis model needs. Secondly, separate modeling will lead to a mismatch between training and testing. The real acoustic features are seen during vocoder training, and the acoustic features generated by the acoustic model are seen during synthesis. There is a big difference between the two. The above two reasons will greatly damage the synthesized sound quality of the synthesis model.

[0089] In this embodiment, if Figure 5 As shown, the first encoder includes: a phoneme encoder, an upsampling module, a splicing module and a Flow module, wherein the Flow module includes multiple Flow layers, such as four layers. The second encoder is composed of several layers of convolution, and the linear spectrum is input to the second encoder to output a training feature vector, that is, the bridge features of the first encoder and the decoder are extracted from the lossless linear spectrum. The decoder can be a vocoder. When training the first encoder and the decoder, the first encoder is trained using the loss between the prior distribution of the feature vector output by the first encoder and the posterior distribution of the feature vector output by the second encoder. For example, the KL divergence loss function, Kullback-Leibler Divergence, (i.e., the first loss function) is determined based on the prior distribution of the feature vector output by the first encoder and the posterior distribution of the feature vector output by the second encoder.

[0090] For the decoder, the maximum likelihood loss function (i.e., the second loss function) used to train the decoder is used according to the training feature vector output by the second encoder. The target loss function is generated according to the maximum likelihood loss function and the KL divergence loss function, and the decoder is trained using the target loss function. After the decoder and the first encoder converge, there is no need to use the second encoder. It should be noted that the first loss function and the second loss function can also be other loss functions set according to actual needs, which are not limited here. In this way, through joint training, the decoder and the first encoder can learn a more suitable intermediate feature vector by themselves, and avoid the problem of mismatch between acoustic feature training and testing.

[0091] Specifically, Figure 6 As shown, after the first encoder and decoder training is completed, if the text to be processed is obtained, the prosodic information corresponding to the text to be processed is first determined. Secondly, the phoneme sequence of the text to be processed is nonlinearly encoded by the phoneme encoder to obtain the encoding vector of the phoneme sequence, and the encoding vector of the phoneme sequence and the predicted duration information of each phoneme in the phoneme sequence are input into the upsampling module, and the frame-level feature vector (i.e., the second acoustic feature of the frame level) is output. The frame-level feature vector and the prosodic information are then spliced ​​in the hidden layer dimension by the splicing module, and the splicing result is encoded through a multi-layer BiLSTM network (such as a two-layer BiLSTM network) to obtain a feature vector containing text and prosodic information. The feature vector containing text and prosodic information is transformed by a four-layer Flow layer, and the feature vector of the text to be processed is output. The feature vector of the text to be processed is input into the vocoder, and the target speech is output. In this way, the target speech can be directly output without solving the acoustic features, thereby greatly improving the synthesized sound quality of the synthesized speech.

[0092] Exemplary Devices

[0093] Accordingly, Figure 7 1 is a schematic diagram of a speech synthesis device according to an embodiment of the present application. In an exemplary embodiment, a speech synthesis device is provided, comprising:

[0094] An acquisition module 710 is used to determine the prosodic information of the text to be processed by using the semantic information of the text to be processed;

[0095] The first processing module 720 is used to determine the feature vector of the text to be processed based on the phoneme sequence and the prosody information of the text to be processed; wherein the feature vector of the text to be processed includes: the phoneme sequence and the prosody information of the text to be processed;

[0096] The synthesis module 730 is used to synthesize the target speech using the feature vector.

[0097] In one implementation, the acquisition module 710 includes:

[0098] An extraction module, used for extracting semantic information of the text to be processed;

[0099] The second processing module is used to determine the prosodic information of the text to be processed based on the phoneme sequence of the text to be processed and the semantic information.

[0100] In one embodiment, the second processing module is further used to:

[0101] Encoding the phoneme sequence of the text to be processed and the semantic information to determine an output sequence; the output sequence includes the phoneme sequence of the text to be processed and the semantic information;

[0102] Determine predicted duration information of each phoneme of the phoneme sequence of the text to be processed according to the output sequence;

[0103] Determining a corresponding first acoustic feature according to the output sequence and the predicted duration information of each phoneme of the phoneme sequence of the text to be processed;

[0104] The prosody information of the text to be processed is determined using the first acoustic feature.

[0105] In one implementation, the determining the prosodic information of the text to be processed by using the first acoustic feature includes:

[0106] Processing the first acoustic feature using a preset prosody information conversion model to obtain the prosody coding vector;

[0107] The prosody information conversion model is obtained by performing prosody information extraction training on acoustic training samples using training prosody coding vectors as training labels, and the training prosody coding vectors are extracted based on speech training data.

[0108] In one implementation, the training prosody coding vector is extracted based on speech training data, including:

[0109] Inputting the speech training data into a preset prosody information extraction model to obtain a training prosody coding vector;

[0110] Among them, the preset prosodic information extraction model is obtained by performing prosodic information extraction training on a preset neural network model based on positive training data and negative training data; the positive training data and negative training data are constructed for each target feature vector in the speech library; the positive training data and negative training data are obtained by performing reverse causal convolution coding on the speech training data in the speech library.

[0111] In one embodiment, the method for obtaining the target feature vector includes:

[0112] Performing causal convolution encoding on the speech training data in the speech library to obtain a first vector;

[0113] Perform time series encoding on the first vector to obtain the target feature vector.

[0114] In one embodiment, the determining of the prosodic information of the text to be processed by using the semantic information of the text to be processed includes:

[0115] Inputting the text to be processed into a preset prosody information prediction model to obtain prosody information of the text to be processed;

[0116] Among them, the prosody information prediction model includes a text semantic encoder and a prosody information decoder, the text semantic encoder is used to extract the semantic information of the text to be processed; the prosody information decoder is used to determine the prosody information of the text to be processed based on the phoneme sequence of the text to be processed and the semantic information.

[0117] In one implementation, the first processing module 720 is further configured to:

[0118] Determining a second acoustic feature of a frame level of the text to be processed according to the phoneme sequence of the text to be processed and the predicted duration information of each phoneme in the phoneme sequence of the text to be processed;

[0119] The second acoustic feature is concatenated with the prosodic information to obtain a feature vector of the text to be processed.

[0120] In one embodiment, determining a feature vector of the text to be processed based on the phoneme sequence of the text to be processed and the prosody information; and synthesizing a target speech using the feature vector comprises:

[0121] Inputting the phoneme sequence of the text to be processed and the prosody information into a preset first encoder to obtain a feature vector of the text to be processed;

[0122] Inputting the feature vector of the text to be processed into a preset decoder, and outputting the target speech;

[0123] The decoder is obtained by performing speech decoding training according to the training feature vector output by the second encoder, and the second encoder is used to encode the linear spectrum to obtain the training feature vector.

[0124] In one embodiment, the training method of the decoder and the first encoder includes:

[0125] Determine a first loss function according to an output result of the first encoder and an output result of the second encoder;

[0126] The decoder and the first encoder are jointly optimized using the first loss function and a second loss function corresponding to the decoding result of the decoder to obtain a trained decoder and first encoder.

[0127] The speech synthesis device provided in this embodiment belongs to the same application concept as the speech synthesis method provided in the above embodiments of this application, can execute the speech synthesis method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the speech synthesis method. For technical details not fully described in this embodiment, please refer to the specific processing content of the speech synthesis method provided in the above embodiments of this application, which will not be repeated here.

[0128] Exemplary Electronic Devices

[0129] Another embodiment of the present application also provides an electronic device, see Figure 8 As shown, the device includes:

[0130] Memory 800 and processor 810;

[0131] The memory 800 is connected to the processor 810 and is used to store programs;

[0132] The processor 810 is used to implement the speech synthesis method disclosed in any of the above embodiments by running the program stored in the memory 800.

[0133] Specifically, the electronic device may further include: a bus, a communication interface 820 , an input device 830 and an output device 840 .

[0134] The processor 810, the memory 800, the communication interface 820, the input device 830 and the output device 840 are connected to each other via a bus.

[0135] A bus may include a pathway that transfers information between components of a computer system.

[0136] The processor 810 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0137] The processor 810 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0138] The memory 800 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 800 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0139] The input device 830 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0140] Output device 840 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0141] The communication interface 820 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0142] The processor 810 executes the program stored in the memory 800 and calls other devices, which can be used to implement each step of any speech synthesis method provided in the above embodiments of the present application.

[0143] Exemplary computer program products and storage media

[0144] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the speech synthesis method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0145] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0146] In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the speech synthesis method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification. The specific working content of the above-mentioned electronic device, as well as the specific working content of the above-mentioned computer program product and the computer program on the storage medium when being executed by the processor, can all be referred to the contents of the above-mentioned method embodiment, and will not be repeated here.

[0147] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0148] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0149] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0150] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.

[0151] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0152] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0154] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0155] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0156] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0157] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A speech synthesis method, characterized in that: include: Determining the prosodic information of the text to be processed by using the semantic information of the text to be processed; Determine a feature vector of the text to be processed based on the phoneme sequence and the prosody information of the text to be processed; wherein the feature vector of the text to be processed includes: the phoneme sequence and the prosody information of the text to be processed; The target speech is synthesized using the feature vector.

2. The method according to claim 1, characterized in that The method of determining the prosodic information of the text to be processed by using the semantic information of the text to be processed includes: Extracting semantic information of the text to be processed; The prosody information of the text to be processed is determined based on the phoneme sequence of the text to be processed and the semantic information.

3. The method according to claim 2, characterized in that The determining the prosodic information of the text to be processed based on the phoneme sequence of the text to be processed and the semantic information comprises: Encoding the phoneme sequence of the text to be processed and the semantic information to determine an output sequence; the output sequence includes the phoneme sequence of the text to be processed and the semantic information; Determine predicted duration information of each phoneme of the phoneme sequence of the text to be processed according to the output sequence; Determining a corresponding first acoustic feature according to the output sequence and the predicted duration information of each phoneme of the phoneme sequence of the text to be processed; The prosody information of the text to be processed is determined using the first acoustic feature.

4. The method according to claim 3, characterized in that The determining the prosodic information of the text to be processed by using the first acoustic feature includes: Processing the first acoustic feature using a preset prosody information conversion model to obtain the prosody coding vector; The prosody information conversion model is obtained by performing prosody information extraction training on acoustic training samples using training prosody coding vectors as training labels, and the training prosody coding vectors are extracted based on speech training data.

5. The method according to claim 4, characterized in that The training prosody coding vector is extracted based on speech training data, and includes: Inputting the speech training data into a preset prosody information extraction model to obtain a training prosody coding vector; Among them, the preset prosodic information extraction model is obtained by performing prosodic information extraction training on a preset neural network model based on positive training data and negative training data; the positive training data and negative training data are constructed for each target feature vector in the speech library; the positive training data and negative training data are obtained by performing reverse causal convolution coding on the speech training data in the speech library.

6. The method according to claim 5, characterized in that in, The method for obtaining the target feature vector includes: Performing causal convolution encoding on the speech training data in the speech library to obtain a first vector; Perform time series encoding on the first vector to obtain the target feature vector.

7. The method according to claim 1, characterized in that The method of determining the prosodic information of the text to be processed by using the semantic information of the text to be processed includes: Inputting the text to be processed into a preset prosody information prediction model to obtain prosody information of the text to be processed; Among them, the prosody information prediction model includes a text semantic encoder and a prosody information decoder, the text semantic encoder is used to extract the semantic information of the text to be processed; the prosody information decoder is used to determine the prosody information of the text to be processed based on the phoneme sequence of the text to be processed and the semantic information.

8. The method according to claim 3, characterized in that The step of determining a feature vector of the text to be processed based on the phoneme sequence of the text to be processed and the prosody information includes: Determining a second acoustic feature of a frame level of the text to be processed according to the phoneme sequence of the text to be processed and the predicted duration information of each phoneme in the phoneme sequence of the text to be processed; The second acoustic feature is concatenated with the prosodic information to obtain a feature vector of the text to be processed.

9. The method according to claim 1, characterized in that: Determining a feature vector of the text to be processed based on the phoneme sequence of the text to be processed and the prosody information; Synthesizing a target speech using the feature vector includes: Inputting the phoneme sequence of the text to be processed and the prosody information into a preset first encoder to obtain a feature vector of the text to be processed; Inputting the feature vector of the text to be processed into a preset decoder, and outputting the target speech; The decoder is obtained by performing speech decoding training according to the training feature vector output by the second encoder, and the second encoder is used to encode the linear spectrum to obtain the training feature vector.

10. The method according to claim 9, characterized in that in, The training method of the decoder and the first encoder comprises: Determine a first loss function according to an output result of the first encoder and an output result of the second encoder; The decoder and the first encoder are jointly optimized using the first loss function and a second loss function corresponding to the decoding result of the decoder to obtain a trained decoder and first encoder.

11. A speech synthesis device, characterized in that: include: An acquisition module, used for determining the prosodic information of the text to be processed by using the semantic information of the text to be processed; A first processing module, configured to determine a feature vector of the text to be processed based on the phoneme sequence of the text to be processed and the prosody information; wherein the feature vector of the text to be processed includes: the phoneme sequence of the text to be processed and the prosody information; The synthesis module is used to synthesize the target speech using the feature vector.

12. An electronic device, characterized in that: include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor implements the speech synthesis method according to any one of claims 1 to 10 by running the program in the memory.

13. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the speech synthesis method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Rhythm control voice synthesis method and system and electronic device

    CN111754976A

  • Rhythm-controllable Chinese and English mixed speech synthesis method and system

    CN112802450A

  • Speech synthesis method and device, computer readable medium and electronic equipment

    CN114495902A

  • Two-Level Speech Prosody Transfer

    US20220051654A1

  • Speech synthesis method and apparatus, and computer-readable storage medium

    WO2020200178A1