Artificial intelligence-based classical Chinese speech synthesis method, device, equipment and medium

By processing classical Chinese speech synthesis through artificial intelligence and utilizing rhythmic hierarchy prediction, word segmentation, and sentiment prediction models, the problem of insufficient rhythm in classical Chinese speech is solved, achieving more natural and accurate classical Chinese speech generation.

CN115273800BActive Publication Date: 2025-09-26PING AN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210897691.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2025-09-26
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

Existing speech synthesis technology cannot effectively improve the rhythm when processing classical Chinese texts, resulting in a low sense of rhythm in the synthesized speech.

Method used

An artificial intelligence-based method is used to process classical Chinese text sequences through a rhythmic hierarchy prediction model, a word segmentation model, a rhythmic emotion prediction model, and a syllable conversion model. Rhythmic hierarchy feature vectors, word segmentation combinations, and rhythmic emotion vectors are extracted respectively, and finally a rhythmic classical Chinese synthetic speech is generated.

Benefits of technology

Through precise segmentation and processing, the rhythm and naturalness of the synthesized speech of classical Chinese are improved, ensuring the accuracy and naturalness of the segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115273800B_ABST
    Figure CN115273800B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of artificial intelligence, and in particular relates to a method, apparatus, device, and medium for synthesizing classical Chinese speech based on artificial intelligence. The present invention inputs a classical Chinese text sequence into a trained prosodic hierarchy prediction model to obtain N prosodic hierarchy feature vectors, then inputs the classical Chinese text sequence and the N prosodic hierarchy feature vectors into a trained word segmentation model to obtain corresponding N word segmentation combinations, then inputs the N prosodic hierarchy feature vectors and the N word segmentation combinations into a trained prosodic emotion prediction model to obtain a prosodic emotion vector for the classical Chinese text sequence, then inputs the classical Chinese text sequence into a trained syllable conversion model to obtain a syllable sequence, and finally inputs the prosodic emotion vector and the syllable sequence into a trained speech synthesis model to obtain synthesized classical Chinese speech. The classical Chinese text sequence is segmented according to its prosodic hierarchy, thereby ensuring the naturalness and accuracy of the segmentation results and improving the rhythmicity of the synthesized classical Chinese speech.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention is applicable to the field of artificial intelligence, and in particular relates to a method, device, equipment and medium for synthesizing classical Chinese speech based on artificial intelligence. Background Art

[0002] Speech synthesis is a technology that converts text information into speech information. Classical Chinese, as a text content with few words but profound meaning, simple sounds and broad meanings, and emphasis on allusions, has a high sense of rhythm.

[0003] The current mainstream speech synthesis technology segments text into units of characters or French words and generates corresponding speech based on the segmentation results. However, classical Chinese texts are parallel and antithetical, with neat rhythm and a high sense of rhythm. The speech synthesized using characters or French words as segmentation units greatly reduces the rhythm of the synthesized speech of classical Chinese.

[0004] Therefore, in the field of speech synthesis technology, how to improve the rhythmicity of classical Chinese synthesized speech has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, apparatus, device, and medium for synthesizing classical Chinese speech based on artificial intelligence to solve the problem of low rhythmicity of synthesized classical Chinese speech.

[0006] In a first aspect, an embodiment of the present invention provides a method for synthesizing classical Chinese speech based on artificial intelligence, the method comprising:

[0007] Obtaining a classical Chinese text sequence for speech to be synthesized, inputting the classical Chinese text sequence into a trained prosody level prediction model to obtain N prosody level feature vectors of the classical Chinese text sequence, where the prosody level includes phoneme level, character level, and word level, and N is an integer greater than 1;

[0008] Inputting the classical Chinese text sequence and the N prosodic-level feature vectors into a trained word segmentation model to obtain N word segmentation combinations corresponding to the N prosodic-level feature vectors, wherein the word segmentation combinations include phoneme combinations, character combinations, and word combinations;

[0009] Inputting the N prosody-level feature vectors and the N word segmentation combinations into a trained prosody emotion prediction model to obtain a prosody emotion vector of the classical Chinese text sequence;

[0010] Inputting the classical Chinese text sequence into a trained syllable conversion model to obtain a syllable sequence;

[0011] The prosodic emotion vector and the syllable sequence are input into a trained speech synthesis model to obtain classical Chinese synthesized speech.

[0012] In a second aspect, an embodiment of the present invention provides an artificial intelligence-based classical Chinese speech synthesis device, the classical Chinese speech synthesis device comprising:

[0013] a prosody level determination module, configured to obtain a classical Chinese text sequence for speech to be synthesized, input the classical Chinese text sequence into a trained prosody level prediction model, and obtain N prosody level feature vectors of the classical Chinese text sequence, where the prosody level includes phoneme level, character level, and word level, and N is an integer greater than 1;

[0014] A word segmentation combination determination module is configured to input the classical Chinese text sequence and the N prosodic-level feature vectors into a trained word segmentation model to obtain N word segmentation combinations corresponding to the N prosodic-level feature vectors, wherein the word segmentation combinations include phoneme combinations, character combinations, and word combinations;

[0015] A prosodic sentiment vector determination module, configured to input the N prosodic level feature vectors and the N word segmentation combinations into a trained prosodic sentiment prediction model to obtain a prosodic sentiment vector for the classical Chinese text sequence;

[0016] a syllable sequence determination module, configured to input the classical Chinese text sequence into a trained syllable conversion model to obtain a syllable sequence;

[0017] The classical Chinese speech synthesis module is used to input the prosodic emotion vector and the syllable sequence into a trained speech synthesis model to obtain classical Chinese synthesized speech.

[0018] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for synthesizing classical Chinese speech as described in the first aspect is implemented.

[0019] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for synthesizing classical Chinese speech as described in the first aspect is implemented.

[0020] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: by inputting a classical Chinese sequence into a trained rhythmic level prediction model, N rhythmic level feature vectors are obtained; then the classical Chinese sequence and the N rhythmic level feature vectors are input into a trained word segmentation model to obtain corresponding N word segmentation combinations; the N rhythmic level feature vectors and the N word segmentation combinations are input into a trained rhythmic emotion prediction model to obtain the rhythmic emotion vector of the classical Chinese sequence; the classical Chinese sequence is input into a trained syllable conversion model to obtain a syllable sequence; finally, the rhythmic emotion vector and the syllable sequence are input into a trained speech synthesis model to obtain classical Chinese synthesized speech; the classical Chinese sequence is segmented according to the rhythmic level of the classical Chinese sequence, thereby ensuring the naturalness and accuracy of the segmentation results and improving the rhythmicity of the classical Chinese synthesized speech. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 This is a schematic diagram of an application environment of an artificial intelligence-based classical Chinese speech synthesis method provided in the first embodiment of the present invention;

[0023] Figure 2 This is a flow chart of a method for synthesizing classical Chinese text based on artificial intelligence, provided in the first embodiment of the present invention;

[0024] Figure 3 This is a schematic diagram of the structure of an artificial intelligence-based classical Chinese speech synthesis device provided in the second embodiment of the present invention;

[0025] Figure 4 This is a structural diagram of a computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0026] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

[0027] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0028] It will also be understood that the term "and / or" used in the present description and appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0029] As used in the present specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0030] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0031] References to "one embodiment" or "some embodiments" in the present specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present invention. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0032] Embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0033] It should be understood that the order of execution of the steps in the following embodiments does not necessarily mean the order in which they are executed. The order in which each process is executed should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0034] In order to illustrate the technical solution of the present invention, specific embodiments are provided below.

[0035] The first embodiment of the present invention provides a method for synthesizing classical Chinese speech based on artificial intelligence, which can be applied in the following fields: Figure 1 In an application environment, a client communicates with a server. Clients include, but are not limited to, PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud computing devices, and personal digital assistants (PDAs). The server can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0036] See also Figure 2 , is a flow chart of a method for synthesizing classical Chinese text based on artificial intelligence provided by the first embodiment of the present invention. The method for synthesizing classical Chinese text can be applied to Figure 1 In the client, the classical Chinese speech synthesis method may include the following steps:

[0037] Step S201 : obtaining a classical Chinese text sequence of speech to be synthesized, inputting the classical Chinese text sequence into a trained prosody level prediction model, and obtaining N prosody level feature vectors of the classical Chinese text sequence.

[0038] Among them, classical Chinese, as a text content with few words but profound meaning, simple sounds and broad meanings, and emphasis on allusions, has parallel antithesis, neat rhythm, and a high sense of rhythm. In classical Chinese speech synthesis technology, in order to improve the naturalness, fluency and rhythm of the generated classical Chinese speech, it is necessary to divide the classical Chinese sequence to be synthesized into multiple text units according to the rhythm of the classical Chinese sequence itself.

[0039] Among them, the prosodic levels include the phoneme level, the character level, and the word level. For the classical Chinese sequence of the speech to be synthesized, the classical Chinese sequence can be prosodically annotated according to different prosodic level rules to obtain the corresponding prosodic level feature vectors. For example, using # as the prosodic identifier, when the classical Chinese sequence is "长风破浪会有时", that is, "changfengpolanghui you shi", prosodically annotating the classical Chinese sequence at the phoneme level, the prosodic level annotation result can be obtained as "chang f eng#p o l ang hui#y oush i", prosodically annotating the classical Chinese sequence at the character level, the prosodic level annotation result can be obtained as "changfeng#polanghui#you shi", and prosodically annotating the classical Chinese sequence at the word level, the prosodic level annotation result can be obtained as " <changfeng> # <polang> <hui>#<you shi> "Furthermore, feature extraction is performed on the rhythm-level annotation results to obtain the rhythm-level feature vector corresponding to the classical Chinese text sequence.

[0040] Since manual prosody annotation is labor-intensive and has low accuracy, this embodiment uses manually annotated training samples to train the prosody level prediction model. Based on the trained prosody level prediction model, feature extraction is directly performed on the classical Chinese text sequence to be synthesized speech to obtain N prosody level feature vectors of the classical Chinese text sequence.

[0041] Specifically, the obtained classical Chinese text sequence of the speech to be synthesized is input into a trained prosody level prediction model, and the features of the classical Chinese text sequence are extracted to output N prosody level feature vectors of the classical Chinese text sequence, where N is an integer greater than 1.

[0042] Optionally, the prosody level prediction model includes a first encoder and a first decoder, and is trained using a classical Chinese sample sequence as a training sample and N actual prosody level feature vectors of the classical Chinese sample sequence as training labels.

[0043] Among them, the N actual rhythmic level feature vectors of the classical Chinese sample sequence are obtained by judging the rhythmic levels of the classical Chinese sample sequence and converting the rhythmic level judgment results into feature vectors through word vector technology. The actual rhythmic level feature vectors of all classical Chinese sample sequences in the training sample are obtained as the basis for parameter optimization of the rhythmic level prediction model during the training process, so as to improve the accuracy of the rhythmic level feature vectors extracted by the rhythmic level prediction model.

[0044] Optionally, the training process of the prosody level prediction model includes:

[0045] Input the classical Chinese sample sequence into the first encoder for feature extraction to obtain the sample text feature vector;

[0046] Performing Gaussian sampling on the sample text feature vector to obtain a sample text feature sampling result, and inputting the sample text feature sampling result into a first decoder for reconstruction, wherein the N output layers of the first decoder respectively output N prosody-level feature vectors of the classical Chinese sample sequence;

[0047] A first loss function is calculated based on the N prosody-level feature vectors of the classical Chinese sample sequence and the N actual prosody-level feature vectors. The parameters of the first encoder and the first decoder are reversely corrected according to the gradient descent method until the first loss function converges to obtain a trained prosody-level prediction model.

[0048] Among them, the training samples of the rhythmic level prediction model are a large number of classical Chinese sample sequences. Each classical Chinese sample sequence is input into the first encoder for feature extraction to obtain a sample text feature vector, and the sample text feature vector is Gaussian sampled to obtain a sample text feature sampling result. The sample text feature sampling result is input into the first decoder for reconstruction, and the N output layers of the first decoder output N rhythmic level feature vectors of the classical Chinese sample sequence respectively. Among them, the rhythmic level includes phoneme level, character level and word level. Therefore, the phoneme feature vector, character feature vector and word feature vector of the classical Chinese sample sequence can be obtained accordingly.

[0049] At the same time, in order to improve the accuracy of the rhythm-level feature vectors extracted by the rhythm-level prediction model, the first loss function is calculated based on the difference between the obtained N rhythm-level feature vectors and the N actual rhythm-level feature vectors, wherein the smaller the first loss function is, the higher the accuracy of the extracted N rhythm-level feature vectors is, and conversely, the larger the first loss function is, the lower the accuracy of the extracted N rhythm-level feature vectors is. It is necessary to reversely correct the parameters of the first encoder and the first decoder according to the gradient descent method until the first loss function converges to improve the feature extraction accuracy of the rhythm-level prediction model and finally obtain a trained rhythm-level prediction model.

[0050] Optionally, calculating the first loss function based on the N prosody-level feature vectors and the N actual prosody-level feature vectors of the classical Chinese text sample sequence includes:

[0051] Calculating the similarity between each prosody-level feature vector and the corresponding actual prosody-level feature vector;

[0052] comparing whether the rhythmic level of each rhythmic level feature vector is consistent with the rhythmic level of each corresponding actual rhythmic level feature vector;

[0053] If the comparison result is consistent, the reset similarity of each rhythm level feature vector is set to each similarity;

[0054] If the comparison result is inconsistent, the reset similarity of each rhythm level feature vector is set to 0;

[0055] N differences between the N reset similarities and a preset similarity threshold are calculated, and the sum of the N differences is recorded as a first loss function.

[0056] Among them, the smaller the difference between the N rhythmic level feature vectors of the classical Chinese sample sequence and the N actual rhythmic levels, the smaller the corresponding first loss function. Therefore, the similarity between each rhythmic level feature vector and the corresponding actual rhythmic level feature vector is first calculated, wherein the similarity calculation method can be set according to the actual situation, for example, cosine similarity, Pearson correlation coefficient, Manhattan distance and Euclidean distance, and then compare whether the rhythmic levels of each rhythmic level feature vector and the corresponding actual rhythmic level feature vector are consistent. If the comparison result is consistent, then the N rhythmic level feature vectors of the classical Chinese sample sequence are consistent. The difference between the N actual prosody-level feature vectors and the N actual prosody-level feature vectors can be characterized according to the similarity between each prosody-level feature vector and the corresponding actual prosody-level feature vector. By setting the reset similarity of each prosody-level feature vector to each similarity, N differences between the N reset similarities and the preset similarity threshold are calculated, and the sum of the N differences is recorded as the first loss function. If the comparison result is inconsistent, the reset similarity of each prosody-level feature vector is set to 0, and N differences between the N reset similarities and the preset similarity threshold are calculated, and the sum of the N differences is recorded as the first loss function. Among them, the similarity threshold can be set according to actual conditions. In this embodiment, the similarity threshold is set to 1.

[0057] For example, in the training process of the rhythm level prediction model, in order to improve the feature extraction accuracy of the rhythm level prediction model, for the N rhythm level feature vectors of the classical Chinese sample sequence, the i-th (i=1, 2, ..., N) rhythm level feature vector is recorded as Y i , for the N actual prosody-level feature vectors of the classical Chinese sample sequence, the i-th actual prosody-level feature vector corresponding to the i-th prosody-level feature vector is recorded as S i , then calculate the cosine similarity between the i-th prosody level feature vector and the i-th actual prosody level feature vector as the i-th similarity X i :

[0058]

[0059] Where Y i is the i-th prosodic level feature vector, S i is the i-th actual prosodic level feature vector.

[0060] Then, the rhythm level of the i-th rhythm level feature vector is compared with the rhythm level of the i-th actual rhythm level feature vector. If the comparison result is consistent, the reset similarity C of the i-th rhythm level feature vector is set. i is the i-th similarity X i , that is, C i =X i ; If the comparison result is inconsistent, set the reset similarity C of the i-th prosodic level feature vector i to 0, that is, C i = 0.

[0061] Preset the similarity threshold C0 as 1 according to the actual situation, and calculate the difference between the reset similarity C i of the i-th prosodic level feature vector and the preset similarity threshold C0, and denote it as Z i , then the difference Z i corresponding to the i-th prosodic level feature vector is:

[0062] Z i = C0 - C i

[0063] In the formula, C0 is the preset similarity threshold, and C i is the reset similarity of the i-th prosodic level feature vector.

[0064] By calculating, the differences Z1, Z2,..., Z N corresponding to N prosodic level feature vectors are obtained, then adding the N differences can obtain the first loss function Loss1:

[0065]

[0066] In the formula, N is the total number of differences, and Z i is the difference corresponding to the i-th prosodic level feature vector.

[0067] Step S202: Input the classical Chinese sequence and N prosodic level feature vectors into the trained word segmentation model to obtain N word segmentation combinations corresponding to the N prosodic level feature vectors.

[0068] Among them, the prosodic levels include phoneme level, character level, and word level. Correspondingly, the word segmentation combinations include phoneme combinations, character combinations, and word combinations.

[0069] When segmenting the same classical Chinese sequence according to different segmentation rules, different hierarchical text segmentation results can be obtained. Among them, the phoneme combination is the text segmentation result obtained by segmenting the classical Chinese sequence according to the phoneme segmentation rule, the character combination is the text segmentation result obtained by segmenting the classical Chinese sequence according to the character segmentation rule, and the word combination is the text segmentation result obtained by segmenting the classical Chinese sequence according to the word segmentation rule. For example, when the classical Chinese sequence is "长风破浪会有时” (i.e., "changfengpolanghui you shi”), the phoneme combination is "chang f eng p ol ang h uiy oush i”, the character combination is "changfengpolanghuiyou shi”, and the word combination is " <changfeng> <polang> <hui><you shi>”.

[0070] For the classical Chinese text sequence to be synthesized, the corresponding N rhythmic level feature vectors are obtained through the trained rhythmic level prediction model. Furthermore, the N word segmentation combinations corresponding to the N rhythmic level feature vectors are obtained. The classical Chinese text sequence can be segmented based on the rhythmic structure contained in the classical Chinese text sequence to improve the rhythmicity of the subsequent synthesized speech.

[0071] Specifically, the classical Chinese text sequence of the speech to be synthesized and the corresponding N prosodic-level feature vectors are input into the trained word segmentation model to output N word segmentation combinations corresponding to the N prosodic-level feature vectors.

[0072] Optionally, the word segmentation model includes a third encoder and a third decoder, and the word segmentation model is trained using the classical Chinese sample sequence and the corresponding N prosody-level feature vectors as training samples, and using N actual word segmentation combinations of the classical Chinese sample sequence as training labels.

[0073] Among them, the N actual word segmentation combinations of the classical Chinese sample sequence are the text segmentation results obtained after the classical Chinese sample sequence is segmented according to different levels of segmentation rules. They serve as the basis for parameter optimization of the word segmentation model during the training process to improve the accuracy of the word segmentation combinations obtained by the word segmentation model.

[0074] Optionally, the training process of the word segmentation model includes:

[0075] Input the classical Chinese sample sequence and the corresponding N prosody-level feature vectors into the third encoder for feature extraction to obtain the sample segmentation feature vector;

[0076] Performing Gaussian sampling on the sample segmentation feature vector to obtain a sample segmentation feature sampling result, and inputting the sample segmentation feature sampling result into a third decoder for reconstruction, and outputting N sample word combinations of the classical Chinese sample sequence in the N output layers of the third decoder respectively;

[0077] The third loss function is calculated based on N sample word segmentation combinations and N actual word segmentation combinations of the classical Chinese sample sequence. The parameters of the third encoder and the third decoder are reversely corrected according to the gradient descent method until the third loss function converges to obtain a trained word segmentation model.

[0078] The training samples of the word segmentation model are a large number of classical Chinese sample sequences and the corresponding N rhythm-level feature vectors. The sample word segmentation combinations obtained include phoneme combinations, character combinations, and word combinations. At the same time, in order to improve the word segmentation accuracy of the word segmentation model, the third loss function is calculated based on the N sample word segmentation combinations of the classical Chinese sample sequence and the N actual word segmentation combinations. The smaller the third loss function, the higher the accuracy of the N sample word segmentation combinations obtained. Conversely, the larger the third loss function, the lower the accuracy of the N sample word segmentation combinations obtained. It is necessary to reversely correct the parameters of the third encoder and the third decoder according to the gradient descent method until the third loss function converges to obtain a trained word segmentation model.

[0079] Optionally, calculating the third loss function based on N sample word combinations and N actual word combinations of the classical Chinese sample sequence includes:

[0080] According to the word vector technology, N sample word combinations are converted into N sample word vectors, and N actual word combinations are converted into N actual word vectors;

[0081] Calculate the word segmentation similarity between each sample word segmentation vector and each actual word segmentation vector respectively;

[0082] Calculate the N segmentation differences between the N segmentation similarities and the preset segmentation similarity threshold, and record the sum of the N segmentation differences as the third loss function.

[0083] Among them, word vector technology represents text as a series of vectors that can express the semantics of the text, for example, word2vec (a word vector model). The smaller the word segmentation similarity between each sample word segmentation vector and each actual word segmentation vector, the higher the word segmentation accuracy of the word segmentation model, that is, the smaller the third loss function. Therefore, according to the word vector technology, N sample word segmentation combinations are converted into N sample word segmentation vectors, and N actual word segmentation combinations are converted into N actual word segmentation vectors. The word segmentation similarity between each sample word segmentation vector and each actual word segmentation vector is calculated respectively, and the sum of the N word segmentation differences between the N word segmentation similarities and the preset word segmentation similarity threshold is recorded as the third loss function, which is used to reversely correct the parameters of the third encoder and the third decoder until the third loss function converges to obtain a trained word segmentation model.

[0084] For example, in the training process of the word segmentation model, in order to improve the accuracy of the word segmentation model for classical Chinese text sequences, N sample word segmentation combinations are converted into N sample word segmentation vectors according to the word2vec technology, and N actual word segmentation combinations are converted into N actual word segmentation vectors, and the i-th sample word segmentation vector is recorded as F i , the actual word segmentation vector of i is recorded as J i , then calculate the cosine similarity between the i-th sample word segmentation vector and the i-th actual word segmentation vector as the i-th word segmentation similarity D i :

[0085]

[0086] Where, F i is the word segmentation vector of the i-th sample, J i is the actual word segmentation vector of the i-th word.

[0087] According to the actual situation, the word segmentation similarity threshold is preset to D0=1, and the i-th word segmentation similarity D is calculated. i The difference between the preset word segmentation similarity threshold D0 is recorded as ΔD i , then the word segmentation loss ΔD corresponding to the i-th sample word segmentation combination i for:

[0088] ΔD i =D0-D i

[0089] Where D0 is the preset word segmentation similarity threshold, D i is the similarity of the i-th word segmentation.

[0090] By calculating the N word segmentation losses ΔD1, ΔD2, ..., ΔD N , then the third loss function Loss3 can be obtained by adding the N word segmentation losses:

[0091]

[0092] Where N is the total number of word segmentation losses, ΔD i is the i-th word segmentation loss.

[0093] Step S203 : inputting N prosody-level feature vectors and N word segmentation combinations into a trained prosody emotion prediction model to obtain a prosody emotion vector of the classical Chinese text sequence.

[0094] The N prosodic-level feature vectors and N word-segment combinations of a classical Chinese text sequence correspond one-to-one, determining the prosodic level of the text sequence and the different segmentation results corresponding to each prosodic level, thereby more comprehensively characterizing the prosodic sentiment contained in the text sequence. Therefore, the N prosodic-level feature vectors and N word-segment combinations are input into the trained prosodic-sentiment prediction model, ultimately outputting the prosodic-sentiment vector for the text sequence.

[0095] Optionally, the N prosody-level feature vectors and N word segmentation combinations are input into the trained prosody sentiment prediction model including:

[0096] Convert N word combinations into N word vectors based on word vector technology;

[0097] Obtain N vector combinations based on N prosody-level feature vectors and corresponding N word segmentation vectors;

[0098] The vector combination sequence obtained based on the N vector combinations is input into the trained rhythmic emotion prediction model.

[0099] Among them, the word segmentation combination is part of the text content in the classical Chinese sequence. Therefore, first, the N word segmentation combinations are converted into N word segmentation vectors according to the word vector technology, and the corresponding vector combination is obtained according to the rhythmic level feature vector and the corresponding word segmentation vector to obtain N vector combinations. The vector combination sequence obtained based on the N vector combinations is used as the input of the trained rhythmic emotion prediction model to output the rhythmic emotion vector corresponding to the classical Chinese sequence, which is used to characterize the rhythmic emotion contained in the classical Chinese sequence.

[0100] Among them, rhythmic emotions, such as flat, oblique, sparse, dense, fast, and slow, are composed of rhythmic emotions contained in the classical Chinese text sequence in order to form a corresponding rhythmic emotion sequence, and the rhythmic emotion sequence can be accurately converted into a rhythmic emotion vector based on word vector technology.

[0101] Optionally, the rhythmic emotion prediction model includes a second encoder and a second decoder, and uses the sample vector combination sequence obtained by combining the sample rhythmic level feature vector and the corresponding sample word segmentation as the training sample, and uses the actual rhythmic emotion vector of the classical Chinese sample sequence as the training label to train the rhythmic emotion prediction model.

[0102] Among them, the actual rhythmic emotion vector of the classical Chinese sample sequence is obtained by manually annotating the actual rhythmic emotion of the classical Chinese sample and converting the actual rhythmic emotion sequence into a vector through word vector technology. It serves as the basis for parameter optimization of the rhythmic emotion prediction model during the training process to improve the accuracy of the rhythmic emotion vector obtained by the rhythmic emotion prediction model.

[0103] Optionally, the training process of the prosody emotion prediction model includes:

[0104] The sample prosody level feature vector and the corresponding sample word segmentation are combined to obtain a sample vector combination sequence, which is input into the second encoder for feature extraction to obtain the sample prosody emotion feature vector;

[0105] Performing Gaussian sampling on the sample rhythmic emotion feature vector to obtain a sample rhythmic emotion feature sampling result, and inputting the sample rhythmic emotion feature sampling result into a second decoder for reconstruction, thereby outputting a sample rhythmic emotion vector of the classical Chinese sample sequence;

[0106] The second loss function is calculated based on the sample rhythmic emotion vector and the actual rhythmic emotion vector of the classical Chinese sample sequence, and the parameters of the second encoder and the second decoder are reversely corrected according to the gradient descent method until the second loss function converges to obtain a trained rhythmic emotion prediction model.

[0107] Among them, the training samples of the rhythmic emotion prediction model are a sample vector combination sequence obtained by combining a large number of sample rhythmic level feature vectors and corresponding sample word segmentations. At the same time, in order to improve the accuracy of the rhythmic emotion vector, the second loss function is calculated based on the vector similarity between the sample rhythmic emotion vector of the classical Chinese sample sequence and the actual rhythmic emotion vector. Among them, the smaller the vector similarity, the smaller the second loss function, which means that the accuracy of the obtained sample rhythmic emotion vector is higher. Conversely, the greater the vector similarity, the larger the second loss function, which means that the accuracy of the obtained sample rhythmic emotion vector is lower. It is necessary to reversely correct the parameters of the second encoder and the second decoder according to the gradient descent method until the second loss function converges to obtain a trained rhythmic emotion prediction model.

[0108] Step S204: input the classical Chinese text sequence into the trained syllable conversion model to obtain a syllable sequence.

[0109] Among them, the syllable sequence of the classical Chinese sequence is the basis for the generation of classical Chinese speech. Therefore, the classical Chinese sequence is input into the trained syllable conversion model to obtain the syllable sequence to realize the conversion of the classical Chinese sequence to classical Chinese speech.

[0110] Optionally, the syllable conversion model includes a fourth encoder and a fourth decoder, and uses the classical Chinese sample sequence as a training sample and the actual syllable sequence of the classical Chinese sample sequence as a training label to train the word segmentation model.

[0111] Among them, the actual syllable sequence of the classical Chinese sample sequence is obtained by manually annotating the syllables of the classical Chinese sequence, which serves as the basis for parameter optimization of the syllable conversion model during the training process to improve the accuracy of the syllable sequence obtained by the syllable conversion model.

[0112] Optionally, the training process of the syllable conversion model includes:

[0113] Input the classical Chinese sample sequence into the fourth encoder for feature extraction to obtain the sample syllable feature vector;

[0114] Performing Gaussian sampling on the sample syllable feature vector to obtain a sample syllable feature sampling result, and inputting the sample syllable feature sampling result into a fourth decoder for reconstruction, thereby outputting a sample syllable sequence of the classical Chinese sample sequence;

[0115] The fourth loss function is calculated based on the sample syllable sequence and the actual syllable sequence of the classical Chinese sample sequence, and the parameters of the fourth encoder and the fourth decoder are reversely corrected according to the gradient descent method until the fourth loss function converges to obtain a trained syllable conversion model.

[0116] Among them, the training samples of the syllable conversion model are a large number of classical Chinese sample sequences. At the same time, in order to improve the accuracy of the syllable sequence, the fourth loss function is calculated according to the sequence similarity between the sample syllable sequence of the classical Chinese sample sequence and the actual syllable sequence. Among them, the smaller the sequence similarity, the smaller the fourth loss function, which means that the accuracy of the obtained sample syllable sequence is higher. Conversely, the greater the sequence similarity, the larger the fourth loss function, which means that the accuracy of the obtained sample syllable sequence is lower. It is necessary to reversely correct the parameters of the fourth encoder and the fourth decoder according to the gradient descent method until the fourth loss function converges to obtain a trained syllable conversion model.

[0117] Step S205: input the prosodic emotion vector and the syllable sequence into the trained speech synthesis model to obtain classical Chinese synthesized speech.

[0118] Among them, the rhythmic emotion vector is used to represent the rhythmic emotion features contained in the classical Chinese text sequence, and the syllable sequence is used to represent the syllable features of the classical Chinese text sequence. By inputting the rhythmic emotion vector and syllable sequence into the trained speech synthesis model, the classical Chinese synthesized speech that conforms to the rhythmic emotion can be obtained, which greatly improves the rhythmicity of the classical Chinese synthesized speech.

[0119] Optionally, the speech synthesis model includes a speech feature prediction sub-model and a vocoder:

[0120] The speech feature prediction sub-model is used to input the prosodic emotion vector and syllable sequence and output the speech feature prediction value;

[0121] The vocoder is used to input speech feature prediction values ​​and output classical Chinese synthesized speech.

[0122] The speech feature prediction submodel is used to extract features from prosodic emotion vectors and syllable sequences to obtain speech feature predictions, such as Tacotron2 (a speech generation model). The vocoder is used to extract features from the speech feature predictions to obtain classical Chinese synthesized speech, such as WaveGlow (a speech generation model). The structures and training processes of Tacotron2 and WaveGlow are prior art and will not be detailed here.

[0123] The embodiment of the present invention inputs a classical Chinese sequence into a trained rhythmic level prediction model to obtain N rhythmic level feature vectors of the classical Chinese sequence, then inputs the classical Chinese sequence and the N rhythmic level feature vectors into a trained word segmentation model to obtain N word segmentation combinations corresponding to the N rhythmic level feature vectors, and inputs the N rhythmic level feature vectors and the N word segmentation combinations into a trained rhythmic emotion prediction model to obtain the rhythmic emotion vector of the classical Chinese sequence, and then inputs the classical Chinese sequence into a trained syllable conversion model to obtain a syllable sequence, and finally inputs the rhythmic emotion vector and the syllable sequence into a trained speech synthesis model to obtain classical Chinese synthesized speech. By segmenting the classical Chinese sequence according to the rhythmic level of the classical Chinese sequence, the naturalness and accuracy of the segmentation results are guaranteed, and the rhythmicity of the classical Chinese synthesized speech is improved.

[0124] Corresponding to the classical Chinese speech synthesis method of the above embodiment, Figure 3 A structural block diagram of an artificial intelligence-based classical Chinese speech synthesis device provided in the second embodiment of the present invention is given. For ease of explanation, only the parts related to the embodiment of the present invention are shown.

[0125] See also Figure 3 , the classical Chinese speech synthesis device comprises:

[0126] A prosodic level determination module 31 is configured to obtain a classical Chinese text sequence for speech synthesis, input the classical Chinese text sequence into a trained prosodic level prediction model, and obtain N prosodic level feature vectors of the classical Chinese text sequence. The prosodic level includes the phoneme level, the character level, and the word level, where N is an integer greater than 1.

[0127] A word segmentation combination determination module 32 is configured to input the classical Chinese text sequence and N prosodic level feature vectors into a trained word segmentation model to obtain N word segmentation combinations corresponding to the N prosodic level feature vectors;

[0128] A prosodic sentiment vector determination module 33 is configured to input N prosodic level feature vectors and N word segmentation combinations into a trained prosodic sentiment prediction model to obtain a prosodic sentiment vector for the classical Chinese text sequence;

[0129] The syllable sequence determination module 34 is used to input the classical Chinese text sequence into the trained syllable conversion model to obtain a syllable sequence;

[0130] The classical Chinese speech synthesis module 35 is used to input the prosodic emotion vector and the syllable sequence into a trained speech synthesis model to obtain classical Chinese synthesized speech.

[0131] Optionally, the rhythm level determination module 31 includes:

[0132] The first model training submodule is used to determine that the prosody level prediction model includes a first encoder and a first decoder, uses the classical Chinese sample sequence as a training sample, and uses N actual prosody level feature vectors of the classical Chinese sample sequence as training labels to train the prosody level prediction model.

[0133] Optionally, the first model training submodule includes:

[0134] A sample text feature vector determination unit is used to input the classical Chinese sample sequence into the first encoder for feature extraction to obtain a sample text feature vector;

[0135] a prosody level determination unit, configured to perform Gaussian sampling on the sample text feature vector to obtain a sample text feature sampling result, and input the sample text feature sampling result into the first decoder for reconstruction, and output N prosody level feature vectors of the classical Chinese text sample sequence at the N output layers of the first decoder;

[0136] The parameter correction unit is used to calculate a first loss function based on the N prosody-level feature vectors and N actual prosody-level feature vectors of the classical Chinese sample sequence, and reversely correct the parameters of the first encoder and the first decoder according to the gradient descent method until the first loss function converges to obtain a trained prosody-level prediction model.

[0137] Optionally, the parameter correction unit includes:

[0138] A similarity calculation subunit, configured to calculate the similarity between each rhythmic level feature vector and the corresponding actual rhythmic level feature vector;

[0139] a rhythm level comparison subunit, configured to compare the rhythm level of each rhythm level feature vector with the rhythm level of each corresponding actual rhythm level feature vector to determine whether the rhythm level is consistent;

[0140] A similarity resetting subunit is configured to set the reset similarity of each prosody-level feature vector to each similarity if the comparison result is consistent; and to set the reset similarity of each prosody-level feature vector to 0 if the comparison result is inconsistent;

[0141] The first loss function calculation subunit is used to calculate N differences between the N reset similarities and a preset similarity threshold, and record the sum of the N differences as a first loss function.

[0142] Optionally, the prosody emotion vector determination module 33 includes:

[0143] The vector conversion submodule is used to convert N word combinations into N word vectors based on word vector technology;

[0144] A vector combination determination submodule is used to obtain N vector combinations based on N prosody-level feature vectors and corresponding N word segmentation vectors;

[0145] The model input submodule is used to input the vector combination sequence obtained based on the N vector combinations into the trained rhythmic emotion prediction model.

[0146] The second model training submodule is used to determine that the rhythmic emotion prediction model includes a second encoder and a second decoder. The sample vector combination sequence obtained by combining the sample rhythm level and the corresponding sample word segmentation is used as the training sample, and the actual rhythmic emotion vector of the classical Chinese sample sequence is used as the training label to train the rhythmic emotion prediction model.

[0147] Optionally, the classical Chinese speech synthesis module 35 includes:

[0148] A feature prediction value determination submodule is used to determine a speech feature prediction submodel for inputting a prosodic emotion vector and a syllable sequence and outputting a speech feature prediction value;

[0149] The classical Chinese speech synthesis submodule is used to determine the speech feature prediction value used by the vocoder as input and output classical Chinese synthesized speech.

[0150] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0151] Figure 4 This is a schematic diagram of the structure of a computer device provided in the third embodiment of the present invention. Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4 Only one is shown), a memory, and a computer program stored in the memory and executable on at least one processor. When the processor executes the computer program, the steps in any of the above-mentioned embodiments of the method for synthesizing classical Chinese speech are implemented.

[0152] The computer device may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that Figure 4 The above is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.

[0153] The processor may be a CPU, or other general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. A general-purpose processor may be a microprocessor, or any conventional processor.

[0154] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory can be the memory of a computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium can be the hard disk of the computer device, and in other embodiments, it can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Furthermore, the memory can also include both the internal storage unit of the computer device and the external storage device. The memory is used to store the operating system, application programs, boot loaders (BootLoader), data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or is about to be output.

[0155] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned method embodiment. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0156] The present invention may implement all or part of the processes in the above-mentioned method embodiments, and may also be completed through a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0157] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0158] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0159] In the embodiments provided by the present invention, it should be understood that the disclosed apparatus / computer equipment and methods can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0160] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0161] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.< / hui> < / polang> < / changfeng> < / hui> < / polang> < / changfeng>

Claims

1. A method for synthesizing classical Chinese speech based on artificial intelligence, characterized in that: The classical Chinese speech synthesis method comprises: Obtaining a classical Chinese text sequence for speech to be synthesized, inputting the classical Chinese text sequence into a trained prosody level prediction model to obtain N prosody level feature vectors of the classical Chinese text sequence, where the prosody level includes phoneme level, character level, and word level, and N is an integer greater than 1; Inputting the classical Chinese text sequence and the N prosodic-level feature vectors into a trained word segmentation model to obtain N word segmentation combinations corresponding to the N prosodic-level feature vectors, wherein the word segmentation combinations include phoneme combinations, character combinations, and word combinations; Inputting the N prosody-level feature vectors and the N word segmentation combinations into a trained prosody emotion prediction model to obtain a prosody emotion vector of the classical Chinese text sequence; Inputting the classical Chinese text sequence into a trained syllable conversion model to obtain a syllable sequence; Inputting the prosodic emotion vector and the syllable sequence into a trained speech synthesis model to obtain classical Chinese synthesized speech; The prosody level prediction model includes a first encoder and a first decoder, and is trained using a classical Chinese sample sequence as a training sample and N actual prosody level feature vectors of the classical Chinese sample sequence as training labels; The training process of the prosody level prediction model includes: Inputting the classical Chinese text sample sequence into the first encoder for feature extraction to obtain a sample text feature vector; Performing Gaussian sampling on the sample text feature vector to obtain a sample text feature sampling result, and inputting the sample text feature sampling result into the first decoder for reconstruction, and outputting N prosody-level feature vectors of the classical Chinese sample sequence at N output layers of the first decoder respectively; A first loss function is calculated based on the difference between the N prosody-level feature vectors of the classical Chinese sample sequence and the N actual prosody-level feature vectors, and the parameters of the first encoder and the first decoder are reversely corrected according to the gradient descent method until the first loss function converges to obtain a trained prosody-level prediction model; the difference is the difference between a preset reset similarity and a preset similarity threshold between the N prosody-level feature vectors of the classical Chinese sample sequence and the N actual prosody-level feature vectors.

2. The speech synthesis method according to claim 1, wherein: Calculating a first loss function based on the N prosody-level feature vectors and the N actual prosody-level feature vectors of the classical Chinese text sample sequence includes: Calculating the similarity between each of the prosody-level feature vectors and the corresponding actual prosody-level feature vector; comparing whether the rhythmic levels of the rhythmic level feature vectors are consistent with the rhythmic levels of the corresponding actual rhythmic level feature vectors; If the comparison result is consistent, setting the reset similarity of each of the rhythm-level feature vectors to each of the similarities; If the comparison result is inconsistent, the reset similarity of each of the rhythm-level feature vectors is set to 0; N differences between the N reset similarities and a preset similarity threshold are calculated, and the sum of the N differences is recorded as the first loss function.

3. The method for synthesizing classical Chinese speech according to claim 1, wherein: Inputting the N prosody-level feature vectors and the N word segmentation combinations into the trained prosody emotion prediction model includes: Convert the N word segmentation combinations into N word segmentation vectors according to word vector technology; Obtaining N vector combinations according to the N prosody-level feature vectors and the corresponding N word segmentation vectors; A vector combination sequence obtained based on the N vector combinations is input into a trained rhythmic emotion prediction model.

4. The method for synthesizing classical Chinese speech according to claim 3, wherein: The rhythmic emotion prediction model includes a second encoder and a second decoder. The sample vector combination sequence obtained by combining the sample rhythmic level feature vector and the corresponding sample word segmentation is used as a training sample, and the actual rhythmic emotion vector of the classical Chinese sample sequence is used as a training label to train the rhythmic emotion prediction model.

5. The method for synthesizing classical Chinese speech according to claim 1, wherein: The speech synthesis model includes a speech feature prediction sub-model and a vocoder: The speech feature prediction sub-model is used to input the prosodic emotion vector and the syllable sequence, and output a speech feature prediction value; The vocoder is used to input the speech feature prediction value and output classical Chinese synthesized speech.

6. A classical Chinese speech synthesis device based on artificial intelligence, characterized in that: The classical Chinese speech synthesis device comprises: a prosody level determination module, configured to obtain a classical Chinese text sequence for speech to be synthesized, input the classical Chinese text sequence into a trained prosody level prediction model, and obtain N prosody level feature vectors of the classical Chinese text sequence, where the prosody level includes phoneme level, character level, and word level, and N is an integer greater than 1; A word segmentation combination determination module is configured to input the classical Chinese text sequence and the N prosodic-level feature vectors into a trained word segmentation model to obtain N word segmentation combinations corresponding to the N prosodic-level feature vectors, wherein the word segmentation combinations include phoneme combinations, character combinations, and word combinations; A prosodic sentiment vector determination module, configured to input the N prosodic level feature vectors and the N word segmentation combinations into a trained prosodic sentiment prediction model to obtain a prosodic sentiment vector for the classical Chinese text sequence; a syllable sequence determination module, configured to input the classical Chinese text sequence into a trained syllable conversion model to obtain a syllable sequence; A classical Chinese speech synthesis module, configured to input the prosodic emotion vector and the syllable sequence into a trained speech synthesis model to obtain classical Chinese synthesized speech; The prosody level prediction model includes a first encoder and a first decoder, and is trained using a classical Chinese sample sequence as a training sample and N actual prosody level feature vectors of the classical Chinese sample sequence as training labels; The training process of the prosody level prediction model includes: Inputting the classical Chinese text sample sequence into the first encoder for feature extraction to obtain a sample text feature vector; Performing Gaussian sampling on the sample text feature vector to obtain a sample text feature sampling result, and inputting the sample text feature sampling result into the first decoder for reconstruction, and outputting N prosody-level feature vectors of the classical Chinese sample sequence at N output layers of the first decoder respectively; A first loss function is calculated based on the difference between the N prosody-level feature vectors of the classical Chinese sample sequence and the N actual prosody-level feature vectors, and the parameters of the first encoder and the first decoder are reversely corrected according to the gradient descent method until the first loss function converges to obtain a trained prosody-level prediction model; the difference is the difference between a preset reset similarity and a preset similarity threshold between the N prosody-level feature vectors of the classical Chinese sample sequence and the N actual prosody-level feature vectors.

7. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for synthesizing classical Chinese speech according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for synthesizing classical Chinese speech according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Speech synthesis method and device, equipment and storage medium

    CN114694633A