A humanized speech synthesis method, device and readable storage medium
Through the anthropomorphic speech synthesis method, anthropomorphic speech is generated through feature encoding and style prediction, which solves the problem of insufficient naturalness and personalized expression of traditional speech synthesis and improves the naturalness and expressiveness of speech synthesis.
Patent Information
- Application Number
- CN202410773107.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-17
AI Technical Summary
Traditional speech synthesis methods ignore the personalization and emotional expression of speech, are difficult to improve naturalness and expressiveness, and fail to effectively capture the semantic and contextual information in the text.
Anthropomorphic speech synthesis method is used to generate audio signals with anthropomorphic characteristics through feature encoding, speech style prediction and style feature latent variable fusion, combined with the identity of the target speaking user. The method includes text encoding, style prediction, regularized flow model, bottleneck feature decoder and mel spectrum decoder, and finally generates synthetic speech through a vocoder.
It significantly improves the naturalness and personalized performance of speech synthesis, provides users with a more realistic voice interaction experience, and accurately captures the semantic and contextual information in the text.
Smart Images

Figure CN118366430B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of speech processing, and in particular to a method for synthesizing humanized speech. Background Art
[0002] With the continuous development of artificial intelligence technology, speech synthesis technology has become an important part of the field of human-computer interaction. Traditional speech synthesis methods often only focus on the conversion of text to speech, while ignoring the personalization and emotional expression of speech. How to improve the naturalness and expressiveness of speech synthesis and accurately capture the semantic and contextual information in the text is a problem that technicians in this field need to solve. Summary of the invention
[0003] The object of the present invention is to provide a method, device and readable storage medium for anthropomorphic speech synthesis.
[0004] In a first aspect, an embodiment of the present invention provides an anthropomorphic speech synthesis method, comprising:
[0005] Acquire a text to be processed, perform a feature encoding operation on the text to be processed, and obtain text encoding features corresponding to the text to be processed, wherein the text encoding features include text semantic information and text context information;
[0006] Performing voice style prediction on the text encoding feature to obtain voice style information corresponding to the text encoding feature;
[0007] Extracting style feature latent variables of the speech style information, and fusing the text encoding features with the style feature latent variables to obtain fused speech features;
[0008] Inputting the fused speech feature into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature;
[0009] Performing feature conversion on the speech decoding feature vector and the identity identifier of the target speaking user to obtain audio signal features;
[0010] The audio signal features are processed by a vocoder to obtain a target anthropomorphic synthesized speech.
[0011] In the embodiment of the present invention, the step of obtaining the text to be processed, performing a feature encoding operation on the text to be processed, and obtaining a text encoding feature corresponding to the text to be processed includes:
[0012] Invoking a text encoder, wherein the text encoder comprises a plurality of feed-forward neural network layers;
[0013] The text to be processed is input into the text encoder for nonlinear transformation operation to obtain the text encoding features including the text semantic information and the text context information.
[0014] In the embodiment of the present invention, the step of performing speech style prediction on the text encoding feature to obtain speech style information corresponding to the text encoding feature includes:
[0015] Calling a style predictor, wherein the style predictor includes a plurality of convolutional layers;
[0016] Inputting the text encoding feature into the style predictor to obtain the mean and variance of the style corresponding to the text encoding feature;
[0017] The mean and variance of the style corresponding to the text encoding feature are used as the speech style information.
[0018] In the embodiment of the present invention, the step of extracting the style feature latent variable of the speech style information includes:
[0019] Calling a regularized flow model, wherein the regularized flow model includes a plurality of continuous regularized flow layers, each of which includes a transformation function and a regularization function;
[0020] The speech style information is input into the regularized flow model, and processed by the transformation function and the regularization function to obtain the style feature latent variable.
[0021] In the embodiment of the present invention, the step of inputting the fused speech feature into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature includes:
[0022] Calling the preset feature decoder, wherein the preset feature decoder is a bottleneck feature decoder, the bottleneck feature decoder is obtained from a pre-trained automatic speech recognition model, and the bottleneck feature decoder includes multiple feedforward neural network layers;
[0023] The fused speech feature is input into the bottleneck feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature.
[0024] In the embodiment of the present invention, the feature conversion of the speech decoding feature vector and the identity identifier of the target speaking user to obtain the audio signal feature includes:
[0025] The speech decoding feature vector and the identity of the target speaking user are input into a Mel spectrum decoder for conversion to obtain a Mel spectrum feature as the audio signal feature.
[0026] In the embodiment of the present invention, the style feature latent variable is learned in the following manner, including:
[0027] Obtain the sample style feature latent variables obtained through the regularized flow model;
[0028] Inputting the sample style feature latent variable into a language phenomenon predictor for processing to obtain a first feature representation of the sample style feature latent variable;
[0029] Inputting the language phenomenon label into the language phenomenon encoder for processing to obtain a second feature representation of the language phenomenon label;
[0030] Loss calculation is performed according to the error between the first feature representation and the second feature representation to complete the learning of the style feature latent variable.
[0031] In an embodiment of the present invention, the method further includes:
[0032] Inputting the speech decoding feature vector into a reference encoder for processing to obtain a frame-level feature representation corresponding to the speech decoding feature vector, wherein the reference encoder includes a plurality of hole convolution layers and gated convolution layers;
[0033] Calling a preset alignment tool to convert the frame-level feature representation into a phoneme-level feature representation;
[0034] The phoneme level feature representation is processed through a linear layer to obtain the mean and variance of the phoneme level feature.
[0035] In a second aspect, an embodiment of the present invention provides an anthropomorphic speech synthesis device, comprising:
[0036] An acquisition module is used to acquire a text to be processed, perform a feature encoding operation on the text to be processed, and obtain text encoding features corresponding to the text to be processed, wherein the text encoding features include text semantic information and text context information;
[0037] A calculation module is used to perform speech style prediction on the text encoding feature to obtain speech style information corresponding to the text encoding feature; extract style feature latent variables of the speech style information, and fuse the text encoding feature and the style feature latent variables to obtain a fused speech feature; input the fused speech feature into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature;
[0038] The synthesis module is used to perform feature conversion on the speech decoding feature vector and the identity identifier of the target speaking user to obtain audio signal features; and process the audio signal features through a vocoder to obtain target anthropomorphic synthesized speech.
[0039] In a third aspect, an embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is running, it controls the computer device where the readable storage medium is located to execute the anthropomorphic speech synthesis method described in at least one possible implementation of the first aspect.
[0040] Compared with the prior art, the beneficial effects provided by the present invention include: adopting a personified speech synthesis method, device and readable storage medium disclosed by the present invention, by performing feature encoding on the text to be processed, obtaining text encoding features containing semantic and contextual information. Then, the corresponding speech style information is obtained through speech style prediction, and its style feature latent variables are extracted. The text encoding features are fused with the style feature latent variables to form fused speech features. Then, these features are input into a preset feature decoder to obtain a speech decoding feature vector. Furthermore, feature conversion is performed in combination with the identity identifier of the target speaking user to obtain audio signal features. Finally, the audio signal features are processed by a vocoder to generate a target synthesized speech with personified characteristics. Such a design can significantly improve the naturalness and personalized performance of speech synthesis, and provide users with a more realistic voice interaction experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0042] Figure 1 A schematic diagram of the steps of the anthropomorphic speech synthesis method provided by an embodiment of the present invention;
[0043] Figure 2 A schematic block diagram of the structure of a humanized speech synthesis device provided by an embodiment of the present invention;
[0044] Figure 3 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0046] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.
[0047] In order to solve the technical problems in the aforementioned background technology, Figure 1 The present invention provides a flowchart of a method for synthesizing humanized speech, which is described in detail below.
[0048] Step S201, obtaining a text to be processed, performing a feature encoding operation on the text to be processed, and obtaining text encoding features corresponding to the text to be processed, wherein the text encoding features include text semantic information and text context information;
[0049] Step S202, performing speech style prediction on the text encoding feature to obtain speech style information corresponding to the text encoding feature;
[0050] Step S203, extracting the style feature latent variable of the speech style information, and fusing the text encoding feature with the style feature latent variable to obtain a fused speech feature;
[0051] Step S204, inputting the fused speech feature into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature;
[0052] Step S205, performing feature conversion on the speech decoding feature vector and the identity identifier of the target speaking user to obtain audio signal features;
[0053] Step S206: Process the audio signal features through a vocoder to obtain a target anthropomorphic synthesized speech.
[0054] In an embodiment of the present invention, exemplarily, a server receives a text to be processed: "Tomorrow's weather is expected to be sunny and suitable for outdoor activities." The server first uses a natural language processing model to perform feature encoding operations on this text. During the encoding process, the server not only analyzes the semantic information of the text, that is, the basic meaning conveyed by the text, but also deeply analyzes the contextual information of the text, such as weather, activity suggestions, etc. After encoding, the server obtains the text encoding features corresponding to this text. Next, the server uses a machine learning model to predict the voice style of the text encoding features. By analyzing the vocabulary, grammar and context in the text, the model predicts that this text should be conveyed in a relaxed and cheerful voice style to match the positive atmosphere of "suitable for outdoor activities" mentioned in the text. The server further extracts the style feature latent variables in the voice style information, which capture the key elements of the relaxed and cheerful voice style. Subsequently, the server fuses these style feature latent variables with the previous text encoding features to form a richer fused voice feature, which contains both the content of the text and reflects the expected voice style. The server inputs the fused voice features into a preset feature decoder. This decoder is a deep learning model that can convert fused voice features into voice decoding feature vectors, which are the key to generating voice waveforms. The server then performs feature conversion between the speech decoding feature vector and the target speaker's identity identifier. For example, if the target speaker is a virtual character named "Xiao Ming", the server will adjust the speech decoding feature vector according to Xiao Ming's voice characteristics, such as pitch, timbre, etc., to obtain audio signal features with Xiao Ming's voice characteristics. Finally, the server uses a vocoder to process the audio signal features. The vocoder converts these features into human-audible audio waveforms and generates the target anthropomorphic synthesized speech. In this example, the server finally synthesized a voice of Xiao Ming saying in a relaxed and cheerful tone, "Tomorrow's weather is expected to be sunny, suitable for outdoor activities."
[0055] In the embodiment of the present invention, the aforementioned step S201 can be implemented through the following example execution.
[0056] Invoking a text encoder, wherein the text encoder comprises a plurality of feed-forward neural network layers;
[0057] The text to be processed is input into the text encoder for nonlinear transformation operation to obtain the text encoding features including the text semantic information and the text context information.
[0058] In an embodiment of the present invention, exemplarily, when the server starts to execute the anthropomorphic speech synthesis process, it will first call a text encoder. This text encoder is pre-trained and contains multiple feedforward neural network layers, which can deeply capture and understand the complex features in the text data. For example, when the server processes a text of a sentence to be synthesized speech: "Tomorrow's science and technology exhibition will display the latest intelligent robots.", it will first activate the text encoder and prepare to perform in-depth analysis on this sentence. Then, the server inputs the above-mentioned text to be processed into the called text encoder. This step is automated, and the server passes the text data to the encoder through the internal data processing process for the next step. After receiving the text transmitted by the server, the text encoder begins to use multiple feedforward neural network layers to perform nonlinear transformation operations on the text. In this process, the neural network layer will gradually extract deep features in the text, including semantic information of words, such as the specific meanings of words such as "science and technology exhibition" and "intelligent robot", and the contextual information formed by these words in the sentence, such as "displaying the latest intelligent robot" implies a scene of science and technology display. After the nonlinear transformation operation of the text encoder, the server obtains text encoding features containing text semantic information and text context information. These features are a high-dimensional data representation that captures the core content of the original text and provides a rich information basis for subsequent voice style prediction and speech synthesis. For example, in this scenario, the text encoding features may include a deep understanding of keywords such as "technology exhibition" and "intelligent robot", as well as the context and emotional color of these words in the sentence. These features will be used by the server in the next speech synthesis step to ensure that the generated speech not only accurately conveys the content of the text, but also conforms to the expected context and emotional expression.
[0059] In the embodiment of the present invention, the aforementioned step S202 may be implemented through the following example execution.
[0060] Calling a style predictor, wherein the style predictor includes a plurality of convolutional layers;
[0061] Inputting the text encoding feature into the style predictor to obtain the mean and variance of the style corresponding to the text encoding feature;
[0062] The mean and variance of the style corresponding to the text encoding feature are used as the speech style information.
[0063] In an embodiment of the present invention, exemplarily, after completing the extraction of text encoding features, the server will call a style predictor. This style predictor is a deep learning model, which specifically includes multiple convolutional layers, which can effectively capture the subtle differences in voice style from text encoding features. For example, when the server processes the text "Welcome to the restaurant, I hope you can enjoy a delicious dinner.", it will activate the style predictor and prepare to analyze the voice style of this text. The server inputs the previously extracted text encoding features into the style predictor. These features contain the semantic information and contextual information of the text, which is the basis for style prediction. After receiving the text encoding features, the style predictor performs a deep analysis through its internal convolutional layer to calculate the mean and variance of the voice style corresponding to these features. The mean reflects the average level of the style, while the variance reflects the fluctuation range of the style, and the two together constitute a quantitative description of the voice style. For example, when processing the above restaurant welcome, the style predictor may obtain a warm and friendly voice style mean and a relatively small variance, indicating that this text should be conveyed in a more consistent and gentle tone. The server uses the mean and variance output by the style predictor as the speech style information of the text. This information will be used to adjust the generated speech in the subsequent speech synthesis process to ensure that it conforms to the expected speech style. By predicting the speech style of the text encoding features, the server can accurately grasp the speech style suitable for the text, providing an important reference for the subsequent speech synthesis.
[0064] In the embodiment of the present invention, the aforementioned step S203 can be implemented through the following example execution.
[0065] Calling a regularized flow model, wherein the regularized flow model includes a plurality of continuous regularized flow layers, each of which includes a transformation function and a regularization function;
[0066] The speech style information is input into the regularized flow model, and processed by the transformation function and the regularization function to obtain the style feature latent variable.
[0067] In the embodiment of the present invention, exemplarily, after determining the speech style information of the text, the server will call a regularized flow model. This model is specially designed to extract style feature hidden variables from complex speech style information. The regularized flow model includes multiple continuous regularized flow layers, each layer is equipped with a transformation function and a regularization function, which can gradually transform the input speech style information into more abstract and representative style feature hidden variables. For example, when the server processes a text with a distinctive style, such as "Today's weather is really great, suitable for going out for a walk!", it will start the regularized flow model to deeply analyze the speech style behind this text. The server inputs the previously obtained speech style information, including the mean and variance of the style, into the regularized flow model. These style information are the basis for the model to extract features. In the regularized flow model, the input speech style information will first be processed by the transformation function. The function of this function is to perform a reversible nonlinear transformation on the input data, with the purpose of mapping the data from the original space to a new space that is easier to extract features. Next, the regularization function normalizes the transformed data to satisfy a certain probability distribution, which helps to further abstract and extract the style feature latent variables. After continuous processing of multiple regularized flow layers, the server finally obtains the style feature latent variables of the speech style information. These latent variables are highly abstract and compressed feature representations that capture the core elements of the original speech style information while removing redundancy and noise. These style feature latent variables will play a key role in the subsequent speech synthesis process to ensure that the generated speech can accurately reflect the expected speech style. For example, when processing the above text about the weather, the regularized flow model may extract a latent variable representing a "positive, happy" style, which will be used in subsequent speech synthesis to adjust the generated speech to make it sound more cheerful and lively.
[0068] In the embodiment of the present invention, the aforementioned step S204 may be implemented through the following example execution.
[0069] Calling the preset feature decoder, wherein the preset feature decoder is a bottleneck feature decoder, the bottleneck feature decoder is obtained from a pre-trained automatic speech recognition model, and the bottleneck feature decoder includes multiple feedforward neural network layers;
[0070] The fused speech feature is input into the bottleneck feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature.
[0071] In an embodiment of the present invention, exemplarily, the server first calls a preset feature decoder. This decoder is a bottleneck feature decoder, which is obtained from a pre-trained automatic speech recognition model. The bottleneck feature decoder is specially designed with a "bottleneck" structure, which can extract the most critical feature information during the information transmission process. This decoder includes multiple feedforward neural network layers, which are specially trained to efficiently decode the input fused speech features into speech decoding feature vectors. For example, when the server is ready to synthesize a voice of "Please note, turn left at the intersection ahead", it will use the fused speech features obtained in the previous step and call this preset feature decoder for the next step of processing. The server inputs the fused speech features obtained in the previous step into the bottleneck feature decoder. These fused speech features contain both the semantic and contextual information of the text and the expected voice style, which is the key to generating natural and vivid speech. After receiving the fused speech features, the bottleneck feature decoder performs deep processing through its internal feedforward neural network layer. These network layers gradually refine and transform the input features and finally output a speech decoding feature vector. This vector is a highly condensed representation of speech features that captures the essence of text content and speech style, providing precise guidance for subsequent speech waveform generation. For example, when processing the above navigation instructions, the bottleneck feature decoder will output a speech decoding feature vector, which not only contains the semantic information of "turn left at the intersection ahead", but also incorporates the clear and accurate speech style unique to navigation instructions. Through this step, the server successfully converts the fused speech features into a speech decoding feature vector, laying a solid foundation for subsequent speech synthesis.
[0072] In the embodiment of the present invention, the aforementioned step S205 can be implemented through the following example execution.
[0073] The speech decoding feature vector and the identity of the target speaking user are input into a Mel spectrum decoder for conversion to obtain a Mel spectrum feature as the audio signal feature.
[0074] In the embodiment of the present invention, exemplarily, in the previous step, the server has obtained a speech decoding feature vector. Now, the server also needs to obtain the identity of the target speaking user. This identity is usually a unique code or label used to refer to a specific speaking user. For example, assuming that the server wants to generate a voice imitating the user "John", then the identity of "John" will be used as the input of this step. The server inputs the speech decoding feature vector and the identity of the target speaking user into the Mel spectrum decoder. The Mel spectrum decoder is a model specifically used to convert feature vectors into Mel spectrum features. Mel spectrum is a spectral representation method commonly used in sound processing, which can effectively capture the pitch and timbre information of the sound. For example, if the server wants to generate a voice imitating "John", it will input the identity of "John" and the previously obtained speech decoding feature vector into the Mel spectrum decoder. After receiving the input, the Mel spectrum decoder will use the internal algorithm and network structure to jointly process the speech decoding feature vector and the identity of the target speaking user. In this process, the decoder will adjust the conversion method of the speech decoding feature vector in combination with the identity of the target speaking user to ensure that the generated Mel spectrum features can reflect the unique voice characteristics of the target speaking user. After being processed by the Mel spectrum decoder, the server obtains Mel spectrum features. These features not only contain the semantic information of the text and the expected voice style, but also incorporate the personal voice characteristics of the target speaker. Therefore, these Mel spectrum features can be used as audio signal features for subsequent speech waveform generation. For example, after processing the speech synthesis request of "John", the Mel spectrum features obtained by the server will be able to reflect the unique timbre and intonation of "John". Finally, the server will use the obtained Mel spectrum features to generate a speech waveform. This is usually done through a vocoder (such as parallel wavegan or HiFi-GAN, etc.). The vocoder can generate the corresponding speech waveform based on the Mel spectrum features, thereby completing the entire speech synthesis process. In summary, by inputting the speech decoding feature vector and the identity of the target speaker into the Mel spectrum decoder for conversion, the server can obtain the Mel spectrum features with the unique voice characteristics of the target speaker as audio signal features, and finally generate a natural and vivid speech waveform.
[0075] In the embodiment of the present invention, the style feature latent variable is learned in the following manner.
[0076] Obtain the sample style feature latent variables obtained through the regularized flow model;
[0077] Inputting the sample style feature latent variable into a language phenomenon predictor for processing to obtain a first feature representation of the sample style feature latent variable;
[0078] Inputting the language phenomenon label into the language phenomenon encoder for processing to obtain a second feature representation of the language phenomenon label;
[0079] Loss calculation is performed according to the error between the first feature representation and the second feature representation to complete the learning of the style feature latent variable.
[0080] In the embodiment of the present invention, the server first obtains sample style feature latent variables from the regularized flow model. These latent variables are obtained by extracting style features and regularizing a large number of speech samples, and they represent the style features of different speech samples.
[0081] For example, the server may extract samples from a corpus containing a variety of different speech styles, such as news broadcasts, daily conversations, speeches, etc., and then process these samples through a regularized flow model to obtain the corresponding style feature latent variables.
[0082] The server inputs the acquired sample style feature latent variables into the language phenomenon predictor. The language phenomenon predictor is a deep learning model that can process the input style feature latent variables and predict the language phenomena related to these latent variables. This process will obtain the first feature representation of the sample style feature latent variables.
[0083] For example, for a speech sample with an obvious colloquial style, its style feature latent variable may be converted into a first feature representation that can reflect the colloquial characteristics in the language phenomenon predictor.
[0084] At the same time, the server also needs to obtain the language phenomenon labels corresponding to the sample style feature latent variables (such as colloquial, formal, excited, etc.) and input these labels into the language phenomenon encoder. The language phenomenon encoder converts the labels into a second feature representation, which is a representation in the same feature space as the first feature representation.
[0085] Continuing with the above example, the server will label the spoken-style speech sample as "spoken" and input it into the language phenomenon encoder to obtain a second feature representation corresponding to the first feature representation.
[0086] The server then compares the error between the first feature representation and the second feature representation. This error reflects the accuracy of the model in predicting language phenomena. In order to reduce this error, the server will perform a loss calculation and update the parameters of the language phenomenon predictor through the back propagation algorithm.
[0087] In the above example, if there is a large error between the first feature representation and the second feature representation, it means that the language phenomenon predictor is insufficient in predicting the colloquial style. The server will calculate this error and adjust the parameters of the predictor through an optimization algorithm to improve its prediction accuracy.
[0088] Through repeated iterations and optimizations of the above steps, the server can eventually complete the learning of the style feature latent variables. This means that the language phenomenon predictor can more accurately predict the corresponding language phenomenon from the style feature latent variables, thereby improving the naturalness and style diversity of speech synthesis.
[0089] The server continuously optimizes the model's predictive ability by learning the relationship between the latent variables of sample style features and language phenomena, thereby achieving accurate synthesis of multiple speech styles.
[0090] In the embodiments of the present invention, the following implementation modes are also provided.
[0091] Inputting the speech decoding feature vector into a reference encoder for processing to obtain a frame-level feature representation corresponding to the speech decoding feature vector, wherein the reference encoder includes a plurality of hole convolution layers and gated convolution layers;
[0092] Calling a preset alignment tool to convert the frame-level feature representation into a phoneme-level feature representation;
[0093] The phoneme level feature representation is processed through a linear layer to obtain the mean and variance of the phoneme level feature.
[0094] In the embodiment of the present invention, the server has obtained the speech decoding feature vectors in the previous step. Now, the server inputs these vectors into a reference encoder. The reference encoder is a deep learning model that includes multiple hole convolution layers and gated convolution layers. Such a structure enables the encoder to capture a wider range of contextual information and effectively extract speech features.
[0095] For example, when the server processes a speech synthesis task of “The weather is so nice today”, it inputs the corresponding speech decoding feature vector into the reference encoder.
[0096] After being processed by the reference encoder, the server obtains the frame-level feature representation corresponding to the speech decoding feature vector. These feature representations capture the detailed information of each frame in the speech, providing an accurate data basis for subsequent speech synthesis.
[0097] In the above example, the frame-level feature representation obtained by the server can reflect the pronunciation details of each word in the sentence "The weather is really nice today".
[0098] The server then calls a preset alignment tool. The purpose of this tool is to convert the frame-level feature representation to the phoneme-level feature representation. Phoneme is the smallest unit in speech, which corresponds to a specific pronunciation. Through the alignment tool, the server can match the features of each frame with the corresponding phoneme.
[0099] For example, for the sentence “It’s a nice day today”, the alignment tool aligns the frame-level feature representation with the phonemes of each word to ensure that the pronunciation of each phoneme is accurately represented by features.
[0100] Finally, the server processes the phoneme-level feature representation through a linear layer. This linear layer can calculate the mean and variance of each phoneme-level feature. These statistical information are very important for subsequent speech synthesis and voice style control.
[0101] In the above example, the server calculates the mean and variance of each phoneme in the sentence "The weather is so nice today" to ensure that the style and rhythm of the original speech can be accurately restored when synthesizing speech.
[0102] Through this series of steps, the server can accurately extract the phoneme-level features in the speech and provide accurate data support for subsequent speech synthesis.
[0103] In order to more clearly describe the solution provided by the embodiment of the present invention, the overall solution is illustrated below.
[0104] First, the text style prediction is performed on the input text. This step aims to identify the specific style of the text. Through text style prediction, the system can better understand the language characteristics of the text and provide an important reference for the subsequent speech synthesis process.
[0105] Then, after being processed by the regularized flow model, the hidden features of the text style are extracted and added to the text encoding features. The purpose of this step is to combine the linguistic features of the text with the style features to which it belongs, thereby generating richer and more expressive speech features.
[0106] Next, the generated features are input into the Bottle Neck (BN) feature decoder, which further processes the features and generates more advanced and abstract BN features. These BN features contain the language information of the text and features related to the selected style, providing more accurate and comprehensive input for the subsequent speech synthesis.
[0107] The system then inputs the BN features and the target speaker ID into the Mel spectrum decoder. The function of the Mel spectrum decoder is to convert the features into Mel spectrum features, which is an essential intermediate step in the speech synthesis process. The Mel spectrum features contain the spectral information of the speech and can more accurately reflect the sound characteristics and intonation changes of the speech.
[0108] Finally, after being processed by the vocoder, the system can generate synthesized speech. The function of the vocoder is to convert the Mel spectrum features into audible sound signals. The speech processed by the vocoder has a natural and smooth sound quality and intonation, and can accurately express the language information contained in the input text and the selected style characteristics.
[0109] In summary, through multiple steps of processing and machining, this system can combine the input text with a specific style to generate high-quality, expressive synthesized speech, thus achieving an important breakthrough and progress in speech synthesis technology in the generation of stylized speech.
[0110] This system mainly includes a text encoder, a style predictor, a regularized flow model, a Bottle Neck (BN) feature decoder, and a Mel spectrum decoder.
[0111] 1. System Module Introduction
[0112] 1. Text Encoder
[0113] The text encoder is one of the key components in the speech synthesis system. It consists of 6 feedforward neural network layers, with the dimension of the hidden layer being 256. This means that after the text is input into the encoder, it will undergo a series of complex nonlinear transformations and eventually generate a 256-dimensional text encoding feature. This encoding feature contains an abstract representation of the input text, has a high-dimensional representation capability, and can effectively capture the semantic information and language structure in the text.
[0114] 2. Style Predictor
[0115] The design of the style predictor aims to extract the corresponding style information from the text encoding features. The present invention adopts a 5-layer convolutional layer structure, which can effectively extract rich language style information from the text encoding features. The input is the text encoding features, and the output is the mean and variance of the corresponding style.
[0116] The style defined in the present invention covers a variety of language phenomena, such as pauses caused by thinking or hesitation, which are often manifested in speech as discontinuities in sound or sudden stagnation of audio waveforms; prolonged sounds refer to syllables or phonemes that appear in speech for a longer duration, which are often used to emphasize or express emotions; faster speech speed refers to faster rhythm in speech, and the speed of speech rhythm will affect the rhythm and expressiveness of language expression; emphasized intonation refers to more significant changes in tone in speech, which are usually used to emphasize the key points of a sentence or the expression of emotion.
[0117] By learning these style language phenomena, the style predictor can accurately classify and predict the style of the input text. In this way, the system can flexibly adjust the parameters in the speech synthesis process according to the predicted style information, thereby generating more expressive and natural speech output.
[0118] 3. Regularized Flow Model
[0119] The regularized flow model is mainly used to model data distribution and is usually applied to generative tasks such as generating images, speech, text, etc. The core idea is to generate complex data distribution from a simple prior distribution (usually Gaussian distribution or uniform distribution) through streaming operations (i.e. continuous differentiable transformations).
[0120] The structure of a regularized flow model usually consists of multiple consecutive regularized flow layers, each of which contains a transformation function and a regularization function. The transformation function is responsible for mapping the input data to another space, while the regularization function is used to ensure the smoothness and sample diversity of the output distribution. By stacking multiple regularized flow layers, the model is able to gradually learn and capture the complex structure of the data distribution, thereby generating high-quality samples.
[0121] The present invention inputs the mean and variance obtained by the text style predictor into the regular flow model to obtain a more complex data distribution, that is, the hidden features of the style.
[0122] 4. BN feature decoder
[0123] The extraction of Bottle Neck (BN) features is an important step in this system. It comes from a pre-trained automatic speech recognition (ASR) model. This feature is designed to contain not only the linguistic information of the text, but also rich style information, and is independent of the specific speaker. This feature makes the BN feature widely used in scenarios such as sentiment transfer and style transfer, because it can provide a feature representation that is independent of the speaker and has rich semantic information.
[0124] Similar to the text encoder, the Bottle Neck (BN) feature decoder also consists of 6 feedforward neural network layers with a hidden layer dimension of 256. This design choice aims to maintain a similar network structure and parameter settings as the text encoder to ensure that the expressiveness and learning ability of the features can match it. With this setting, the system can maintain consistency in the feature extraction and decoding process, thereby ensuring that the final generated speech can accurately reflect the language characteristics and style information of the input text.
[0125] 5. Language Phenomenon Predictor and Language Phenomenon Encoder
[0126] In the model training phase, the language phenomenon encoder and language phenomenon predictor are used to learn the latent variables of style features. First, the latent variables of style features obtained by the regularized flow model are sent to the language phenomenon predictor for processing. At the same time, the language phenomenon label is input into the language phenomenon encoder, and the feature representation corresponding to the input label is obtained through the processing of the encoder. Then, the outputs of the language phenomenon encoder and the language phenomenon predictor are subjected to cosine loss calculation to ensure that their feature representations are as close as possible in the language phenomenon space. Both components are composed of 5 linear layers to extract and learn complex language features. The supervision of language phenomenon labels is also introduced to restrict the process of converting Bottle Neck (BN) features into latent variables of style features to ensure the convergence of the model. This supervision mechanism helps to guide the model to learn more accurate and meaningful latent variables of style features, thereby improving the performance and generalization ability of the model.
[0127] 6. Reference encoder
[0128] The reference encoder has a WaveNet-like structure, which is mainly composed of multiple dilated convolutional layers and gated convolutional layers. This structure can effectively capture the temporal features and local dependencies of language, thereby improving the representation ability and learning effect of features. When the Bottle Neck (BN) features are processed by the reference encoder, frame-level feature representation is obtained. Next, an alignment tool similar to Montreal Forced Alignment is used to convert these frame-level features into phoneme-level features. This alignment tool can accurately align the speech signal with its corresponding phoneme sequence. Subsequently, after processing by the linear layer, the mean and variance of the features are obtained.
[0129] Specific implementation steps:
[0130] Step 1: First, input the text to be synthesized into the text encoder. The main function of the text encoder is to convert the input text into a high-dimensional vector, which contains the semantic and contextual information of the text. This vector is called the text encoding feature, which is an abstract representation of the input text.
[0131] Step 2: Next, input the text encoding features into the style predictor. The style predictor analyzes the text encoding features and predicts the speech style of the text. Through the style predictor, the mean and variance of the predicted style can be obtained. These statistics describe the distribution characteristics of the predicted speech style.
[0132] Step 3: Then, the predicted speech style is input into the regularized flow model. The regularized flow model is a generative model that models by learning the probability density function of the data distribution. In this step, the regularized flow model is used to learn the latent variables of the style features, that is, the potential, unobservable speech style features.
[0133] Step 4: Next, add the latent variables of the style features obtained in step 3 to the text encoding features. In this way, a feature vector that combines text information and speech style information is obtained. Then, this feature vector is input into the Bottle Neck (BN) feature decoder.
[0134] Step 5: After the Bottle Neck (BN) feature decoder, a vector called the Bottle Neck (BN) feature is obtained. This vector contains high-level semantic information after feature fusion and decoding, which is one of the key features for generating synthetic audio.
[0135] Step 6: Then, the Bottle Neck (BN) features and the target speaker's identity information (ID) are input into the Mel spectrum decoder. The Mel spectrum decoder converts the Bottle Neck (BN) features and the target speaker's identity information into Mel spectrum features. Mel spectrum features are the representation of speech signals in the frequency domain, which contain the frequency and intensity information of speech.
[0136] Step 7: Finally, the Mel spectrum features are input into the vocoder. After being processed by the vocoder, the final synthesized audio is obtained.
[0137] See also Figure 2 , Figure 2 An anthropomorphic speech synthesis device 110 provided in an embodiment of the present invention includes:
[0138] The acquisition module 1101 is used to acquire a text to be processed, perform a feature encoding operation on the text to be processed, and obtain text encoding features corresponding to the text to be processed, wherein the text encoding features include text semantic information and text context information;
[0139] The calculation module 1102 is used to perform speech style prediction on the text encoding feature to obtain speech style information corresponding to the text encoding feature; extract style feature latent variables of the speech style information, and fuse the text encoding feature and the style feature latent variables to obtain fused speech features; input the fused speech features into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech features;
[0140] The synthesis module 1103 is used to perform feature conversion on the speech decoding feature vector and the identity identifier of the target speaking user to obtain audio signal features; and process the audio signal features through a vocoder to obtain target anthropomorphic synthesized speech.
[0141] It should be noted that the implementation principle of the aforementioned anthropomorphic speech synthesis device 110 can refer to the implementation principle of the aforementioned anthropomorphic speech synthesis method, and will not be repeated here. It should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the anthropomorphic speech synthesis device 110 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above anthropomorphic speech synthesis device 110. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0142] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0143] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned anthropomorphic speech synthesis device 110. Figure 3 As shown, Figure 3 The computer device 100 provided in the embodiment of the present invention is a structural block diagram. The computer device 100 includes an anthropomorphic speech synthesis device 110, a memory 111, a processor 112 and a communication unit 113.
[0144] To achieve data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly. For example, the electrical connection between these components can be achieved through one or more communication buses or signal lines. The anthropomorphic speech synthesis device 110 includes at least one software function module that can be stored in the memory 111 in the form of software or firmware or solidified in the operating system (OS) of the computer device 100. The processor 112 is used to execute the anthropomorphic speech synthesis device 110 stored in the memory 111, such as the software function modules and computer programs included in the anthropomorphic speech synthesis device 110.
[0145] An embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the aforementioned anthropomorphic speech synthesis method.
[0146] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in accordance with the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended specific application.
Claims
1. A method for anthropomorphic speech synthesis, characterized in that: include: Acquire a text to be processed, perform a feature encoding operation on the text to be processed, and obtain text encoding features corresponding to the text to be processed, wherein the text encoding features include text semantic information and text context information; Performing voice style prediction on the text encoding feature to obtain voice style information corresponding to the text encoding feature; Extracting style feature latent variables of the speech style information, and fusing the text encoding features with the style feature latent variables to obtain fused speech features; Inputting the fused speech feature into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature; Performing feature conversion on the speech decoding feature vector and the identity identifier of the target speaking user to obtain audio signal features; Processing the audio signal features through a vocoder to obtain a target anthropomorphic synthesized speech; The style feature latent variables are learned in the following ways, including: Obtain the sample style feature latent variables obtained through the regularized flow model; Inputting the sample style feature latent variable into a language phenomenon predictor for processing to obtain a first feature representation of the sample style feature latent variable; Inputting the language phenomenon label into the language phenomenon encoder for processing to obtain a second feature representation of the language phenomenon label; Loss calculation is performed according to the error between the first feature representation and the second feature representation to complete the learning of the style feature latent variable.
2. The method according to claim 1, characterized in that The step of obtaining the text to be processed and performing a feature encoding operation on the text to be processed to obtain a text encoding feature corresponding to the text to be processed includes: Invoking a text encoder, wherein the text encoder includes a plurality of feed-forward neural network layers; The text to be processed is input into the text encoder for nonlinear transformation operation to obtain the text encoding features including the text semantic information and the text context information.
3. The method according to claim 1, characterized in that The performing speech style prediction on the text encoding feature to obtain speech style information corresponding to the text encoding feature includes: Calling a style predictor, wherein the style predictor includes a plurality of convolutional layers; Inputting the text encoding feature into the style predictor to obtain the mean and variance of the style corresponding to the text encoding feature; The mean and variance of the style corresponding to the text encoding feature are used as the speech style information.
4. The method according to claim 1, characterized in that: The step of extracting the style feature latent variables of the speech style information comprises: Calling a regularized flow model, wherein the regularized flow model includes a plurality of continuous regularized flow layers, each of which includes a transformation function and a regularization function; The speech style information is input into the regularized flow model, and processed by the transformation function and the regularization function to obtain the style feature latent variable.
5. The method according to claim 1, characterized in that The step of inputting the fused speech feature into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature comprises: Calling the preset feature decoder, wherein the preset feature decoder is a bottleneck feature decoder, the bottleneck feature decoder is obtained from a pre-trained automatic speech recognition model, and the bottleneck feature decoder includes multiple feedforward neural network layers; The fused speech feature is input into the bottleneck feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature.
6. The method according to claim 1, characterized in that The step of converting the speech decoding feature vector and the identity identifier of the target speaking user to obtain audio signal features includes: The speech decoding feature vector and the identity of the target speaking user are input into a Mel spectrum decoder for conversion to obtain a Mel spectrum feature as the audio signal feature.
7. The method according to claim 1, characterized in that The method further comprises: Inputting the speech decoding feature vector into a reference encoder for processing to obtain a frame-level feature representation corresponding to the speech decoding feature vector, wherein the reference encoder includes a plurality of hole convolution layers and gated convolution layers; Calling a preset alignment tool to convert the frame-level feature representation into a phoneme-level feature representation; The phoneme level feature representation is processed through a linear layer to obtain the mean and variance of the phoneme level feature.
8. An anthropomorphic speech synthesis device, characterized in that: include: An acquisition module is used to acquire a text to be processed, perform a feature encoding operation on the text to be processed, and obtain text encoding features corresponding to the text to be processed, wherein the text encoding features include text semantic information and text context information; A calculation module is used to perform speech style prediction on the text encoding feature to obtain speech style information corresponding to the text encoding feature; extract style feature latent variables of the speech style information, and fuse the text encoding feature and the style feature latent variables to obtain a fused speech feature; input the fused speech feature into a preset feature decoder to obtain a speech decoding feature vector corresponding to the fused speech feature; A synthesis module is used to perform feature conversion on the speech decoding feature vector and the identity identifier of the target speaking user to obtain audio signal features; and process the audio signal features through a vocoder to obtain a target anthropomorphic synthesized speech; The style feature latent variables are learned in the following ways, including: Obtain the sample style feature latent variables obtained through the regularized flow model; The sample style feature latent variable is input into a language phenomenon predictor for processing to obtain a first feature representation of the sample style feature latent variable; the language phenomenon label is input into a language phenomenon encoder for processing to obtain a second feature representation of the language phenomenon label; and the loss is calculated based on the error between the first feature representation and the second feature representation to complete the learning of the style feature latent variable.
9. A readable storage medium, characterized in that: The readable storage medium includes a computer program, which, when executed, controls the computer device where the readable storage medium is located to execute the anthropomorphic speech synthesis method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for converting text data into acoustic features
CN113761841A
Voice conversion method, voice conversion device, electronic equipment and storage medium
CN115294995A
Speech synthesis method and device, electronic equipment and storage medium
CN116129862A
Unsupervised learning of separate voice content and style representations
CN116635934A
Method for generating digital human voice and facial animation through text
CN116863038A
