Virtual image face driving method, device, electronic device and medium
By generating voice text alignment information and phoneme mapping relationships, the avatar's facial mouth shape is accurately driven, solving the problem of poor synchronization effect caused by uncoordinated lip shape changes in the existing technology, and achieving more natural and coordinated avatar facial synchronization.
Patent Information
- Application Number
- CN202211325775.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-10-27
AI Technical Summary
When the existing technology drives the facial expression of an avatar, because it only aligns text with mouth movements, the generated lip shape driving data is not precise, resulting in uncoordinated lip shape changes and poor synchronization effects.
By acquiring speech and text information, generating speech-text alignment information, determining phoneme information, and based on the mapping relationship between facial visemes and phonemes in the avatar, a driving parameter sequence is generated to accurately drive the facial mouth movement of the avatar.
It improves the coordination of the avatar's facial mouth movements, improves the synchronization effect, and avoids lip jitter and incoordination.
Smart Images

Figure CN115662388B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a virtual image face driving method, device, electronic device and medium. Background Art
[0002] With the development of artificial intelligence technology and big data technology, the application scope of virtual images is becoming wider and wider. For example, a virtual image can be built and its facial expressions can be driven to simulate human speech.
[0003] In the related art, when driving the facial expressions of a virtual image, each character corresponding to the voice segment and the lip movements corresponding to the facial data are aligned one by one to generate lip shape driving data corresponding to each character, so as to drive the lip shape of the virtual image to change.
[0004] However, since the above solution only aligns the text with the lip movements, the generated lip shape driving data is not precise, which makes the final lip shape changes uncoordinated, and further leads to a poor final synchronization effect. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a virtual image face driving method, device, electronic device and medium, which can solve the problem of poor synchronization effect caused by uncoordinated lip shape changes.
[0006] In a first aspect, an embodiment of the present application provides a method for driving the face of a virtual image, the method comprising: obtaining first input information; the first input information comprising at least one of voice information and text information; generating voice-text alignment information based on the first input information; determining N phonemes corresponding to the first input information based on the voice-text alignment information, the phonemes comprising phoneme information, N being an integer greater than 1; generating a first driving parameter sequence based on the mapping relationship between the phonemes, the phoneme information and the facial visual elements in the virtual image and the phonemes; and driving the face of the virtual image based on the first driving parameter sequence.
[0007] In a second aspect, an embodiment of the present application provides a virtual image face driving device, the device comprising: an acquisition module, a generation module, a determination module and an execution module, wherein: the above-mentioned acquisition module is used to acquire first input information, and the first input information includes at least one of voice information and text information; the above-mentioned generation module is used to generate voice-text alignment information based on the above-mentioned first input information acquired by the acquisition module; the above-mentioned determination module is used to determine the N phonemes corresponding to the above-mentioned first input information based on the above-mentioned voice-text alignment information generated by the generation module, and the phonemes include phoneme information, and N is an integer greater than 1; the above-mentioned generation module is also used to generate a first driving parameter sequence based on the above-mentioned phonemes determined by the determination module, the above-mentioned phoneme information, and the mapping relationship between the facial visual elements in the virtual image and the above-mentioned phonemes; the above-mentioned execution module is used to drive the face of the above-mentioned virtual image based on the above-mentioned first driving parameters generated by the generation module.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, an electronic device can obtain first input information; the first input information includes at least one of voice information and text information; based on the first input information, voice-text alignment information is generated; based on the voice-text alignment information, N phonemes corresponding to the first input information are determined, the phonemes include phoneme information, and N is an integer greater than 1; based on the phonemes, the phoneme information, and the mapping relationship between the facial visual elements in the virtual image and the phonemes, a first driving parameter sequence is generated; based on the first driving parameter sequence, the face of the virtual image is driven. In this way, since the phoneme information of the N phonemes can accurately express the facial lip shape of the virtual image corresponding to the first input information, a more accurate first driving parameter sequence can be generated to drive the face of the virtual image. Thereby, the incoordination of the facial lip shape of the presented virtual image is avoided, and the final synchronization effect is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a flowchart of a virtual image face driving method provided in an embodiment of the present application;
[0014] Figure 2 It is a structural schematic diagram of a virtual image face driving device provided in an embodiment of the present application;
[0015] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0016] Figure 4 It is a hardware schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0019] The following, in conjunction with the accompanying drawings, describes in detail the virtual image face driving method, device, electronic device and medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0020] In the related art, when the electronic device generates the facial driving data for driving the virtual image, it first generates the voice-text alignment information including only the text information based on the input text or voice information, then obtains the lip shape movement corresponding to the text information, and finally generates the lip shape driving data for driving the virtual image. However, with this solution, since the text information cannot accurately express the lip shape movement corresponding to the voice segment, the lip shape driving data finally generated is not precise, and the lip shape shakes.
[0021] In the virtual image face driving method, device, electronic device and medium provided in the embodiment of the present application, the electronic device can obtain first input information; the first input information includes at least one of voice information and text information; based on the first input information, generate voice and text alignment information; based on the voice and text alignment information, determine the N phonemes corresponding to the first input information, the phonemes include phoneme information, and N is an integer greater than 1; based on the phonemes, the phoneme information, and the mapping relationship between the facial visual elements in the virtual image and the phonemes, generate a first driving parameter sequence; based on the first driving parameter sequence, drive the face of the virtual image. In this way, since the phoneme information of the N phonemes can accurately express the facial lip shape of the virtual image corresponding to the first input information, a more accurate first driving parameter sequence can be generated to drive the face of the virtual image. Thereby, the incoordination of the facial lip shape of the presented virtual image is avoided, and the final synchronization effect is improved.
[0022] The execution subject of the virtual image face driving method provided in this embodiment can be a virtual image face driving device, and the virtual image face driving device can be an electronic device, or a control module or a processing module in the electronic device. The technical solution provided in the embodiment of the present application is described below by taking an electronic device as an example.
[0023] The present application embodiment provides a virtual image face driving method, such as Figure 1 As shown, the virtual image face driving method may include the following steps 201 to 205:
[0024] Step 201: The electronic device obtains first input information.
[0025] In an embodiment of the present application, the first input information includes at least one of voice information and text information.
[0026] In the embodiment of the present application, the first input information is used to indicate the content to be expressed by the virtual image.
[0027] In the embodiment of the present application, the above-mentioned virtual image may include a virtual character image generated by an electronic device.
[0028] Step 202: The electronic device generates speech-text alignment information based on the first input information.
[0029] In an embodiment of the present application, the electronic device may align the above-mentioned voice information with the text information corresponding to the voice information to generate voice-text alignment information.
[0030] In an embodiment of the present application, the above-mentioned voice-text alignment information is used to indicate the start time and end time of each word in the above-mentioned text information.
[0031] Step 203: The electronic device determines N phonemes corresponding to the first input information based on the voice-text alignment information.
[0032] In the embodiment of the present application, the above-mentioned phoneme includes phoneme information.
[0033] Where N is an integer greater than 1
[0034] In an embodiment of the present application, the above-mentioned phoneme information may be the pinyin information corresponding to the characters in the above-mentioned text information.
[0035] Exemplarily, the above pinyin information can be divided into initial consonants and finals.
[0036] It should be noted that the above-mentioned finals may include simple finals, complex finals, front nasal finals and back nasal finals.
[0037] In the embodiment of the present application, the electronic device can classify the above N factors into single vowels, complex vowels, front nasal vowels, back nasal vowels, whole-word syllables, and three-word syllables according to the pinyin type. Then, the three-word syllables and the whole-word syllables are split into the combination of the first four kinds of vowels to generate the corresponding phoneme groups.
[0038] Step 204: The electronic device generates a first driving parameter sequence based on the phonemes, the phoneme information, and the mapping relationship between the facial visemes in the virtual image and the phonemes.
[0039] In the embodiment of the present application, the facial visual element may be a part or muscle of the face of the virtual image.
[0040] Exemplarily, the facial visemes may include chin visemes, lip visemes, and other visemes.
[0041] It should be noted that the above-mentioned chin part visual element and mouth part visual element are used to determine the lip shape movement, and the visual elements in other parts are used to determine the facial expression movement of the eyes, nose, eyebrows, etc.
[0042] Exemplarily, the above-mentioned chin part visual elements may include: front jaw, right lower jaw, left lower jaw, and lower jaw.
[0043] Exemplarily, the above-mentioned mouth part visual elements may include: mouth closed, mouth twisted, mouth twitching, right side of mouth, left side of mouth, left side of mouth smiling, right side of mouth smiling, mouth wrinkled to the left, mouth wrinkled to the left, dimple curve on the left side of mouth, dimple on the right side of mouth, mouth stretched to the left, mouth stretched to the right, mouth curled down, mouth curled up, lower lip raised, upper lip raised, pressing the left side of mouth, pressing the right side of mouth, lower left mouth, lower right mouth, upper left mouth, upper right mouth.
[0044] Exemplarily, the above-mentioned other part visual elements may include: left eye blinking, left eye looking downward, left eye looking inward, left eye looking outward, left eye looking upward, left eye squinting, left eye wide open, right eye blinking, right eye looking downward, right eye looking inward, right eye looking outward, right eye looking upward, right eye squinting, right eye wide open, left eyebrow downward, right eyebrow downward, inner eyebrow upward, outer left eyebrow upward, outer right eyebrow upward, cheek puff, cheek slanted to the left, cheek slanted to the right, nose moving to the left, nose moving to the right, and sticking out tongue.
[0045] In the embodiment of the present application, the above mapping relationship can be pre-stored in the electronic device or obtained from the network side.
[0046] The following is an exemplary description of how to generate the above mapping relationship:
[0047] Exemplarily, the electronic device can first count the real-person facial viseme movements corresponding to each phoneme by recording a video with a real person, and record the corresponding driving parameters so that the virtual image is consistent with the facial movement of the real-person video. Then, based on the driving parameters corresponding to each of the above phonemes, the electronic device establishes a one-to-one correspondence between phonemes and visemes, that is, the above-mentioned mapping relationship.
[0048] For example, the above mapping relationship may be a mapping value from phoneme to viseme. For example, the mapping value of the front jaw is 0.11426107876499998, and the mapping value of the lower jaw is 0.45334974318700005.
[0049] Step 205: The electronic device drives the face of the virtual image based on the first driving parameter sequence.
[0050] In the embodiment of the present application, after obtaining the above-mentioned first driving parameter sequence, the electronic device can input the first driving parameter sequence into the driving engine, and can drive the lip movement of the virtual image's face through the first driving parameter sequence.
[0051] Exemplarily, the driving engine may be a three-dimensional (3D) engine.
[0052] In the virtual image face driving method provided in the embodiment of the present application, the electronic device can obtain the first input information; the first input information includes at least one of voice information and text information; based on the first input information, generate voice and text alignment information; based on the voice and text alignment information, determine the N phonemes corresponding to the first input information, the phonemes include phoneme information, and N is an integer greater than 1; based on the phonemes, the phoneme information, and the mapping relationship between the facial visual elements in the virtual image and the phonemes, generate a first driving parameter sequence; based on the first driving parameter sequence, drive the face of the virtual image. In this way, since the phoneme information of the N phonemes can accurately express the facial lip shape of the virtual image corresponding to the first input information, a more accurate first driving parameter sequence can be generated to drive the face of the virtual image. Thereby, the incoordination of the facial lip shape of the presented virtual image is avoided, and the final synchronization effect is improved.
[0053] Optionally, in the embodiment of the present application, in the above step 204, “the electronic device generates a first driving parameter sequence based on the phonemes, the phoneme information, and the mapping relationship between the facial visemes in the avatar and the phonemes” may include the following steps 204a and 204b:
[0054] Step 204a: The electronic device determines the importance weight and density weight corresponding to the phoneme based on the phoneme and the phoneme information.
[0055] In the embodiment of the present application, the importance weight is used to characterize the importance of the phoneme in the facial driving of the virtual image.
[0056] In the embodiment of the present application, the above density weight is used to characterize the density of each phoneme in the above N phonemes.
[0057] In an embodiment of the present application, the electronic device can set a corresponding importance weight for each factor group based on the above phoneme group. For example, for the importance weight, the weights of the initial consonant, the single vowel, the complex vowel, the front nasal vowel, and the back nasal vowel are set to (1.0, 0.9, 0.6, 0.5, 0.5) respectively.
[0058] Step 204b: The electronic device generates a first driving parameter sequence based on the importance weight, the density weight, the phoneme, the phoneme information, and the mapping relationship between the facial visemes and the phonemes in the virtual image.
[0059] In this way, by using the importance weights and density weights of the above-mentioned phonemes to generate the first driving parameter sequence, phonemes with high density and low importance can be discarded, thereby avoiding the shaking of the virtual image driven by the generated first driving parameter sequence.
[0060] Optionally, in the embodiment of the present application, in the above step 204b, “the electronic device generates a first driving parameter sequence based on the importance weight, the density weight, the phoneme, the phoneme information, and the mapping relationship between the facial visemes and the phonemes in the virtual image” may include the following steps 204b1 to 204b3:
[0061] Step 204b1: the electronic device obtains a phoneme sequence corresponding to the phoneme.
[0062] In the embodiment of the present application, the above-mentioned phoneme sequence is used to indicate the order of the above-mentioned N phonemes.
[0063] In an embodiment of the present application, the electronic device can generate N phonemes based on the above, and arrange the N phonemes according to the word sequence of the input information to obtain a phoneme sequence.
[0064] Step 204b2: The electronic device generates a first phoneme sequence based on the phoneme sequence, the importance weight, and the density weight.
[0065] In an embodiment of the present application, the electronic device can discard phonemes with high density and low importance based on the above phoneme sequence, importance weight and density weight, and generate a new phoneme sequence, that is, the above first phoneme sequence.
[0066] Step 204b3: The electronic device converts the first phoneme sequence according to the phoneme information and the mapping relationship between the facial visemes and phonemes in the virtual image to generate a first driving parameter sequence.
[0067] Exemplarily, the electronic device can calculate the first driving parameter sequence by formula (1). Formula (1) is as follows:
[0068] v i =min(S(p i )*w 1i *w 2i ,1.0) Formula (1)
[0069] Among them, w 1i is the above importance weight, w 2i is the above density weight, and S is the above mapping relationship.
[0070] In this way, by converting the phoneme sequence into a viseme parameter sequence with time sequence characteristics, the electronic device can drive the virtual image based on the viseme parameter sequence, further improving the precision of driving the virtual image.
[0071] Optionally, in the embodiment of the present application, in the above step 205, "the electronic device drives the face of the virtual image based on the first driving parameter sequence" may include optional steps 205a to 205c:
[0072] Step 205a: The electronic device performs time domain feature smoothing processing on the driving parameters corresponding to each phoneme in the first driving parameter sequence to obtain a processed second driving parameter sequence.
[0073] In the embodiment of the present application, after obtaining the above-mentioned viseme parameter sequence, the electronic device can respectively perform smoothing processing on the viseme parameters of different parts.
[0074] Exemplarily, the above-mentioned smoothing process may be performed using a convolution smoothing (Savitzky-Golay, SG) algorithm.
[0075] Exemplarily, the electronic device can take each character in the above text information as a unit and smooth the driving parameters corresponding to the phonemes of each character pair, that is, apply the SG algorithm to the driving parameters corresponding to the phonemes of each character to ensure that the facial visual element corresponding to each character is more natural, and finally obtain the above-mentioned second driving parameter sequence.
[0076] Step 205b: the electronic device performs time domain feature smoothing processing on the second driving parameter sequence to obtain a third driving parameter sequence.
[0077] In the embodiment of the present application, the facial driving data is related to the third driving parameter.
[0078] Exemplarily, after obtaining the second driving parameter sequence, the electronic device may apply the SG algorithm to the second driving parameter sequence as a whole to ensure that the facial visemes corresponding to the entire input information are more natural, thereby obtaining the third driving parameter sequence.
[0079] For example, taking the smoothing of the driving parameters corresponding to the chin as an example, the driving parameter sequence of the chin is obtained by formula (2). Formula (2) is as follows:
[0080]
[0081] Here, m represents the number of characters in the above input information.
[0082] Furthermore, the electronic device can generate a final third driving parameter sequence by using formula (3) to generate the driving parameter sequences corresponding to different parts. Formula (3) is as follows:
[0083] V s = {V s下巴 ,V s嘴部 ,V s其他} Formula (3)
[0084] Step 205c: The electronic device drives the face of the virtual image based on the third driving parameter sequence.
[0085] In the embodiment of the present application, after obtaining the third driving parameter sequence, the electronic device can input the third driving parameter sequence into the 3D engine, and can drive the lip movement of the virtual image's face through the third driving parameter sequence.
[0086] In this way, the driving parameters corresponding to each phoneme are first smoothed, and then the overall driving parameter sequence is smoothed, so that the generated driving parameter sequence is more refined, avoiding the unnaturalness and jitter of the virtual image caused by the driving parameter jumps in the transition stages of different phonemes.
[0087] Optionally, in the embodiment of the present application, in the above step 205, "the electronic device drives the face of the virtual image based on the first driving parameter sequence" may include optional steps 205d to 205g:
[0088] Step 205d: The electronic device generates an energy coefficient weight corresponding to each phoneme based on the short-time energy of the first input information.
[0089] In the embodiment of the present application, the short-time energy includes the unvoiced part and the voiced part of the speech information.
[0090] It should be noted that the energy corresponding to the voiced sound part is greater than the energy corresponding to the unvoiced sound part.
[0091] In the embodiment of the present application, the energy coefficient weight is used to characterize the proportion of the unvoiced part and the voiced part in the voice information. In other words, the greater the energy coefficient weight, the greater the volume of the corresponding voice information.
[0092] Step 205e: The electronic device obtains an energy coefficient weight sequence corresponding to the phoneme based on the phoneme sequence and energy coefficient weight corresponding to the phoneme in the first input information.
[0093] In this embodiment, the electronic device may process the energy coefficient weights according to the sequence indicated by the phoneme sequence to obtain an energy coefficient weight sequence.
[0094] For example, the electronic device can obtain the above energy input weight sequence through formula (4). Formula (4) is as follows:
[0095]
[0096] Step 205f: The electronic device generates a fourth driving parameter sequence based on the energy coefficient weight sequence, the intensity parameters of the facial visemes in the virtual image, and the first driving parameter sequence.
[0097] In the embodiment of the present application, the facial driving data is related to the fourth driving parameter sequence.
[0098] In the embodiment of the present application, the intensity parameter of the facial viseme is used to characterize the emotion information corresponding to the driving parameter sequence.
[0099] Exemplarily, the above-mentioned emotional information includes happiness, sadness, anger, calmness, etc.
[0100] Exemplarily, the electronic device can customize different intensity parameters for the driving parameter sequences of different parts. Then, the fourth driving parameter sequence is generated by formula (5). Formula (5) is as follows:
[0101] V final =W E *{w st1 V s下巴 ,w st2 V s嘴部 ,w st3 V s其他} Formula (5)
[0102] Step 205g: The electronic device drives the face of the virtual image based on the fourth driving parameter sequence.
[0103] In the embodiment of the present application, after obtaining the fourth driving parameter sequence, the electronic device can input the fourth driving parameter sequence into the 3D engine, and can drive the lip movement of the virtual image's face through the fourth driving parameter sequence.
[0104] In the embodiment of the present application, the electronic device can reduce the problem of lip jitter by discarding the phonemes that contribute little to lip movement through the importance weight and density weight of the phonemes. A mapping scheme from phonemes to visemes is established, and facial drive data can be generated directly through phonemes. Then, the drive parameter sequence is smoothed through smoothing strategies of different granularities to make the lip movement more natural. Finally, the drive parameter sequence can be dynamically adjusted according to the voice information and built-in strategies to achieve different speaking styles.
[0105] In this way, by adding parameters for characterizing the volume of voice information and for characterizing the emotions of the virtual image to the above-mentioned first driving parameter sequence, the final effect of driving the virtual image is made more natural.
[0106] Optionally, in the embodiment of the present application, in the above step 202, "the electronic device generates voice-text alignment information based on the first input information" may include step 202a and step 202b:
[0107] Step 202a: The electronic device extracts acoustic feature information corresponding to the first voice information.
[0108] In the embodiment of the present application, the first voice information is the input voice information, or the voice information converted from the text information.
[0109] In the embodiment of the present application, the above-mentioned conversion of text information into voice information may include: generating a virtual voice corresponding to the text information through a text to speech (TTS) interface.
[0110] In an embodiment of the present application, the above-mentioned acoustic feature information is used to represent the pitch, intensity, strength, and timbre of the above-mentioned first voice information.
[0111] In an embodiment of the present application, the electronic device may input the above input information into a feature extraction model to extract the acoustic features of the corresponding speech.
[0112] Exemplarily, the feature extraction model may include linear predictive coding and Mel spectrum.
[0113] Step 202b: The electronic device performs voice-text alignment on the first voice information and the text information corresponding to the first voice information based on the acoustic feature information to generate voice-text alignment information.
[0114] In an embodiment of the present application, the electronic device may input the above-mentioned acoustic feature information and text information into a statistical model or a deep learning method model for dynamic matching to generate speech-text alignment information.
[0115] In this way, by extracting acoustic feature information from the voice information and aligning the voice information with the corresponding text information, the electronic device can more accurately obtain the content contained in the input information.
[0116] Optionally, in the embodiment of the present application, the phoneme information includes the duration of each phoneme, and the step 204a of "the electronic device determines the density weight corresponding to the phoneme based on the phoneme and the phoneme information" may include the following steps 204a1 and 204a2:
[0117] Step 204a1: the electronic device divides the duration corresponding to the first input information into P time periods based on the duration of each phoneme.
[0118] Wherein, P is an integer greater than 1.
[0119] In the embodiment of the present application, the duration may be from the start time to the end time of each phoneme.
[0120] In the embodiment of the present application, the duration corresponding to the above-mentioned input information may be the start time to the end time corresponding to the above-mentioned voice information.
[0121] In the embodiment of the present application, the above-mentioned P time periods may be time periods of the same length.
[0122] Step 204a2: The electronic device determines a density weight corresponding to the phoneme based on the density information of each phoneme contained in each of the P time periods.
[0123] In the embodiment of the present application, the above density information is used to indicate the quantity of each phoneme in each time period.
[0124] Exemplarily, the electronic device can calculate the density weight by formula (6). Formula (6) is as follows:
[0125]
[0126] Among them, T represents the time length corresponding to the above P time periods, t i represents the i-th phoneme among the above N phonemes, t max It represents the duration of the longest phoneme in the above time length T, and P is the above P time periods.
[0127] In this way, the electronic device can discard phonemes with high density but small application to facial visual elements based on the calculated density weight, thereby avoiding the problem of lip shaking.
[0128] The virtual image face driving method provided in the embodiment of the present application can be executed by a virtual image face driving device. In the embodiment of the present application, the virtual image face driving device executing the virtual image face driving method is taken as an example to illustrate the virtual image face driving device provided in the embodiment of the present application.
[0129] The present application embodiment provides a virtual image face driving device, such as Figure 2As shown, the virtual image face driving device 400 includes: an acquisition module 401, a generation module 402, a determination module 403 and an execution module 404, wherein: the acquisition module 401 is used to acquire first input information, and the input information includes at least one of voice information and text information; the generation module 402 is used to generate voice-text alignment information based on the first input information acquired by the acquisition module 401; the determination module 403 is used to determine N phonemes corresponding to the first input information based on the voice-text alignment information generated by the generation module 402, and the phonemes include phoneme information, and N is an integer greater than 1; the generation module 402 is also used to generate a first driving parameter sequence based on the phonemes determined by the determination module 403, the phoneme information and the mapping relationship between the facial visual elements in the virtual image and the phonemes; the execution module 404 is used to drive the face of the virtual image based on the first driving parameter sequence generated by the generation module 402.
[0130] Optionally, in an embodiment of the present application, the above-mentioned determination module 403 is also used to determine the importance weight and density weight corresponding to the above-mentioned phoneme based on the above-mentioned phoneme and the above-mentioned phoneme information, the above-mentioned importance weight is used to characterize the importance of the above-mentioned phoneme in the facial driving of the above-mentioned virtual image, and the above-mentioned density weight is used to characterize the density of each phoneme in the above-mentioned N phonemes; the above-mentioned generation module 402 is specifically used to generate a first driving parameter sequence based on the above-mentioned importance weight, the above-mentioned density weight, the above-mentioned phoneme, the above-mentioned phoneme information determined by the determination module 403 and the mapping relationship between the facial visual elements in the above-mentioned virtual image and the above-mentioned phonemes.
[0131] Optionally, in an embodiment of the present application, the acquisition module 401 is further used to acquire a phoneme sequence corresponding to the phoneme; the generation module 402 is specifically used to: generate a first phoneme sequence based on the phoneme sequence acquired by the acquisition module 401, the importance weight and the density weight; convert the first phoneme sequence according to the mapping relationship between the phoneme information and the facial visemes in the virtual image and the phonemes to generate the first driving parameter sequence.
[0132] Optionally, in an embodiment of the present application, the execution module 404 is specifically used to perform time domain feature smoothing processing on the driving parameters corresponding to each of the above phonemes in the above first driving parameter sequence generated by the generation module 402 to obtain a smoothed second driving parameter sequence; perform time domain feature smoothing processing on the second driving parameter sequence to obtain a third driving parameter sequence; and drive the face of the above virtual image based on the third driving parameter sequence.
[0133] Optionally, in an embodiment of the present application, the execution module 404 is specifically used to generate an energy coefficient weight corresponding to each of the phonemes based on the short-time energy of the first input information; obtain an energy coefficient weight sequence corresponding to the phonemes based on the phoneme sequence corresponding to the phonemes in the first input information and the energy coefficient weights; generate a fourth driving parameter sequence based on the energy coefficient weight sequence, the intensity parameters of the facial visual elements in the virtual image, and the first driving parameter sequence; and drive the face of the virtual image based on the fourth driving parameter sequence.
[0134] Optionally, in an embodiment of the present application, the virtual image facial driving device 400 further includes: an extraction module, wherein: the extraction module is used to extract acoustic feature information corresponding to the first voice information; the first voice information is the input voice information, or the voice information converted from the text information; the generation module 402 is specifically used to perform voice-to-text alignment on the first voice information and the text information corresponding to the first voice information based on the acoustic feature information extracted by the extraction module, so as to generate the voice-to-text alignment information.
[0135] Optionally, in an embodiment of the present application, the above-mentioned phoneme information includes the duration of each of the above-mentioned phonemes; the above-mentioned determination module 403 is specifically used to divide the duration corresponding to the above-mentioned first input information into P time periods based on the duration of each of the above-mentioned phonemes, where P is an integer greater than 1; based on the density information of each phoneme contained in each of the above-mentioned P time periods, determine the density weight corresponding to the above-mentioned phoneme.
[0136] In the virtual image face driving device provided in the embodiment of the present application, the virtual image face driving device can obtain first input information; the first input information includes at least one of voice information and text information; based on the first input information, generate voice and text alignment information; based on the voice and text alignment information, determine the N phonemes corresponding to the first input information, the phonemes include phoneme information, and N is an integer greater than 1; based on the phonemes, the phoneme information, and the mapping relationship between the facial visual elements in the virtual image and the phonemes, generate a first driving parameter sequence; based on the first driving parameter sequence, drive the face of the virtual image. In this way, since the phoneme information of the N phonemes can accurately express the facial lip shape of the virtual image corresponding to the first input information, a more accurate first driving parameter sequence can be generated to drive the face of the virtual image. Thereby, the facial lip shape of the virtual image presented is avoided from being incoordinated, and the final synchronization effect is improved.
[0137] The virtual image face driving device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0138] The virtual image face driving device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0139] The virtual image face driving device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0140] Alternatively, if Figure 3 As shown, an embodiment of the present application further provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores programs or instructions that can be executed on the processor 601, and when the program or instructions are executed by the processor 601, the various steps of the above-mentioned virtual image face driving method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.
[0141] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0142] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0143] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
[0144] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0145] Among them, the above-mentioned processor 110 is used to obtain first input information, which includes at least one of voice information and text information; based on the above-mentioned first input information, generate voice-text alignment information; based on the above-mentioned voice-text alignment information, determine N phonemes corresponding to the above-mentioned first input information, the phonemes include phoneme information, and N is an integer greater than 1; based on the above-mentioned phonemes, the above-mentioned phoneme information and the mapping relationship between the facial visual elements in the virtual image and the above-mentioned phonemes, generate a first driving parameter sequence; based on the first driving parameter sequence, drive the face of the above-mentioned virtual image.
[0146] Optionally, in an embodiment of the present application, the processor 110 is further used to determine the importance weight and density weight corresponding to the phoneme based on the phoneme and the phoneme information, wherein the importance weight is used to characterize the importance of the phoneme in the facial driving of the virtual image, and the density weight is used to characterize the density of each phoneme in the N phonemes; the processor 110 is specifically used to generate a first driving parameter sequence based on the importance weight, the density weight, the phoneme, the phoneme information and the mapping relationship between the facial visual elements in the virtual image and the phonemes.
[0147] Optionally, in an embodiment of the present application, the processor 110 is further used to: obtain a phoneme sequence corresponding to the phoneme; the processor 110 is specifically used to: generate a first phoneme sequence based on the phoneme sequence, the importance weight and the density weight; convert the first phoneme sequence according to the mapping relationship between the phoneme information and the facial visual elements in the virtual image and the phonemes to generate the first driving parameter sequence.
[0148] Optionally, in an embodiment of the present application, the processor 110 is specifically used to perform time domain feature smoothing processing on the driving parameters corresponding to each of the phonemes in the first driving parameter sequence to obtain a smoothed second driving parameter sequence; perform time domain feature smoothing processing on the second driving parameter sequence to obtain a third driving parameter sequence; and drive the face of the virtual image based on the third driving parameter sequence.
[0149] Optionally, in an embodiment of the present application, the processor 110 is specifically used to generate an energy coefficient weight corresponding to each of the phonemes based on the short-time energy of the first input information; obtain an energy coefficient weight sequence corresponding to the phonemes based on a phoneme sequence corresponding to the phonemes in the first input information and the energy coefficient weights; generate a fourth driving parameter sequence based on the energy coefficient weight sequence, the intensity parameters of the facial visual elements in the virtual image, and the first driving parameter sequence; and drive the face of the virtual image based on the fourth driving parameter sequence.
[0150] Optionally, in an embodiment of the present application, the processor 110 is also used to extract acoustic feature information corresponding to the first voice information; the first voice information is the input voice information, or the voice information converted from the text information; the processor 110 is specifically used to perform voice-to-text alignment on the first voice information and the text information corresponding to the first voice information based on the acoustic feature information to generate the voice-to-text alignment information.
[0151] Optionally, in an embodiment of the present application, the above-mentioned phoneme information includes the duration of each of the above-mentioned phonemes; the above-mentioned processor 110 is specifically used to divide the duration corresponding to the above-mentioned first input information into P time periods based on the duration of each of the above-mentioned phonemes, where P is an integer greater than 1; based on the density information of each phoneme contained in each of the above-mentioned P time periods, determine the density weight corresponding to the above-mentioned phoneme.
[0152] In the electronic device provided in the embodiment of the present application, the electronic device can obtain first input information; the first input information includes at least one of voice information and text information; based on the first input information, generate voice-text alignment information; based on the voice-text alignment information, determine the N phonemes corresponding to the first input information, the phonemes include phoneme information, and N is an integer greater than 1; based on the phonemes, the phoneme information, and the mapping relationship between the facial visual elements in the virtual image and the phonemes, generate a first driving parameter sequence; based on the first driving parameter sequence, drive the face of the virtual image. In this way, since the phoneme information of the N phonemes can accurately express the facial lip shape of the virtual image corresponding to the first input information, a more accurate first driving parameter sequence can be generated to drive the face of the virtual image. Thereby, the incoordination of the facial lip shape of the presented virtual image is avoided, and the final synchronization effect is improved.
[0153] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0154] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0155] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
[0156] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned virtual image face driving method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0157] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0158] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned virtual image facial driving method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0159] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0160] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned virtual image face driving method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0161] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0163] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A virtual image face driving method, It is characterized in that The method comprises: Acquire first input information, where the first input information includes at least one of voice information and text information; Based on the first input information, generate speech-text alignment information; Based on the voice-text alignment information, determine N phonemes corresponding to the first input information, where the phonemes include phoneme information, and N is an integer greater than 1; Generate a first driving parameter sequence based on the phoneme, the phoneme information, and a mapping relationship between the facial visemes in the avatar and the phonemes; driving the face of the avatar based on the first driving parameter sequence; The generating of a first driving parameter sequence based on the phoneme, the phoneme information, and a mapping relationship between the facial visemes in the avatar and the phonemes comprises: Based on the phoneme and the phoneme information, determine the importance weight and density weight corresponding to the phoneme, wherein the importance weight is used to characterize the importance of the phoneme in the facial driving of the avatar, and the density weight is used to characterize the density of each phoneme in the N phonemes; A first driving parameter sequence is generated based on the importance weight, the density weight, the phoneme, the phoneme information, and a mapping relationship between the facial visemes in the virtual image and the phonemes.
2. The method according to claim 1, It is characterized in that The generating a first driving parameter sequence based on the importance weight, the density weight, the phoneme, the phoneme information, and a mapping relationship between the facial visemes in the avatar and the phoneme comprises: Obtaining a phoneme sequence corresponding to the phoneme; generating a first phoneme sequence based on the phoneme sequence, the importance weight, and the density weight; According to the phoneme information and the mapping relationship between the facial visemes in the virtual image and the phonemes, the first phoneme sequence is converted to generate the first driving parameter sequence.
3. The method according to claim 1, It is characterized in that The step of driving the face of the avatar based on the first driving parameter sequence comprises: Performing time domain feature smoothing processing on the driving parameters corresponding to each phoneme in the first driving parameter sequence to obtain a smoothed second driving parameter sequence; Performing time domain feature smoothing processing on the second driving parameter sequence to obtain a third driving parameter sequence; Based on the third driving parameter sequence, the face of the avatar is driven.
4. The method according to claim 1, It is characterized in that The step of driving the face of the avatar based on the first driving parameter sequence comprises: generating an energy coefficient weight corresponding to each phoneme based on the short-time energy of the first input information; Based on the phoneme sequence corresponding to the phoneme in the first input information and the energy coefficient weight, obtaining an energy coefficient weight sequence corresponding to the phoneme; generating a fourth driving parameter sequence based on the energy coefficient weight sequence, the intensity parameters of the facial visemes in the avatar, and the first driving parameter sequence; Based on the fourth driving parameter sequence, the face of the avatar is driven.
5. The method according to claim 1, It is characterized in that The generating speech-text alignment information based on the first input information includes: Extracting acoustic feature information corresponding to first voice information; the first voice information is the input voice information, or voice information converted from the text information; Based on the acoustic feature information, the first voice information and the text information corresponding to the first voice information are voice-to-text aligned to generate the voice-to-text alignment information.
6. The method according to claim 1, It is characterized in that The phoneme information includes the duration of each phoneme; The determining, based on the phoneme and the phoneme information, a density weight corresponding to the phoneme includes: Based on the duration of each phoneme, dividing the duration corresponding to the first input information into P time periods, where P is an integer greater than 1; Based on the density information of each phoneme included in each of the P time periods, a density weight corresponding to the phoneme is determined.
7. A virtual image face driving device, It is characterized in that The device comprises: an acquisition module, a generation module, a determination module and an execution module, wherein: The acquisition module is used to acquire first input information, where the first input information includes at least one of voice information and text information; The generating module is used to generate speech-text alignment information based on the first input information acquired by the acquiring module; The determining module is used to determine N phonemes corresponding to the first input information based on the speech-text alignment information generated by the generating module, where the phonemes include phoneme information, and N is an integer greater than 1; The generating module is further configured to generate a first driving parameter sequence based on the phonemes determined by the determining module, the phoneme information, and a mapping relationship between facial visemes in the avatar and the phonemes; The execution module is used to drive the face of the virtual image based on the first driving parameter sequence generated by the generation module; The determination module is further used to determine the importance weight and density weight corresponding to the phoneme based on the phoneme and the phoneme information, wherein the importance weight is used to represent the importance of the phoneme in the facial driving of the avatar, and the density weight is used to represent the density of each phoneme in the N phonemes; The generating module is specifically used to generate a first driving parameter sequence based on the importance weight, the density weight, the phoneme, the phoneme information and the mapping relationship between the facial visual elements in the virtual image and the phoneme determined by the determining module.
8. The device according to claim 7, It is characterized in that The acquisition module is further used to acquire a phoneme sequence corresponding to the phoneme; The generation module is specifically used for: Generate a first phoneme sequence based on the phoneme sequence, the importance weight, and the density weight acquired by the acquisition module; According to the phoneme information and the mapping relationship between the facial visemes in the virtual image and the phonemes, the first phoneme sequence is converted to generate the first driving parameter sequence.
9. The device according to claim 7, It is characterized in that The execution module is specifically used for: Performing time domain feature smoothing processing on the driving parameters corresponding to each phoneme in the first driving parameter sequence generated by the generating module to obtain a smoothed second driving parameter sequence; Performing time domain feature smoothing processing on the second driving parameter sequence to obtain a third driving parameter sequence; Based on the third driving parameter sequence, the face of the avatar is driven.
10. The device according to claim 7, It is characterized in that The execution module is specifically used for: generating an energy coefficient weight corresponding to each phoneme based on the short-time energy of the first input information; Based on the phoneme sequence corresponding to the phoneme in the first input information and the energy coefficient weight, obtaining an energy coefficient weight sequence corresponding to the phoneme; generating a fourth driving parameter sequence based on the energy coefficient weight sequence, the intensity parameters of the facial visemes in the avatar, and the first driving parameter sequence; Based on the fourth driving parameter sequence, the face of the avatar is driven.
11. The device according to claim 7, It is characterized in that The device also includes an extraction module, wherein: The extraction module is used to extract acoustic feature information corresponding to the first voice information; the first voice information is the input voice information, or the voice information converted from the text information; The generation module is specifically used to perform voice-text alignment on the first voice information and the text information corresponding to the first voice information based on the acoustic feature information extracted by the extraction module to generate the voice-text alignment information.
12. The device according to claim 7, It is characterized in that The phoneme information includes the duration of each phoneme; The determining module is specifically used for: Based on the duration of each phoneme, dividing the duration corresponding to the first input information into P time periods, where P is an integer greater than 1; Based on the density information of each phoneme included in each of the P time periods, a density weight corresponding to the phoneme is determined.
13. An electronic device, It is characterized in that It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the virtual image face driving method as described in any one of claims 1 to 6 are implemented.
14. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the virtual image face driving method as described in any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Virtual image face driving method and apparatus, electronic device and medium
EP4593008A1
