Speech synthesis method and electronic device

Through the combination of text feature extraction, word segmentation and part-of-speech tagging models, the problem of poor traditional speech synthesis effects is solved and the quality of speech synthesis is improved.

CN112016325BActive Publication Date: 2024-10-29SOUNDAI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010921206.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-04
Publication Date
2024-10-29
Estimated Expiration
2040-09-04

AI Technical Summary

Technical Problem

Traditional speech synthesis methods are less effective, mainly due to the difficulty in accurately extracting formant parameters.

Method used

Using a combination of text feature extraction model, conditional random field CRF model and part-of-speech tagging model, more accurate text analysis results are generated for speech synthesis through text feature extraction, word segmentation and part-of-speech tagging.

Benefits of technology

The effect of speech synthesis is improved, and the accuracy of part-of-speech tagging is improved through the use of intermediate variables in the word segmentation process, thus improving the quality of speech synthesis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112016325B_ABST
    Figure CN112016325B_ABST
Patent Text Reader

Abstract

The present invention provides a speech synthesis method and electronic device, the method comprising: inputting a text to be processed into a text feature extraction model to obtain a first text feature; inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result; inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result; performing text analysis based on the part-of-speech tagging result to obtain a text analysis result; and performing speech synthesis based on the text analysis result. The embodiments of the present invention can improve the effect of speech synthesis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a speech synthesis method and electronic equipment. Background Art

[0002] Speech synthesis is a technology that can convert text information into speech and read it aloud. With the continuous advancement of technology, speech synthesis is increasingly widely used, such as news and information broadcasting, audio novels, etc. In daily life, text messages, emails and other information can also be synthesized into speech through speech synthesis, providing users with another way to obtain information.

[0003] Traditional speech synthesis uses parameter synthesis methods. Many realistic synthesized speech can be obtained through formant synthesizers. However, since it is difficult to accurately extract formant parameters, the effect of synthesizing speech using parameter synthesis methods is poor. Summary of the invention

[0004] The embodiment of the present invention provides a speech synthesis method and electronic device to solve the problem that the traditional speech synthesis effect is poor.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present invention provides a speech synthesis method, the method comprising:

[0007] Inputting the text to be processed into a text feature extraction model to obtain a first text feature;

[0008] Inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result;

[0009] Inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result;

[0010] Perform text analysis based on the part-of-speech tagging result to obtain a text analysis result;

[0011] Speech synthesis is performed based on the text analysis result.

[0012] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0013] A first input module, used for inputting the text to be processed into a text feature extraction model to obtain a first text feature;

[0014] A second input module, used for inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result;

[0015] A third input module, used for inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result;

[0016] An analysis module, used to perform text analysis based on the part-of-speech tagging result to obtain a text analysis result;

[0017] A synthesis module is used to perform speech synthesis based on the text analysis result.

[0018] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the speech synthesis method as described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the speech synthesis method described in the first aspect are implemented.

[0020] In an embodiment of the present invention, the text to be processed is input into a text feature extraction model to obtain a first text feature; the first text feature is input into a first conditional random field CRF model for word segmentation to obtain a word segmentation result; the first text feature and the word segmentation result are input into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result; text analysis is performed based on the part-of-speech tagging result to obtain a text analysis result; and speech synthesis is performed based on the text analysis result. In this way, the part-of-speech tagging result is obtained through the text feature extraction model, the first conditional random field CRF model, and the second CRF model to perform text analysis, and the effect of text analysis is better. In the process of part-of-speech tagging, the first text feature, which is an intermediate variable in the word segmentation process, is used, which can improve the accuracy of part-of-speech tagging, thereby improving the effect of speech synthesis. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 is a flow chart of a speech synthesis method provided by an embodiment of the present invention;

[0023] Figure 2 This is one of the structural schematic diagrams of an electronic device provided by an embodiment of the present invention;

[0024] Figure 3 This is a second structural schematic diagram of an electronic device provided by an embodiment of the present invention;

[0025] Figure 4 This is a third structural diagram of an electronic device provided by an embodiment of the present invention;

[0026] Figure 5 This is a fourth structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] In the embodiment of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted mobile terminal, a wearable device, and a pedometer.

[0029] See also Figure 1 , Figure 1 is a flow chart of a speech synthesis method provided by an embodiment of the present invention. Figure 1 As shown, the following steps are included:

[0030] Step 101: Input the text to be processed into a text feature extraction model to obtain a first text feature.

[0031] Wherein, the text feature extraction model can be a multi-layer long short-term memory neural network BLSTM model, or it can also be other models that can be used for text feature extraction. The input of the text to be processed into the text feature extraction model can be embedding vectorization of the text to be processed to process the text to be processed into a word vector, and the word vector is input into the text feature extraction model. Taking the text feature extraction model as a BLSTM model as an example, if the text to be processed is "Who am I?", the length of the text to be processed is 4, and after embedding vectorization, a vector with a dimension of (4, 100) can be obtained. The vector with a dimension of (4, 100) represents that the length of the text to be processed is 4, and each word can be represented by a 100-dimensional word vector. The input of the BLSTM model can be a vector with a dimension of (4, 100), and after the BLSTM model, the hidden layer vector can be changed to a vector with a dimension of (4, 128), wherein 128 can be the output dimension of the BLSTM model. The first text feature can be the vector with the dimension of (4, 128).

[0032] Step 102: Input the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result.

[0033] Among them, the first conditional random field CRF model can be used for word segmentation, which can be divided into four categories: the beginning of a word, the middle of a word, the end of a word, and a single word. Taking the first text feature as a vector with a dimension of (4, 128) as an example, the first text feature is input into the first conditional random field CRF model, and the word segmentation result obtained can be a vector with a dimension of (4, 4). Each word can correspond to 4 floating point values, which respectively represent the probability of the word belonging to a certain category.

[0034] Step 103: Input the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result.

[0035] The inputting of the first text feature and the word segmentation result into the second CRF model for part-of-speech tagging may be concatenating the first text feature and the word segmentation result, and inputting the concatenated result into the second CRF model. For example, the first text feature may be a vector with a dimension of (4, 128), and the word segmentation result may be a vector with a dimension of (4, 4). After concatenation, a vector with a dimension of (4, 132) may be obtained, and the obtained vector with a dimension of (4, 132) may be input into the second CRF model.

[0036] In addition, the inputting of the first text feature and the word segmentation result into the second CRF model for part-of-speech tagging may also be: multiplying the first text feature by a first preset coefficient to obtain a first input; multiplying the word segmentation result by a second preset coefficient to obtain a second input; and inputting the first input and the second input into the second CRF model. The inputting of the first input and the second input into the second CRF model may also be: splicing the first input and the second input, and inputting the splicing result into the second CRF model.

[0037] Furthermore, before inputting the first text feature into the first conditional random field (CRF) model for word segmentation, the method may further include: inputting the text to be processed into a convolutional neural network (CNN) model for text feature extraction to obtain a second text feature; inputting the first text feature into the first conditional random field (CRF) model for word segmentation to obtain a word segmentation result may include: inputting the first text feature and the second text feature into the first CRF model to obtain a word segmentation result. Inputting the first text feature and the word segmentation result into the second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result may include: inputting the first text feature, the second text feature and the word segmentation result into the second CRF model to obtain a part-of-speech tagging result.

[0038] Step 104: Perform text analysis based on the part-of-speech tagging result to obtain a text analysis result.

[0039] Among them, the text analysis based on the part-of-speech tagging result to obtain the text analysis result can be, the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result are input into the third CRF model for text pronunciation to obtain the text pronunciation result, and the text analysis is performed based on the text pronunciation result; or, the first text feature, the word segmentation result and the part-of-speech tagging result are input into the third CRF model for text pronunciation to obtain the text pronunciation result, and the text analysis is performed based on the text pronunciation result; or, the word segmentation result and the part-of-speech tagging result are input into the third CRF model for text pronunciation to obtain the text pronunciation result, and the text analysis is performed based on the text pronunciation result; or, the part-of-speech tagging result is input into the text pronunciation model to obtain the text pronunciation result, the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result and the text pronunciation result are input into the first deep neural network DNN model for rhythm prediction to obtain the rhythm prediction result, and the text analysis is performed based on the rhythm prediction result and the text pronunciation result. This embodiment of the present invention is not limited to this.

[0040] Step 105: Perform speech synthesis based on the text analysis result.

[0041] The text analysis result may be a phoneme sequence, and features of the phoneme sequence may be extracted through an acoustic model to obtain speech features, and the speech features may be converted into speech data through a vocoder to obtain a speech synthesis result.

[0042] In an embodiment of the present invention, the text to be processed is input into a text feature extraction model to obtain a first text feature; the first text feature is input into a first conditional random field CRF model for word segmentation to obtain a word segmentation result; the first text feature and the word segmentation result are input into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result; text analysis is performed based on the part-of-speech tagging result to obtain a text analysis result; and speech synthesis is performed based on the text analysis result. In this way, the part-of-speech tagging result is obtained through the text feature extraction model, the first conditional random field CRF model and the second CRF model to perform text analysis, and the effect of text analysis is better. In the process of part-of-speech tagging, not only the word segmentation result is used, but also the first text feature, which is an intermediate variable in the word segmentation process, is used, which can improve the accuracy of part-of-speech tagging, thereby improving the effect of speech synthesis.

[0043] Optionally, the text feature extraction model is a multi-layer long short-term memory neural network BLSTM model, and before the first text feature is input into a first conditional random field CRF model for word segmentation, the method further includes:

[0044] Inputting the text to be processed into a convolutional neural network (CNN) model for text feature extraction to obtain a second text feature;

[0045] The step of inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result includes:

[0046] The first text feature and the second text feature are input into a first CRF model to obtain a word segmentation result.

[0047] Among them, the BLSTM model can fuse two groups of long short-term memory neural network LSTM layers with opposite learning directions. The convolutional neural network CNN model for text feature extraction can be used to extract local features to avoid the BLSTM model from discarding some important information due to model capacity problems when learning longer sentences. The input of the text to be processed into the convolutional neural network CNN model for text feature extraction can be, embedding vectorization of the text to be processed to process the text to be processed into a word vector, zero padding the word vector, and inputting the zero-filled word vector into the convolutional neural network CNN model for text feature extraction. For example, the text to be processed can be "Who am I?", then the length of the text to be processed is 4, and after embedding vectorization, a vector with a dimension of (4, 100) can be obtained, and after zero padding of the vector, a vector with a dimension of (35, 100) can be obtained, and the vector after zero padding can be input into the CNN model to reduce the vector dimension, and the second text feature obtained can be a vector with a dimension of (4, 50).

[0048] In addition, the inputting of the first text feature and the second text feature into the first CRF model may be concatenating the first text feature and the second text feature, and inputting the concatenated result into the first CRF model. For example, the first text feature may be a vector with a dimension of (4, 128), and the second text feature may be a vector with a dimension of (4, 50). After concatenation, a vector with a dimension of (4, 178) may be obtained, and the obtained vector with a dimension of (4, 178) may be input into the first CRF model.

[0049] Furthermore, the inputting of the first text feature and the second text feature into the first CRF model may also be the inputting of the first text feature and the second text feature into a second DNN model for reducing the vector dimension, and the inputting of the output of the second DNN model into a first conditional random field CRF model for word segmentation. For example, the vector with a dimension of (4, 178) obtained by concatenating the first text feature and the second text feature may be input into the second DNN model to obtain a vector with a dimension of (4, 10), and the obtained vector with a dimension of (4, 10) may be input into the first CRF model to obtain a word segmentation result.

[0050] In this embodiment, the text feature extraction model is a multi-layer long short-term memory neural network BLSTM model, the text to be processed is input into a convolutional neural network CNN model for text feature extraction to obtain a second text feature; the first text feature and the second text feature are input into a first CRF model to obtain a word segmentation result. In this way, the BLSTM model, the CNN model and the first CRF model are used for word segmentation. The BLSTM model better considers the context information of the word, the CNN model can extract the local features of the current word, and the CRF model can learn the optimal label sequence. The word segmentation effect is better, thereby improving the effect of speech synthesis.

[0051] Optionally, the step of inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result includes:

[0052] The first text feature, the second text feature and the word segmentation result are input into a second CRF model to obtain a part-of-speech tagging result.

[0053] The step of inputting the first text feature, the second text feature and the word segmentation result into the second CRF model may be to concatenate the first text feature, the second text feature and the word segmentation result, and input the concatenated result into the second CRF model. Alternatively, the step of multiplying the first text feature by a third preset coefficient to obtain a third input; multiplying the second text feature by a fourth preset coefficient to obtain a fourth input; multiplying the word segmentation result by a fifth preset coefficient to obtain a fifth input; and inputting the third input, the fourth input and the fifth input into the second CRF model for part-of-speech tagging.

[0054] For example, the first text feature may be a vector with a dimension of (4, 128), the second text feature may be a vector with a dimension of (4, 50), the word segmentation result may be a vector with a dimension of (4, 4), and after concatenation, a vector with a dimension of (4, 182) may be obtained, which may be input into the second CRF model.

[0055] In addition, the inputting of the first text feature, the second text feature and the word segmentation result into the second CRF model may also be the inputting of the first text feature, the second text feature and the word segmentation result into the second DNN model for reducing the vector dimension, and the inputting of the output of the second DNN model into the second CRF model for part-of-speech tagging. For example, the vector with a dimension of (4, 182) obtained by concatenating the first text feature, the second text feature and the word segmentation result may be input into the second DNN model to obtain a vector with a dimension of (4, 10), and the obtained vector with a dimension of (4, 10) may be input into the second CRF model to obtain a vector with a dimension of (4, 6) as the part-of-speech tagging result. In this example, the parts of speech are simply divided into 6 categories.

[0056] In this implementation, the first text feature, the second text feature and the word segmentation result are input into the second CRF model to obtain the part-of-speech tagging result. In this way, in the process of part-of-speech tagging, not only the word segmentation result is used, but also the intermediate variables first text feature and second text feature in the word segmentation process are used, which can improve the accuracy of part-of-speech tagging, thereby further improving the effect of speech synthesis.

[0057] Optionally, performing text analysis based on the part-of-speech tagging result to obtain a text analysis result includes:

[0058] Inputting the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result into a third CRF model for text phonetic notation to obtain a text phonetic notation result;

[0059] The text is analyzed based on the text phonetic notation result.

[0060] The inputting of the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result into the third CRF model for text phonetic notation to obtain the text phonetic notation result may be to splice the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result, and input the spliced ​​result into the third CRF model. Alternatively, the first text feature may be multiplied by the sixth preset coefficient to obtain the sixth input; the second text feature may be multiplied by the seventh preset coefficient to obtain the seventh input; the word segmentation result may be multiplied by the eighth preset coefficient to obtain the eighth input; the part-of-speech tagging result may be multiplied by the ninth preset coefficient to obtain the ninth input; and the sixth input, the seventh input, the eighth input and the ninth input may be input into the third CRF model for text phonetic notation.

[0061] For example, the first text feature can be a vector with a dimension of (4, 128), the second text feature can be a vector with a dimension of (4, 50), the word segmentation result can be a vector with a dimension of (4, 4), and the part-of-speech tagging result can be a vector with a dimension of (4, 6). After splicing, a vector with a dimension of (4, 188) can be obtained. The obtained vector with a dimension of (4, 188) can be input into the third CRF model. Taking the example that a polyphone has a maximum of 4 pronunciations, a vector with a dimension of (4, 4) is obtained. As the text phonetic notation result, each character can correspond to 4 floating-point values, which respectively represent the probability of the character being a certain pronunciation.

[0062] In this implementation, the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result are input into the third CRF model for text phonetic notation to obtain the text phonetic notation result; and text analysis is performed based on the text phonetic notation result. In this way, in the process of text phonetic notation, not only the part-of-speech tagging result is used, but also the first text feature and the second text feature, which are intermediate variables in the word segmentation process, and the word segmentation result are used, which can improve the accuracy of text phonetic notation, thereby further improving the effect of speech synthesis.

[0063] Optionally, the performing text analysis based on the text phonetic notation result includes:

[0064] Inputting the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result, and the text phonetic notation result into a first deep neural network DNN model for prosody prediction to obtain a prosody prediction result;

[0065] A text analysis is performed based on the prosody prediction result and the text phonetic notation result.

[0066] Wherein, the inputting of the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result and the text phonetic notation result into the first deep neural network DNN model for prosody prediction may be, the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result and the text phonetic notation result are spliced, and the spliced ​​result is input into the first DNN model. Alternatively, the first text feature is multiplied by the tenth preset coefficient to obtain the tenth input; the second text feature is multiplied by the eleventh preset coefficient to obtain the eleventh input; the word segmentation result is multiplied by the twelfth preset coefficient to obtain the twelfth input; the part-of-speech tagging result is multiplied by the thirteenth preset coefficient to obtain the thirteenth input; the text phonetic notation result is multiplied by the fourteenth preset coefficient to obtain the fourteenth input; the tenth input, the eleventh input, the twelfth input and the thirteenth input and the fourteenth input are input into the first deep neural network DNN model for prosody prediction. The first preset coefficient, the third preset coefficient, the sixth preset coefficient and the tenth preset coefficient may be the same or different. The second preset coefficient, the fifth preset coefficient, the eighth preset coefficient and the twelfth preset coefficient may be the same or different. The fourth preset coefficient, the seventh preset coefficient and the eleventh preset coefficient may be the same or different. The ninth preset coefficient and the fourteenth preset coefficient may be the same or different.

[0067] In addition, the rhythm information can also be input into the first deep neural network DNN model for rhythm prediction. For example, the first text feature can be a vector with a dimension of (4, 128), the second text feature can be a vector with a dimension of (4, 50), the word segmentation result can be a vector with a dimension of (4, 4), the part-of-speech tagging result can be a vector with a dimension of (4, 6), the text phonetic notation result can be a vector with a dimension of (4, 4), and the rhythm information can be a vector with a dimension of (4, 3). After concatenation, a vector with a dimension of (4, 195) can be obtained. The obtained vector with a dimension of (4, 195) can be input into the first DNN model. Taking the possible 4 rhythms as an example, a vector with a dimension of (4, 4) is obtained as the rhythm prediction result. Each word can correspond to 4 floating point values, which respectively represent the probability of the word being a certain rhythm. The rhythm with the highest probability can be used as the rhythm of the word.

[0068] Furthermore, the BLSTM model, CNN model, first CRF model, second CRF model, third CRF model and first DNN model can form a unified model to realize word segmentation, part-of-speech tagging, text phonetic notation and rhythm prediction of the text to be processed. In the process of model training, the BLSTM model, CNN model and first CRF model can be trained with training samples for word segmentation; the second CRF model can be trained with the trained BLSTM model, CNN model and first CRF model and training samples for part-of-speech tagging; the third CRF model can be trained with the trained BLSTM model, CNN model, first CRF model and second CRF model and training samples for text phonetic notation; the first DNN model can be trained with the trained BLSTM model, CNN model, first CRF model, second CRF model and third CRF model and training samples for rhythm prediction.

[0069] In practical applications, taking the text to be processed as "Karp accompanies his grandson to play on the slide" as an example, the rhythm of the text to be processed can be determined as "Karp#2 accompanies his grandson#1 to play on the slide#4" based on the rhythm prediction result, and the pronunciation of the text to be processed can be determined as "ka2 er2 pu3 pei2 wai4 sun1 wan2 hua2 ti1" based on the text phonetic notation result. The text analysis result can be a phoneme sequence, and the obtained text analysis result can be "k a2 e2 er5 p u3#2p ei2 uai4 suen1#1uan2 h ua2 t i1#4".

[0070] In this implementation, the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result, and the text phonetic notation result are input into a first deep neural network DNN model for prosody prediction to obtain a prosody prediction result; and text analysis is performed based on the prosody prediction result and the text phonetic notation result. In this way, in the process of prosody prediction, not only the text phonetic notation result is used, but also the first text feature and the second text feature, which are intermediate variables in the word segmentation process, and the word segmentation result and the part-of-speech tagging result are used, which can improve the accuracy of prosody prediction, and the prediction speed is faster, thereby further improving the effect of speech synthesis.

[0071] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 2 As shown, the electronic device 200 includes:

[0072] A first input module 201, used to input the text to be processed into a text feature extraction model to obtain a first text feature;

[0073] A second input module 202, used for inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result;

[0074] A third input module 203 is used to input the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result;

[0075] An analysis module 204 is used to perform text analysis based on the part-of-speech tagging result to obtain a text analysis result;

[0076] The synthesis module 205 is used to perform speech synthesis based on the text analysis result.

[0077] Optional, such as Figure 3 As shown, the electronic device 200 further includes:

[0078] A fourth input module 206, configured to input the text to be processed into a convolutional neural network (CNN) model for text feature extraction to obtain a second text feature;

[0079] The second input module 202 is specifically used for:

[0080] The first text feature and the second text feature are input into a first CRF model to obtain a word segmentation result.

[0081] Optionally, the third input module 203 is specifically used for:

[0082] The first text feature, the second text feature and the word segmentation result are input into a second CRF model to obtain a part-of-speech tagging result.

[0083] Optional, such as Figure 4 As shown, the analysis module 204 includes:

[0084] An input unit 2041, used for inputting the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result into a third CRF model for text phonetic notation to obtain a text phonetic notation result;

[0085] The analyzing unit 2042 is used to perform text analysis based on the text phonetic notation result.

[0086] Optionally, the analysis unit 2042 is specifically used for:

[0087] Inputting the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result, and the text phonetic notation result into a first deep neural network DNN model for prosody prediction to obtain a prosody prediction result;

[0088] A text analysis is performed based on the prosody prediction result and the text phonetic notation result.

[0089] Electronic devices can achieve Figure 1 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0090] See also Figure 5 , Figure 5 is a schematic diagram of the structure of another electronic device provided by an embodiment of the present invention, such as Figure 5 As shown, the electronic device 300 includes: a memory 302, a processor 301, and a program stored in the memory 302 and executable on the processor 301, wherein:

[0091] The processor 301 reads the program in the memory 302 to execute:

[0092] Inputting the text to be processed into a text feature extraction model to obtain a first text feature;

[0093] Inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result;

[0094] Inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result;

[0095] Perform text analysis based on the part-of-speech tagging result to obtain a text analysis result;

[0096] Speech synthesis is performed based on the text analysis result.

[0097] Optionally, the text feature extraction model is a multi-layer long short-term memory neural network BLSTM model, and the processor 301 is further used to execute:

[0098] Inputting the text to be processed into a convolutional neural network (CNN) model for text feature extraction to obtain a second text feature;

[0099] The processor 301 performs the step of inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result, including:

[0100] The first text feature and the second text feature are input into a first CRF model to obtain a word segmentation result.

[0101] Optionally, the processor 301 inputs the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result, including:

[0102] The first text feature, the second text feature and the word segmentation result are input into a second CRF model to obtain a part-of-speech tagging result.

[0103] Optionally, the processor 301 performs text analysis based on the part-of-speech tagging result to obtain a text analysis result, including:

[0104] Inputting the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result into a third CRF model for text phonetic notation to obtain a text phonetic notation result;

[0105] The text is analyzed based on the text phonetic notation result.

[0106] Optionally, the processor 301 performs text analysis based on the text phonetic notation result, including:

[0107] Inputting the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result, and the text phonetic notation result into a first deep neural network DNN model for prosody prediction to obtain a prosody prediction result;

[0108] A text analysis is performed based on the prosody prediction result and the text phonetic notation result.

[0109] exist Figure 5 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 301 and memory represented by memory 302. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface.

[0110] The processor 301 is responsible for managing the bus architecture and general processing, and the memory 302 can store data used by the processor 301 when performing operations.

[0111] It should be noted that in the embodiments of the present invention Figure 1 Any implementation method in the method embodiment shown can be implemented by the above-mentioned electronic device in this embodiment and achieve the same beneficial effects, which will not be described in detail here.

[0112] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned speech synthesis method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0113] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0115] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A speech synthesis method, characterized in that: The method comprises: Inputting the text to be processed into a text feature extraction model to obtain a first text feature; Inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result; Inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result; Perform text analysis based on the part-of-speech tagging result to obtain a text analysis result; Perform speech synthesis based on the text analysis result, where the text analysis result is a phoneme sequence; The text feature extraction model is a bidirectional long short-term memory network BLSTM model. Before the first text feature is input into a first conditional random field CRF model for word segmentation, the method further includes: Inputting the text to be processed into a convolutional neural network (CNN) model for text feature extraction to obtain a second text feature; The step of inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result includes: Inputting the first text feature and the second text feature into a first conditional random field (CRF) model to obtain a word segmentation result; The step of inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result includes: Inputting the first text feature, the second text feature and the word segmentation result into a second CRF model to obtain a part-of-speech tagging result; The performing text analysis based on the part-of-speech tagging result to obtain the text analysis result includes: Inputting the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result into a third CRF model for text phonetic notation to obtain a text phonetic notation result; The text is analyzed based on the text phonetic notation result.

2. The method according to claim 1, characterized in that The text analysis based on the text phonetic notation result comprises: Inputting the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result, and the text phonetic notation result into a first deep neural network DNN model for prosody prediction to obtain a prosody prediction result; A text analysis is performed based on the prosody prediction result and the text phonetic notation result.

3. An electronic device, characterized in that: The electronic device comprises: A first input module, used for inputting the text to be processed into a text feature extraction model to obtain a first text feature; A second input module, used for inputting the first text feature into a first conditional random field (CRF) model for word segmentation to obtain a word segmentation result; A third input module, used for inputting the first text feature and the word segmentation result into a second CRF model for part-of-speech tagging to obtain a part-of-speech tagging result; An analysis module, used to perform text analysis based on the part-of-speech tagging result to obtain a text analysis result; A synthesis module, used for performing speech synthesis based on the text analysis result, wherein the text analysis result is a phoneme sequence; The electronic device further comprises: A fourth input module, used for inputting the text to be processed into a convolutional neural network (CNN) model for text feature extraction to obtain a second text feature; The second input module is specifically used for: Inputting the first text feature and the second text feature into a first conditional random field (CRF) model to obtain a word segmentation result; The third input module is specifically used for: Inputting the first text feature, the second text feature and the word segmentation result into a second CRF model to obtain a part-of-speech tagging result; The analysis module comprises: An input unit, used for inputting the first text feature, the second text feature, the word segmentation result and the part-of-speech tagging result into a third CRF model for text phonetic notation to obtain a text phonetic notation result; An analysis unit is used to perform text analysis based on the text phonetic notation result.

4. The electronic device according to claim 3, characterized in that: The analysis unit is specifically used for: Inputting the first text feature, the second text feature, the word segmentation result, the part-of-speech tagging result, and the text phonetic notation result into a first deep neural network DNN model for prosody prediction to obtain a prosody prediction result; A text analysis is performed based on the prosody prediction result and the text phonetic notation result.

5. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the speech synthesis method as claimed in claim 1 or 2 when executed by the processor.

Citation Information

Patent Citations

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

    CN105336322A

  • Chinese part-of-speech tagging method and device, storage medium and electronic equipment

    CN110852102A