Video generation method, device, medium and electronic device
By generating a response video, using the emotional information in the user's question video to control the expression of the virtual image, the problem of neutral expression of the virtual image in the prior art is solved, and more interesting human-computer interaction is achieved.
Patent Information
- Application Number
- CN202110098921.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-25
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-02-14
AI Technical Summary
In the existing human-computer interaction technology, when the user interacts with the machine's video, the virtual image expressions in the machine's response video are usually neutral and lack emotional expression, which leads to the user experience being boring and boring.
By obtaining the face image information and question audio in the user's question video, the response text information is determined, and the response video is generated based on the user's question video and response text information, the emotional performance of the virtual image is controlled to improve the fun of human-computer interaction.
The emotional expression of virtual images is realized, the fun of human-computer interaction and the anthropomorphic interaction effect are enhanced, and the user experience is improved.
Smart Images

Figure CN112785667B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of human-computer interaction technology, and in particular to a video generation method, device, medium and electronic device. Background Art
[0002] Human-Computer Interaction Techniques refers to the technology that enables people to communicate with computers in an effective way through computer input and output devices. Human-Computer Interaction Techniques include machines providing people with a large amount of relevant information and prompts through output or display devices, and people inputting relevant information to machines through input devices, answering questions and prompts, etc.
[0003] At present, human-computer interaction methods include not only keyboard input and handle operation, but also more novel methods, such as touch operation, voice interaction, video interaction, etc., which can realize information transmission and complete the "dialogue" between people and machines. At present, when users interact with machines through video, the expressions of the virtual images in the machine's response video are generally neutral, that is, they do not reflect emotions, so users will feel boring. Summary of the invention
[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a video generation method, comprising:
[0006] Obtaining a user question video, wherein the user question video includes the user's facial image information and the question audio;
[0007] Determining answer text information corresponding to the question audio;
[0008] Based on the user question video and the answer text information, an answer video for answering the user question in the user question video is generated, wherein the answer video includes a virtual image interacting with the user and audio corresponding to the answer text information.
[0009] In a second aspect, the present disclosure provides a video generation device, comprising:
[0010] An acquisition module, used to acquire a user question video, wherein the user question video includes the user's facial image information and the question audio;
[0011] A determination module, used to determine the answer text information corresponding to the question audio acquired by the acquisition module;
[0012] A generation module is used to generate a response video for responding to the user's question in the user question video based on the user question video acquired by the acquisition module and the response text information determined by the determination module, wherein the response video includes a virtual image interacting with the user and audio corresponding to the response text information.
[0013] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method provided in the first aspect of the present disclosure.
[0014] In a fourth aspect, the present disclosure provides an electronic device, including:
[0015] a storage device having a computer program stored thereon;
[0016] A processing device is used to execute the computer program in the storage device to implement the steps of the method provided in the first aspect of the present disclosure.
[0017] In the above technical solution, after obtaining the user question video including the user's facial image information and the question audio, the answer text information corresponding to the question audio is first determined; then, a response video for answering the user's question in the user question video can be generated based on the user question video and the answer text information. Since the user question video contains the user's expression, tone, intonation and other emotional information when asking the question, it is possible to control the emotional expression of the virtual image currently interacting with the user based on this emotional information, so as to enhance the fun of human-computer interaction and achieve perfect anthropomorphic interaction.
[0018] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0020] Figure 1 It is a schematic diagram showing an implementation environment according to an exemplary embodiment.
[0021] Figure 2 The figure is a flowchart of a video generating method according to an exemplary embodiment.
[0022] Figure 3 The present invention is a flowchart showing a method for generating a response video according to a user question video and response text information according to an exemplary embodiment.
[0023] Figure 4A It is a schematic diagram of the structure of a prediction model according to an exemplary embodiment.
[0024] Figure 4B It is a schematic diagram of the structure of a prediction model according to an exemplary embodiment.
[0025] Figure 5 The figure is a flowchart of a prediction model training method according to an exemplary embodiment.
[0026] Figure 6 The invention is a flowchart showing a method for generating a response video according to a feature of a facial region of a virtual image and a first acoustic feature according to an exemplary embodiment.
[0027] Figure 7 The present invention is a flowchart of a method for generating a response video according to a feature of a facial region of a virtual image and a first acoustic feature according to another exemplary embodiment.
[0028] Figure 8 The present invention is a flowchart showing a method for generating a response video according to a user question video and response text information according to another exemplary embodiment.
[0029] Fig. 9 It is a block diagram of a video generating device according to an exemplary embodiment.
[0030] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] First, the implementation environment of the present disclosure is introduced. Figure 1 is a schematic diagram of an implementation environment according to an exemplary embodiment. Figure 1 In the application scenario, the terminal device 20 first obtains the question video of the user 10, and then the terminal device 20 generates a video for answering the question of the user 10 in the question video of the user 10 based on the question video (such as Figure 1 As shown, the question asked by user 10 is "How is the weather today?" and the answering video is given.
[0038] In addition, in the present disclosure, the above-mentioned terminal device 20 can be, for example, a smart phone, a tablet computer, a laptop computer, a smart wearable device (for example, a smart bracelet), etc. Figure 1 The terminal device 20 is illustrated as a smart phone.
[0039] Figure 2 is a flow chart of a video generation method according to an exemplary embodiment, wherein the method can be applied to a terminal device, such as Figure 1 The smartphone shown in . Figure 2 As shown, the method includes S201 to S203.
[0040] In S201, a user question video is obtained, wherein the user question video includes the user's facial image information and question audio.
[0041] In the present disclosure, the user face image information includes an image sequence in a user question video.
[0042] In S202, answer text information corresponding to the question audio is determined.
[0043] In the present disclosure, user questions can be extracted by performing voice recognition on question audio, and then, based on pre-associated and stored question and answer text information, answer text information corresponding to the user question can be determined.
[0044] In S203, a response video for responding to the user's question in the user question video is generated based on the user question video and the response text information.
[0045] In the present disclosure, the response video includes a virtual image interacting with the user and audio corresponding to the response text message.
[0046] In the above technical solution, after obtaining the user question video including the user's facial image information and the question audio, the answer text information corresponding to the question audio is first determined; then, a response video for answering the user's question in the user question video can be generated based on the user question video and the answer text information. Since the user question video contains the user's expression, tone, intonation and other emotional information when asking the question, it is possible to control the emotional expression of the virtual image currently interacting with the user based on this emotional information, so as to enhance the fun of human-computer interaction and achieve perfect anthropomorphic interaction.
[0047] The following is a detailed description of the specific implementation method of generating a response video for responding to the user's question in the user's question video based on the user's question video and the response text information in S203. Figure 3 It is implemented by S301 and S302 shown in FIG.
[0048] In S301, based on the user question video and the answer text information, the features of the face area of the virtual image and the first acoustic features of the answer text information are predicted.
[0049] In S302, a response video is generated based on the features of the facial area of the avatar and the first acoustic features.
[0050] In the present disclosure, the feature of the face region of the avatar may include the facial key point information of the avatar. The facial key point information of the avatar may include at least one of the mouth key point information of the avatar, the eyebrow key point information of the avatar, the nose key point information of the avatar, and the jaw key point information of the avatar. The first acoustic feature may be, for example, Mel spectrum information, fundamental frequency information, linear spectrum information, etc.
[0051] The following is a detailed description of the specific implementation of predicting the features of the face area of the virtual image and the first acoustic features of the response text information according to the user question video and the response text information in S301. Specifically, S301 may include the following steps:
[0052] (1) Extract the second acoustic feature of the question audio.
[0053] In the present disclosure, the second acoustic feature may be, for example, mel spectrum information, fundamental frequency information, linear spectrum information, etc.
[0054] (2) Determine the features of the user's facial area based on the user's facial image information.
[0055] In the present disclosure, the features of the user's facial area include the user's facial key point information, wherein the user's facial key point information may include the user's mouth key point information, the user's eyebrow key point information, the user's eye key point information, the user's nose key point information, and the user's jaw key point information.
[0056] (3) Extract the voice feature information of the response text information.
[0057] In the present disclosure, speech feature information may include phonemes, tones, participles, and prosodic boundaries. Among them, phonemes are the smallest speech units divided according to the natural attributes of speech, and are analyzed according to the pronunciation actions in the syllable, and one action constitutes a phoneme; phonemes are divided into two categories: vowels and consonants. For example, for Chinese, phonemes include initial consonants (initial consonants are consonants used before the finals, and together with the finals, they constitute a complete syllable) and finals (i.e., vowels). Tones refer to the changes in the height of the sound. For example, there are four tones in Chinese: yinping, yangping, shangsheng, and qusheng. Prosodic boundaries are used to indicate where pauses should be made when reading text. For example, prosodic boundaries are divided into four pause levels of "#1", "#2", "#3", and "#4", and the degree of pause increases in sequence.
[0058] (4) Predicting the facial region features of the avatar and the first acoustic features based on the second acoustic features, the facial region features of the user, and the voice feature information.
[0059] The specific implementation method of determining the features of the user's facial area based on the user's facial image information in the above step (2) is described in detail below.
[0060] Specifically, the features of the user's facial region can be determined in a variety of ways. In one embodiment, first, for each key point in the user's facial region, that is, each key point in the mouth key point, eyebrow key point, eye key point, nose key point, and jaw key point, the key point in all images in the image sequence in the user's question video can be averaged to obtain the key point information of the user. Then, the key point information obtained after the average processing of each key point is determined as the features of the user's facial region. Among them, each key point in the user's facial region in each image in the image sequence in the user's question video can be obtained by using facial key point detection methods such as active shape model (ASM), active appearance model (AAM), cascaded pose regression model (CPR), and deep learning-based methods.
[0061] For example, for the mouth key points, the mouth key points in all images in the image sequence in the user question video are averaged to obtain the user's mouth key point information; for the eyebrow key points, the eyebrow key points in all images in the image sequence in the user question video are averaged to obtain the user's eyebrow key point information; for the eye key points, the eye key points in all images in the image sequence in the user question video are averaged to obtain the user's eye key point information; for the nose key points, the nose key points in all images in the image sequence in the user question video are averaged to obtain the user's nose key point information; for the jaw key points, the jaw key points in all images in the image sequence in the user question video are averaged to obtain the user's jaw key point information; finally, the mouth key point information, eyebrow key point information, eye key point information, nose key point information and jaw key point information can be used as features of the user's facial area.
[0062] In another embodiment, the user's facial image information (i.e., the image sequence in the user's question video) can be input into a recurrent neural network (RNN), and the final hidden state of the hidden layer of the RNN is used as the feature of the user's facial area. In this way, the features of the user's facial area can be directly obtained through the RNN, which is convenient and fast.
[0063] The specific implementation method of extracting the voice feature information of the response text information in the above step (3) is described in detail below.
[0064] Specifically, the above-mentioned voice feature information can be obtained in a variety of ways. In one embodiment, the voice feature information of the response text information can be pre-marked by the user and stored in a corresponding storage module. In this way, the voice feature information of the response text information can be obtained by accessing the storage module.
[0065] In another implementation, the response text information may be input into an information extraction model to obtain voice feature information of the response text information, which is convenient and quick, and does not require human intervention, thus saving manpower.
[0066] In the present disclosure, the information extraction model may include a text normalization (TN) model, a grapheme-to-phoneme (G2P) model, a word segmentation model, and a rhythm model. Among them, the TN model can be used to convert numbers, symbols, abbreviations, etc. in the response text information into language characters, the G2P model can be used to obtain the phonemes in the response text information, the word segmentation model can be used to segment the text to be synthesized, and the rhythmic boundaries and tones of the response text information can be obtained through the rhythm model.
[0067] For example, the G2P model can use a recurrent neural network (RNN) and a long short-term memory network (LSTM) to achieve the conversion from graphemes to phonemes.
[0068] The word segmentation model can be an n-gram model, a hidden Markov model, a naive Bayes classification model, etc.
[0069] The rhythm model includes a pre-trained language model BERT (Bidirectional Encoder Representation from Transformers), a bidirectional LSTM-CRF (Conditional Random Field) model, and the like.
[0070] In the above-mentioned implementation, by extracting the voice feature information such as the phonemes, tones, word segments and rhythmic boundaries of the response text information, and generating a response video for the response text information based on the voice feature information, more attention can be paid to the text content of the response text information. In this way, the audio corresponding to the response text information can be paused according to the text content and word segmentation of the response text information, thereby improving the accuracy and comprehensibility of the audio in the response video, and facilitating the user to quickly understand the text content corresponding to the audio in the response video. In addition, the audio can be paused at natural rhythmic boundaries, thereby improving the naturalness and fluency of the audio in the response video.
[0071] The following describes in detail the specific implementation method of predicting the facial area features of the virtual image and the first acoustic features based on the second acoustic features, the facial area features of the user and the voice feature information in the above step (4).
[0072] Specifically, the second acoustic feature, the feature of the user's facial region, and the voice feature information may be input into the prediction model to obtain the feature of the facial region of the avatar and the first acoustic feature. Figure 4A As shown, the above prediction model may include an encoding network, an attention network, a decoding network and a post-processing network (post-processing-net, postnet). The encoding network is used to generate a representation sequence according to the second acoustic feature, the features of the user's facial area and the voice feature information; the attention network is used to generate a fixed-length semantic representation according to the representation sequence, and the decoding network is used to generate the first acoustic feature according to the semantic representation; the post-processing network is used to generate the features of the facial area of the virtual image according to the first acoustic feature.
[0073] For example, the encoding network can be, for example, a CBHG (Convolution Bank + Highway network + bidirectional Gated Recurrent Unit, i.e., convolution layer + highway network + bidirectional recurrent neural network, that is, CBHG is composed of a convolution layer, a highway network and a bidirectional recurrent neural network) model; the attention network can be a location sensitive attention (Locative Sensitive Attention) or a GMM attention network, i.e., an attention network based on a Gaussian mixture model (GMM). Preferably, the attention network can be GMMattention, so that the stability of the audio in the response video can be further improved to avoid the occurrence of missing finals, repeated finals, and the like.
[0074] The following is a detailed description of the training method of the above prediction model. Specifically, the features of the user's face area include the user's face key point information, and the features of the avatar's face area include the avatar's face key point information, and can be obtained through Figure 5 The prediction model is trained by performing S501 to S505 as shown.
[0075] In S501, a question-and-answer video is obtained, wherein the question-and-answer video includes a reference user question video and a reference answer video of a virtual image, the reference user question video includes facial image information of the reference user and a reference user question audio, and the reference answer video includes the virtual image, answer audio, and reference answer text information corresponding to the answer audio.
[0076] In S502, reference acoustic features of the reference user's question audio and annotated acoustic features of the answer audio are extracted respectively.
[0077] In the present disclosure, the reference acoustic features and the annotated acoustic features may be, for example, mel spectrum information, fundamental frequency information, linear spectrum information, etc.
[0078] In S503, the annotated key point information of the face area of the virtual image is determined, and the facial key point information of the reference user is determined based on the facial image information of the reference user.
[0079] In the present disclosure, the facial key point information of the reference user and the annotated key point information of the facial area of the virtual image can be determined in the same manner as determining the features of the facial area of the user in the above step (2), which will not be repeated here.
[0080] In S504, reference voice feature information of the reference response text information is extracted.
[0081] In the present disclosure, the reference speech feature information may include phonemes, tones, word segments and prosodic boundaries, and the reference speech feature information of the reference response text information may be extracted in the same manner as the speech feature information of the response text information in the above step (3), which will not be repeated here.
[0082] In S505, the model is trained by taking the reference acoustic features, the reference user's facial key point information and the reference speech feature information as the input of the encoding network, taking the output of the encoding network as the input of the attention network, taking the output of the attention network as the input of the decoding network, taking the labeled acoustic features as the target output of the decoding network, taking the output of the decoding network as the input of the post-processing network, and taking the labeled key point information as the target output of the post-processing network to obtain a prediction model.
[0083] Specifically, if Figure 4A As shown, the reference acoustic features, the reference user's facial key point information and the reference speech feature information are input into the encoding network to obtain a reference representation sequence; then, the reference representation sequence is input into the attention network to obtain a fixed-length reference semantic representation; next, the reference semantic representation is input into the decoding network to obtain predicted acoustic features; the predicted acoustic features are input into the post-processing network to obtain predicted key point information; in this way, the model parameters of the encoding network, the model parameters of the attention network, the model parameters of the decoding network and the model parameters of the post-processing network can be updated according to the comparison results between the predicted acoustic features and the labeled acoustic features, and the comparison results between the predicted key point information and the labeled key point information, so as to obtain a prediction model.
[0084] The specific implementation method of generating a response video based on the features of the facial area of the virtual image and the first acoustic features in the above S302 is described in detail below.
[0085] In one embodiment, the features of the face region of the avatar include key point information of the face of the avatar, namely, key point information of the mouth, key point information of the eyebrows, key point information of the eyes, key point information of the nose, and key point information of the jaw. At this time, the response video can be generated by the following steps:
[0086] First, a target image sequence is generated based on the key point information of the virtual image's face.
[0087] For example, the key point information of the virtual image's face can be used to generate a target image sequence through the Pix2Pix framework.
[0088] At the same time, audio corresponding to the response text information is generated based on the first acoustic feature.
[0089] In the present disclosure, the first acoustic feature may be input into a vocoder to obtain audio corresponding to the response text message, wherein the vocoder may be, for example, a Wavenet vocoder, a Griffin-Lim vocoder, or the like.
[0090] Finally, the target image sequence and the audio corresponding to the response text information are synthesized to obtain the response video.
[0091] In another embodiment, the features of the face area of the avatar include key point information of the mouth of the avatar. Figure 6 S601 to S603 shown are used to generate a response video:
[0092] In S601, a target image sequence is generated based on the mouth key point information of the avatar and pre-stored other facial key point information of the avatar.
[0093] For example, a target image sequence may be generated through a Pix2Pix framework based on the mouth key point information of the avatar and pre-stored other facial key point information of the avatar.
[0094] In S602, audio corresponding to the response text information is generated according to the first acoustic feature.
[0095] In S603, the target image sequence and the audio corresponding to the response text information are synthesized to obtain a response video.
[0096] In this implementation, since only the key point information of the mouth of the virtual image is predicted, and the other key point information of the virtual image's face is pre-stored, the prediction efficiency can be guaranteed, thereby increasing the speed of generating the response video, ensuring the real-time nature of the response, and improving the user experience.
[0097] In addition, if Figure 7 As shown, before the above step S601, the above step S302 may further include S604 and S605.
[0098] In S604, the target emotion category to be expressed by the avatar is determined.
[0099] In the present disclosure, the target emotion category may be one of happy, angry, furious, serious, neutral (ie, without emotion), and the like.
[0100] In S605, based on the preset correspondence between the emotion category and the key point information, the key point information corresponding to the target emotion category is determined as the target key point information of the face area of the virtual image.
[0101] In the present disclosure, the target key point information includes eyebrow key point information and / or eye key point information. At this time, the above S601 can generate a target image sequence based on the mouth key point information of the virtual image, the target key point information, and each key point information of other facial key point information except the target key point information. In this way, the movement of the eyes and / or eyebrows of the virtual image in the answering video can be controlled according to the target emotion category of the virtual image, for example, the virtual image in the answering video can be controlled to blink, frown, etc., thereby further enhancing the fun of human-computer interaction.
[0102] The specific implementation of determining the target emotion category to be expressed by the virtual image in the above S604 is described in detail below.
[0103] In one implementation, the emotion category corresponding to the response text information may be determined as the target emotion category according to a preset correspondence between the response text information and the emotion category.
[0104] In another embodiment, the target emotion category can be determined based on the answer text information and the question audio. In this way, the emotion to be expressed by the virtual image is not only related to the answer text information, but also related to the emotion expressed by the user's voice when asking questions, so that strong supervision and control of the emotional expression of the virtual image can be achieved. In addition, the automatic extraction of emotional representation can be achieved, which is convenient and fast.
[0105] Specifically, this can be achieved by following steps 1) and 2):
[0106] 1) Determine a first probability distribution corresponding to the response text information and a second probability distribution corresponding to the question audio respectively.
[0107] In the present disclosure, the first probability distribution includes the probability that the emotion represented by the answer text information belongs to each preset emotion category, and the second probability distribution includes the probability that the emotion represented by the question audio belongs to each preset emotion category. The preset emotion categories may include happy, angry, furious, serious, neutral (i.e., without emotion), etc.
[0108] For example, the first probability distribution corresponding to the answer text information and the second probability distribution corresponding to the question audio can be predicted respectively by using a bidirectional long short-term memory recurrent network (Bi-directional Long Short-Term Memory, BiLSTM). Since the BiLSTM model is a bidirectional recurrent neural network, it can learn the dependency between the forward and backward directions in the answer text information and the question audio, and thus accurately predict the corresponding probability distribution.
[0109] 2) Determine the target emotion category based on the first probability distribution and the second probability distribution.
[0110] Specifically, for each preset emotion category, a target probability corresponding to the preset emotion category can be determined, wherein the target probability is equal to the sum of the probability corresponding to the preset emotion category in the first probability distribution and the probability corresponding to the preset emotion category in the second probability distribution; if the maximum value of the target probabilities corresponding to the preset emotion categories is greater than a preset probability threshold (for example, 120%), the preset emotion category corresponding to the maximum value is determined as the target emotion category; if the above maximum value is less than or equal to the preset probability threshold, "neutral" is determined as the target emotion category.
[0111] For example, the preset emotion categories include happy, angry, irritated, serious, and neutral. The probabilities that the emotions represented by the response text information belong to happy, angry, irritated, serious, and neutral are 15%, 38%, 16%, 22%, and 9%, respectively, that is, the first probability distribution is a row vector [15% 38% 16% 22% 9%], and the probabilities that the emotions represented by the question audio belong to happy, angry, irritated, serious, and neutral are 15%, 8%, 65%, 10%, and 2%, respectively, that is, the second probability distribution is a row vector [15% 8% 65% 10% 2%], and the preset probability threshold is 120%. Therefore, the target probabilities corresponding to happy, angry, irritated, serious, and neutral are 30%, 46%, 81%, 32%, and 11%, respectively. It can be seen that the maximum value of the target probabilities corresponding to each preset emotion category is 81%, which is less than the preset probability threshold of 120%. Therefore, "neutral" is determined as the target emotion category.
[0112] As another example, the preset emotion categories include happy, angry, irritated, serious, and neutral. The probabilities that the emotions represented by the response text information belong to happy, angry, irritated, serious, and neutral are 55%, 18%, 6%, 12%, and 9%, respectively, that is, the first probability distribution is a row vector [55%18%6%12%9%], and the probabilities that the emotions represented by the question audio belong to happy, angry, irritated, serious, and neutral are 75%, 8%, 5%, 10%, and 2%, respectively, that is, the second probability distribution is a row vector [75%8%5%10%2%], and the preset probability threshold is 120%. Therefore, the target probabilities corresponding to happy, angry, irritated, serious, and neutral are 130%, 26%, 11%, 22%, and 11%, respectively. It can be seen that the maximum value of the target probabilities corresponding to each preset emotion category is 130%, which is greater than the preset probability threshold of 120%. Among them, the preset emotion category corresponding to the maximum value 130% is "happy". Therefore, "happy" can be determined as the target emotion category.
[0113] Figure 8 FIG. 1 is a flow chart showing a method for generating a response video based on a user question video and response text information according to another exemplary embodiment. Figure 8 As shown, before S301, the method further includes S303.
[0114] In S303, the target emotion category to be expressed by the virtual image is determined.
[0115] In this way, S301 can predict the characteristics of the facial area of the virtual image and the first acoustic characteristics of the response text information based on the target emotion category, the user question video and the response text information; then, generate a response video based on the characteristics of the facial area of the virtual image and the first acoustic characteristics.
[0116] In this implementation, the target emotion category to be expressed by the virtual image currently interacting with the user is used as the basis for generating a response video, so that the emotional expression of the virtual image can be controlled in a strongly supervised manner, further enhancing the fun of human-computer interaction.
[0117] The following is a detailed description of the specific implementation method of predicting the features of the face area of the virtual image and the first acoustic features of the response text information based on the target emotion category, the user question video and the response text information. Specifically, it can be achieved by the following steps:
[0118] ① Extract the second acoustic features of the question audio.
[0119] ② Determine the features of the user's facial area based on the user's facial image information.
[0120] ③Extract the voice feature information of the response text information.
[0121] ④ According to the target emotion category, the second acoustic feature, the features of the user's facial area and the voice feature information, predict the features of the virtual image's facial area and the first acoustic feature.
[0122] Specifically, the target emotion category, the second acoustic feature, the features of the user's facial region, and the voice feature information can be input into the prediction model to obtain the features of the virtual image's facial region and the first acoustic feature. The structure of the preset model is as follows: Figure 4B As shown in , and the specific structure of the prediction model has been described in detail in the relevant part of the above step (4), which will not be repeated here.
[0123] Among them, in the prediction model training stage, such as Figure 4B As shown, the input of the prediction model increases the reference emotion category to be expressed by the virtual image compared to the input of the prediction model described above, and its training process is similar to the process described in S501 to S505 above, which will not be repeated here.
[0124] Fig. 9 FIG. 1 is a block diagram of a video generating device according to an exemplary embodiment. Fig. 9 As shown, the device 900 includes: an acquisition module 901, used to acquire a user question video, wherein the user question video includes the user's facial image information and question audio; a determination module 902, used to determine the answer text information corresponding to the question audio acquired by the acquisition module 901; a generation module 903, used to generate a response video for answering the user's question in the user question video according to the user question video acquired by the acquisition module 901 and the response text information determined by the determination module 902, wherein the response video includes a virtual image interacting with the user and audio corresponding to the response text information.
[0125] In the present disclosure, the determination module 902 can extract the user's question by performing voice recognition on the question audio, and then determine the answer text information corresponding to the user's question based on the pre-associated and stored question and answer text information.
[0126] In the above technical solution, after obtaining the user question video including the user's facial image information and the question audio, the answer text information corresponding to the question audio is first determined; then, a response video for answering the user's question in the user question video can be generated based on the user question video and the answer text information. Since the user question video contains the user's expression, tone, intonation and other emotional information when asking the question, it is possible to control the emotional expression of the virtual image currently interacting with the user based on this emotional information, so as to enhance the fun of human-computer interaction and achieve perfect anthropomorphic interaction.
[0127] Optionally, the generation module 903 includes: a prediction submodule, used to predict the characteristics of the facial area of the virtual image and the first acoustic features of the response text information based on the user question video and the response text information; a video generation submodule, used to generate the response video based on the characteristics of the facial area of the virtual image and the first acoustic features.
[0128] Optionally, the features of the facial area of the virtual image include key point information of the mouth of the virtual image; the video generation submodule includes: an image sequence generation submodule, used to generate a target image sequence based on the key point information of the mouth of the virtual image and pre-stored other key point information of the face of the virtual image; an audio generation submodule, used to generate audio corresponding to the response text information based on the first acoustic features; and a synthesis submodule, used to synthesize the target image sequence and the audio corresponding to the response text information to obtain the response video.
[0129] Optionally, the video generation submodule also includes: a first determination submodule, used to determine the target emotion category to be expressed by the virtual image before the image sequence generation submodule generates the target image sequence based on the mouth key point information of the virtual image and pre-stored other key point information of the virtual image's face; a second determination submodule, used to determine the key point information corresponding to the target emotion category as the target key point information of the facial area of the virtual image based on the correspondence between the preset emotion category and the key point information, wherein the target key point information includes eyebrow key point information and / or eye key point information; the image sequence generation submodule is used to generate the target image sequence based on the mouth key point information of the virtual image, the target key point information and each key point information of the other key point information of the face except the target key point information.
[0130] Optionally, the first determination submodule is used to determine the target emotion category according to the response text information and the question audio.
[0131] Optionally, the first determination submodule includes: a third determination submodule, used to respectively determine a first probability distribution corresponding to the response text information and a second probability distribution corresponding to the question audio, wherein the first probability distribution includes the probability that the emotion represented by the response text information belongs to each preset emotion category, and the second probability distribution includes the probability that the emotion represented by the question audio belongs to each preset emotion category; a fourth determination submodule, used to determine the target emotion category based on the first probability distribution and the second probability distribution.
[0132] Optionally, the prediction submodule includes: a first extraction submodule, used to extract the second acoustic feature of the question audio; a fifth determination submodule, used to determine the features of the user's facial area based on the user's facial image information; a second extraction submodule, used to extract voice feature information of the response text information; and a feature prediction submodule, used to predict the features of the facial area of the virtual image and the first acoustic feature based on the second acoustic feature, the features of the user's facial area and the voice feature information.
[0133] Optionally, the feature prediction submodule is used to input the second acoustic feature, the feature of the user's facial area and the voice feature information into a prediction model to obtain the feature of the facial area of the virtual image and the first acoustic feature.
[0134] Optionally, the features of the user's facial area include the user's facial key point information, the features of the virtual image's facial area include the virtual image's facial key point information, the prediction model includes an encoding network, an attention network, a decoding network, and a post-processing network; the prediction model is trained by a prediction model training device. Wherein, the prediction model training device may include: a question-and-answer video acquisition module, used to acquire a question-and-answer video, wherein the question-and-answer video includes a reference user question video and a reference answer video of the virtual image, the reference user question video includes a reference user's facial image information and a reference user's question audio, the reference answer video includes the virtual image, the answer audio, and a reference answer text information corresponding to the answer audio; a first extraction module, used to extract the reference acoustic features of the reference user's question audio and the annotated acoustic features of the answer audio, respectively; a key point determination module, used to determine the annotated key point information of the facial area of the virtual image, and determine the key point information based on the reference user's facial image information. The facial key point information of the reference user is determined; a second extraction module is used to extract reference speech feature information of the reference response text information; a training module is used to perform model training by taking the reference acoustic features, the facial key point information of the reference user and the reference speech feature information as the input of the encoding network, taking the output of the encoding network as the input of the attention network, taking the output of the attention network as the input of the decoding network, taking the annotated acoustic features as the target output of the decoding network, taking the output of the decoding network as the input of the post-processing network, and taking the annotated key point information as the target output of the post-processing network to obtain the prediction model.
[0135] Optionally, the generation module 903 also includes: an emotion category determination submodule, which is used to determine the target emotion category to be expressed by the virtual image before the prediction submodule predicts the characteristics of the facial area of the virtual image and the first acoustic characteristics of the response text information based on the user question video and the response text information; the prediction submodule is used to predict the characteristics of the facial area of the virtual image and the first acoustic characteristics of the response text information based on the target emotion category, the user question video and the response text information.
[0136] In addition, it should be noted that the above-mentioned prediction model training device can be integrated into the video generation device 900, or can be independent of the video generation device 900, which is not specifically limited in the present disclosure. In addition, regarding the device in the above-mentioned embodiment, the specific manner in which each module performs an operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0137] The present disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-mentioned video generation method provided by the present disclosure.
[0138] Reference below Fig.10 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 1000 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0139] like Fig.10 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0140] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0141] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0142] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0143] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0144] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0145] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a user question video, wherein the user question video includes the user's facial image information and question audio; determines the answer text information corresponding to the question audio; and generates an answer video for answering the user's question in the user question video based on the user question video and the answer text information, wherein the answer video includes a virtual image interacting with the user and audio corresponding to the answer text information.
[0146] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0147] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0148] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, an acquisition module may also be described as a "module for acquiring user question videos".
[0149] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0150] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0151] According to one or more embodiments of the present disclosure, Example 1 provides a video generation method, comprising: obtaining a user question video, wherein the user question video includes the user's facial image information and question audio; determining answer text information corresponding to the question audio; and generating an answer video for answering the user's question in the user question video based on the user question video and the answer text information, wherein the answer video includes a virtual image interacting with the user and audio corresponding to the answer text information.
[0152] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, which generates an answer video for answering the user's question in the user question video based on the user question video and the answer text information, including: predicting the features of the facial area of the virtual image and the first acoustic features of the answer text information based on the user question video and the answer text information; generating the answer video based on the features of the facial area of the virtual image and the first acoustic features.
[0153] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the features of the facial area of the virtual image include key point information of the mouth of the virtual image; generating the response video based on the features of the facial area of the virtual image and the first acoustic features includes: generating a target image sequence based on the key point information of the mouth of the virtual image and pre-stored other key point information of the virtual image's face; generating audio corresponding to the response text information based on the first acoustic features; and synthesizing the target image sequence and the audio corresponding to the response text information to obtain the response video.
[0154] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, before the step of generating a target image sequence based on the mouth key point information of the virtual image and pre-stored other key point information of the virtual image's face, generating the response video based on the features of the virtual image's facial area and the first acoustic feature, further comprising: determining a target emotion category to be expressed by the virtual image; determining the key point information corresponding to the target emotion category as the target key point information of the facial area of the virtual image based on a preset correspondence between the emotion category and the key point information, wherein the target key point information includes eyebrow key point information and / or eye key point information; generating a target image sequence based on the mouth key point information of the virtual image and pre-stored other key point information of the virtual image's face, comprises: generating a target image sequence based on the mouth key point information of the virtual image, the target key point information, and each key point information of the other facial key point information except the target key point information.
[0155] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 4, wherein determining the target emotion category to be expressed by the virtual image comprises: determining the target emotion category based on the response text information and the question audio.
[0156] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, which determines the target emotion category based on the response text information and the question audio, including: respectively determining a first probability distribution corresponding to the response text information and a second probability distribution corresponding to the question audio, wherein the first probability distribution includes the probability that the emotion represented by the response text information belongs to each preset emotion category, and the second probability distribution includes the probability that the emotion represented by the question audio belongs to each preset emotion category; determining the target emotion category based on the first probability distribution and the second probability distribution.
[0157] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 2, which predicts the features of the facial area of the virtual image and the first acoustic features of the response text information based on the user question video and the response text information, including: extracting the second acoustic feature of the question audio; determining the features of the facial area of the user based on the user's facial image information; extracting the voice feature information of the response text information; and predicting the features of the facial area of the virtual image and the first acoustic feature based on the second acoustic feature, the features of the user's facial area, and the voice feature information.
[0158] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 7, which predicts the characteristics of the facial area of the virtual image and the first acoustic feature based on the second acoustic feature, the characteristics of the facial area of the user, and the voice feature information, including: inputting the second acoustic feature, the characteristics of the facial area of the user, and the voice feature information into a prediction model to obtain the characteristics of the facial area of the virtual image and the first acoustic feature.
[0159] According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 8, wherein the features of the user's facial area include the user's facial key point information, the features of the virtual image's facial area include the virtual image's facial key point information, and the prediction model includes an encoding network, an attention network, a decoding network, and a post-processing network; the prediction model is trained in the following manner: obtaining a question-and-answer video, wherein the question-and-answer video includes a reference user question video and a reference answer video of the virtual image, the reference user question video includes a reference user's facial image information and a reference user question audio, and the reference answer video includes the virtual image, the answer audio, and a reference answer text information corresponding to the answer audio; respectively extracting the reference acoustic features of the reference user question audio, the answer audio, and the reference acoustic features of the reference user question audio, and the reference acoustic features of the reference user question audio. The method comprises the following steps: determining the annotated acoustic features of the answer audio; determining the annotated key point information of the facial area of the virtual image, and determining the facial key point information of the reference user based on the facial image information of the reference user; extracting the reference voice feature information of the reference answer text information; and training the model by using the reference acoustic features, the facial key point information of the reference user and the reference voice feature information as the input of the encoding network, the output of the encoding network as the input of the attention network, the output of the attention network as the input of the decoding network, the annotated acoustic features as the target output of the decoding network, the output of the decoding network as the input of the post-processing network, and the annotated key point information as the target output of the post-processing network to obtain the prediction model.
[0160] According to one or more embodiments of the present disclosure, Example 10 provides a method of any one of Examples 2-9, before the step of predicting the features of the facial area of the virtual image and the first acoustic features of the answer text information based on the user question video and the answer text information, generating an answer video for answering the user question in the user question video based on the user question video and the answer text information also includes: determining the target emotion category to be expressed by the virtual image; predicting the features of the facial area of the virtual image and the first acoustic features of the answer text information based on the user question video and the answer text information includes: predicting the features of the facial area of the virtual image and the first acoustic features of the answer text information based on the target emotion category, the user question video and the answer text information.
[0161] According to one or more embodiments of the present disclosure, Example 11 provides a video generating device, comprising: an acquisition module, used to acquire a user question video, wherein the user question video includes the user's facial image information and question audio; a determination module, used to determine answer text information corresponding to the question audio acquired by the acquisition module; a generation module, used to generate an answer video for answering the user's question in the user question video based on the user question video acquired by the acquisition module and the answer text information determined by the determination module, wherein the answer video includes a virtual image interacting with the user and audio corresponding to the answer text information.
[0162] According to one or more embodiments of the present disclosure, Example 12 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-10 when executed by a processing device.
[0163] According to one or more embodiments of the present disclosure, Example 13 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-10.
[0164] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0165] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0166] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A video generation method, characterized in that: include: Obtaining a user question video, wherein the user question video includes the user's facial image information and the question audio; Determining answer text information corresponding to the question audio; Generate a response video for responding to the user's question in the user's question video according to the user's question video and the response text information, wherein the response video includes a virtual image interacting with the user and audio corresponding to the response text information; The step of generating a response video for responding to the user's question in the user's question video according to the user's question video and the response text information includes: Predicting features of a facial region of the avatar and first acoustic features of the response text information based on the user question video and the response text information, wherein the features of the facial region include facial key point information; generating the response video according to the features of the facial region of the virtual image and the first acoustic features; The predicting, based on the user question video and the answer text information, the features of the face region of the virtual image and the first acoustic features of the answer text information comprises: Extracting a second acoustic feature of the question audio; Determining features of a facial region of the user according to the facial image information of the user; Extracting voice feature information of the response text information; The features of the facial area of the virtual image and the first acoustic features are predicted based on the second acoustic features, the features of the facial area of the user and the voice feature information.
2. The method according to claim 1, characterized in that The features of the face area of the virtual image include key point information of the mouth of the virtual image; The step of generating the response video according to the feature of the facial region of the virtual image and the first acoustic feature comprises: Generate a target image sequence according to the mouth key point information of the virtual image and pre-stored other facial key point information of the virtual image; generating audio corresponding to the response text information according to the first acoustic feature; The target image sequence and the audio corresponding to the response text information are synthesized to obtain the response video.
3. The method according to claim 2, characterized in that Before the step of generating a target image sequence according to the mouth key point information of the virtual image and the pre-stored other key point information of the face of the virtual image, generating the response video according to the features of the face area of the virtual image and the first acoustic feature further includes: Determining a target emotion category to be expressed by the virtual image; According to the preset correspondence between the emotion category and the key point information, the key point information corresponding to the target emotion category is determined as the target key point information of the face area of the virtual image, wherein the target key point information includes eyebrow key point information and / or eye key point information; The step of generating a target image sequence according to the mouth key point information of the virtual image and pre-stored other facial key point information of the virtual image comprises: A target image sequence is generated according to the mouth key point information of the virtual image, the target key point information, and each key point information of the other key point information of the face except the target key point information.
4. The method according to claim 3, characterized in that Determining the target emotion category to be expressed by the virtual image includes: The target emotion category is determined according to the response text information and the question audio.
5. The method according to claim 4, characterized in that Determining the target emotion category according to the answer text information and the question audio includes: Determine respectively a first probability distribution corresponding to the response text information and a second probability distribution corresponding to the question audio, wherein the first probability distribution includes the probability that the emotion represented by the response text information belongs to each preset emotion category, and the second probability distribution includes the probability that the emotion represented by the question audio belongs to each preset emotion category; The target emotion category is determined according to the first probability distribution and the second probability distribution.
6. The method according to claim 1, characterized in that The predicting the feature of the facial region of the avatar and the first acoustic feature according to the second acoustic feature, the feature of the facial region of the user, and the voice feature information includes: The second acoustic feature, the feature of the user's facial area and the voice feature information are input into a prediction model to obtain the feature of the facial area of the virtual image and the first acoustic feature.
7. The method according to claim 6, characterized in that The features of the user's facial region include the user's facial key point information, the features of the avatar's facial region include the avatar's facial key point information, and the prediction model includes an encoding network, an attention network, a decoding network, and a post-processing network; The prediction model is trained in the following way: Acquire a question-and-answer video, wherein the question-and-answer video includes a reference user question video and a reference answer video of the virtual image, the reference user question video includes facial image information of the reference user and a reference user question audio, and the reference answer video includes the virtual image, the answer audio, and reference answer text information corresponding to the answer audio; Respectively extracting reference acoustic features of the reference user question audio and annotated acoustic features of the answer audio; Determine the annotated key point information of the facial region of the virtual image, and determine the facial key point information of the reference user based on the facial image information of the reference user; Extracting reference voice feature information of the reference response text information; The prediction model is obtained by performing model training by using the reference acoustic features, the facial key point information of the reference user and the reference speech feature information as the input of the encoding network, the output of the encoding network as the input of the attention network, the output of the attention network as the input of the decoding network, the annotated acoustic features as the target output of the decoding network, the output of the decoding network as the input of the post-processing network, and the annotated key point information as the target output of the post-processing network.
8. The method according to any one of claims 1 to 7, characterized in that Before the step of predicting the features of the facial region of the avatar and the first acoustic features of the response text information according to the user question video and the response text information, generating a response video for responding to the user question in the user question video according to the user question video and the response text information further includes: Determining a target emotion category to be expressed by the virtual image; The predicting, based on the user question video and the answer text information, the features of the face region of the virtual image and the first acoustic features of the answer text information comprises: Based on the target emotion category, the user question video and the response text information, the features of the facial area of the virtual image and the first acoustic features of the response text information are predicted.
9. A video generating device, characterized in that: include: An acquisition module, used to acquire a user question video, wherein the user question video includes the user's facial image information and the question audio; A determination module, used to determine the answer text information corresponding to the question audio acquired by the acquisition module; a generating module, configured to generate a response video for responding to the user's question in the user question video according to the user question video acquired by the acquiring module and the response text information determined by the determining module, wherein the response video includes a virtual image interacting with the user and audio corresponding to the response text information; Wherein, the generating module comprises: A prediction submodule, configured to predict features of a facial region of the avatar and first acoustic features of the response text information based on the user question video and the response text information, wherein the features of the facial region include facial key point information; A video generation submodule, configured to generate the response video according to the features of the facial region of the virtual image and the first acoustic features; The prediction submodule includes: A first extraction submodule, used to extract a second acoustic feature of the question audio; A fifth determination submodule, configured to determine features of a facial region of the user based on the facial image information of the user; A second extraction submodule is used to extract voice feature information of the response text information; A feature prediction submodule is used to predict the features of the facial area of the virtual image and the first acoustic feature based on the second acoustic feature, the features of the facial area of the user and the voice feature information.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 8 are implemented.
11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-emotional recognition method and system combining speech and text, medium and equipment
CN110675859A
Video processing method, device and system, terminal equipment and storage medium
CN110688911A