Speech synthesis method, device, equipment and storage medium

Through the preset grapheme-to-phoneme model and optimized acoustic model, combined with the vocoder, the problem of difficult corpus acquisition in deep learning speech synthesis is solved and the speech synthesis effect is improved.

CN113345415BActive Publication Date: 2024-10-25PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110607789.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-01
Publication Date
2024-10-25
Estimated Expiration
2041-06-01

AI Technical Summary

Technical Problem

Deep learning speech synthesis technology requires a large number of corpora for training, resulting in poor speech synthesis results and difficulty in obtaining corpora.

Method used

Use the preset grapheme-to-phoneme model to convert the text, optimize the acoustic model to generate syllable sequences, and synthesize the target speech through the vocoder to improve the speech synthesis effect.

Benefits of technology

It improves the effect of speech synthesis, simplifies the corpus acquisition process, and reduces dependence on corpus acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113345415B_ABST
    Figure CN113345415B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence, and discloses a speech synthesis method, device, equipment and storage medium for improving the synthesis effect of speech. The speech synthesis method comprises: obtaining an initial text, preprocessing the initial text to obtain a preprocessed text, calling a preset grapheme-to-phoneme model and a preset mapping dictionary, converting the preprocessed text to obtain a syllable sequence; obtaining a training text, optimizing a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm, and obtaining an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model; calling the optimized acoustic model, encoding and decoding the syllable sequence, and obtaining a Mel spectrum sequence; performing spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain a target speech. In addition, the present invention also relates to blockchain technology, and the target speech can be stored in a blockchain node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech signal processing, and in particular to a speech synthesis method, device, equipment and storage medium. Background Art

[0002] Speech synthesis, also known as text to speech (TTS), is a technology that can convert any input text into corresponding speech. It is an important research branch in the field of natural language processing.

[0003] The research history of speech synthesis can be traced back to the 18th and 19th centuries, from early rule-based mechanical and electronic speech synthesizers to speech synthesis based on waveform splicing and statistical parameters. In recent years, the introduction of deep learning has significantly improved the effect of speech synthesis. However, if you want to make the effect of deep learning speech synthesis better, you must have a large corpus for training. The corpus in the existing technology is difficult to obtain, resulting in poor results in synthesized speech. Summary of the invention

[0004] The present invention provides a speech synthesis method, apparatus, device and storage medium, which are used to call a preset grapheme-to-phoneme model to convert a preprocessed text to obtain a syllable sequence, call an optimized acoustic model to predict the syllable sequence based on the sound spectrum, synthesize the target speech through a vocoder, and improve the speech synthesis effect.

[0005] The first aspect of the present invention provides a speech synthesis method, comprising: obtaining an initial text, preprocessing the initial text to obtain a preprocessed text, calling a preset grapheme-to-phoneme model and a preset mapping dictionary to convert the preprocessed text to obtain a syllable sequence; obtaining a training text, optimizing a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model; calling the optimized acoustic model to encode and decode the syllable sequence to obtain a Mel spectrum sequence; and performing spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain a target speech.

[0006] Optionally, in a first implementation manner of the first aspect of the present invention, the obtaining of initial text, preprocessing of the initial text to obtain preprocessed text, calling a preset grapheme-to-phoneme model and a preset mapping dictionary to convert the preprocessed text to obtain a syllable sequence includes: obtaining initial text, completing missing values, filtering outliers and filtering duplicate values ​​on the initial text to obtain preprocessed text; calling a preset text segmentation tool to perform segmentation on the preprocessed text to obtain segmented text; mapping and converting the segmented text through a preset grapheme-to-phoneme model and a preset mapping dictionary to obtain a syllable sequence, wherein the syllable sequence includes an initial consonant sequence, a final vowel sequence and tones corresponding to the final vowel sequence.

[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of obtaining a training text and optimizing a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model, including: obtaining a training text, wherein the training text includes multiple sub-texts, each sub-text includes a training set text and a test set text; obtaining parameters of a preset acoustic model, and calculating a loss function of the acoustic model through the training text and a preset model-independent meta-learning algorithm to obtain a model loss function, wherein the preset acoustic model is a neural network speech synthesis model; calculating partial derivatives corresponding to the parameters of the acoustic model based on the model loss function to obtain parameter partial derivatives; and updating the parameters of the preset acoustic model through a preset gradient descent method based on the parameter partial derivatives to obtain an optimized acoustic model.

[0008] Optionally, in a third implementation manner of the first aspect of the present invention, calling the optimized acoustic model to encode and decode the syllable sequence to obtain a Mel spectrum sequence includes: calling the encoder in the optimized acoustic model to encode the syllable sequence based on a preset character embedding layer, three convolutional layers and encoding long short-term memory network to obtain encoding features; calling the decoder in the optimized acoustic model to perform decoding operations on the encoding features based on an attention mechanism to obtain a Mel spectrum sequence.

[0009] Optionally, in a fourth implementation method of the first aspect of the present invention, calling the encoder in the optimized acoustic model to perform encoding operation on the syllable sequence based on a preset character embedding layer, three convolutional layers and a coding long short-term memory network to obtain encoding features includes: calling the encoder in the optimized acoustic model to convert the syllable sequence into a character vector of a preset dimension based on a preset character embedding layer to obtain an encoded character vector; normalizing the encoded character vector through the preset three convolutional layers to obtain a convolution vector, calling a preset activation function to activate the convolution vector to obtain an activation vector; predicting the activation vector through a preset coding long short-term memory network to obtain encoding features, wherein the coding long short-term memory network is a bidirectional coding long short-term memory network.

[0010] Optionally, in a fifth implementation manner of the first aspect of the present invention, performing spectral analysis on the Mel spectrum sequence through a preset vocoder to obtain the target speech includes: calling a deconvolution layer in a preset vocoder to upsample the Mel spectrum sequence to obtain an initial audio waveform, the sampling rate of the initial audio waveform matches a preset waveform sampling rate; performing de-emphasis processing on the initial audio waveform to obtain a target audio waveform, and splicing the target audio waveforms to obtain the target speech.

[0011] Optionally, in a sixth implementation of the first aspect of the present invention, before obtaining the initial text, preprocessing the initial text to obtain the preprocessed text, calling a preset grapheme-to-phoneme model and a preset mapping dictionary, converting the preprocessed text to obtain a syllable sequence, the method further includes: obtaining training corpus, preprocessing the training corpus to obtain preprocessed training corpus, the training corpus including the training text and a pinyin sequence corresponding to the training text; selecting grapheme-to-phoneme conversion rules from a preset conversion rule library to obtain mapping conversion rules; importing the training corpus and the mapping conversion rules into a preset dictionary construction template to obtain a mapping dictionary.

[0012] The second aspect of the present invention provides a speech synthesis device, including: an acquisition module, used to acquire an initial text, preprocess the initial text to obtain a preprocessed text, call a preset grapheme-to-phoneme model and a preset mapping dictionary, convert the preprocessed text to obtain a syllable sequence; an optimization module, used to acquire a training text, optimize a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm, and obtain an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model; a coding and decoding module, used to call the optimized acoustic model, encode and decode the syllable sequence, and obtain a Mel spectrum sequence; an analysis module, used to perform spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain a target speech.

[0013] Optionally, in a first implementation manner of the second aspect of the present invention, the acquisition module includes: a filtering unit, used to acquire an initial text, perform missing value completion, outlier filtering and duplicate value filtering on the initial text, and obtain a preprocessed text; a word segmentation unit, used to call a preset text segmentation tool, perform word segmentation processing on the preprocessed text, and obtain a segmented text; a mapping unit, used to map and convert the segmented text through a preset grapheme-to-phoneme model and a preset mapping dictionary to obtain a syllable sequence, wherein the syllable sequence includes an initial consonant sequence, a final vowel sequence and tones corresponding to the final vowel sequence.

[0014] Optionally, in a second implementation of the second aspect of the present invention, the optimization module includes: an acquisition unit, used to acquire a training text, the training text includes multiple sub-texts, each sub-text includes a training set text and a test set text; a first calculation unit, used to acquire parameters of a preset acoustic model, and calculate the loss function of the acoustic model through the training text and a preset model-independent meta-learning algorithm to obtain a model loss function, and the preset acoustic model is a neural network speech synthesis model; a second calculation unit, used to calculate the partial derivatives corresponding to the parameters of the acoustic model based on the model loss function to obtain parameter partial derivatives; an updating unit, used to update the parameters of the preset acoustic model based on the parameter partial derivatives through a preset gradient descent method to obtain an optimized acoustic model.

[0015] Optionally, in a third implementation of the second aspect of the present invention, the encoding and decoding module includes: an encoding unit, used to call the encoder in the optimized acoustic model, and perform encoding operations on the syllable sequence based on a preset character embedding layer, three convolutional layers and encoding long short-term memory network to obtain encoding features; a decoding unit, used to call the decoder in the optimized acoustic model, and perform decoding operations based on the attention mechanism on the encoding features to obtain a Mel-spectrogram sequence.

[0016] Optionally, in a fourth implementation method of the second aspect of the present invention, the encoding unit is specifically used to: call the encoder in the optimized acoustic model, and based on a preset character embedding layer, convert the syllable sequence into a character vector of a preset dimension to obtain a coded character vector; normalize the coded character vector through a preset three convolutional layers to obtain a convolution vector, and call a preset activation function to activate the convolution vector to obtain an activation vector; predict the activation vector through a preset encoding long short-term memory network to obtain a coding feature, and the encoding long short-term memory network is a bidirectional encoding long short-term memory network.

[0017] Optionally, in a fifth implementation of the second aspect of the present invention, the analysis module includes: an upsampling unit, used to call the deconvolution layer in a preset voice coder, upsample the Mel spectrum sequence to obtain an initial audio waveform, and the sampling rate of the initial audio waveform matches the preset waveform sampling rate; a splicing unit, used to de-emphasize the initial audio waveform to obtain a target audio waveform, and splice the target audio waveforms to obtain a target speech.

[0018] Optionally, in a sixth implementation of the second aspect of the present invention, before the acquisition module, the speech synthesis device also includes a construction module, and the construction module includes: a preprocessing unit, used to acquire training corpus, preprocess the training corpus, and obtain preprocessed training corpus, wherein the training corpus includes a training text and a pinyin sequence corresponding to the training text; a selection unit, used to select a conversion rule for morphemes to phonemes from a preset conversion rule library to obtain a mapping conversion rule; and a construction unit, used to import the training corpus and the mapping conversion rule into a preset dictionary construction template to obtain a mapping dictionary.

[0019] The third aspect of the present invention provides a speech synthesis device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the speech synthesis device executes the above-mentioned speech synthesis method.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned speech synthesis method.

[0021] In the technical solution provided by the present invention, an initial text is obtained, the initial text is preprocessed to obtain a preprocessed text, a preset grapheme-to-phoneme model and a preset mapping dictionary are called to convert the preprocessed text to obtain a syllable sequence; a training text is obtained, and a preset acoustic model is optimized based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model; the optimized acoustic model is called to encode and decode the syllable sequence to obtain a Mel spectrum sequence; and a preset vocoder is used to perform spectrum analysis on the Mel spectrum sequence to obtain a target speech. In an embodiment of the present invention, a preset grapheme-to-phoneme model is called to convert the preprocessed text to obtain a syllable sequence, the optimized acoustic model is called to perform spectrum-based prediction on the syllable sequence, and the target speech is synthesized by the vocoder, thereby improving the speech synthesis effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of an embodiment of a speech synthesis method in an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of another embodiment of the speech synthesis method in an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of an embodiment of a speech synthesis device in an embodiment of the present invention;

[0025] Figure 4 A schematic diagram of another embodiment of a speech synthesis device according to an embodiment of the present invention;

[0026] Figure 5 The figure is a schematic diagram of an embodiment of a speech synthesis device in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The embodiments of the present invention provide a speech synthesis method, apparatus, device and storage medium for calling a preset grapheme-to-phoneme model to convert a preprocessed text to obtain a syllable sequence, calling an optimized acoustic model to perform spectrum-based prediction on the syllable sequence, and synthesizing a target speech through a vocoder, thereby improving the speech synthesis effect.

[0028] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the speech synthesis method in the embodiment of the present invention includes:

[0030] 101. Obtain an initial text, preprocess the initial text to obtain a preprocessed text, call a preset grapheme-to-phoneme model and a preset mapping dictionary, convert the preprocessed text to obtain a syllable sequence.

[0031] It is understandable that the execution subject of the present invention may be a speech synthesis device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0032] The server obtains the initial text, preprocesses the initial text to obtain the preprocessed text, calls the preset grapheme-to-phoneme model and the preset mapping dictionary, converts the preprocessed text, and obtains the syllable sequence. The initial text is obtained by a crawler. The initial text used in this embodiment is authorized by the user. The execution process of preprocessing the initial text can be: the server fills the missing values, filters the abnormal values, and filters the repeated values ​​of the initial text to realize the preprocessing of the initial text, thereby obtaining the preprocessed text. The filling of the missing values ​​can be multiple interpolation. The processing of the abnormal values ​​mainly uses the abnormal value detection algorithm z-score to identify the abnormal values ​​and delete them. At the same time, the repeated values ​​are deduplicated to obtain the preprocessed text. After the preprocessed text is generated, the server calls the preset grapheme-to-phoneme model (grapheme-to-phoneme, G2P) to convert the preprocessed text to obtain the syllable sequence. The G2P model uses a recurrent neural network (recurrent neural network, RNN) and a long short-term memory network (long short-term memory, LSTM) to realize the conversion of words to phonemes.

[0033] 102. Obtain training text, and optimize a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, where the preset acoustic model is a neural network speech synthesis model.

[0034] The server obtains the training text, and optimizes the preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model. The preset acoustic model is a neural network speech synthesis model. In this embodiment, a preset acoustic model is trained through 100 groups of tasks (i.e., training texts), all of which are text to speech (TTS) tasks, and each group of tasks includes a training set and a test set, wherein each group of tasks consists of 11 sentences of a speaker, 10 sentences of which are training sets and 1 sentence of which is a test set. The texts in the test set must have appeared in the training set, and the 100 groups of tasks correspond to 100 different speakers. In this embodiment, a model agnostic meta-learning (MAML) algorithm is used to optimize the parameters of the preset acoustic model, and the parameter update is achieved by calculating the loss function of the model to obtain the optimized acoustic model. The preset acoustic model is a neural network speech synthesis model tacotron2, which is a model that directly converts text into speech. The function of the model is to synthesize a spectrum graph into a waveform graph, and finally synthesize the target speech.

[0035] 103. Call the optimized acoustic model to encode and decode the syllable sequence to obtain a Mel spectrum sequence.

[0036] The server calls the optimized acoustic model to encode and decode the syllable sequence to obtain a Mel spectrum sequence. The optimized acoustic model includes an encoder and a decoder with an attention mechanism. The encoder converts the character sequence into a hidden layer representation (i.e., encoding features). The decoder receives this hidden layer representation to predict the spectrogram and obtains a Mel spectrum sequence. The encoder includes a character embedding layer, a three-convolutional layer, and a bidirectional encoding long short-term memory network LSTM layer. The decoder includes an initial network layer pre-net, a unidirectional long short-term memory network layer, and a post-net network layer post-net.

[0037] 104. Perform spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain the target speech.

[0038] The server uses a preset vocoder to perform spectrum analysis on the Mel spectrum sequence to obtain the target speech. The vocoder used in this embodiment is a parallel waveform network based on generative adversarial parallel wavegan, which is a non-distillation adversarial generative network, a fast and space-saving waveform generation algorithm, and trains the speech generation model WaveNet by optimizing the multi-resolution spectrogram and adversarial loss function. It can effectively capture the time-frequency distribution of the real speech waveform, convert the Mel spectrum sequence into a sound wave spectrum (i.e., voiceprint) carrying language information, and obtain the target speech.

[0039] In the embodiment of the present invention, a preset grapheme-to-phoneme model is called to convert the preprocessed text to obtain a syllable sequence, and an optimized acoustic model is called to perform spectrum-based prediction on the syllable sequence, and a target speech is synthesized through a vocoder, thereby improving the speech synthesis effect.

[0040] See also Figure 2 Another embodiment of the speech synthesis method in the embodiment of the present invention includes:

[0041] 201. Obtain an initial text, preprocess the initial text to obtain a preprocessed text, call a preset grapheme-to-phoneme model and a preset mapping dictionary, convert the preprocessed text to obtain a syllable sequence.

[0042] The server obtains the initial text, preprocesses the initial text to obtain the preprocessed text, calls the preset grapheme-to-phoneme model and the preset mapping dictionary, converts the preprocessed text, and obtains the syllable sequence. Specifically, the server obtains the initial text, performs missing value completion, outlier filtering, and duplicate value filtering on the initial text to obtain the preprocessed text; the server calls the preset text segmentation tool to perform segmentation processing on the preprocessed text to obtain the segmented text; the server maps and converts the segmented text through the preset grapheme-to-phoneme model and the preset mapping dictionary to obtain the syllable sequence, and the syllable sequence includes the initial consonant sequence, the final vowel sequence, and the tone corresponding to the final vowel sequence.

[0043] The execution process of preprocessing the initial text can be as follows: The server fills in missing values, filters out outliers, and filters out duplicate values from the initial text to obtain the preprocessed text. The filling of missing values can be multiple imputation. The processing of outliers mainly uses the outlier detection algorithm z-score to identify and delete outliers. At the same time, duplicate values are de-duplicated to obtain the preprocessed text. After the preprocessed text is generated, a preset text tokenization tool is called to tokenize the preprocessed text. The text tokenization tool includes, but is not limited to, the language technology platform (LTP), the Chinese language processing package (HanLP), and the Jieba tokenization tool, to obtain the tokenized text. By calling a preset grapheme-to-phoneme model, based on a preset mapping dictionary, the tokenized text can be mapped and converted into a corresponding syllable sequence. The syllable sequence includes an initial consonant sequence, a final vowel sequence, and the tones corresponding to the final vowel sequence. For example, the syllable sequence corresponding to "中国" is "zh,ong1,g,uo2", and the syllable sequence corresponding to "平安" is "p,ing2,an1". The tones corresponding to the final vowel sequence are represented by the numbers 1 to 5. 1 represents the first tone in Chinese tones, 2 represents the second tone, 3 represents the third tone, 4 represents the fourth tone, and 5 represents the neutral tone.

[0044] 202. Obtain the training text, and optimize the preset acoustic model based on the training text and the preset model-agnostic meta-learning algorithm to obtain the optimized acoustic model. The preset acoustic model is a neural network speech synthesis model.

[0045] The server obtains the training text. The training text includes multiple sub-texts, and each sub-text includes a training set text and a test set text. The server obtains the parameters of the preset acoustic model, calculates the loss function of the acoustic model through the training text and the preset model-agnostic meta-learning algorithm to obtain the model loss function. The preset acoustic model is a neural network speech synthesis model. The server calculates the partial derivative of the parameters corresponding to the acoustic model based on the model loss function to obtain the parameter partial derivative. The server updates the parameters of the preset acoustic model through the preset gradient descent method based on the parameter partial derivative to obtain the optimized acoustic model.

[0046] The training text in this embodiment is a small sample corpus, including 100 tasks of converting task texts into speech. The server obtains the parameters of the preset acoustic model and calculates the loss function of the acoustic model through the training text and the preset model-agnostic meta-learning algorithm. Obtain the model loss function, where N is the number of subtasks, ln is the subtask loss, Represents the initialization parameters trained for the nth task. The optimization process of the model is to update the parameters, calculate the partial derivatives of the parameters of the model loss function, and then use the gradient descent method to update the parameters to obtain the optimized acoustic model.

[0047] 203. Call the encoder in the optimized acoustic model, and perform encoding operation on the syllable sequence based on the preset character embedding layer, three convolutional layers and encoding long short-term memory network to obtain encoding features.

[0048] The server calls the encoder in the optimized acoustic model, and performs encoding operations on the syllable sequence based on the preset character embedding layer, three convolutional layers, and the encoding long short-term memory network to obtain encoding features. Specifically, the server calls the encoder in the optimized acoustic model, and converts the syllable sequence into a character vector of a preset dimension based on the preset character embedding layer to obtain an encoded character vector; the server normalizes the encoded character vector through the preset three convolutional layers to obtain a convolution vector, and calls the preset activation function to activate the convolution vector to obtain an activation vector; the server predicts the activation vector through the preset encoding long short-term memory network to obtain encoding features, and the encoding long short-term memory network is a bidirectional encoding long short-term memory network.

[0049] The syllable sequence is converted into a character vector of a preset dimension through the character embedding layer in the encoder, and the preset dimension can be 512 dimensions to obtain a coded character vector. Then, the coded character vector is normalized through the preset three convolutional layers, which include three convolutional layers. Each convolutional layer contains 512 5x 1 convolution kernels, that is, each convolution kernel spans 5 characters. The coded character vector is batch normalized, and the activation function relu is called for activation to obtain an activation vector. Finally, the activation vector is transmitted to the bidirectional encoding long short-term memory network layer, and the hidden state corresponding to the activation vector is predicted to obtain the encoding feature. The bidirectional encoding long short-term memory network layer includes 512 units, and each direction contains 256 units.

[0050] 204. Call the decoder in the optimized acoustic model, perform a decoding operation based on the attention mechanism on the encoded features, and obtain a Mel spectrum sequence.

[0051] The server calls the decoder in the optimized acoustic model, performs a decoding operation based on the attention mechanism on the encoded features, and obtains a Mel spectrum sequence. The server performs a linear projection based on the preset dimension on the encoded features through the initial network layer pre-net and the unidirectional LSTM layer in the decoder to obtain an intermediate spectrum frame. The pre-net is a double-layer fully connected layer, each fully connected layer consists of 256 hidden activation function relu units. The post-net network layer performs residual prediction and normalization on the intermediate spectrum frame to obtain a Mel spectrum sequence. The post-net is a five-layer convolution layer, each layer consists of 512 5x 1 convolution kernels. Except for the last convolution layer, the normalization process of each other layer uses the activation function tanh activation.

[0052] 205. Perform spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain the target speech.

[0053] The server performs spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain the target speech. Specifically, the server calls the deconvolution layer in the preset vocoder to upsample the Mel spectrum sequence to obtain an initial audio waveform, and the sampling rate of the initial audio waveform matches the preset waveform sampling rate; the server performs de-emphasis processing on the initial audio waveform to obtain a target audio waveform, and splices the target audio waveforms to obtain the target speech.

[0054] The vocoder used in this embodiment is a parallel waveform network parallel wavegan based on generative adversarial, which may include 4 deconvolution layers. The preset waveform sampling rate is 16kHz, so the deconvolution layer will upsample the Mel spectrum sequence to match the sampling rate of the speech waveform to obtain an initial audio waveform, de-emphasize the high-frequency components in the initial audio waveform to obtain a target audio waveform, splice the target audio waveforms, and finally obtain the target speech.

[0055] In the embodiment of the present invention, a preset grapheme-to-phoneme model is called to convert the preprocessed text to obtain a syllable sequence, and an optimized acoustic model is called to perform spectrum-based prediction on the syllable sequence, and a target speech is synthesized through a vocoder, thereby improving the speech synthesis effect.

[0056] The above describes the speech synthesis method in the embodiment of the present invention. The following describes the speech synthesis device in the embodiment of the present invention. Figure 3 , an embodiment of the speech synthesis device in the embodiment of the present invention includes:

[0057] The acquisition module 301 is used to acquire an initial text, preprocess the initial text to obtain a preprocessed text, call a preset grapheme-to-phoneme model and a preset mapping dictionary, convert the preprocessed text to obtain a syllable sequence;

[0058] The optimization module 302 is used to obtain a training text, and optimize a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, where the preset acoustic model is a neural network speech synthesis model;

[0059] The encoding and decoding module 303 is used to call the optimized acoustic model to encode and decode the syllable sequence to obtain a Mel spectrum sequence;

[0060] The analysis module 304 is used to perform spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain the target speech.

[0061] In the embodiment of the present invention, a preset grapheme-to-phoneme model is called to convert the preprocessed text to obtain a syllable sequence, and an optimized acoustic model is called to perform spectrum-based prediction on the syllable sequence, and a target speech is synthesized through a vocoder, thereby improving the speech synthesis effect.

[0062] See also Figure 4 Another embodiment of the speech synthesis device in the embodiment of the present invention includes:

[0063] The acquisition module 301 is used to acquire an initial text, preprocess the initial text to obtain a preprocessed text, call a preset grapheme-to-phoneme model and a preset mapping dictionary, convert the preprocessed text to obtain a syllable sequence;

[0064] The optimization module 302 is used to obtain a training text, and optimize a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, where the preset acoustic model is a neural network speech synthesis model;

[0065] The encoding and decoding module 303 is used to call the optimized acoustic model to encode and decode the syllable sequence to obtain a Mel spectrum sequence;

[0066] The encoding and decoding module 303 specifically includes:

[0067] The encoding unit 3031 is used to call the encoder in the optimized acoustic model, perform encoding operation on the syllable sequence based on the preset character embedding layer, three convolutional layers and encoding long short-term memory network, and obtain encoding features;

[0068] The decoding unit 3032 is used to call the decoder in the optimized acoustic model, perform a decoding operation based on the attention mechanism on the encoded features, and obtain a Mel spectrum sequence;

[0069] The analysis module 304 is used to perform spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain the target speech.

[0070] Optionally, the acquisition module 301 includes:

[0071] The filtering unit 3011 is used to obtain the initial text, and perform missing value completion, abnormal value filtering and duplicate value filtering on the initial text to obtain a preprocessed text;

[0072] The word segmentation unit 3012 is used to call a preset text word segmentation tool to perform word segmentation processing on the preprocessed text to obtain a word segmentation text;

[0073] The mapping unit 3013 is used to perform mapping conversion on the segmented text through a preset grapheme-to-phoneme model and a preset mapping dictionary to obtain a syllable sequence, where the syllable sequence includes an initial consonant sequence, a final consonant sequence, and the tones corresponding to the final consonant sequence.

[0074] Optionally, the optimization module 302 includes:

[0075] An acquisition unit 3021 is used to acquire a training text, where the training text includes a plurality of subtexts, each of which includes a training set text and a test set text;

[0076] The first calculation unit 3022 is used to obtain parameters of a preset acoustic model, calculate the loss function of the acoustic model through training text and a preset model-independent meta-learning algorithm, and obtain a model loss function, wherein the preset acoustic model is a neural network speech synthesis model;

[0077] A second calculation unit 3023 is used to obtain partial derivatives corresponding to parameters of the acoustic model based on the model loss function to obtain parameter partial derivatives;

[0078] The updating unit 3024 is used to update the parameters of the preset acoustic model based on the parameter partial derivatives through a preset gradient descent method to obtain an optimized acoustic model.

[0079] Optionally, the encoding unit 3031 may also be specifically used for:

[0080] Call the encoder in the optimized acoustic model, and based on the preset character embedding layer, convert the syllable sequence into a character vector of a preset dimension to obtain an encoded character vector;

[0081] The coded character vector is normalized through the preset three convolution layers to obtain a convolution vector, and the convolution vector is activated by calling a preset activation function to obtain an activation vector;

[0082] The activation vector is predicted by a preset encoding long short-term memory network to obtain the encoding feature, and the encoding long short-term memory network is a bidirectional encoding long short-term memory network.

[0083] Optionally, the analysis module 304 includes:

[0084] The up-sampling unit 3041 is used to call the deconvolution layer in the preset vocoder to up-sample the Mel spectrum sequence to obtain an initial audio waveform, and the sampling rate of the initial audio waveform matches the preset waveform sampling rate;

[0085] The splicing unit 3042 is used to perform de-emphasis processing on the initial audio waveform to obtain a target audio waveform, and splice the target audio waveform to obtain a target speech.

[0086] Optionally, before the acquisition module 301, the speech synthesis device further includes a construction module 305, including:

[0087] A preprocessing unit 3051 is used to obtain training corpus, preprocess the training corpus, and obtain the preprocessed training corpus, where the training corpus includes a training text and a pinyin sequence corresponding to the training text;

[0088] A selection unit 3052 is used to select a conversion rule of grapheme to phoneme from a preset conversion rule library to obtain a mapping conversion rule;

[0089] The construction unit 3053 is used to import the training corpus and mapping conversion rules into a preset dictionary construction template to obtain a mapping dictionary.

[0090] In the embodiment of the present invention, a preset grapheme-to-phoneme model is called to convert the preprocessed text to obtain a syllable sequence, and an optimized acoustic model is called to perform spectrum-based prediction on the syllable sequence, and a target speech is synthesized through a vocoder, thereby improving the speech synthesis effect.

[0091] above Figure 3 and Figure 4 The speech synthesis apparatus in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The speech synthesis device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0092] Figure 51 is a schematic diagram of the structure of a speech synthesis device provided by an embodiment of the present invention. The speech synthesis device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the speech synthesis device 500. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the speech synthesis device 500.

[0093] The speech synthesis device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 5 The illustrated structure of the speech synthesis device does not constitute a limitation on the speech synthesis device, and may include more or less components than those illustrated, or may combine certain components, or may have different component arrangements.

[0094] The present invention also provides a speech synthesis device, wherein the computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the speech synthesis method in the above-mentioned embodiments.

[0095] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the speech synthesis method.

[0096] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0098] 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 technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0099] As described above, 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 the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, 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 embodiments of the present invention.

Claims

1. A speech synthesis method, It is characterized in that The speech synthesis method comprises: Obtaining the initial text, filling missing values ​​in the initial text through multiple interpolation, filtering outliers through an outlier detection algorithm, and removing duplicate values ​​to obtain a preprocessed text; Calling a preset text segmentation tool to perform segmentation processing on the preprocessed text to obtain a segmented text; Mapping and converting the segmented text by using a preset grapheme-to-phoneme model and a preset mapping dictionary to obtain a syllable sequence, wherein the syllable sequence includes an initial consonant sequence, a final consonant sequence, and tones corresponding to the final consonant sequence; Acquire a training text, and optimize a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model; Calling the optimized acoustic model, encoding and decoding the syllable sequence to obtain a Mel spectrum sequence; The mel spectrum sequence is subjected to spectrum analysis by a preset vocoder to obtain the target speech.

2. The speech synthesis method according to claim 1, It is characterized in that The step of obtaining the training text and optimizing the preset acoustic model based on the training text and a preset model-independent meta-learning algorithm to obtain an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model and includes: Acquire a training text, wherein the training text includes a plurality of sub-texts, and each sub-text includes a training set text and a test set text; Obtaining parameters of a preset acoustic model, calculating a loss function of the acoustic model through the training text and a preset model-independent meta-learning algorithm, and obtaining a model loss function, wherein the preset acoustic model is a neural network speech synthesis model; Calculating partial derivatives corresponding to parameters of the acoustic model based on the model loss function to obtain parameter partial derivatives; Based on the parameter partial derivatives, the parameters of the preset acoustic model are updated by a preset gradient descent method to obtain an optimized acoustic model.

3. The speech synthesis method according to claim 1, It is characterized in that The calling of the optimized acoustic model, encoding and decoding the syllable sequence, and obtaining a Mel spectrum sequence include: Calling the encoder in the optimized acoustic model to perform encoding operation on the syllable sequence based on a preset character embedding layer, three convolutional layers and encoding long short-term memory network to obtain encoding features; The decoder in the optimized acoustic model is called to perform a decoding operation based on the attention mechanism on the encoded features to obtain a Mel spectrum sequence.

4. The speech synthesis method according to claim 3, It is characterized in that The encoder in the optimized acoustic model is called to perform encoding operation on the syllable sequence based on a preset character embedding layer, three convolutional layers and encoding long short-term memory network, and the encoding features obtained include: Calling the encoder in the optimized acoustic model to convert the syllable sequence into a character vector of a preset dimension based on a preset character embedding layer to obtain an encoded character vector; The coded character vector is normalized by three preset convolutional layers to obtain a convolution vector, and a preset activation function is called to activate the convolution vector to obtain an activation vector; The activation vector is predicted by a preset encoding long short-term memory network to obtain an encoding feature, and the encoding long short-term memory network is a bidirectional encoding long short-term memory network.

5. The speech synthesis method according to claim 1, It is characterized in that The method of performing spectrum analysis on the Mel spectrum sequence by a preset vocoder to obtain the target speech comprises: Calling a deconvolution layer in a preset vocoder to upsample the Mel spectrum sequence to obtain an initial audio waveform, wherein the sampling rate of the initial audio waveform matches a preset waveform sampling rate; The initial audio waveform is de-emphasized to obtain a target audio waveform, and the target audio waveform is spliced ​​to obtain a target speech.

6. The speech synthesis method according to any one of claims 1 to 5, It is characterized in that Before obtaining the initial text, preprocessing the initial text to obtain the preprocessed text, calling a preset grapheme-to-phoneme model and a preset mapping dictionary to convert the preprocessed text to obtain a syllable sequence, the method further includes: Acquire training corpus, preprocess the training corpus to obtain preprocessed training corpus, wherein the training corpus includes a training text and a pinyin sequence corresponding to the training text; Selecting a grapheme-to-phoneme conversion rule from a preset conversion rule library to obtain a mapping conversion rule; The training corpus and the mapping conversion rules are imported into a preset dictionary construction template to obtain a mapping dictionary.

7. A speech synthesis device, It is characterized in that The speech synthesis device comprises: The acquisition module is used to acquire the initial text, fill missing values ​​of the initial text through multiple interpolation, filter outliers through an outlier detection algorithm, and remove duplicate values ​​to obtain a preprocessed text; call a preset text segmentation tool to perform segmentation on the preprocessed text to obtain a segmented text; map and convert the segmented text through a preset grapheme-to-phoneme model and a preset mapping dictionary to obtain a syllable sequence, wherein the syllable sequence includes an initial consonant sequence, a final vowel sequence, and tones corresponding to the final vowel sequence; An optimization module, used for acquiring training text, optimizing a preset acoustic model based on the training text and a preset model-independent meta-learning algorithm, and obtaining an optimized acoustic model, wherein the preset acoustic model is a neural network speech synthesis model; A coding and decoding module, used for calling the optimized acoustic model, encoding and decoding the syllable sequence to obtain a Mel spectrum sequence; The analysis module is used to perform spectrum analysis on the Mel spectrum sequence through a preset vocoder to obtain the target speech.

8. A speech synthesis device, It is characterized in that The speech synthesis device comprises: A memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the speech synthesis device executes the speech synthesis method as described in any one of claims 1-6.

9. A computer-readable storage medium having instructions stored thereon, It is characterized in that When the instructions are executed by the processor, the speech synthesis method as described in any one of claims 1 to 6 is implemented.