Virtual digital human driving method and device, equipment and medium
Patent Information
- Application Number
- CN202380027498.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-28
- Filing Date
- 2023-03-01
- Publication Date
- 2024-11-01
AI Technical Summary
The recognition difficulty of virtual digital people in complex acoustic scenes increases, and it is difficult to accurately recognize the user's intention and emotional state, resulting in low fidelity and natural expression.
By obtaining the user's voice information and image information, the user's intention and emotion are determined, and the virtual digital person's reply text and emotional expression are determined based on the intention and emotion, so as to realize the body movements and emotional expression of the virtual digital person.
It improves the realism and natural expression of virtual digital humans, and achieves more realistic restoration of user intentions and emotions.
Smart Images

Figure CN118891616A_ABST
Abstract
Description
A virtual digital human driving method, device, equipment and medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to the Chinese patent application filed with the China Patent Office on June 22, 2022, with application number 202210714001.7; and filed with the China Patent Office on June 28, 2022, with application number 202210751784.6, the entire contents of which are incorporated by reference into this disclosure. Technical Field
[0003] The present disclosure relates to the technical field of virtual digital humans, and in particular to a method, apparatus, device, and medium for driving a virtual digital human. Background Art
[0004] Virtual digital human is a multimodal intelligent human-computer interaction technology that integrates computer vision, speech recognition, speech synthesis, natural language processing, terminal display and other technologies to create a highly anthropomorphic virtual image that interacts and communicates with people like a real person.
[0005] While virtual digital humans have already seen a small number of demonstration-level applications, their expressive capabilities are still somewhat limited. First, from a perception perspective, in complex, realistic acoustic scenarios, the variability in channels, environments, and speakers significantly increases the difficulty of recognition. Second, current intelligent interaction systems struggle to accurately recognize users' true intentions and emotional states in complex natural interaction scenarios, making it difficult to output matching system actions. Finally, due to the current limitations of virtual human visual imagery, morphological drive technology, and speech synthesis technology, the realism and naturalness of virtual human expression remain relatively stiff.
[0006] Summary of the Invention
[0007] The present disclosure provides a virtual digital human driving method, comprising:
[0008] Acquiring user information, wherein the user information includes voice information and image information;
[0009] determining user intention and user emotion based on the user information;
[0010] Determining a reply text of the virtual digital person according to the user intention, and determining a reply emotion of the virtual digital person according to the user intention and the user emotion;
[0011] The body movements of the virtual digital human are determined according to the reply text, and the emotional expression of the virtual digital human is determined according to the reply emotion.
[0012] The present disclosure also provides a computer device, comprising:
[0013] one or more processors;
[0014] a memory for storing one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of the first aspects.
[0016] The present disclosure also provides a computer-readable non-volatile storage medium having a computer program stored thereon, which implements the method as described in any one of the first aspects when the program is executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] FIG1A is a schematic diagram of an application scenario of a virtual digital human driving process according to some embodiments;
[0018] FIG1B is a schematic diagram of the structure of a virtual digital human according to some embodiments;
[0019] FIG2A is a block diagram of a hardware configuration of a computer device according to some embodiments;
[0020] FIG2B is a schematic diagram of software configuration of a computer device according to some embodiments;
[0021] FIG2C is a schematic diagram showing an icon control interface of an application included in a smart device according to some embodiments;
[0022] FIG3A is a schematic flow chart of a method for driving a virtual digital human according to some embodiments;
[0023] FIG3B is a schematic diagram showing the principle of a method for driving a virtual digital human according to some embodiments;
[0024] FIG4A is a flow chart of another method for driving a virtual digital human according to some embodiments;
[0025] FIG4B is a schematic diagram showing the principle of a method for driving a virtual digital human according to some embodiments;
[0026] FIG4C is a flowchart of another method for driving a virtual digital human according to some embodiments;
[0027] FIG4D is a flowchart of another method for driving a virtual digital human according to some embodiments;
[0028] FIG5 is a schematic flow chart of a method for driving a virtual digital human according to some embodiments;
[0029] FIG6 is a flow chart of another method for driving a virtual digital human according to some embodiments;
[0030] FIG7 is a flow chart of another method for driving a virtual digital human according to some embodiments;
[0031] FIG8 is a schematic diagram of a virtual digital human according to some embodiments;
[0032] FIG9 is a schematic diagram of a virtual digital human according to some embodiments;
[0033] FIG10 is a schematic diagram illustrating the principle of generating a new speaking style according to some embodiments;
[0034] FIG11 is a schematic diagram of a human-computer interaction scenario according to some embodiments;
[0035] FIG12 is a flow chart of a method for generating a speaking style according to some embodiments;
[0036] FIG13 is a schematic diagram illustrating the division of facial topology data into regions according to some embodiments;
[0037] FIG14 is a flow chart of a method for generating a speaking style according to some embodiments;
[0038] FIG15 is a flow chart of a method for generating a speaking style according to some embodiments;
[0039] FIG16 is a flowchart of a method for generating a speaking style according to some embodiments;
[0040] FIG17 is a schematic diagram of the structure of a framework of a speaking style model according to some embodiments;
[0041] FIG18 is a flowchart of a method for generating a speaking style according to some embodiments;
[0042] FIG19 is a schematic diagram of the structure of a framework of a speaking style generation model according to some embodiments;
[0043] FIG20 is a flowchart of a method for generating a speaking style according to some embodiments;
[0044] FIG21 is a schematic diagram of the structure of a framework of a speaking style generation model according to some embodiments;
[0045] FIG22 is a schematic diagram of the structure of a framework of a speaking style generation model according to some embodiments;
[0046] FIG23 is a flowchart of a method for generating a speaking style according to some embodiments;
[0047] FIG24 is a schematic structural diagram of a computer device according to some embodiments. DETAILED DESCRIPTION
[0048] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0049] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0050] As a new generation of human-computer interaction, the system design of virtual digital humans usually consists of five modules: character image, voice generation, dynamic image generation, audio and video synthesis display, and interaction modeling. The character image can be divided into two categories: 2D and 3D according to the dimension of the character image resource, and can be divided into cartoon, anthropomorphic, realistic, hyper-realistic and other styles in terms of appearance; the voice generation module can generate corresponding character voice based on text; the animation generation module can generate dynamic images of specific characters based on voice or text; the audio and video synthesis display module synthesizes voice and dynamic images into video, and finally displays it to the user; the interaction module enables the digital human to have interactive functions, that is, to identify the user's intention through intelligent technologies such as voice semantic recognition, and determine the digital human's subsequent voice and actions based on the user's current intention, driving the character to start the next round of interaction.
[0051] While virtual digital humans have already seen a small number of demonstration-level applications, their expressive capabilities remain limited. First, from a perception perspective, in complex acoustic scenarios, the variability in the channel, environment, and speaker significantly increases the difficulty of recognition. Second, current intelligent interaction systems struggle to accurately recognize users' true intentions and emotional states in complex natural interaction scenarios, making it difficult to output matching system actions. Finally, due to the current limitations of virtual human visual appearance, morphological drive technology, and speech synthesis technology, the realism and naturalness of virtual human expression remain relatively stiff.
[0052] In response to the shortcomings of the above-mentioned technical problems, the embodiments of the present disclosure first obtain user information, which includes voice information and image information; then determine the user intention and user emotion based on the user information; finally determine the virtual digital human's body movements based on the user intention, and determine the virtual digital human's emotional expression method based on the user emotion. That is, based on the obtained user voice information and user image information, the user voice information and user image information are processed to determine the user intention and user emotion, and then determine the virtual digital human's body movements based on the user intention, and determine the virtual digital human's emotional expression method based on the user emotion, so that the virtual digital human can truly restore the user intention and user emotion, and improve the virtual digital human's realism and natural expression.
[0053] FIG1A is a schematic diagram of an application scenario of a virtual digital human driving process according to an embodiment of the present disclosure. As shown in FIG1A , the virtual digital human driving process can be used in a scenario where a user interacts with a smart terminal. Assuming that the smart terminals in this scenario include a smart blackboard, a smart screen, a smart speaker, and a smart phone, the smart terminal displays a virtual digital human. Examples of virtual digital humans include virtual teachers, virtual brand images, virtual assistants, virtual shopping guides, and virtual anchors. As shown in FIG1B , when a user wants to control the virtual digital human displayed on the smart terminal in this scenario, they need to first issue a voice command. At this time, the smart terminal collects the user's voice information and user image information, processes the user's voice information and user image information, determines the user's intention and user emotion, and then determines the virtual digital human's body movements and emotional expression based on the analyzed user instructions and user emotion, so that the virtual digital human can truly restore the user's intention and user emotion, improving the virtual digital human's realism and natural expression.
[0054] The virtual digital human driving method provided by the embodiment of the present disclosure can be implemented based on a computer device, or a functional module or functional entity in the computer device.
[0055] The computer device may be a personal computer (PC), a server, a mobile phone, a tablet computer, a laptop computer, a mainframe computer, etc., and the embodiments of the present disclosure do not specifically limit this.
[0056] For example, FIG2A is a hardware configuration block diagram of a computer device according to one or more embodiments of the present disclosure. As shown in FIG2A , the computer device includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The controller 250 includes a central processing unit (CPU), a video processor, an audio processor, a graphics processor, RAM, ROM, and first to nth interfaces for input / output. The display 260 may be at least one of a liquid crystal display (LCD), an OLED display, a touch display, and a projection display, and may also be a projection device and a projection screen. The tuner and demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG audio and video data signals, from multiple wireless or wired broadcast television signals. The communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of a Wi-Fi module, a Bluetooth module, a wired Ethernet module, or other network communication protocol chip or a near-field communication protocol chip, as well as an infrared receiver. The computer device can use the communicator 220 to send and receive control and data signals with a server or local control device. The detector 230 is used to collect signals from the external environment or external interactions.
[0057] In some embodiments, the controller 250 controls the operation of the computer device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the computer device. The user can enter user commands through the graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input commands through the graphical user interface (GUI). Alternatively, the user can enter user commands by inputting specific sounds or gestures, and the user input interface recognizes the sounds or gestures through sensors to receive the user input commands.
[0058] Figure 2B is a schematic diagram of the software configuration of a computer device according to one or more embodiments of the present disclosure. As shown in Figure 2B, the system is divided into four layers, from top to bottom: the application layer (referred to as the "application layer"), the application framework layer (referred to as the "framework layer"), the Android runtime and system library layer (referred to as the "system runtime library layer"), and the kernel layer.
[0059] Figure 2C is a schematic diagram showing the icon control interface display of an application included in a smart terminal (mainly a smart playback device, such as a smart TV, a digital cinema system, or an audio and video server, etc.) according to one or more embodiments of the present disclosure. As shown in Figure 2C, the application layer includes at least one application that can display a corresponding icon control on the display, such as: a live TV application icon control, a video on demand VOD application icon control, a media center application icon control, an application center icon control, a game application icon control, etc. A live TV application can provide live TV through different signal sources. A video on demand VOD application can provide videos from different storage sources. Unlike a live TV application, video on demand provides video display from certain storage sources. A media center application can provide applications for playing various multimedia content. An application center can provide storage for various applications.
[0060] In order to illustrate the virtual digital human driving method in more detail, the following will be explained in an exemplary manner in conjunction with Figure 3A. It can be understood that the steps involved in Figure 3A may include more steps or fewer steps in actual implementation, and the order of these steps may also be different, so as to be able to implement the virtual digital human driving method provided in the embodiment of the present disclosure.
[0061] Figure 3A is a flow chart of a method for driving a virtual digital human, as provided in an embodiment of the present disclosure; Figure 3B is a schematic diagram of the principles of a method for driving a virtual digital human, as provided in an embodiment of the present disclosure. This embodiment is applicable to driving a virtual digital human. The method of this embodiment can be executed by an intelligent terminal, which can be implemented using hardware or software and can be configured in a computer device.
[0062] As shown in FIG3A , the method specifically includes the following steps:
[0063] S10. Obtain user information, which includes voice information and image information.
[0064] In a specific embodiment, the smart terminal includes a sound sensor and a visual sensor, wherein the sound sensor can be exemplarily a microphone array, etc., and the visual sensor includes a 2D visual sensor and a 3D visual sensor, and the visual sensor can be exemplarily a camera, etc.
[0065] The intelligent terminal collects voice information through sound sensors and image information through visual sensors. The voice information includes semantic information and acoustic information, and the image information includes scene information and user image information.
[0066] S20: Determine user intention and user emotion based on user information.
[0067] After the terminal device collects voice information based on the sound sensor, it can determine the user's intention based on the semantic information included in the voice information, that is, how the user expects to drive the virtual digital human to move. After collecting image information based on the visual sensor, it can determine the facial expression of the user who sent the voice information based on the collected image information, and determine the emotion that the user expects to drive the virtual digital human to express based on the user's facial expression in the collected image information.
[0068] S30: Determine the reply text of the virtual digital person according to the user's intention, and determine the reply emotion of the virtual digital person according to the user's intention and the user's emotion.
[0069] After determining the user intention and user emotion based on the user information, the reply text of the virtual digital person can be determined based on the user intention, such as the text corresponding to the virtual digital person's reply voice. The reply emotion of the virtual digital person is determined according to the user intention and user emotion, that is, the emotional expression required for the virtual digital person's reply is determined according to the user intention, and the emotion required to be expressed in the virtual digital person's reply is determined according to the emotion expressed by the user. In a specific implementation method, when the emotion expressed by the user is sad, the emotion required to be expressed in the virtual digital person's reply is also sad.
[0070] S40: determining the body movements of the virtual digital human according to the reply text, and determining the emotional expression of the virtual digital human according to the reply emotion.
[0071] After determining the user intention and user emotion based on the user information, the reply text of the virtual digital person is determined based on the user intention, and the reply emotion of the virtual digital person is determined based on the user intention and user emotion. Then, the virtual digital person's body movements are determined based on the reply text, and the virtual digital person's emotional expression method is determined based on the reply emotion. That is, first, for voice recognition and image recognition, a multimodal human-computer interaction information perception capability is established. Then, through the acquired voice information and image information, the user emotion of the user intention is determined. According to the user intention, the reply text of the virtual digital person is determined, and the reply emotion of the virtual digital person is determined based on the user intention and user emotion. Finally, based on the virtual digital person, the emotional expression method and body movement are expressed to realize the synthesis of the virtual digital person's voice, expression, action, etc.
[0072] The virtual digital human driving method provided by the embodiment of the present disclosure first obtains user information, namely voice information and image information, then determines the user intention and user emotion based on the user information, determines the virtual digital human's reply text based on the user intention, and determines the virtual digital human's reply emotion based on the user intention and user emotion, finally determines the virtual digital human's body movements based on the reply text, and determines the virtual digital human's emotional expression method based on the reply emotion, thereby realizing a natural anthropomorphic virtual human interaction state and improving the virtual digital human's realism and natural expression.
[0073] FIG4A is a flow chart of another method for driving a virtual digital human provided by an embodiment of the present disclosure, and FIG4B is a schematic diagram of the principle of another method for driving a virtual digital human provided by an embodiment of the present disclosure. Based on the above embodiment, as shown in FIG4A and FIG4B , a specific implementation of step S20 includes:
[0074] S201: Process the voice information to determine the text information and voice emotion information corresponding to the voice information.
[0075] Optionally, as shown in FIG4C , step S201 includes:
[0076] S2012: Perform text transcription on the voice information to determine text information corresponding to the voice information.
[0077] In a specific implementation, after the voice information is acquired, the acquired voice information is subjected to text transcription processing by the voice recognition module, that is, the voice information is converted into text information corresponding to the voice information.
[0078] Specifically, the terminal device may input voice information into an offline automatic speech recognition (ASR) engine to obtain text information output by the ASR engine.
[0079] In the disclosed embodiment, after completing the text transcription processing of the voice information, the terminal device can continue to wait for the user to input voice. If the voice activity detection (VAD) recognizes the beginning of the human voice, the recording continues. If the VAD recognizes the end of the human voice, the recording stops. The terminal device can use the recorded audio as the user voice information. The terminal device can then input the user voice information into the ASR engine to obtain the text information corresponding to the user voice information.
[0080] S2013. Extract voiceprint features from the voice information to determine the voice emotion information corresponding to the voice information.
[0081] Voiceprint features are the spectrum of sound waves that carry speech information, as displayed by electroacoustic instruments. Voiceprint features reflect the wavelength, frequency, intensity, and rhythm of different sounds—the pitch, intensity, duration, and timbre of a user's voice. Voiceprint features vary from user to user. By extracting voiceprint features from speech information, we can derive the emotional information expressed by the user, known as voice emotion information.
[0082] S202: Process the image information to determine scene information and image emotion information corresponding to the image information.
[0083] Optionally, as shown in FIG4D , step S202 includes:
[0084] S2021. Preprocess the image information to determine scene key point information and user key point information included in the image information.
[0085] Scene key point information refers to the key points of the scene in which the user is located, in addition to the user information, in the image information. User key point information refers to the key points of the user's body parts or facial features in the image information. For example, if the image information captured by the terminal device shows a teacher standing in front of a blackboard, the scene key point information included in the image information is the blackboard, and the user key point information included in the image information is the user's eyes, mouth, arms, legs, etc.
[0086] S2022: Determine scene information corresponding to the image information based on the scene key point information.
[0087] By preprocessing the image and obtaining the scene key point information, the scene information of the terminal device can be determined, that is, in which scene the terminal device is used.
[0088] In a specific implementation, a knowledge base of different application scenarios for virtual digital humans is constructed, and a scene recognition model is constructed based on algorithms such as entity recognition, entity linking, and entity alignment. The image information for different application scenarios in the knowledge base is then preprocessed to obtain scene key point information corresponding to the image information for each application scenario. This information is then input into the scene recognition model for training until the scene recognition model reaches convergence, thereby determining a target scene recognition model. The acquired image information is then preprocessed using methods such as graph mapping and information extraction to obtain scene key point information corresponding to the image. This preprocessed scene key point information is then input into the target scene recognition model for scene recognition, ensuring the accuracy of the scene recognition results.
[0089] S2023. Determine the image emotional information based on the correspondence between the user key point information and the preset user emotional key points.
[0090] After preprocessing the image and obtaining the key point information of the user, the emotion of the user collected by the terminal device can be determined, that is, the emotion expressed by the user included in the image information collected by the terminal device.
[0091] S203: Determine user intention based on text information and scenario information.
[0092] After obtaining the text information corresponding to the voice information and the scene information corresponding to the image information, the user's desired physical movements to drive the virtual digital human can be determined based on the text information. Then, combined with the determined scene information, the terminal device can further ensure the coordination accuracy of the virtual digital human's physical movements driven by the text information.
[0093] S204: Determine the user's emotion based on the text information, voice emotion information, and image emotion information.
[0094] After obtaining the text information corresponding to the voice information, the emotions expressed by the user can be roughly determined based on the text information. Then, by integrating the voice emotion information and image emotion information, the virtual digital human can be accurately driven to express the user's emotions, thereby improving the realism of the virtual digital human.
[0095] The virtual digital human determination method provided by the embodiment of the present disclosure first determines the text information and voice emotion information corresponding to the voice information by processing the voice information, and determines the scene information and image emotion information corresponding to the image information by processing the image information. Then, based on the text information and scene information, the user intention is determined. According to the text information, the user emotion is determined based on the text information, the user's expectation to drive the virtual digital human's body movements can be determined based on the text information. Then, combined with the determined scene information, the coordination accuracy of the terminal device driving the virtual digital human's body movements based on the text information is further guaranteed. Based on the text information, the emotion expressed by the user can be roughly determined. Then, by fusing the voice emotion information and the image emotion information, the virtual digital human can be accurately driven to express the user's emotion, thereby improving the realism of the virtual digital human.
[0096] FIG5 is a flow chart of another method for driving a virtual digital human provided by an embodiment of the present disclosure. The present embodiment is based on the embodiment corresponding to FIG4C . As shown in FIG5 , before step S2012 , the method further includes:
[0097] S2010: Extract speech feature vectors of speech information.
[0098] In the disclosed embodiments, highly robust voiceprint recognition and clustering technologies are developed to enable automatic multi-user login through voice modality. Paralinguistic information such as gender and accent is simultaneously extracted to establish basic user information. To address the difficulties of clustering voice features for an uncertain number of target categories, as well as the impact of voice channel interference on classification and clustering, a noisy density space unsupervised clustering technique is employed, combined with randomized linear discriminant analysis (RLDA) to achieve highly reliable voiceprint classification and clustering, mitigating the impact of channel interference on voiceprint recognition. Specifically, the disclosed embodiments construct a voice recognition model that is adaptable to varying paralinguistic information, resulting in high voice recognition accuracy.
[0099] In a specific implementation, before performing text transcription processing on the voice information and determining the text information corresponding to the voice information, the voice feature vector in the voice information is first extracted. Specifically, the voice feature vector includes: accent feature vector, gender feature vector, age feature vector, etc.
[0100] S2011. Add speech feature vectors to the convolutional layer of the speech recognition model.
[0101] Among them, the speech recognition model includes an acoustic model and a language model. The acoustic model includes a convolutional neural network model with an attention mechanism, and the language model includes a deep neural network model.
[0102] The speech recognition model constructed in this paper is a joint model of acoustic and language models. It uses deep time series convolution and an attention mechanism to build the acoustic model. Speech feature vectors are added as conditions in the convolutional layers of the convolutional neural network model to adapt to different speech characteristics. At the language model level, a deep neural network-based model structure with rapid intervention and configuration is implemented. The user's unique voiceprint is used to adapt to the speech characteristics of different paralinguistic information, improving speech recognition accuracy.
[0103] The specific implementation of step S2012 may include:
[0104] S20120. Perform text transcription processing on the voice information based on the speech recognition model to determine the text information corresponding to the voice information.
[0105] After the speech recognition model is built, the speech information can be transcribed into text based on the speech recognition model to improve the accuracy of the speech recognition results.
[0106] FIG6 is a flow chart of another method for driving a virtual digital human provided by an embodiment of the present disclosure. This embodiment of the present disclosure is based on the embodiment corresponding to FIG4A . As shown in FIG6 , the specific implementation of step 40 includes:
[0107] S401: Obtain an action identifier included in the reply text.
[0108] Examples of action identifiers include: lift, stretch, blink, open, etc.
[0109] In the process of driving a virtual digital human, key point driving includes speech content separation, content key point driving, speaker key point driving, key point-based image generation module, and key point-based image stretching module. Therefore, first, the text information at the transcription of the speech information is parsed to obtain the action identifiers and key point identifiers included in the text information.
[0110] S402: According to the action identifier, select the body action of the virtual digital human from the preset action database corresponding to the scene information.
[0111] Specifically, if the action identifier is lifting, the body movements of the virtual digital human such as raising the head and raising the legs are selected from the preset action database corresponding to the scene information.
[0112] Among them, the preset action database includes action type definition, action arrangement, action connection, etc.
[0113] S403: Determine the emotional expression of key points of the virtual digital human based on the voice emotional information and the image emotional information.
[0114] Specifically, if the acquired voice emotion information and image emotion information are happy emotion information, then the emotional expression methods for determining the key points of the virtual digital human may be, for example, smiling with the mouth, clapping with both hands, and the like.
[0115] In a specific implementation, a deep learning method is used to learn the mapping between virtual human key points and voice feature information, as well as the mapping between human face key points and voice emotion information and image emotion information.
[0116] The embodiment of the present disclosure provides a method for driving a virtual digital human, in which the method realizes the generation of expression-controllable voice-driven virtual digital human animation by integrating an emotional key point template.
[0117] FIG7 is a flow chart of another method for driving a virtual digital human provided by an embodiment of the present disclosure. The embodiment of the present disclosure is based on the embodiment corresponding to FIG6 . As shown in FIG7 , before step S401, the method further includes:
[0118] S301: Determine the image of the virtual digital human.
[0119] In a specific implementation, different features are extracted from the speech to drive head movements, facial activities, and body movements respectively, thereby forming a more vivid speech-driven method.
[0120] The virtual human's image is driven by deep neural networks, while generative adversarial networks are used for high-fidelity real-time generation. This generation is divided into motion-driven and image library production. The virtual human's hair, clothing, and dental models are created offline, allowing for tailored image creation based on specific application scenarios. The virtual human's motion-driven module is processed on the server, followed by the packaging and transmission of topological vertex data, and texture mapping and rendering output on the device.
[0121] As a specific implementation method, the virtual digital human is driven by user key points, using key point driving technology based on adversarial networks, feature point geometric stretching methods, and image transformation and generation technology based on encoder-decoder methods. At the same time, by integrating emotional key point templates, a correspondence between user key points and preset user emotional key points is established, enabling the virtual digital human to express emotions.
[0122] As another specific implementation method, 3D facial driving technology based on deep codec technology realizes semantic mapping of speech features and vertex three-dimensional motion features, and rhythmic head driving technology based on deep codec nested timing network has the ability to distinguish and control head movement and facial activities.
[0123] An embodiment of the present disclosure provides a computer device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the methods described in the embodiments of the present disclosure.
[0124] In addition, considering that the current efficiency of generating speaking styles for virtual digital humans is low, for example, the smart device shown in Figure 8 simultaneously displays the facial expressions and lip shapes of the virtual digital human when speaking while playing the voice response information. As shown in Figure 9, the user can both hear the voice of the virtual digital human and see the facial expressions of the virtual digital human when speaking, giving the user the experience of having a conversation with a human.
[0125] Typically, different people speak in different ways. For example, some people have precise lip shapes and expressive expressions, while others have smaller lips and a more serious expression. In other words, different people have different speaking styles. Thus, virtual digital humans with different speaking styles can be designed, i.e., virtual digital humans with different speaking styles have different lip shapes and expressions. Users can then engage in conversations with three-dimensional virtual humans with different speaking styles, thereby enhancing the user experience. Each time a new speaking style for a three-dimensional virtual human is designed, corresponding training samples must first be obtained. A speaking style model is then retrained based on the corresponding training samples. New speaking style parameters are then generated based on the retrained speaking style model, and the basic speaking style is driven by the speaking style parameters. As shown in Figure 10, a new speaking style can be generated. Since retraining a speaking style model requires a significant amount of time to collect training samples and process large amounts of data, generating a new speaking style takes a considerable amount of time, resulting in relatively low efficiency in generating speaking styles.
[0126] In order to solve the above problems, the present disclosure determines the fitting coefficient of each style feature attribute by fitting the target style feature attribute based on multiple style feature attributes; determines the target style feature vector according to the fitting coefficient of each style feature attribute and multiple style feature vectors, and the multiple style feature vectors correspond one-to-one to the multiple style feature attributes; inputs the target style feature vector into the speaking style model, and outputs the target speaking style parameters, and the speaking style model is obtained by training the speaking style model based on multiple style feature vectors; generates the target speaking style based on the target speaking style parameters, so that the target style feature vector can be fitted with multiple style feature vectors. Since the speaking model is obtained by training based on multiple style feature vectors, the target style feature vector fitted by multiple style feature vectors can be input into the speaking model to directly obtain the corresponding new speaking style, without the need to retrain the speaking style model, and can achieve rapid migration of speaking styles and improve the efficiency of speaking style generation.
[0127] Figure 11 is a schematic diagram of a human-computer interaction scenario according to some embodiments. As shown in Figure 11, in the voice interaction scenario between the user and the smart home, the smart devices may include a smart refrigerator 110, a smart washing machine 120, and a smart display device 130, etc. When the user wants to control the smart device, he needs to issue a voice command first. When the smart device receives the voice command, it needs to perform semantic understanding of the voice command, determine the semantic understanding result corresponding to the voice command, and execute the corresponding control command according to the semantic understanding result to meet the user's usage needs. The smart devices in this scenario all include a display screen. The display screen can be a touch screen or a non-touch screen. For terminal devices with a touch screen, the user can use gestures, fingers or touch tools (for example, a stylus) to achieve interactive operations with the terminal device. For terminal devices without a touch screen, interactive operations with the terminal device can be achieved through external devices (for example, a mouse or keyboard, etc.). The display screen can display a three-dimensional virtual person. The user can see the three-dimensional virtual person and his or her expression when speaking through the display screen, and achieve dialogue interaction with the three-dimensional virtual person.
[0128] The speaking style generation method provided in the embodiments of the present disclosure can be implemented based on a computer device, or a functional module or functional entity within the computer device. The computer device can be a personal computer (PC), a server, a mobile phone, a tablet computer, a laptop computer, a mainframe computer, etc., and the embodiments of the present disclosure do not specifically limit this.
[0129] In order to illustrate the speaking style generation method in more detail, the following will be explained in an exemplary manner in conjunction with Figure 12. It can be understood that the steps involved in Figure 12 may include more steps or fewer steps in actual implementation, and the order of these steps may also be different, so as to be able to implement the speaking style generation method provided in the embodiment of the present disclosure.
[0130] FIG12 is a flow chart of a method for generating a speaking style according to some embodiments. As shown in FIG12 , the method specifically includes the following steps:
[0131] S1301 : Fitting a target style feature attribute based on a plurality of style feature attributes to determine a fitting coefficient of each style feature attribute.
[0132] Exemplarily, a facial topology data sequence is collected when the user is speaking within a Δt time period. In the facial topology data sequence, each frame of facial topology data corresponds to a dynamic facial topology structure, and the facial topology structure includes multiple vertices. Each vertex in the dynamic facial topology structure corresponds to a vertex coordinate (x, y, z). When the user is not speaking, it corresponds to a preset static facial topology structure, and the vertex coordinates of each vertex in the static facial topology structure are (x', y', z'). In this way, based on the difference between the vertex coordinates of the same vertex in the dynamic facial topology structure and the vertex coordinates in the static facial topology structure, the vertex offset (Δx, Δy, Δz) of each vertex in each dynamic facial topology structure can be determined, that is, Δx = x-x', Δy = y-y', Δz = z-z'. Based on the vertex offset (Δx, Δy, Δz) of each vertex in all dynamic facial topologies corresponding to the facial topology data sequence, the average vertex offset of each vertex in the dynamic facial topology structure can be determined.
[0133] FIG13 is a schematic diagram of a facial topology data division area provided by an embodiment of the present disclosure. As shown in FIG13 , the facial topology data can be divided into multiple areas. For example, the facial topology data can be divided into three areas, namely S1, S2 and S3, where S1 is all facial areas above the lower edge of the eyes, S2 is the facial area from the lower edge of the eyes to the upper edge of the upper lip, and S3 is the facial area from the upper edge of the upper lip to the chin. Based on the above embodiment, the average vertex offset of all vertices of the dynamic face topology structure in area S1 can be determined. Average value The average vertex offset of all vertices of the dynamic face topology in region S2 Average value Average vertex offset of all vertices of the dynamic face topology structure in region S3 Average value The style feature attributes can be obtained, which is In summary, one style feature attribute can be obtained for one user, and thus, multiple style feature attributes can be obtained based on multiple users.
[0134] Based on the multiple acquired style feature attributes, a new style feature attribute can be fitted to form the target style feature attribute. For example, the target style feature attribute can be fitted based on the following formula:
[0135] in, is the target feature attribute, is the style feature attribute of user 1, is the style feature attribute of user 2, is the style feature attribute of user n, a1 is the fitting coefficient of the style feature attribute of user 1, a2 is the fitting coefficient of the style feature attribute of user 2, an is the fitting coefficient of the style feature attribute of user n, n is the number of users, a1+a2+…+an=1.
[0136] Based on the above formula, an optimization method, such as gradient descent method, Gauss-Newton method, etc., can be used to obtain the fitting coefficient of each style feature attribute.
[0137] It should be noted that this embodiment is merely illustrative of the division of facial topological structure data into three regions, and does not serve as a specific limitation on the regional division of facial topological structure data.
[0138] S1302: Determine a target style feature vector according to the fitting coefficients of the style feature attributes and the multiple style feature vectors.
[0139] The multiple style feature vectors correspond one-to-one to the multiple style feature attributes.
[0140] For example, a style feature vector represents the style. Based on a classification task model, the embeddings obtained by training the classification task model can be used as the style feature vector. Alternatively, a one-hot feature vector can be directly designed as the style feature vector. For example, if three users correspond to three style feature attributes as one-hot feature vectors, the three style feature vectors can be [1; 0; 0], [0; 1; 0], and [0; 0; 1].
[0141] Based on the above embodiment, the style feature attributes of n users with different speaking styles are obtained, and accordingly, the style feature vectors of n users can be obtained. These n style feature attributes correspond one-to-one to the n style feature vectors, and the n style feature attributes and their corresponding style feature vectors form a style basic feature base. Based on the multiplication of the fitting coefficients of each of the n style feature attributes and the corresponding style feature vector, the target style feature vector can be expressed in the form of a style basic feature base, as shown in the following formula:
[0142] p=a1×F1+a2×F2+…+an×Fn (2)
[0143] Among them, F1 is the style feature vector of user 1, F2 is the style feature vector of user 2, Fn is the style feature vector of user n, and p is the target style feature vector.
[0144] For example, if the style feature vector is a one-hot feature vector, the target style feature vector p can be expressed as:
[0145] S1303: Input the target style feature vector into a speaking style model, and output target speaking style parameters.
[0146] The speaking style model is obtained by training a speaking style model based on the multiple style feature vectors.
[0147] For example, a framework of a speaking style model is trained based on multiple style feature vectors in a basic style feature base, yielding a trained framework of the speaking style model, i.e., the speaking style model. Inputting a target style feature vector into the speaking style model can be understood as inputting the product of multiple style feature vectors and their respective fitting coefficients into the speaking style model. This is similar to the training samples input when training the framework of the speaking style model. Therefore, based on the speaking style model, using the target style feature vector as input, the target speaking style parameters can be directly output.
[0148] The target speaking style parameter can be the vertex offset between each vertex in the dynamic face topology structure and the corresponding vertex in the static face topology structure; or, it can be the coefficient of the expression base of the dynamic face topology structure, or it can be other parameters, and the present disclosure does not impose specific restrictions on this.
[0149] S1304: Generate a target speaking style based on the target speaking style parameters.
[0150] Exemplarily, the target speaking style parameter is the vertex offset between each vertex in the dynamic face topology structure and the corresponding vertex in the static face topology structure. In this way, based on the static face topology structure, based on the vertex offset of each vertex, each vertex of the static face topology structure is driven to move to the corresponding position, and the target speaking style can be obtained.
[0151] In an embodiment of the present disclosure, a fitting coefficient of each style feature attribute is determined by fitting a target style feature attribute based on multiple style feature attributes; a target style feature vector is determined based on the fitting coefficient of each style feature attribute and multiple style feature vectors, and the multiple style feature vectors correspond one-to-one to the multiple style feature attributes; the target style feature vector is input into a speaking style model, and a target speaking style parameter is output, and the speaking style model is obtained by training a speaking style model based on multiple style feature vectors; based on the target speaking style parameter, a target speaking style is generated, so that the target style feature vector can be fitted with multiple style feature vectors. Since the speaking model is obtained by training based on multiple style feature vectors, the target style feature vector fitted with multiple style feature vectors is input into the speaking model to directly obtain a corresponding new speaking style, without the need to retrain the speaking style model, thereby achieving rapid migration of speaking styles and improving the efficiency of speaking style generation.
[0152] FIG14 is a flow chart of a method for generating a speaking style according to some embodiments. FIG14 is based on the embodiment shown in FIG12 , and before executing S1301 , the method further includes:
[0153] S1501, collecting multi-frame facial topology data when multiple preset users read multiple voice segments.
[0154] For example, users with different speaking styles are selected as preset users, and multiple speech segments are also selected. When each preset user reads each speech segment, multiple frames of facial topology data for that preset user are collected. For example, if the duration of speech 1 is t1, and the frequency of facial topology data collection is 30 frames / second, then after the preset user 1 reads each speech segment 1, t1*30 frames of facial topology data can be collected.
[0155] S1502, for each preset user: according to the speaking style parameters of the multiple frames of facial topology structure data corresponding to the multiple segments of speech and the divided areas of the facial topology structure data, determine the average value of the speaking style parameters of the multiple frames of facial topology structure data in each divided area.
[0156] Exemplarily, based on the above embodiment, for the preset user 1, after the preset user 1 reads m segments of speech, t1*30*m frames of facial topology structure data can be collected. The vertex offsets (Δx, Δy, Δz) of each vertex of the dynamic facial topology structure and each vertex of the static facial topology structure in each frame of facial topology structure data can be used as speaking style parameters of each frame of facial topology structure data. Based on the vertex offsets (Δx, Δy, Δz) of each vertex of all dynamic facial topology structures corresponding to the t1*30*m frames of facial topology structure data of the preset user 1, the average vertex offset of each vertex of the dynamic facial topology structure in the facial topology structure data of the preset user 1 can be determined.
[0157] Based on the divided areas of the facial topology data, for each divided area of the preset user 1, the average vertex offset of all vertices of the dynamic face topology structure in the facial topology data within the divided area can be obtained. For example, the facial topology data is divided into three regions, wherein the average value of the average vertex offset of all vertices of the dynamic face topology structure in the facial topology data in region S1 is The average value of the average vertex offset of all vertices in the dynamic face topology data in region S2 is The average value of the average vertex offset of all vertices in the dynamic face topology data in region S3 is
[0158] S1503: Concatenate the average values of the speaking style parameters of the multiple frames of facial topology structure data in each divided area in a preset order to obtain style feature attributes of each preset user.
[0159] For example, the preset order can be in the order from top to bottom as shown in FIG13 , or it can be in the order from bottom to top as shown in FIG13 , and the present disclosure does not impose any specific restrictions on this. If the preset order is in the order from top to bottom as shown in FIG13 , based on the above embodiment, the average vertex offsets of all vertices of the dynamic face topology structure in the facial topology structure data corresponding to each region can be spliced in the order of regions S1, S2 and S3. In this way, the style feature attributes of the preset user 1 can be obtained, that is,
[0160] In summary, for the preset user 1, the style feature attributes can be obtained In this way, multiple style feature attributes can be obtained for multiple preset users.
[0161] FIG15 is a flowchart of a method for generating a speaking style according to some embodiments. FIG15 is based on the embodiment shown in FIG14 , and before executing S1301 , the method further includes:
[0162] S1601, collecting multi-frame target facial topology data when the target user reads the multiple voice segments.
[0163] The target user and the plurality of preset users are different users.
[0164] For example, when a target speaking style different from the speaking styles of multiple preset users is desired, multi-frame target facial topology data is collected when a target user corresponding to the target speaking style recites multiple speech segments, and the content of the target user's speech segments is the same as the content of the multiple preset speech segments. For example, if the target user recites m speech segments of duration t1, t1*30*m frames of target facial topology data can be obtained.
[0165] S1602, determining the average value of the speaking style parameters of the multiple frames of target facial topology structure data within each divided area based on the speaking style parameters of each frame of target facial topology structure data corresponding to the multiple segments of speech and the divided areas of the facial topology structure data.
[0166] The vertex offsets (Δx', Δy', Δz') of each vertex of the dynamic face topology structure and each vertex of the static face topology structure in each frame of the target facial topology structure data can be used as the speaking style parameters of the target facial topology structure data in each frame. Based on the vertex offsets (Δx', Δy', Δz') of each vertex of all dynamic face topologies in the target facial topology structure data of the target user in t1*30*m frames, the average vertex offset of each vertex of the dynamic face topology structure in the target facial topology structure data of the target user can be determined.
[0167] Based on the divided areas of the facial topology data, for each divided area of the target user, the average vertex offset of all vertices of the dynamic face topology structure in the target facial topology data within the divided area can be obtained. For example, the facial topology data is divided into three regions, wherein the average vertex offset of all vertices in the dynamic face topology structure in the target facial topology data in region S1 is The average value of the average vertex offsets of all vertices in the dynamic face topology data in the target facial topology data in region S2 is The average value of the average vertex offsets of all vertices in the dynamic face topology data in the target facial topology data in region S3 is
[0168] S1603: Concatenate the average values of the speaking style parameters of the multiple frames of target facial topology structure data within each divided area according to the preset order to obtain the target style feature attributes.
[0169] Exemplarily, based on the same preset order as in the above embodiment, the average value of the average vertex offsets of all vertices of the dynamic face topology structure in the target facial topology structure data is spliced. For example, based on the order from top to bottom as shown in FIG13 , the average value of the average vertex offsets of all vertices of the dynamic face topology structure in the target facial topology structure data corresponding to the respective regions can be spliced in the order of regions S1, S2, and S3, and the target style feature attribute of the target user can be obtained, that is,
[0170] It should be noted that S1501-S1503 as shown in FIG. 14 may be executed first, and then S1601-S1603 as shown in FIG. 15 may be executed; or, S1601-S1603 as shown in FIG. 15 may be executed first, and then S1501-S1503 as shown in FIG. 14 may be executed. This disclosure does not impose any specific restrictions on this.
[0171] FIG16 is a flowchart of a method for generating a speaking style according to some embodiments. FIG16 is based on the embodiments shown in FIG14 and FIG13 , and before executing S1303 , the method further includes:
[0172] S1701: Obtain a training sample set.
[0173] The training sample set includes an input sample set and an output sample set, the input sample includes speech features and the corresponding multiple style feature vectors, and the output sample includes the speaking style parameters.
[0174] When the preset user reads aloud the speech, the intrinsic features of the speech information can be extracted, mainly features that can express the content of the speech. For example, the speech Melp feature can be extracted as a speech feature, or a commonly used speech feature extraction model in the industry can be used to extract speech features, or speech features can be extracted based on a designed deep network model. Based on the efficiency of speech feature extraction, after the preset user reads aloud multiple speech segments, a speech feature sequence can be extracted. If the content of the multiple speech segments read aloud by multiple preset users is exactly the same, the same speech feature sequence can be extracted for different preset users. In this way, for the same speech feature in the speech feature sequence, there are multiple style feature vectors corresponding to multiple preset users. A speech feature and its corresponding multiple style feature vectors can be used as input samples. Based on all the speech features of the speech feature sequence, multiple input samples can be obtained, that is, an input sample set.
[0175] For example, while extracting each speech feature, corresponding facial topology data can be collected. Based on the vertex coordinates of all vertices in the dynamic facial topology structure in the facial topology data, the vertex offsets of all vertices in the dynamic facial topology structure in the facial topology data can be obtained. The vertex offsets of all vertices in the dynamic facial topology structure in the facial topology data are used as a set of speaking style parameters, and a set of speaking style parameters is an output sample. In this way, based on multiple frames of facial topology data corresponding to the speech feature sequence, multiple output samples, namely, an output sample set, can be obtained. The input sample set and the output sample set constitute the training sample set for training the speaking style generation model.
[0176] S1702: Define a framework of the speaking style model.
[0177] The framework of the speaking style model includes a linear combination unit and a network model. The linear combination unit is used to generate a linear combination style feature vector of the multiple style feature vectors, and generate a linear combination output sample of the multiple output samples, and the input samples correspond one-to-one to the output samples; the network model is used to generate corresponding predicted output samples based on the linear combination style feature vector.
[0178] Figure 17 is a structural diagram of the framework of the speaking style model according to some embodiments. As shown in Figure 17, the framework of the speaking style model includes a linear combination unit 310 and a network model 320. The input end of the linear combination unit 310 is used to receive training samples, and the output end of the linear combination unit 310 is connected to the input end of the network model 320. The output end of the network model 320 is the output end of the framework 300 of the speaking style model.
[0179] After the training samples are input into the linear combination unit 310, the training samples include input samples and output samples, wherein the input samples include speech features and their corresponding multiple style feature vectors. The linear combination unit 310 can linearly combine the multiple style feature vectors to obtain a linear combination style feature vector, and can also linearly combine the speaking style parameters corresponding to the multiple style feature vectors to obtain a linear combination output sample. The linear combination unit 310 can output the speech features and their corresponding linear combination style feature vectors, i.e., the linear combination input samples, and can also output the corresponding linear combination output samples. The linear combination training samples are input into the network model 320. The linear combination training samples include the linear combination input samples and the linear combination output samples. The network model 320 is trained based on the linear combination training samples.
[0180] S1703: Train the framework of the speaking style model according to the training sample set and the loss function to obtain the speaking style model.
[0181] Based on the above embodiment, training samples from a training sample set are input into the framework of a speaking style model. The framework of the speaking style model can output predicted output samples. A loss function is used to determine a loss value between the predicted output samples and the output samples. Based on the direction of decreasing loss value, the model parameters of the framework of the speaking style model are adjusted, thereby completing one iteration of training. In this way, by training the framework of the speaking style model multiple times, a trained framework of the speaking style model, i.e., a speaking style model, can be obtained.
[0182] In this embodiment, a training sample set is obtained, the training sample set includes an input sample set and an output sample set, the input sample includes speech features and their corresponding multiple style feature vectors, and the output sample includes a speaking style parameter; the framework of the speaking style model is defined, the framework of the speaking style model includes a linear combination unit and a network model, the linear combination unit is used to generate a linear combination style feature vector of multiple style feature vectors, and generate a linear combination output sample of multiple output samples, and the input sample and the output sample correspond one to one; the network model is used to generate corresponding predicted output samples based on the linear combination style feature vector; according to the training sample set and the loss function, the framework of the speaking style model is trained to obtain a speaking style model. In this way, the speaking style model is essentially obtained by training the network model based on the linear combination style feature vector of multiple style feature vectors, which can improve the diversity of the training samples of the network model and improve the versatility of the speaking style model.
[0183] FIG18 is a flowchart of a method for generating a speaking style according to some embodiments. FIG18 is a specific description of an implementation method when S1703 is executed based on the embodiment shown in FIG16 , as follows:
[0184] S501, input the training sample set into the linear combination unit, generate the linear combination style feature vector based on the multiple style feature vectors and their respective weight values, and generate the linear combination output sample based on the respective weight values of the multiple style feature vectors and the multiple output samples.
[0185] The sum of the weight values of the multiple style feature vectors is 1.
[0186] Exemplarily, after the training sample is input into the linear combination unit, based on the linear combination unit, multiple style feature vectors can be assigned weight values respectively, and the sum of the weight values of the multiple style feature vectors is 1. The product of each style feature vector and the corresponding weight value in the multiple style feature vectors is added to obtain a linear combination style feature vector. Each style feature vector corresponds to an output sample, and the product of the weight value of each style feature vector and the corresponding output sample is added to obtain a linear combination output sample. In this way, based on different weight values, different linear combination style feature vectors and different linear combination output samples can be obtained. Based on multiple speech features and their corresponding linear combination style feature vectors, a linear combination input sample set can be obtained. Based on the output samples corresponding to each of the multiple speech features, a linear combination output sample set can be obtained.
[0187] S502: Train the network model according to the loss function and the linear combination training sample set to obtain the speaking style model.
[0188] The linear combination training sample set includes a linear combination input sample set and a linear combination output sample set, and the linear combination input sample includes the speech feature and its corresponding linear combination style feature vector.
[0189] Exemplarily, the linear combination training sample set includes a linear combination input sample set and a linear combination output sample set. The linear combination training samples are input into the network model. Based on the network model and the linear combination input samples, predicted output samples are obtained. Based on the direction of decreasing loss value of the loss function, the model parameters of the network model are adjusted, thereby completing one iteration of network model training. In this manner, based on multiple iterations of network model training, a trained speaking style model framework, i.e., a speaking style model, can be obtained.
[0190] In this embodiment, a training sample set is input into a linear combination unit, a linear combination style feature vector is generated based on multiple style feature vectors and their respective weight values, and a linear combination output sample is generated based on the respective weight values of the multiple style feature vectors and multiple output samples, and the sum of the respective weight values of the multiple style feature vectors is 1; according to the loss function and the linear combination training sample set, a network model is trained to obtain a speaking style model, the linear combination training sample set includes a linear combination input sample set and a linear combination output sample set, the linear combination input sample includes speech features and their corresponding linear combination style feature vectors, and the training samples after linear combination can be used as training samples of the network model, which can improve the number and diversity of the network model training samples and can improve the versatility and accuracy of the speaking style model.
[0191] In some embodiments of the present disclosure, FIG19 is a schematic structural diagram of the framework of another speaking style generation model provided by an embodiment of the present disclosure. As shown in FIG19 , based on the embodiment shown in FIG17 , the framework of the speaking style model further includes a scaling unit 330. The input end of the scaling unit 330 is used to receive training samples, and the output end of the scaling unit 330 is connected to the input end of the linear combination unit 310. The scaling unit 330 is used to scale multiple style feature vectors and multiple output samples based on a randomly generated scaling factor to obtain multiple scaled style feature vectors and multiple scaled output samples, and output scaled training samples. The scaled training samples include multiple scaled style feature vectors and their corresponding scaled training samples. The scaling factor can be 0.5-2, and the scaling factor is accurate to one decimal place.
[0192] The scaled training samples are input to the linear combination unit 310. Based on the linear combination unit 310, multiple scaled style feature vectors can be linearly combined to obtain a linear combination style feature vector. The scaled output samples corresponding to each of the multiple scaled style feature vectors can also be linearly combined to obtain a linear combination output sample. The linear combination unit 310 can output the speech features and their corresponding linear combination style feature vectors, that is, the linear combination input samples, and can also output the corresponding linear combination output samples. The linear combination training samples are input to the network model 320. The linear combination training samples include linear combination input samples and linear combination output samples. The network model 320 is trained based on the linear combination training samples.
[0193] FIG20 is a flowchart of a method for generating a speaking style according to some embodiments. FIG20 is a detailed description of another possible implementation method when performing S1703 based on the embodiment shown in FIG16 , as follows:
[0194] S5011 , inputting the training sample set into the scaling unit, generating a plurality of scaled style feature vectors based on a scaling factor and the plurality of style feature vectors, and generating a plurality of scaled output samples based on the scaling factor and the plurality of output samples.
[0195] For example, after the training samples are input to the scaling unit, the scaling unit can perform scaling processing on multiple style feature vectors using random scaling factors, thereby obtaining multiple scaled style feature vectors. Each style feature vector corresponds to an output sample, and the corresponding output samples are scaled based on the scaling factors of the multiple style feature vectors to obtain multiple scaled output samples. In this way, based on multiple speech features and their corresponding multiple scaled style feature vectors, a scaled input sample set can be obtained, and based on the scaled output samples corresponding to the multiple speech features, a scaled output sample set can be obtained.
[0196] S5012: Input the multiple scaled style feature vectors and the multiple scaled output samples into the linear combination unit, generate the linear combination style feature vector based on the multiple scaled style feature vectors and their respective weight values, and generate the linear combination output sample based on the respective weight values of the multiple scaled style feature vectors and the multiple scaled output samples.
[0197] The sum of the weight values of the multiple scaled style feature vectors is 1.
[0198] Exemplarily, the scaled training sample set includes a scaled input sample set and a scaled output sample set. The scaled training sample set is input into a linear combination unit. Based on the linear combination unit, weight values can be assigned to multiple scaled style feature vectors respectively, and the sum of the weight values of the multiple scaled style feature vectors is 1. The product of each scaled style feature vector and the corresponding weight value in the multiple scaled style feature vectors is added to obtain a linear combination style feature vector. Each scaled style feature vector corresponds to a scaled output sample. The product of the weight value of each scaled style feature vector and the corresponding scaled output sample is added to obtain a linear combination output sample. In this way, based on different weight values, different linear combination style feature vectors and different linear combination output samples can be obtained. Based on multiple speech features and their corresponding linear combination style feature vectors, a linear combination input sample set can be obtained. Based on the scaled output samples corresponding to each of the multiple speech features, a linear combination output sample set can be obtained.
[0199] S502: Train the network model according to the loss function and the linear combination training sample set to obtain the speaking style model.
[0200] The linear combination training sample set includes a linear combination input sample set and a linear combination output sample set, and the linear combination input sample includes the speech feature and its corresponding linear combination style feature vector.
[0201] Exemplarily, the linear combination training sample set includes a linear combination input sample set and a linear combination output sample set. The linear combination training samples are input into the network model. Based on the network model and the linear combination input samples, predicted output samples are obtained. Based on the direction of decreasing loss value of the loss function, the model parameters of the network model are adjusted, thereby completing one iteration of network model training. In this manner, based on multiple iterations of network model training, a trained speaking style model framework, i.e., a speaking style model, can be obtained.
[0202] In this embodiment, the framework of the speaking style model also includes a scaling unit; the training sample set is input into the scaling unit, and multiple scaled style feature vectors are generated based on the scaling factor and multiple style feature vectors, and multiple scaled output samples are generated based on the scaling factor and multiple output samples; the multiple scaled style feature vectors and multiple scaled output samples are input into the linear combination unit, and a linear combination style feature vector is generated based on the multiple scaled style feature vectors and their respective weight values, and a linear combination output sample is generated based on the respective weight values of the multiple scaled style feature vectors and multiple scaled output samples, and the sum of the weight values of the multiple scaled style feature vectors is 1; according to the loss function and the linear combination training sample set, the network model is trained to obtain the speaking style model, the linear combination training sample set includes a linear combination input sample set and a linear combination output sample set, and the linear combination input sample includes speech features and their corresponding linear combination style feature vectors. In this way, using the scaled multiple style feature vectors as training samples of the network model can increase the number and diversity of the network model training samples, thereby improving the versatility and accuracy of the speaking style model.
[0203] In some embodiments of the present disclosure, FIG21 is a structural diagram of the framework of the speaking style generation model according to some embodiments, and FIG22 is a structural diagram of the framework of the speaking style generation model according to some embodiments. FIG21 is based on the embodiment shown in FIG17, and FIG22 is based on the embodiment shown in FIG19. The network model 320 includes a primary network model 321, a secondary network model 322, and an overlay unit 323. The output end of the primary network model 321 and the output end of the secondary network model 322 are both connected to the input end of the overlay unit 323, and the output end of the overlay unit 323 is used to output the predicted output sample. The loss function includes a first loss function and a second loss function.
[0204] The linear combination training samples are respectively input to the primary network model 321 and the secondary network model 322. The primary prediction output samples can be output based on the primary network model 321, and the secondary prediction output samples can be output based on the secondary network model 322. The primary prediction output samples and the secondary prediction output samples are input to the superposition unit 323. The primary prediction output samples and the secondary prediction output samples are superimposed on the primary prediction output samples based on the superposition unit 323 to obtain the prediction output samples. The primary network model 321 may include a convolutional network and a fully connected network, which is used to extract the single-frame correspondence between speech and facial topology data. The secondary network model 322 can be a sequence-to-sequence seq2seq network model, for example, a long short-term memory (LSTM) network model, a gated recurrent unit (GRU) network model, or a Transformer network model, which is used to enhance the continuity of speech features and facial expressions and the delicacy of speaking style.
[0205] Exemplarily, the loss function L=b1*L1+b2*L2, where L1 is the first loss function, used to determine the loss value of the first-level prediction output sample and the linear combination output sample, L2 is the second loss function, used to determine the loss value of the second-level prediction output sample and the linear combination output sample, b1 is the weight of the first loss function, b2 is the weight of the second loss function, and b1 and b2 are adjustable. By setting b2 to be close to 0, the first-level network model 321 can be trained, and by setting b1 to be close to 0, the second-level network model 322 can be trained. In this way, the first-level network model and the second-level network model can be trained separately in stages, which can improve the convergence speed of the network model training, save the training time of the network model, and thus improve the efficiency of generating the speaking style.
[0206] FIG23 is a flowchart of a method for generating a speaking style according to some embodiments. FIG23 is a specific description of an implementation method when S502 is executed based on the embodiment shown in FIG18 or FIG20 , as follows:
[0207] S5021: Train the primary network model according to the linear combination training sample set and the first loss function to obtain an intermediate speaking style model.
[0208] The intermediate speaking style model includes the secondary network model and the trained primary network model.
[0209] Exemplarily, based on the above embodiment, in the first stage, the weight b2 of the second loss function is set to approach 0. The loss function of the current network model can be understood as the first loss function. The linear combination training samples are input into the primary network model and the secondary network model, respectively. Based on the predicted output samples output by the superposition unit, the first loss function, and the corresponding linear combination output samples, a first loss value can be obtained. The model parameters of the primary network model are adjusted based on the direction in which the first loss value decreases until the first loss value converges, thereby obtaining a trained primary network model. The framework of the speaking style model trained in the first stage is the intermediate speaking style model.
[0210] S5022: Fix the model parameters of the trained primary network model.
[0211] For example, after the first-level network model is trained, the second stage is entered, and the model parameters of the trained first-level network model need to be fixed first.
[0212] S5023: Train the secondary network model in the intermediate speaking style model according to the linear combination training sample set and the second loss function to obtain the speaking style model.
[0213] The speaking style model includes the trained primary network and the trained secondary network.
[0214] Next, the weight b1 of the first loss function is set to approach 0. The loss function of the current network model can be understood as the second loss function. The linear combination training samples are input into the secondary network model and the trained primary network model. Based on the predicted output samples output by the superimposed unit, the second loss function, and the corresponding linear combination output samples, a second loss value can be obtained. The model parameters of the secondary network model are adjusted based on the direction in which the second loss value decreases until the second loss value converges, resulting in a trained secondary network model. The framework of the speaking style model trained in the first stage is the speaking style model.
[0215] In this embodiment, the network model includes a first-level network model, a second-level network model and a superposition unit, the output end of the first-level network model and the output end of the second-level network model are both connected to the input end of the superposition unit, and the output end of the superposition unit is used to output the predicted output sample; the loss function includes a first loss function and a second loss function; according to the linear combination training sample set and the first loss function, the first-level network model is trained to obtain an intermediate speaking style model, and the intermediate speaking style model includes the second-level network model and the trained first-level network model; the model parameters of the trained first-level network model are fixed; according to the linear combination training sample set and the second loss function, the second-level network model in the intermediate speaking style model is trained to obtain a speaking style model, and the speaking style model includes the trained first-level network and the trained second-level network. In this way, the network model can be trained in stages, which can improve the convergence speed of the network model, that is, shorten the training time of the network model, thereby improving the efficiency of speaking style generation.
[0216] Figure 24 is a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure. As shown in Figure 24, the computer device includes a processor 910 and a memory 920. The number of processors 910 in the computer device can be one or more, and Figure 24 uses a single processor 910 as an example. The processor 910 and memory 920 in the computer device can be connected via a bus or other means, and Figure 24 uses a bus connection as an example.
[0217] Memory 920, as a computer-readable non-volatile storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the semantic understanding model training method in the embodiments of the present disclosure; or the program instructions / modules corresponding to the semantic understanding method in the embodiments of the present disclosure. The processor 910 executes the software programs, instructions, and modules stored in memory 920 to execute various functional applications and data processing of the computer device, that is, to implement the semantic understanding model training method or short video recall method provided in the embodiments of the present disclosure.
[0218] The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the terminal, etc. In addition, the memory 920 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 920 may further include a memory remotely located relative to the processor 910, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
Claims
1. A method for driving a virtual digital human, comprising: Acquiring user information, wherein the user information includes voice information and image information; determining user intention and user emotion based on the user information; Determining a reply text of the virtual digital person according to the user intention, and determining a reply emotion of the virtual digital person according to the user intention and the user emotion; The body movements of the virtual digital human are determined according to the reply text, and the emotional expression of the virtual digital human is determined according to the reply emotion.
2. The method according to claim 1, wherein determining the user intention and the user emotion based on the user information comprises: Processing the voice information to determine text information and voice emotion information corresponding to the voice information; Processing the image information to determine scene information and image emotion information corresponding to the image information; Determining the user intention based on the text information and the scenario information; The user emotion is determined based on the text information, the voice emotion information and the image emotion information.
3. The method according to claim 2, wherein the processing of the voice information to determine the text information and voice emotion information corresponding to the voice information comprises: Performing text transcription processing on the voice information to determine text information corresponding to the voice information; Perform voiceprint feature extraction on the voice information to determine voice emotion information corresponding to the voice information.
4. The method according to claim 3, before performing text transcription on the voice information and determining the text information corresponding to the voice information, further comprising: Extracting a speech feature vector of the speech information; Adding the speech feature vector to a convolutional layer of a speech recognition model, wherein the speech recognition model includes an acoustic model and a language model, the acoustic model includes a convolutional neural network model with an attention mechanism, and the language model includes a deep neural network model; The performing text transcription processing on the voice information to determine text information corresponding to the voice information includes: The speech information is transcribed into text based on the speech recognition model to determine text information corresponding to the speech information.
5. The method according to claim 2, wherein processing the image information to determine the scene information and image emotion information corresponding to the image information comprises: Determining scene key point information and user key point information included in the image information; Determining scene information corresponding to the image information based on the scene key point information; The image emotion information is determined based on the correspondence between the user key point information and the preset user emotion key points.
6. The method according to claim 2, wherein determining the body movements of the virtual digital human based on the reply text, and determining the emotional expression of the virtual digital human based on the reply text and the reply emotion, comprises: Obtaining an action identifier included in the reply text; According to the action identifier, selecting the body action of the virtual digital human from a preset action database corresponding to the scene information; Determine the emotional expression of key points of the virtual digital human according to the voice emotional information and the image emotional information.
7. The method according to claim 6, before determining the body movements of the virtual digital human based on the reply text and determining the emotional expression of the virtual digital human based on the reply emotion, further comprising: Determine the image of the virtual digital human.
8. The method according to any one of claims 1 to 7, further comprising: Fitting a target style feature attribute based on a plurality of style feature attributes, and determining a fitting coefficient for each style feature attribute; wherein the style feature attribute is determined based on a facial image of a user when reading a voice; determining a target style feature vector based on the fitting coefficients of the style feature attributes and a plurality of style feature vectors, wherein the plurality of style feature vectors correspond one-to-one to the plurality of style feature attributes; Inputting the target style feature vector into a speaking style model and outputting target speaking style parameters, wherein the speaking style model is obtained by training a speaking style model based on the plurality of style feature vectors; Based on the target speaking style parameters, a target speaking style for the virtual digital human is generated.
9. The method according to claim 8, further comprising: fitting a target style feature attribute based on a plurality of style feature attributes and determining a fitting coefficient for each style feature attribute; Collect multi-frame facial topology data when multiple preset users read multiple voice segments; For each preset user: determining an average value of the speaking style parameters of the multiple frames of facial topology structure data within each divided area based on the speaking style parameters of the multiple frames of facial topology structure data corresponding to the multiple voice segments and the divided areas of the facial topology structure data; The average values of the speaking style parameters of the multiple frames of facial topology structure data in each divided area are spliced in a preset order to obtain the style feature attributes of each preset user.
10. The method according to claim 9, further comprising: Collecting multiple frames of target facial topology data when a target user reads the multiple voice segments, where the target user is a different user from the multiple preset users; Determining an average value of the speaking style parameters of the multiple frames of target facial topology structure data within each divided area based on the speaking style parameters of each frame of the target facial topology structure data corresponding to the multiple segments of speech and the divided areas of the facial topology structure data; The average values of the speaking style parameters of the multiple frames of target facial topology structure data within the divided areas are concatenated according to the preset order to obtain the target style feature attributes.
11. The method according to claim 9, before inputting the target style feature vector into the speaking style model and outputting the target speaking style parameters, further comprising: Acquire a training sample set, the training sample set including an input sample set and an output sample set, the input sample including speech features and the corresponding multiple style feature vectors, and the output sample including the speaking style parameters; The framework of the speaking style model is defined, and the framework of the speaking style model includes a linear combination unit and a network model. The linear combination unit is used to generate a linear combination style feature vector of the multiple style feature vectors, and generate a linear combination output sample of the multiple output samples, and the input samples correspond to the output samples in a one-to-one manner; the network model is used to generate a corresponding predicted output sample according to the linear combination style feature vector; The framework of the speaking style model is trained according to the training sample set and the loss function to obtain the speaking style model.
12. The method according to claim 11, wherein training the framework of the speaking style model based on the training sample set and the loss function to obtain the speaking style model comprises: Inputting the training sample set into the linear combination unit, generating the linear combination style feature vector based on the multiple style feature vectors and their respective weight values, generating the linear combination output sample based on the respective weight values of the multiple style feature vectors and the multiple output samples, wherein the sum of the respective weight values of the multiple style feature vectors is 1; The network model is trained according to the loss function and the linear combination training sample set to obtain the speaking style model, wherein the linear combination training sample set includes a linear combination input sample set and a linear combination output sample set, and the linear combination input sample includes the speech feature and its corresponding linear combination style feature vector.
13. The method according to claim 11, wherein the framework of the speaking style model further comprises a scaling unit; The step of training the framework of the speaking style model according to the training sample set and the loss function to obtain the speaking style model includes: Inputting the training sample set into the scaling unit, generating a plurality of scaled style feature vectors based on a scaling factor and the plurality of style feature vectors, and generating a plurality of scaled output samples based on the scaling factor and the plurality of output samples; inputting the plurality of scaled style feature vectors and the plurality of scaled output samples into the linear combination unit, generating the linear combination style feature vector based on the plurality of scaled style feature vectors and their respective weight values, and generating the linear combination output sample based on the respective weight values of the plurality of scaled style feature vectors and the plurality of scaled output samples, wherein the sum of the respective weight values of the plurality of scaled style feature vectors is 1; The network model is trained according to the loss function and the linear combination training sample set to obtain the speaking style model, wherein the linear combination training sample set includes a linear combination input sample set and a linear combination output sample set, and the linear combination input sample includes the speech feature and its corresponding linear combination style feature vector.
14. The method according to claim 12 or 13, wherein the network model comprises a primary network model, a secondary network model, and a superposition unit, wherein the output end of the primary network model and the output end of the secondary network model are both connected to the input end of the superposition unit, and the output end of the superposition unit is used to output the predicted output sample; the loss function comprises a first loss function and a second loss function; The step of training the network model according to the loss function and the linear combination training sample set to obtain the speaking style model includes: Training the primary network model according to the linear combination training sample set and the first loss function to obtain an intermediate speaking style model, wherein the intermediate speaking style model includes the secondary network model and the trained primary network model; Fixing the model parameters of the trained primary network model; The secondary network model in the intermediate speaking style model is trained according to the linear combination training sample set and the second loss function to obtain the speaking style model, wherein the speaking style model includes the trained primary network and the trained secondary network.
15. A computer device comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 14.
16. A computer-readable non-volatile storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
Citation Information
Cited By
Hotel intelligent voice dialogue method based on multi-modal interaction
CN120544573A
