A visually driven text-to-speech method

By introducing video frame input into the text-to-speech model, extracting full-face features and text information, and combining it with a multi-source attention mechanism to generate speech that matches the video, it solves the problem of difficulty in realizing speech rhythm changes in the existing technology and improves the efficiency of the text-to-speech model. Efficiency and quality of video dubbing.

CN114283784BActive Publication Date: 2024-09-24SHANDONG NEW GENERATION INFORMATION IND TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111609326.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2024-09-24
Estimated Expiration
2041-12-27

Smart Images

  • Figure CN114283784B
    Figure CN114283784B
Patent Text Reader

Abstract

The present invention provides a method for converting text to speech based on visual drive, which belongs to the technical field of text to speech. The present invention expands the input of the text to speech model to not only input text but also input facial video, generates and outputs speech matching the video frame, and the generated audio is not only synchronized with the video, but also retains the same rhythm and pause as the video, and can infer the pause and sound changes from the video signal. The method can be applied to produce high-quality pinyin videos without consuming a lot of manpower and material resources to re-record dubbing in a professional environment. Given the speaker's text and the corresponding video frame, the model is trained, and the model does not only focus on the mouth area, but extracts the visual information of the whole face to match the text information, thereby generating speech.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text-to-speech, and in particular to a text-to-speech method based on vision-driven. Background Art

[0002] Currently in the field of video dubbing, actors are required to re-record the dialogue in a professional dubbing environment after filming to improve the audio quality, and sometimes different tones are required for dubbing, which will take a lot of time to do post-production synchronization and dubbing.

[0003] Traditional text-to-speech engines generate natural speech that is human-like through end-to-end neural networks, but the speech intonation generated by this method is related to the model training dataset and cannot be transformed naturally. Most methods consist of three main components: an encoder that converts the input text into a series of hidden representations, a decoder that produces sound representations such as mel spectrograms from these, and finally a vocoder that constructs a waveform representation of the sound.

[0004] Speech prosody is broadly defined as "variations in speech signals, including voice signals, speaker identity, and channel effects." Due to the difficulty of prosody modeling, standard text-to-speech (TTS) methods are often trained to be neutral languages. Currently, many scholars have made great efforts to control and transfer the prosody of TTS audio, such as creating a style embedding using a multi-head attention module between the encoded input audio sequence and the global style tag (gst). At inference, they build style embeddings from text to support style control, or build style transfer from other audio; or use variational autoencoders (VAE) to latently represent speaking style, manipulate latent embeddings during inference, or, they change speaking style by manipulating latent embeddings obtained from reference audio. A common approach to automatic dubbing is to generate or modify video frames to match a given audio speech clip.

[0005] The end-to-end TTS model currently used only takes text information as input and generates human voice through an encoder and decoder. However, the human voice generated by this method has a fixed rhythm and tone. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides a method for converting text to speech based on vision-driven, and the audio generated by this method is not just a simple text-to-speech conversion, but generates audio with synchronized video.

[0007] The technical solution of the present invention is:

[0008] A visually driven text-to-speech method.

[0009] By using video frames as additional input to the text-to-speech model, facial information in the video frames and features in the text are extracted to generate speech that matches the video and has the same prosodic changes as the video frames.

[0010] The input of the text-to-speech model is expanded to include not only text but also facial videos. The speech is generated to match the facial movements of the input video. The generated audio is not only synchronized with the video, but also retains the same rhythm and pauses as the video, and the pauses and sound changes can be inferred from the video signal.

[0011] Furthermore,

[0012] Given the speaker's text and the corresponding video frame, the text-to-speech model is trained. The text-to-speech model does not only focus on the mouth area, but extracts the visual information of the entire face and matches it with the text information to generate speech.

[0013] It consists of a text and video encoder processing inputs, followed by a multi-source attention mechanism, connecting these inputs to a decoder that produces a mel-spectrogram, and then a vocoder produces a waveform from the mel-spectrogram to generate audio.

[0014] Furthermore,

[0015] Specifically, it includes (1) video encoder, (2) text encoder, (3) speaker encoder, (4) autoregressive decoder with multi-source attention mechanism, and (5) vocoder.

[0016] 1) The video encoder encodes the features of the entire face in the video instead of just the mouth area;

[0017] 2) The text encoder is derived from Tacotron2’s text encoder; each phoneme is first embedded into an embedding space, and then the phoneme embedding sequence is passed through the convolutional layer and the Bi-LSTM layer;

[0018] 3) The speaker encoder uses a frozen, pre-trained speaker embedding model that generates an encoded embedding for each utterance when a speaker ID is provided in the dataset, and averages and normalizes all utterances associated with the speaker;

[0019] 4) An autoregressive decoder that reconstructs the previous decoder output into a 512-dimensional space before being used as input for future time steps; an attention module; an LSTM core; and a post-net to predict the final mel-spectrogram output;

[0020] 5) The autoregressive decoder receives the video encoder, the text phoneme encoder, and the speaker encoding sequence generated by the speaker encoder as input, and generates a mel spectrogram of the speech signal;

[0021] 6) Generate audio waveform using pre-trained vocoder.

[0022] The specific principles are as follows:

[0023] 1) Let Tx and Ty be the length of the input video frame and phoneme sequence respectively; let Dw, Dh and Dc be the width, height and number of channels of the frame, De is the dimension of the phoneme embedding, P is the phoneme set, and the input is the source video frame sequence x ∈ R Tx×Dw×Dh×Dc and the phoneme sequence y ∈ P Ty The input pairs consist of:

[0024] 2) The video encoder receives a sequence of frames as input and generates a hidden representation h for each frame x ; The text encoder receives the source phoneme and produces a hidden representation h y ;

[0025] 3) Speaker encoder d i Map speakers to 256-dimensional speaker embeddings;

[0026] 4) The autoregressive decoder receives two hidden representations h x and h y and speaker embedding d i As input, and use the attention context to predict the mel-spectrogram z of the synthesized speech t ;

[0027] 5) Finally, the predicted mel-spectrogram [z 1 , z 2 , . . . ,z t ] to a waveform. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flowchart of the work flow of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0030] The present invention is based on the traditional text-to-speech model, and expands its input to not only input text, but also input facial video frames, generating speech that matches the facial movements of the input video. The output audio is not only synchronized with the video, but also retains the original rhythm, including pauses and pitch changes that can be inferred from the video signal, providing a key part for making high-quality dubbing videos. Compared with the standard visual speech recognition model that focuses on the mouth area, the features of the whole face are used to avoid missing the information related to the speaker's delivery. This provides enough information for the model to generate speech that not only matches the video, but also restores various aspects of the rhythm, such as time and emotion.

[0031] The present invention mainly consists of four parts: text and video encoders processing inputs, a multi-source attention mechanism, and a decoder connecting these inputs to produce mel-spectrograms.

[0032] The vocoder generates a waveform from the mel-spectrogram to generate audio. The architecture consists of (1) video encoder, (2) text encoder, (3) speaker encoder, (4) autoregressive decoder with multi-source attention mechanism, and (5) vocoder.

[0033] The overall working process is as follows Figure 1 shown.

[0034] 1. The video encoder uses VGG3D to encode the features of the entire face in the video instead of just the mouth area;

[0035] 2. The text encoder is derived from Tacotron2's text encoder. Each phoneme is first embedded into an embedding space. Then the phoneme embedding sequence is passed through the convolutional layer and the Bi-LSTM layer;

[0036] 3. The speaker encoder uses a frozen, pre-trained speaker embedding model. When a speaker ID is provided in the dataset, we generate an encoded embedding for each utterance and average and normalize it over all utterances associated with the speaker;

[0037] 4. Use an RNN-based autoregressive decoder, which consists of four parts:

[0038] 1) pre-net, a fully connected network that reconstructs the previous decoder output to a lower dimension before it is used as input for future time steps; 2) an attention module; 3) an LSTM core; and 4) post-net, which is used to predict the final mel-spectrogram output;

[0039] 5. The decoder receives the video encoder h x 、Text Phoneme Encoder hy and the speaker code sequence d generated by the speaker encoder i As input, generate a speech signal z t Mel-spectrogram of .

[0040] 6. Generate audio waveform using pre-trained vocoder.

[0041] The above description is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for converting text to speech based on vision drive, characterized in that: By using the video frame as an additional input to the text-to-speech model, the facial information in the video frame and the features in the text are extracted to generate speech that matches the video and has the same prosodic changes as the video frame; Expand the input of the text-to-speech model to not only text but also facial videos; Generate speech that matches the facial movements of the input video. The generated audio is not only synchronized with the video, but also retains the same rhythm and pauses as the video, and the pauses and sound changes can be inferred from the video signal. Given the speaker's text and the corresponding video frame, the text-to-speech model is trained. The text-to-speech model does not focus only on the mouth area, but extracts the visual information of the whole face and matches it with the text information to generate speech; It includes text and video encoders processing inputs, followed by a multi-source attention mechanism, connecting these inputs to a decoder that produces a mel-spectrogram, and then a vocoder produces a waveform from the mel-spectrogram to generate audio; Specifically include: video encoder, text encoder, speaker encoder, autoregressive decoder with multi-source attention mechanism, vocoder; 1) The video encoder encodes the features of the entire face in the video instead of just the mouth area; 2) The text encoder is derived from Tacotron2’s text encoder; each phoneme is first embedded into an embedding space, and then the phoneme embedding sequence is passed through the convolutional layer and the Bi-LSTM layer; 3) The speaker encoder uses a frozen, pre-trained speaker embedding model that generates an encoded embedding for each utterance when a speaker ID is provided in the dataset, and averages and normalizes all utterances associated with the speaker; 4) An autoregressive decoder that reconstructs the previous decoder output into a 512-dimensional space before being used as input for future time steps; an attention module; an LSTM core; and a post-net to predict the final mel-spectrogram output; 5) The autoregressive decoder receives the video encoder, the text phoneme encoder, and the speaker encoding sequence generated by the speaker encoder as input, and generates a mel spectrogram of the speech signal; 6) Generate audio waveform using pre-trained vocoder.

2. The method according to claim 1, characterized in that The specific contents are as follows: 1) Let Tx and Ty be the length of the input video frame and phoneme sequence respectively; let Dw, Dh and Dc be the width, height and number of channels of the frame, De is the dimension of the phoneme embedding, P is the phoneme set, and the input is the source video frame sequence x ∈ R Tx×Dw×Dh×Dc and the phoneme sequence y ∈ P Ty The input pairs consist of: 2) The video encoder receives a sequence of frames as input and generates a hidden representation h for each frame x ; The text encoder receives the source phoneme and produces a hidden representation h y ; 3) Speaker encoder d i Map speakers to 256-dimensional speaker embeddings; 4) The autoregressive decoder receives two hidden representations h x and h y and speaker embedding d i As input, and use the attention context to predict the mel-spectrogram z of the synthesized speech t ; 5) Finally, the predicted mel-spectrogram [z 1 , z 2 , . . . , z t ] to a waveform.