Voice conversion method and device, computer equipment and storage medium

By obtaining the characteristics of the source speech and the target speech, using the decoder to generate the converted timbre mel spectrum characteristics and synthesizing the speech, it solves the problems of large number of speech conversion parameters, long cycle and high cost in the existing technology, and achieves fast and efficient personality. ized voice conversion.

CN118737167AActive Publication Date: 2024-10-01MOBILITY ASIA SMART TECH CO LTD

Patent Information

Application Number
CN202310315841.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-10-01
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

Existing speech conversion technology has a large number of parameters, long training period, and high cost when converting streaming text into the target speaker's voice, making it difficult to meet the personalized customization needs of ordinary users.

Method used

By obtaining the source speech language coding characteristics and fundamental frequency characteristics, combined with the target speech timbre coding characteristics, the decoder is used to generate the converted timbre mel spectrum features, and the converted speech is synthesized through the vocoder, using an end-to-end non-autoregressive model and text assistance. , introducing multi-head attention to align text and audio features to achieve fast and efficient speech conversion.

Benefits of technology

It reduces the amount of parameters needed to convert text into the target speaker's voice, shortens the conversion cycle, improves the efficiency of synthesized speech, reduces costs, and enables personalized voice customization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118737167A_ABST
    Figure CN118737167A_ABST
Patent Text Reader

Abstract

The invention relates to a voice conversion method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a source voice language coding feature and a source voice fundamental frequency feature, and splicing the source voice language coding feature and the source voice fundamental frequency feature to form a source voice splicing feature; obtaining target voice timbre coding features; inputting the source voice splicing feature and the target voice timbre coding feature into the decoder for decoding to obtain a converted timbre Mel spectrum feature; and inputting the converted tone Mel spectrum features into a vocoder to synthesize converted voice. Multi-head attention is introduced to perform non-speaker related language feature alignment of texts and audios, and target speaker language features are embedded through source speaker related features and fundamental frequency features by a decoder, so that rapid and efficient end-to-end non-autoregressive voice conversion is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech conversion technology, and in particular to a speech conversion method, apparatus, computer equipment and storage medium. Background Art

[0002] Voice conversion is to transfer the timbre of the original speaker to the timbre of the target speaker without changing the content of the speech. It has important applications in movie dubbing, character imitation, and character timbre reproduction. It also has a wide range of application scenarios in the automotive field, such as navigation voice change, IP customization, and personalized customization of user timbre. By duplicating the timbre through single-sample voice conversion, it can not only greatly reduce the requirements for training data, but also significantly save computing resources.

[0003] At present, great progress has been made in voice conversion to a specific target speaker based on deep learning. For example, voice conversion methods based on Cycle GAN, VAE, and ASR can well achieve voice conversion to speakers in the training set. However, if you want to add a target speaker's timbre, or customize the user's timbre, you usually need a large amount of speaker data to retrain a voice conversion model with the speaker's timbre as the target timbre, or adaptively train the existing model with a small amount of data. In practical applications, the cycle and cost of database recording are relatively high, and it is also difficult for ordinary users to obtain a large amount of user voice data.

[0004] Although the text-assisted attention model can share attention with the TTS model and achieve one-to-many conversion, it also has disadvantages such as long training cycle, large amount of calculation, and inability to achieve ultra-long text synthesis conversion. Although the streaming text-to-speech (TTS) model can synthesize speech in parallel, it also has the disadvantage of a large number of parameters. Summary of the invention

[0005] Based on this, it is necessary to provide a speech conversion method, device, computer equipment and storage medium to address the above technical problems, which can solve the technical problems of large parameter quantity, high cycle and high cost in converting streaming text into a certain target speaker's speech.

[0006] In one aspect, a method for voice conversion is provided, the method comprising:

[0007] Acquire a source speech language coding feature and a source speech fundamental frequency feature, and concatenate the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature;

[0008] Obtaining target speech timbre coding features;

[0009] Inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain a conversion timbre Mel-spectrogram feature;

[0010] The converted timbre Mel-spectrogram features are input into a vocoder to synthesize the converted speech.

[0011] In one embodiment, the step of inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain the converted timbre Mel-spectrogram feature comprises:

[0012] Input the source speech concatenation feature into a one-dimensional convolution layer for convolution processing and then input it into a generation module;

[0013] The target speech timbre coding features are subjected to conditional batch normalization processing and then input into a generation module;

[0014] The output results of the source speech concatenation features after convolution processing and the target speech timbre coding features after conditional batch normalization processing are input into the one-dimensional convolution layer for convolution processing after the piecewise linear function and upsampling layer, one-dimensional convolution layer and dilated convolution layer in the generation module to output the converted timbre Mel spectrum features.

[0015] In one embodiment, the step of inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain the converted timbre Mel-spectrogram feature further includes:

[0016] The noise vector is processed by the linear layer and then input into the batch normalization layer;

[0017] Inputting the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the batch normalization layer, and concatenating and accumulating them with the noise vector;

[0018] The output result of the spliced ​​features after splicing and accumulating with the noise vector is processed by the piecewise linear function and the upsampling layer, the one-dimensional convolution layer and the dilated convolution layer in the generation module, and is input into the one-dimensional convolution layer for convolution processing to output the converted timbre Mel spectrum feature.

[0019] In one embodiment, the step of inputting the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the batch normalization layer and concatenating and accumulating the noise vector comprises:

[0020] The concatenated features of the source speech after convolution processing and the timbre coding features of the target speech after conditional batch normalization processing are used as the first speech input features;

[0021] A plurality of batch normalization layers and a plurality of piecewise linear functions and upsampling layers are arranged in the generation module, wherein the output end of one normalization layer is connected to the input end of the piecewise linear function and upsampling layer, the output end of the piecewise linear function and upsampling layer is connected to the input end of a one-dimensional convolution layer or an expansion-dimensional convolution layer, and the output end of the one-dimensional convolution layer or the expansion-dimensional convolution layer is connected to the input end of another normalization layer;

[0022] Inputting the first speech input feature into the batch normalization layer and concatenating and accumulating it with the noise vector, and outputting a first concatenated feature after being processed by the piecewise linear function, the upsampling layer, and the one-dimensional convolution layer;

[0023] The first speech input feature is processed by a piecewise linear function, an upsampling layer, and a one-dimensional convolution layer to output a first corrected splicing feature;

[0024] Correcting the first splicing feature using the first correction splicing feature to form a second speech input feature;

[0025] Inputting the second speech input feature into the batch normalization layer and concatenating and accumulating it with the noise vector, and outputting the second concatenated feature after being processed by the piecewise linear function, the upsampling layer, and the dilated convolution layer;

[0026] The second speech input feature is processed by a piecewise linear function, an upsampling layer, and an expanded convolution layer to output a second corrected splicing feature;

[0027] The second corrected splicing feature is used to correct the second splicing feature to form a speech output feature.

[0028] In one embodiment, the step of obtaining a source speech language coding feature and a source speech fundamental frequency feature, and concatenating the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature comprises:

[0029] Convert text sequence into phoneme sequence;

[0030] The phoneme sequence is input into the encoder pre-trained network, concatenated with the position code and then input into the encoder multi-head attention layer, and processed by the residual and normalization layer, the forward feedback layer, the residual and normalization layer and the linear layer in sequence to output the text sequence features;

[0031] The source speech Mel spectrum is input into the decoder pre-trained network, and the concatenated features are concatenated with the positional encoding features to form the concatenated features and input into the masked multi-head attention layer. After residual and normalization processing, the decoded spectrum features are formed and input into the decoder multi-head attention layer.

[0032] The text sequence features are concatenated with the target speech timbre coding features to form a two-dimensional feature matrix sequence and input it into the decoder multi-head attention layer;

[0033] The decoder multi-head attention layer performs an alignment operation on the two-dimensional feature matrix sequence and the decoded spectrum feature, and then outputs the speech of the text to be synthesized after residual and normalization processing;

[0034] Perform matrix multiplication on the text sequence feature and the speech of the text to be synthesized, and output the source speech concatenation feature.

[0035] In one embodiment, the step of inputting the text sequence into the source speech concatenation feature module and converting it into a phoneme sequence includes:

[0036] Inputting a text sequence into a source speech concatenation feature module;

[0037] Forming a regular expression by regularizing the text sequence;

[0038] Convert the regular expression into Chinese by phonetic conversion;

[0039] The Chinese language is converted into a phoneme sequence through polyphone classification and rhythm prediction.

[0040] In one embodiment, before the step of inputting the phoneme sequence into the encoder preprocessing network and the position coding splicing step, and before the step of inputting the source speech Mel spectrum into the decoder preprocessing network and the position coding feature splicing step, it also includes:

[0041] The phoneme sequence is position-encoded for each frame in time series, and the position encoding formula is:

[0042]

[0043] Among them, PE is the position code, pos is the position number, i is the dimension number of the time series, and d model is the model dimension.

[0044] In another aspect, a speech conversion device is provided, the device comprising:

[0045] Encoder pre-training network, used to obtain the source speech language coding features;

[0046] A decoder pre-training network is used to obtain the fundamental frequency feature of the source speech, and to concatenate the source speech language coding feature with the fundamental frequency feature of the source speech to form a source speech concatenation feature;

[0047] A target speech encoder, used to obtain the target speech timbre coding characteristics;

[0048] A decoder, used for decoding the source speech concatenation feature and the target speech timbre coding feature to obtain a conversion timbre Mel-spectrogram feature;

[0049] A vocoder is used to synthesize the converted speech by using the converted timbre mel-spectrogram features.

[0050] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0051] Acquire a source speech language coding feature and a source speech fundamental frequency feature, and concatenate the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature;

[0052] Obtaining target speech timbre coding features;

[0053] Inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain a conversion timbre Mel-spectrogram feature;

[0054] The converted timbre Mel-spectrogram features are input into a vocoder to synthesize the converted speech.

[0055] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0056] Acquire a source speech language coding feature and a source speech fundamental frequency feature, and concatenate the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature;

[0057] Obtaining target speech timbre coding features;

[0058] Inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain a conversion timbre Mel-spectrogram feature;

[0059] The converted timbre Mel-spectrogram features are input into a vocoder to synthesize the converted speech.

[0060] The above-mentioned speech conversion method, device, computer equipment and storage medium, by splicing the non-speaker related language features and the fundamental frequency features of the source speaker into the decoder, the target speaker coding features are input into the decoder; the decoder outputs the mel spectrum with the fundamental frequency features of the target speaker after conversion; the converted mel spectrum is input into the vocoder to synthesize the converted speech. That is, by using the transformer (transformer) end-to-end non-autoregressive model and text assistance, multi-head attention is introduced to align the non-speaker related language features of text and audio, and the source speaker related features and fundamental frequency features are embedded in the target speaker language features through the decoder to achieve fast and efficient end-to-end non-autoregressive speech conversion. Therefore, the present application can reduce the number of parameters for converting text into a certain target speaker's speech, shorten the conversion cycle, improve the efficiency of synthesizing converted speech, and reduce the cost of synthesizing converted speech. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0062] Figure 1 A flowchart of a speech conversion method in one embodiment;

[0063] Figure 2 A flowchart of the steps of obtaining a source speech language coding feature and a source speech fundamental frequency feature, and concatenating the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature in one embodiment;

[0064] Figure 3 A flowchart of the steps of converting a text sequence into a phoneme sequence in one embodiment;

[0065] Figure 4 In one embodiment Figure 1 A schematic diagram of the module structure corresponding to the voice conversion method shown;

[0066] Figure 5 is a schematic diagram of a module structure of a non-speaker-related language feature module in one embodiment;

[0067] Figure 6 is a schematic diagram of a process flow through residual and normalization processing steps in one embodiment;

[0068] Figure 7 is a schematic flow chart of the processing steps of the forward feedback layer in one embodiment;

[0069] Figure 8 A schematic diagram of a flow chart of the steps of performing an alignment operation on the two-dimensional feature matrix sequence and the decoded spectrum feature by the multi-head attention layer of the decoder in one embodiment;

[0070] Fig. 9 is a processing flow chart of a multi-head attention layer of a decoder in one embodiment;

[0071] Fig.10 A schematic diagram of the module structure of a decoder multi-head attention layer in one embodiment;

[0072] Fig.11 A flowchart of an embodiment of the present invention is a step of inputting the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the batch normalization layer, and concatenating and accumulating the noise vector;

[0073] Fig.12 is a structural block diagram of a speech conversion device in one embodiment;

[0074] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0076] like Figure 1 As shown, in one embodiment, a voice conversion method is provided, including the following steps S1-S4.

[0077] Step S1, obtaining a source speech language coding feature and a source speech fundamental frequency feature, and concatenating the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature.

[0078] Among them, the source speech language coding feature is the source speaker related language feature obtained by converting the text sequence through the non-speaker related language feature module. The source speech fundamental frequency feature is to obtain the source speaker fundamental frequency feature through the fundamental frequency extraction module through the source speech Mel spectrum. The fundamental frequency feature includes tone and timbre. The fundamental frequency contains a large number of features that characterize speech emotions, which is crucial in speech emotion recognition. The source speech language coding feature and the source speech fundamental frequency feature are spliced ​​to form the source speech splicing feature, that is, the original text sequence and the source speech fundamental frequency feature are spliced ​​to form the initial converted speech, which is usually the timbre speech converted by the machine by default. The present application is to merge the timbre speech converted by the machine by default with the timbre speech of the target speaker to achieve timbre conversion, so the timbre speech of the target speaker is the pre-imitation timbre speech.

[0079] Mel spectrogram is based on the characteristics of human hearing. We are more sensitive to low-frequency sounds and less sensitive to high-frequency sounds. So when the sound frequency increases linearly, the higher the frequency, the harder it is for us to hear the difference. Therefore, we use logarithmic spectrum instead of linear spectrum. Mel spectrum contains three major characteristics: time-frequency domain information; perception-related amplitude information; perception-related frequency domain information. The core of Mel spectrum is Mel-scale, a logarithmic scale for linear changes in frequency perception.

[0080] Among them, the fundamental frequency extraction module is: using the cwt algorithm to extract the fundamental frequency, or using the end-to-end crepe model to extract the fundamental frequency features, inputting the mel spectrum and outputting one-dimensional features.

[0081] Specifically, Figure 2 As shown, the steps of obtaining the source speech language coding feature and the source speech fundamental frequency feature, and concatenating the source speech language coding feature and the source speech fundamental frequency feature to form the source speech concatenation feature include S11-S16.

[0082] Step S11, converting the text sequence into a phoneme sequence.

[0083] The text sequence is written text, which is the text content of the pre-reading. The phoneme sequence is the phonetic sequence of each word or sentence of the pre-reading text content.

[0084] Among them, Figure 3 As shown, the steps of converting a text sequence into a phoneme sequence specifically include: step S21, inputting a text sequence into a source speech splicing feature module; step S22, subjecting the text sequence to text normalization to form a regular expression; step S23, subjecting the regular expression to grapheme-to-phoneme conversion to form Chinese; step S24, converting the Chinese into a phoneme sequence through polyphone classification and prosody prediction.

[0085] Step S12, input the phoneme sequence into the encoder pre-trained network (encoder prenet), spliced ​​with the position code and input into the encoder multi-head attention layer, and processed by the residual and normalization layer, the forward feedback layer, the residual and normalization layer and the linear layer in sequence to output the text sequence features.

[0086] Figure 4 for Figure 1The schematic diagram of the module structure corresponding to the voice conversion method shown in the figure. Among them, the speaker encoder is the encoder prenet: using the GE2E or E-CACPA model, the Mel spectrum (80, 1) is input and the 256-dimensional target speech timbre coding features are output.

[0087] Figure 5 This is a schematic diagram of the structure of the non-speaker-dependent language feature module. The left side of the non-speaker-dependent language feature module is the encoder prenet. The encoder prenet is: input text sequence->1D convolution->1D convolution->1D convolution->(512,). The decoder prenet is: input Mel spectrum->full connection layer (256, relu)->full connection layer (256, relu)->(256,). The values ​​in (512,), (256, relu), and (256,) represent dimensions, and the same applies to the following.

[0088] Step S13, input the source speech Mel spectrum into the decoder pre-trained network (decoder prenet), splice it with the position coding feature to form a spliced ​​feature input to the masked multi-head attention layer, and after residual and normalization processing, form the decoded spectrum feature and input it into the decoder multi-head attention layer.

[0089] like Figure 5 As shown, the right side of the non-speaker-dependent language feature module is the decoder prenet. Decoder: Input->Masked Multi-Head Attention (8)->Residual & Layer Normalization->Multi-Head Attention (8)->Residual & Layer Normalization->Feedback Layer->Residual & Layer Normalization->Decoder Output.

[0090] like Figure 6 As shown, in this embodiment, the steps of residual and normalization processing include: step S31, input data is processed by the first residual and normalization; step S32, processed by the forward feedback layer; step S33, processed by the residual and normalization; step S34, outputting the synthesized speech after linear layer processing.

[0091] like Figure 7 As shown, in this embodiment, the forward feedback layer processing steps include: step S41, obtaining input data; step S42, inputting the input data into the linear layer; step S43, the linear layer processes the input data through a piecewise linear function (relu activation function) and then outputs the processing result.

[0092] Step S14, concatenating the text sequence features with the target speech timbre coding features to form a two-dimensional feature matrix sequence and inputting it into the decoder multi-head attention layer.

[0093] Among them, the forward feedback layer: input->linear layer->relu activation function->output.

[0094] Step S15, the decoder multi-head attention layer performs an alignment operation on the two-dimensional feature matrix sequence and the decoded spectrum feature, and then outputs the speech of the text to be synthesized after residual and normalization processing.

[0095] Among them, Figure 8 , Fig. 9 As shown, in this embodiment, the decoder multi-head attention layer performs an alignment operation step on the two-dimensional feature matrix sequence and the decoded spectrum feature, including:

[0096] Step S51, inputting the two-dimensional feature matrix sequence into a one-dimensional convolutional layer for convolution processing and then inputting it into a generation module;

[0097] Step S52, obtaining the target speech timbre coding features, performing conditional batch normalization processing, and then inputting them into the generation module;

[0098] Step S53, the generation module inputs the two-dimensional feature matrix sequence after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the normalization layer, and concatenates and accumulates them with the noise vector processed by the linear layer;

[0099] Step S54: the output result of the generation module is input into a one-dimensional convolution layer for convolution processing, and then the converted Mel spectrum feature is output.

[0100] An example of the steps of aligning the two-dimensional feature matrix sequence and the decoded spectrum feature by the decoder multi-head attention layer is as follows:

[0101] 1) The text encoder outputs the text feature sequence through the linear layer and inputs it into the multi-head attention of the decoder, which is the sequence k, v;

[0102] 2) The decoder mel spectrum enters the multi-head attention after residual and normalization, which is the sequence q;

[0103] 3)Sequence Q (Query), K (Key) and V (Value) for SelfAttention alignment calculation

[0104] attention(q,k,v)=softmax(qk_T / sq(d_k))v.

[0105] Step S16, performing matrix multiplication of the text sequence feature and the speech of the text to be synthesized, and outputting source speech concatenation features.

[0106] Step S2, obtaining the target speech timbre coding features.

[0107] Similarly, the method of obtaining the target speech timbre coding features is to use the target speaker's Mel spectrum to convert it into the target speaker's timbre coding features through a speaker encoder. The target speaker is the pre-simulated timbre and tone.

[0108] Step S3, inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain the converted timbre Mel-spectrogram feature.

[0109] Among them, combined Fig. 9 , Fig.10 Step S3 specifically includes: inputting the source speech splicing feature into a one-dimensional convolutional layer for convolution processing and then inputting it into a generation module; the target speech timbre coding feature is subjected to conditional batch normalization processing and then inputted into a generation module; the output results of the source speech splicing feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing are processed by the piecewise linear function and upsampling layer, one-dimensional convolution layer and dilated convolution layer in the generation module, and then inputted into a one-dimensional convolutional layer for convolution processing and then output the converted timbre Mel-spectrogram feature.

[0110] In this embodiment, combined with Fig.10 In order to simulate the influence of real environmental noise, step S3 also includes: inputting the noise vector into the batch normalization layer after being processed by the linear layer; inputting the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the batch normalization layer, and concatenating and accumulating with the noise vector; inputting the output result of the concatenation feature after concatenating and accumulating with the noise vector into the one-dimensional convolution layer after being processed by the piecewise linear function and upsampling layer, one-dimensional convolution layer and dilated convolution layer in the generation module, and performing convolution processing to output the converted timbre Mel-spectrogram feature.

[0111] Combination Fig.10 ,like Fig.11 As shown, the step of inputting the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the batch normalization layer and concatenating and accumulating the noise vector includes:

[0112] Step S61, taking the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing as the first speech input feature;

[0113] Step S62, setting a plurality of batch normalization layers and a plurality of piecewise linear functions and upsampling layers in the generation module, wherein the output end of one normalization layer is connected to the input end of the piecewise linear function and upsampling layer, the output end of the piecewise linear function and upsampling layer is connected to the input end of a one-dimensional convolution layer or an expanded-dimensional convolution layer, and the output end of the one-dimensional convolution layer or the expanded-dimensional convolution layer is connected to the input end of another normalization layer;

[0114] Step S63, inputting the first speech input feature into the batch normalization layer to concatenate and accumulate with the noise vector, and outputting the first concatenated feature after being processed by the piecewise linear function, the upsampling layer, and the one-dimensional convolution layer;

[0115] Step S64, processing the first speech input feature through a piecewise linear function, an upsampling layer, and a one-dimensional convolutional layer to output a first corrected splicing feature;

[0116] Step S65, using the first corrected splicing feature to correct the first splicing feature to form a second speech input feature;

[0117] Step S66, inputting the second speech input feature into the batch normalization layer to concatenate and accumulate with the noise vector, and outputting the second concatenated feature after being processed by the piecewise linear function, the upsampling layer, and the dilated convolution layer;

[0118] Step S67, processing the second speech input feature through a piecewise linear function, an upsampling layer, and an expanded convolution layer to output a second corrected splicing feature;

[0119] Step S68: Use the second corrected splicing feature to correct the second splicing feature to form a speech output feature.

[0120] In this embodiment, before the step of inputting the phoneme sequence into the encoder preprocessing network (prenet) and splicing with the position coding, and before the step of inputting the source speech Mel spectrum into the decoder preprocessing network (prenet) and splicing with the position coding feature, it also includes:

[0121] The phoneme sequence is position-encoded for each frame in time series, and the position encoding formula is a sin / cosine function, specifically:

[0122]

[0123] Among them, PE is the position code, pos is the position number, i is the dimension number of the time series, and d model is the model dimension.

[0124] Fig. 9 This is the processing flow chart of the decoder multi-head attention layer (multi-head attention module), where Gblock is the generation module; the generation module is mainly composed of one-dimensional convolution, dilated convolution, and residual network. At the same time, the injected noise vector is spliced ​​to batch normalization through the linear layer. The above modules are overlapped seven times, as shown in detail. Fig.10As shown in the dashed box. The source speaker related features and the source speaker base frequency features are concatenated and input into the one-dimensional convolution, and the output is used as the input of the generation module. The output of the generation module is converted into the Mel spectrum feature after the one-dimensional convolution output.

[0125] Fig. 9 , Fig.10 The corresponding decoder data flow is: concatenated features (,) -> one-dimensional convolution (c = 512, k = 7) -> GBlock (no upsampling, 4X) -> one-dimensional convolution (c = 80, k = 1) -> Mel spectrum.

[0126] Training process: 1) Alignment training of non-speaker related language features: The text passes through the text front-end (text regularization, word segmentation, grapheme to phoneme (g2p), rhythm prediction, polyphone prediction, etc.), outputs the phoneme sequence, passes through the encoder prenet, and the splicing position encoding information is input into the encoder module (multi-head attention->residual, normalization->forward feedback layer->residual, normalization->linear layer) to output the text sequence features, and the text corresponding to the Mel spectrum is input into the decoder prenet, and the splicing position encoding information is input into the decoder module (masked multi-head attention->residual, normalized multi-head attention->residual, normalization->forward feedback layer->residual, normalization->linear layer). The output passes through the linear layer and is multiplied with the encoder output matrix. The encoder output is input into the multi-head attention layer of the decoder for alignment training, and finally the alignment model is obtained. 2) Overall training: The text passes through the text front-end (text regularization, word segmentation, grapheme-to-phoneme (g2p), rhythm prediction, polyphone prediction, etc.) to output the phoneme sequence, which passes through the non-speaker related feature module to output the source speaker related characteristics. The Mel spectrum corresponding to the text passes through the fundamental frequency extraction module to output the fundamental frequency characteristics of the original speaker. The above features are concatenated and input into the decoder. The source speaker Mel spectrum is input into the speaker encoder, and the output of the source speaker code is input into the decoder. After the decoder is trained, the conversion model is obtained.

[0127] Application process: The text passes through the text front-end (text regularization, word segmentation, grapheme-to-phoneme (g2p), rhythm prediction, polyphone prediction, etc.) to output the phoneme sequence, which passes through the non-speaker related feature module to output the source speaker related characteristics. The Mel spectrum corresponding to the text passes through the fundamental frequency extraction module to output the fundamental frequency characteristics of the original speaker. The above features are spliced ​​and input into the decoder. The target speaker Mel spectrum is input into the speaker encoder and the target speaker code is output into the decoder. After decoding, the converted Mel spectrum is output, which is finally synthesized into converted speech through a traditional or neural vocoder.

[0128] In the above-mentioned speech conversion method, the non-speaker related language features and the fundamental frequency features of the source speaker are spliced ​​into the decoder, and the target speaker coding features are input into the decoder; the decoder outputs the mel spectrum with the fundamental frequency features of the target speaker after conversion; the converted mel spectrum is input into the vocoder to synthesize the converted speech. That is, by using the transformer end-to-end non-autoregressive model and text assistance, multi-head attention is introduced to align the non-speaker related language features of text and audio, and the source speaker related features and fundamental frequency features are embedded in the target speaker language features through the decoder to achieve fast and efficient end-to-end non-autoregressive speech conversion. Therefore, the present application can reduce the number of parameters for converting text into a certain target speaker's speech, shorten the conversion cycle, improve the efficiency of synthesizing converted speech, and reduce the cost of synthesizing converted speech.

[0129] It should be understood that although Figure 2-Figure 10 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 10 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0130] In one embodiment, Fig.12 As shown, a speech conversion device 10 is provided, comprising: an encoder pre-training network 1, a decoder pre-training network 2, a target speech encoder 3, a decoder 4, and a vocoder 5. The encoder pre-training network 1 is used to obtain the source speech language coding feature; the decoder pre-training network 2 is used to obtain the source speech fundamental frequency feature, and splice the source speech language coding feature with the source speech fundamental frequency feature to form a source speech splicing feature; the target speech encoder 3 is used to obtain the target speech timbre coding feature; the decoder 4 is used to decode the source speech splicing feature and the target speech timbre coding feature to obtain the conversion timbre Mel-spectrogram feature; the vocoder 5 is used to synthesize the conversion timbre Mel-spectrogram feature into the conversion speech.

[0131] In the above-mentioned speech conversion device, the non-speaker related language features and the fundamental frequency features of the source speaker are spliced ​​into the decoder, and the target speaker coding features are input into the decoder; the decoder outputs the mel spectrum with the fundamental frequency features of the target speaker after conversion; the converted mel spectrum is input into the vocoder to synthesize the converted speech. That is, by using the transformer end-to-end non-autoregressive model and text assistance, multi-head attention is introduced to align the non-speaker related language features of text and audio, and the source speaker related features and fundamental frequency features are embedded in the target speaker language features through the decoder to achieve fast and efficient end-to-end non-autoregressive speech conversion. Therefore, the present application can reduce the number of parameters for converting text into a certain target speaker's speech, shorten the conversion cycle, improve the efficiency of synthesizing converted speech, and reduce the cost of synthesizing converted speech.

[0132] For the specific definition of the voice conversion device, please refer to the definition of the voice conversion method above, which will not be repeated here. Each module in the above-mentioned voice conversion device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0133] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store voice conversion data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a voice conversion method is implemented.

[0134] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a voice conversion method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0135] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0136] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0137] Acquire a source speech language coding feature and a source speech fundamental frequency feature, and concatenate the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature;

[0138] Obtaining target speech timbre coding features;

[0139] Inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain a conversion timbre Mel-spectrogram feature;

[0140] The converted timbre Mel-spectrogram features are input into a vocoder to synthesize the converted speech.

[0141] For the specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the voice conversion method above, which will not be repeated here.

[0142] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0143] Acquire a source speech language coding feature and a source speech fundamental frequency feature, and concatenate the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature;

[0144] Obtaining target speech timbre coding features;

[0145] Inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain a conversion timbre Mel-spectrogram feature;

[0146] The converted timbre Mel-spectrogram features are input into a vocoder to synthesize the converted speech.

[0147] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method of speech conversion above, which will not be repeated here.

[0148] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0149] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0150] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A speech conversion method, characterized in that: include: Acquire a source speech language coding feature and a source speech fundamental frequency feature, and concatenate the source speech language coding feature and the source speech fundamental frequency feature to form a source speech concatenation feature; Obtaining target speech timbre coding features; Inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain a conversion timbre Mel-spectrogram feature; The converted timbre Mel-spectrogram features are input into a vocoder to synthesize the converted speech.

2. The voice conversion method according to claim 1, characterized in that: The step of inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain the converted timbre Mel-spectrogram feature comprises: Input the source speech concatenation feature into a one-dimensional convolution layer for convolution processing and then input it into a generation module; The target speech timbre coding features are subjected to conditional batch normalization processing and then input into a generation module; The output results of the source speech concatenation features after convolution processing and the target speech timbre coding features after conditional batch normalization processing are input into the one-dimensional convolution layer for convolution processing after the piecewise linear function and upsampling layer, one-dimensional convolution layer and dilated convolution layer in the generation module to output the converted timbre Mel spectrum features.

3. The voice conversion method according to claim 2, characterized in that: The step of inputting the source speech concatenation feature and the target speech timbre coding feature into the decoder for decoding to obtain the converted timbre Mel-spectrogram feature also includes: The noise vector is processed by the linear layer and then input into the batch normalization layer; Inputting the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the batch normalization layer, and concatenating and accumulating them with the noise vector; The output result of the spliced ​​features after splicing and accumulating with the noise vector is processed by the piecewise linear function and the upsampling layer, the one-dimensional convolution layer and the dilated convolution layer in the generation module, and is input into the one-dimensional convolution layer for convolution processing to output the converted timbre Mel spectrum feature.

4. The method for voice conversion according to claim 3, characterized in that: The step of inputting the source speech concatenation feature after convolution processing and the target speech timbre coding feature after conditional batch normalization processing into the batch normalization layer and concatenating and accumulating the noise vector comprises: The concatenated features of the source speech after convolution processing and the timbre coding features of the target speech after conditional batch normalization processing are used as the first speech input features; A plurality of batch normalization layers and a plurality of piecewise linear functions and upsampling layers are arranged in the generation module, wherein the output end of one normalization layer is connected to the input end of the piecewise linear function and upsampling layer, the output end of the piecewise linear function and upsampling layer is connected to the input end of a one-dimensional convolution layer or an expansion-dimensional convolution layer, and the output end of the one-dimensional convolution layer or the expansion-dimensional convolution layer is connected to the input end of another normalization layer; Inputting the first speech input feature into the batch normalization layer and concatenating and accumulating it with the noise vector, and outputting a first concatenated feature after being processed by the piecewise linear function, the upsampling layer, and the one-dimensional convolution layer; The first speech input feature is processed by a piecewise linear function, an upsampling layer, and a one-dimensional convolution layer to output a first corrected splicing feature; Correcting the first splicing feature using the first correction splicing feature to form a second speech input feature; Inputting the second speech input feature into the batch normalization layer and concatenating and accumulating it with the noise vector, and outputting the second concatenated feature after being processed by the piecewise linear function, the upsampling layer, and the dilated convolution layer; The second speech input feature is processed by a piecewise linear function, an upsampling layer, and an expanded convolution layer to output a second corrected splicing feature; The second corrected splicing feature is used to correct the second splicing feature to form a speech output feature.

5. The voice conversion method according to claim 1, characterized in that: The step of obtaining a source speech language coding feature and a source speech fundamental frequency feature, and splicing the source speech language coding feature and the source speech fundamental frequency feature to form a source speech splicing feature comprises: Convert text sequence into phoneme sequence; The phoneme sequence is input into the encoder pre-trained network, concatenated with the position code and then input into the encoder multi-head attention layer, and processed by the residual and normalization layer, the forward feedback layer, the residual and normalization layer and the linear layer in sequence to output the text sequence features; The source speech Mel spectrum is input into the decoder pre-trained network, and the concatenated features are concatenated with the positional encoding features to form the concatenated features and input into the masked multi-head attention layer. After residual and normalization processing, the decoded spectrum features are formed and input into the decoder multi-head attention layer. The text sequence features are concatenated with the target speech timbre coding features to form a two-dimensional feature matrix sequence and input it into the decoder multi-head attention layer; The decoder multi-head attention layer performs an alignment operation on the two-dimensional feature matrix sequence and the decoded spectrum feature, and then outputs the speech of the text to be synthesized after residual and normalization processing; Perform matrix multiplication on the text sequence feature and the speech of the text to be synthesized, and output the source speech concatenation feature.

6. The method for voice conversion according to claim 5, characterized in that: The step of converting the text sequence into a phoneme sequence includes: Inputting a text sequence into a source speech concatenation feature module; Forming a regular expression by regularizing the text sequence; Convert the regular expression into Chinese by phonetic conversion; The Chinese language is converted into a phoneme sequence through polyphone classification and rhythm prediction.

7. The method for voice conversion according to claim 5, characterized in that: Before the step of inputting the phoneme sequence into the encoder preprocessing network and the position coding splicing step, and before the step of inputting the source speech Mel spectrum into the decoder preprocessing network and the position coding feature splicing step, it also includes: The phoneme sequence is position-encoded for each frame in time series, and the position encoding formula is: Among them, PE is the position code, pos is the position number, i is the dimension number of the time series, and d model is the model dimension.

8. A speech conversion device, characterized in that: The device comprises: Encoder pre-training network, used to obtain the source speech language coding features; A decoder pre-training network is used to obtain the fundamental frequency feature of the source speech, and to concatenate the source speech language coding feature with the fundamental frequency feature of the source speech to form a source speech concatenation feature; A target speech encoder, used to obtain the target speech timbre coding characteristics; A decoder, used for decoding the source speech concatenation feature and the target speech timbre coding feature to obtain a conversion timbre Mel-spectrogram feature; A vocoder is used to synthesize the converted speech by using the converted timbre mel-spectrogram features.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Audio synthesis method and device

    CN109599092A

  • Voice conversion method and device with emotion and rhythm

    CN111883149A

  • Quick voice cloning method

    CN113436607A

  • Conversion method and device capable of converting any voice into multiple voices

    CN113470622A

  • Voice conversion model training method and device

    CN113763987A

Cited By

  • Voice conversion method based on variational self-encoding network bidirectional loss function

    CN116312582A

  • Voice conversion method and device based on attention mechanism and stream matching strategy

    CN118969023A

  • Voice anonymization method based on content-related frame-level speaker voiceprint modeling

    CN119851670A