Voice interaction method and device, electronic equipment and storage medium
By identifying attribute parameters such as user emotional state when the voice assistant is awakened and determining the output content, the problem of inaccurate output of voice assistants in the prior art is solved, and the interactive experience is improved.
Patent Information
- Application Number
- CN202310538692.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-12
AI Technical Summary
Voice assistants in existing electronic devices lack consideration of user attributes when outputting content, resulting in inaccurate and inhumane content output, affecting user interaction experience.
By obtaining the input target voice when the voice assistant is awakened, user attribute parameters are identified, including parameters used to characterize the user's emotional state, and then more accurate and humanized content is determined and output.
It improves the accuracy and user-friendliness of the output content of the voice assistant, and improves the interactive experience between users and voice assistants.
Smart Images

Figure CN118942453A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and more specifically, to a voice interaction method, device, electronic device and storage medium. Background Art
[0002] With the rapid advancement of technology and living standards, electronic devices (such as smartphones, tablets, etc.) have become one of the commonly used electronic products in people's lives. Most of the current electronic devices are equipped with voice assistants to assist users in using the electronic devices. Users can interact with the voice assistants in daily life, but in actual use, the content output by the voice assistants is prone to inaccuracy. Summary of the invention
[0003] The present application proposes a voice interaction method, device, electronic device and storage medium, which can improve the accuracy of the content output by the voice assistant and enhance the user's interactive experience with the voice assistant.
[0004] In a first aspect, an embodiment of the present application provides a voice interaction method, the method comprising: when a voice assistant is awakened, obtaining an input target voice; based on the target voice, identifying user attribute parameters, the user attribute parameters including at least a first parameter for characterizing the user's emotional state; based on the user attribute parameters, determining the target content to be output by the voice assistant, and outputting the target content.
[0005] In a second aspect, an embodiment of the present application provides a voice interaction device, comprising: a voice acquisition module, a parameter recognition module and a content output module, wherein the voice acquisition module is used to acquire an input target voice when a voice assistant is awakened; the parameter recognition module is used to identify user attribute parameters based on the target voice, and the user attribute parameters include at least a first parameter for characterizing the user's emotional state; the content output module is used to determine the target content to be output by the voice assistant based on the user attribute parameters, and output the target content.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the voice interaction method provided in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the voice interaction method provided in the first aspect above.
[0008] The solution provided by the present application obtains the input target voice when the voice assistant is awakened; based on the target voice, the user attribute parameters are identified, and the user attribute parameters at least include a first parameter for characterizing the user's emotional state; based on the user attribute parameters, the target content to be output by the voice assistant is determined, and the target content is output. Thus, by determining the content to be output by the voice assistant based on the user attribute parameters detected when the voice assistant is awakened, which at least include the first parameter for characterizing the user's emotional state, the content output by the voice assistant is made more accurate and humane, and the voice interaction is made more intelligent, thereby improving the user's interactive experience when using the voice assistant. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A flow chart of a voice interaction method according to an embodiment of the present application is shown.
[0011] Figure 2 A flow chart of a voice interaction method according to another embodiment of the present application is shown.
[0012] Figure 3 A flow chart of a voice interaction method according to yet another embodiment of the present application is shown.
[0013] Figure 4 A block diagram of a voice interaction device according to an embodiment of the present application is shown.
[0014] Figure 5 It is a block diagram of an electronic device according to an embodiment of the present application for executing the voice interaction method according to an embodiment of the present application.
[0015] Figure 6 It is a storage unit of an embodiment of the present application for storing or carrying program codes for implementing the voice interaction method according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0017] Voice assistants are now widely used in various smart devices, and the usage rate and acceptance of users are also increasing. When a voice assistant is installed in an electronic device, the user can first operate the electronic device to call out the voice assistant, and then call out the voice assistant, and trigger the voice assistant through voice input to control the electronic device. For example, after the voice assistant is called out, the user inputs "start music software" through voice, then the voice assistant can control the electronic device to start the installed music software.
[0018] Taking the voice assistant installed in a smartphone as an example, the voice assistant can conduct voice chat, text chat, content query, content recommendation and other application scenarios with the user. In the relevant technology, when the electronic device outputs content (such as outputting chat reply content, recommended content, etc.), it is usually assumed that the user using the voice assistant does not change, and the user's emotional state does not change, and the output content is determined by a fixed strategy. Therefore, during voice interaction, the voice assistant's question and answer content, chat content, recommended content and other materials will lack consideration of user attributes, and the accuracy of the content output during the interaction will be insufficient, and it will also appear to be relatively inhumane.
[0019] In response to the above problems, the inventors have proposed the voice interaction method, device, electronic device and storage medium provided in the embodiments of the present application, which can make the content output by the voice assistant more accurate and humanized, and the voice interaction more intelligent, thereby improving the user's interactive experience when using the voice assistant. Among them, the specific voice interaction method is described in detail in the subsequent embodiments.
[0020] The voice interaction method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0021] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a voice wake-up method provided by an embodiment of the present application. In a specific embodiment, the voice wake-up method is applied to Figure 4 The voice awakening device 600 and the electronic device 100 ( Figure 5 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, an e-book, etc., which is not limited here. Figure 1 The process shown is described in detail, and the voice wake-up method may specifically include the following steps:
[0022] Step S110: When the voice assistant is awakened, the input target voice is obtained.
[0023] In an embodiment of the present application, an application corresponding to the voice assistant is installed in the electronic device. When the electronic device is awakened, it can detect the input voice, and when the input voice is detected, it uses the input voice as the target voice to perform the voice interaction required by the user.
[0024] In some embodiments, the voice assistant in the electronic device can be awakened by voice awakening, triggering controls, triggering physical buttons, etc. Among them, the voice awakening method refers to the electronic device controlling the voice assistant to be awakened according to the voice input by the user; the triggering control method refers to the electronic device controlling the voice assistant to be awakened according to the user's operation on the displayed target control (such as a floating ball, etc.); the triggering physical button method refers to the electronic device controlling the voice assistant to be awakened according to the user's operation on the displayed target physical button (such as the Home button, etc.).
[0025] In one possible implementation, the electronic device can collect audio signals in the environment through an audio collection device (such as a microphone, etc.) to obtain voice when the voice assistant is turned on; then, the electronic device can match the obtained voice with the set wake-up voice to obtain a wake-up score, and the wake-up score is used to characterize the probability that the obtained voice is the wake-up voice; after obtaining the wake-up score, the wake-up score can be compared with the wake-up threshold. When the wake-up score is greater than the wake-up threshold, the voice assistant can be woken up, and when the wake-up score is not greater than the wake-up threshold, the voice assistant may not be woken up. The specific value of the above wake-up threshold is not limited, and the wake-up threshold corresponds to the quantitative standard of the wake-up score. For example, if the wake-up score ranges from 0 to 1, the wake-up threshold can be 0.9.
[0026] The voice assistant can be set to an on state or an off state. When the voice assistant is on, the user can wake up the voice assistant and use the voice assistant; when the voice assistant is off, the voice assistant cannot be woken up and used. Optionally, the electronic device can display a setting interface for the voice assistant, which includes a switch control for controlling the voice assistant to be on or off. The electronic device can control the voice assistant to be on or off according to the detected operation on the switch control.
[0027] Optionally, considering that the audio signal collected by the electronic device in its environment may not be the sound made by the user, the electronic device performs voice activity detection (VAD) on the collected audio when collecting the audio signal, and determines whether it is the voice input by the user or other sounds in the environment based on the detection result; if it is determined to be the voice input by the user, the collected audio signal can be used as the voice obtained above, and subsequent steps can be performed to determine whether to wake up the voice assistant.
[0028] In some embodiments, when the voice assistant is awakened, the electronic device may not be limited to the specific scenario in which the input target voice is obtained. For example, the voice assistant may be in a voice chat scenario, a text chat scenario, a voice control scenario, a voice query scenario, etc. When the electronic device obtains the above target voice, it may collect audio signals in the environment through an audio collection device (such as a microphone, etc.) to obtain the voice, and use the obtained input voice as the target voice.
[0029] Step S120: Based on the target speech, user attribute parameters are recognized, and the user attribute parameters at least include a first parameter for characterizing the user's emotional state.
[0030] In the embodiment of the present application, after the electronic device obtains the input target voice, considering the accuracy of the subsequent output content of the voice assistant, the electronic device can identify the user attribute parameters based on the target voice. Among them, the user attribute parameters can be parameters that characterize the user's personal attributes, such as the user's gender, age, emotional state, etc., and the user attribute parameters at least include a first parameter for characterizing the user's emotional state.
[0031] In some embodiments, the above user attribute parameters may be attribute labels of different types of personal attributes. An electronic device may store a recognition model for identifying user attribute parameters. The recognition model may be a neural network, a decision tree, or other models, and the specific model type may not be limited. The above attribute labels are used to characterize different types of personal attributes. When determining the user attribute parameters based on the acquired target voice, the voice features corresponding to the target voice may be acquired, and then the voice features may be input into the recognition model to obtain the attribute labels output by the recognition model, and the attribute labels are used to characterize different types of personal attributes. Exemplarily, the recognition model includes a recognition sub-model for parameters of the user's emotional state. The recognition sub-model may output a corresponding emotion label based on the speech features of the target voice. The emotion label is used to characterize different user emotional states. The emotion label may be used as the first parameter for characterizing the user's emotional state.
[0032] When training the above recognition model, the speech features of the sample speech can be input into the initial recognition model to obtain the recognition result output by the initial recognition model; then, the loss value corresponding to the initial recognition model is determined based on the recognition result and the attribute label annotated by the sample speech; after obtaining the above loss value, the initial recognition model can be iteratively updated according to the loss value until the initial recognition model meets the training termination condition, thereby obtaining the above recognition model. It is worth noting that the training of the recognition model can be performed in advance based on the obtained sample speech, and then each time the user attribute parameters corresponding to the target speech need to be obtained, the trained recognition model can be used for the training, without the need to train the recognition model each time the user attribute parameters corresponding to the target speech are obtained.
[0033] Step S130: Based on the user attribute parameters, determine the target content to be output by the voice assistant, and output the target content.
[0034] In the embodiment of the present application, after obtaining the user attribute parameters, the target content to be output by the voice assistant can be determined based on the user attribute parameters, and the target content can be output. Among them, the electronic device can output the target content by voice output or by displaying the target content on the screen, and the specific output method may not be limited.
[0035] In some embodiments, when the voice assistant in the electronic device is in a dialogue scene, such as a voice chat scene or a text chat scene, the electronic device can determine the dialogue content to be output by the voice assistant based on the determined user attribute parameters and the above target voice, and output the determined dialogue content. Optionally, a dialogue model can be stored in the electronic device, and the electronic device can generate dialogue content that matches the user attribute parameters and the target voice based on the user attribute parameters and the target voice, and output the dialogue content as the target content to be output by the voice assistant.
[0036] Exemplarily, when the voice assistant is in a conversation scenario, the above user attribute parameters include a first parameter representing the user's emotional state, a second parameter representing the user's gender, and a third parameter representing the user's age. The text information corresponding to the target voice input by the user is "Play me a song", and the recognized first parameter represents the user's emotional state as a negative emotional state. The electronic device can determine, based on the second parameter and the third parameter, a cheerful song "A" that matches the gender represented by the second parameter and the age represented by the third parameter, and then determine the conversation content to be "Master, you don't sound very happy, let me play a song "A" for you". After the user enters a confirmation command, the song "A" is played to meet the user's song playback needs, and the played songs match the gender and age, and the cheerful songs match the negative emotional state, which can improve the user's negative emotions. As a result, not only conventional voice interaction can be achieved, but also conversation content that matches the user attribute parameters such as the first parameter representing the user's emotional state can be output during voice interaction, thereby improving the accuracy of the content output by the voice assistant and the intelligence of the voice interaction.
[0037] In some embodiments, when the voice assistant in the electronic device is in a recommendation scenario, for example, when it is determined that content needs to be pushed based on the target voice input by the user, the first push content to be output by the voice assistant can be determined based on the user attribute parameters, and the first push content can be output. Among them, the electronic device can obtain the target content matching the above user attribute parameters as the first push content, for example, the target content matching the above user attribute parameters can be obtained from the server as the first push content, and the first push content can be output.
[0038] In a possible implementation, the user attribute parameters include a first parameter representing the user's emotional state, a second parameter representing the user's gender, and a third parameter representing the user's age. If the user's emotional state represented by the first parameter is a negative emotional state, then the content with positive emotions that matches the gender and age can be determined as the first pushed content based on the gender represented by the second parameter and the age represented by the third parameter; if the user's emotional state represented by the first parameter is a positive emotional state, then the product content that matches the gender and age can be determined as the first pushed content based on the gender represented by the second parameter and the age represented by the third parameter, such as clothes, electronic products, etc.
[0039] In the above implementation, when the user attribute parameters only include the first parameter for characterizing the user's emotional state, if the electronic device identifies the user corresponding to the voiceprint information based on the input voice during the operation of the voice assistant, it can determine the second parameter characterizing the user's gender and the third parameter characterizing the user's age and other parameters related to the user's personal attributes based on the identified user, and determine the target content to be output by the voice assistant based on the above user attribute parameters and the above second parameters and third parameters of the user corresponding to the identified voiceprint information, thereby further ensuring the accuracy of the content output by the voice assistant.
[0040] The voice interaction method provided in the embodiment of the present application determines the content output by the voice assistant based on user attribute parameters detected when the voice assistant is awakened, including at least a first parameter for characterizing the user's emotional state, so that the content output by the voice assistant is more accurate and humanized, and the voice interaction is more intelligent, thereby improving the user's interactive experience when using the voice assistant.
[0041] See also Figure 2 , Figure 2 A flow chart of a voice interaction method provided by another embodiment of the present application is shown. The voice interaction method is applied to the above electronic device. Figure 2 The process shown is described in detail, and the voice interaction method may specifically include the following steps:
[0042] Step S210: When the voice assistant is awakened, the input target voice is obtained.
[0043] In the embodiment of the present application, step S210 can refer to the contents of the aforementioned embodiment and will not be described again here.
[0044] Step S220: If the voice assistant is awakened this time by voice, a first parameter for characterizing the user's emotional state is identified based on the target voice, and the first parameter is used as the user attribute parameter.
[0045] In an embodiment of the present application, after the electronic device obtains the target voice input by the voice assistant in the wake-up state, it can determine the user attribute parameters that need to be identified according to the wake-up method of the voice assistant this time. Among them, the wake-up method of the voice assistant can include a voice wake-up method and a non-voice wake-up method (for example, by triggering a control, triggering a physical button, etc.). If the wake-up method of the voice assistant this time is a voice wake-up method, the electronic device identifies the first parameter used to characterize the user's emotional state based on the voice input by the user, and uses the first parameter as the user attribute parameter that needs to be identified. In other words, if the wake-up method of the voice assistant this time is a voice wake-up method, when identifying the user attribute parameters based on the target voice detected during the use of the voice assistant, it is only necessary to identify the first parameter used to characterize the user's emotional state, and there is no need to identify other user attribute parameters (such as parameters characterizing the user's age, user gender, etc.).
[0046] It is understandable that in the relevant technology, voice assistants usually pre-register the user's voiceprint information to specify the corresponding user to wake up the voice assistant. That is to say, the recognized voiceprint needs to match the registered voiceprint to wake up the voice assistant; and it is usually assumed that the user of the electronic device is fixed, and the content output of the voice assistant (such as outputting chat reply content, recommended content, etc.) is based on a fixed user. However, in actual use, the user who uses the voice assistant of the electronic device may be different each time, and different users will wake up the voice assistant when using the voice assistant. If the voice assistant is awakened by voice wake-up, the voiceprint of the user who inputs the voice can be obtained during the voice wake-up stage, and the user identity information corresponding to the user who uses the voice assistant this time can be determined, and then the gender, age and other information of the identified user can be obtained. Therefore, if the voice assistant is awakened by voice wake-up, there is no need to identify the second parameter used to characterize the user's gender and the third parameter used to characterize the user's age during use. Instead, only the first parameter used to characterize the user's emotional state is identified. When the target content to be output by the voice assistant is subsequently determined, it is only necessary to determine the target content to be output by the voice assistant based on the first parameter recognized for the target voice and the second parameter and the second parameter that can be determined during the wake-up phase of the voice assistant. In this way, the amount of calculation caused by the additional identification of the second and third parameters during the use of the voice assistant can be reduced.
[0047] In some embodiments, a pre-trained first recognition model may be stored in the electronic device, and the first recognition model is used to output a first parameter for characterizing the user's emotional state based on the input speech. The first recognition model can be obtained by training an initial recognition model based on sample speech labeled with different first parameters. The initial recognition model can be a neural network, decision tree or other model, and its specific model type may not be limited. When determining the first parameter for characterizing the user's emotional state based on the target speech, the speech feature corresponding to the target speech can be obtained, and then the speech feature can be input into the first recognition model to obtain the first parameter output by the first recognition model, and the first parameter is used to characterize the user's emotional state.
[0048] Step S230: Based on the user identity information recognized when the voice assistant is awakened by voice, determine a second parameter corresponding to the user identity information for characterizing the user's gender and a third parameter for characterizing the user's age.
[0049] In the embodiment of the present application, since the voice assistant is awakened by voice wake-up, only the first parameter for characterizing the user's emotional state will be obtained as the user attribute parameter for the input target voice recognition, and when determining the target content to be output by the voice assistant, the target content determined will be more accurate in combination with other user attribute parameters of the currently used user, and if the voice assistant is awakened by voice wake-up, the voiceprint of the user who inputs the voice can be obtained during the voice wake-up stage, and the user identity information corresponding to the user who uses the voice assistant this time can be determined, and the second parameter for characterizing the user's gender and the third parameter for characterizing the user's age can be determined based on the user identity information. Therefore, based on the user identity information recognized when the voice assistant is awakened by voice, the second parameter for characterizing the user's gender and the third parameter for characterizing the user's age corresponding to the user identity information can be determined, so as to determine the target content to be output by the voice assistant based on the above user attribute parameters, the second parameter corresponding to the user identity information, and the third parameter.
[0050] In some embodiments, the electronic device can determine the second parameters and third parameters of the user corresponding to the user identity information from the second parameters and third parameters corresponding to different pre-registered users stored based on the user identity information recognized when the voice assistant is awakened by voice.
[0051] Step S240: Based on the user attribute parameter, the second parameter and the third parameter, determine the target content to be output by the voice assistant, and output the target content.
[0052] In the embodiment of the present application, when the wake-up method is a voice wake-up method, after obtaining the above first parameter as a user attribute parameter based on the target voice recognition, and determining the second parameter and the third parameter based on the above user identity information, the target content to be output by the voice assistant can be determined based on the first parameter (i.e., the user attribute parameter), the second parameter, and the third parameter, and the target content can be output. Among them, the method of determining the target content to be output by the voice assistant based on the first parameter, the second parameter, and the third parameter can refer to the content of the aforementioned embodiment, which will not be repeated here.
[0053] Step S250: If the wake-up method is not a voice wake-up method, based on the target voice, identify a first parameter for characterizing the user's emotional state, a second parameter for characterizing the user's gender, and a third parameter for characterizing the user's age, and use the first parameter, the second parameter, and the third parameter as the user attribute parameters.
[0054] In an embodiment of the present application, if the voice assistant is awakened this time by a method other than voice wake-up, the user using the voice assistant this time cannot be determined during the wake-up phase of the voice assistant. Therefore, based on the target voice input during use, the first parameter characterizing the user's emotional state, the second parameter characterizing the user's gender, and the third parameter characterizing the user's age can be identified, and the obtained first parameter, second parameter, and third parameter are used as user attribute parameters.
[0055] In some embodiments, the target speech can be input into a pre-trained first recognition model to obtain a first parameter output by the first recognition model for characterizing the user's emotional state; the target speech can be input into a pre-trained second recognition model to obtain a second parameter output by the second recognition model for characterizing the user's gender and a third parameter output by the second recognition model for characterizing the user's age. The method of obtaining the first parameter by using the first recognition model can refer to the content in step S220; the second recognition model can be obtained by training the initial recognition model based on sample speech labeled with different second parameters and third parameters. The initial recognition model can be a neural network, decision tree or other model, and its specific model type can be unlimited. When determining the second parameter for characterizing the user's gender and the third parameter for characterizing the user's age based on the target speech, the speech features corresponding to the target speech can be obtained, and then the speech features can be input into the second recognition model to obtain the second parameter and the third parameter output by the second recognition model.
[0056] Step S260: Based on the first parameter, the second parameter, and the third parameter in the user attribute parameters, determine the target content to be output by the voice assistant, and output the target content.
[0057] In the embodiment of the present application, when the wake-up method is a voice wake-up method, after obtaining the above first parameter, second parameter and third parameter as user attribute parameters based on target voice recognition, the target content to be output by the voice assistant can be determined based on the first parameter, second parameter and third parameter in the user attribute parameters, and the target content can be output. Among them, the method of determining the target content to be output by the voice assistant based on the first parameter, second parameter and third parameter can refer to the content of the aforementioned embodiment, which will not be repeated here.
[0058] In the above implementation, the electronic device can also obtain a text-to-speech (TTS) voice package that matches the second parameter and the third parameter according to the third parameter used to characterize the user's age, and output the above target content through voice through the TTS voice package as a voice assistant. For example, if the user's age represented by the second parameter is a child's age, a personalized TTS voice package of a cartoon character can be obtained; for another example, if the user's age represented by the second parameter is an elderly person's age, a personalized TTS voice package of his children can be obtained.
[0059] The voice interaction method provided in the embodiment of the present application can determine the content output by the voice assistant based on the first parameter used to characterize the user's emotional state, the second parameter used to characterize the user's gender, and the third parameter used to characterize the user's age, so that the content output by the voice assistant is more accurate and humanized, and the voice interaction is more intelligent, thereby improving the user's interactive experience when using the voice assistant; in addition, when determining the first parameter used to characterize the user's emotional state, the second parameter used to characterize the user's gender, and the third parameter used to characterize the user's age, according to different wake-up methods, the first parameter is selectively identified for the target voice input during use, or the first parameter, the second parameter, and the third parameter are identified, thereby reducing the amount of calculation during the use of the voice assistant and reducing the power consumption of the electronic device.
[0060] See also Figure 3 , Figure 3 A flow chart of a voice interaction method provided by another embodiment of the present application is shown. The voice interaction method is applied to the above electronic device. Figure 3 The process shown is described in detail, and the voice interaction method may specifically include the following steps:
[0061] Step S310: When the voice assistant is awakened, the input target voice is obtained.
[0062] Step S320: Based on the target speech, user attribute parameters are identified, where the user attribute parameters include at least a first parameter for characterizing the user's emotional state.
[0063] Step S330: Based on the user attribute parameters, determine the target content to be output by the voice assistant, and output the target content.
[0064] In the embodiment of the present application, steps S310 to S330 may refer to the contents of the aforementioned embodiment and will not be described in detail here.
[0065] Step S340: Based on the first parameter for characterizing the emotional state of the target user corresponding to the target voice that is historically recognized, an emotional portrait of the target user is generated, where the emotional portrait is used to characterize the emotion preferred by the target user.
[0066] In an embodiment of the present application, the electronic device may store, for the target user who inputs the above target voice, the first parameter used to characterize the user's emotional state, which is recognized by the target user when using the voice assistant. Among them, the electronic device may extract the voiceprint information of the target user, and store the above first parameter of the target user when recognizing that the user currently using the voice assistant is the target user based on the voiceprint information. The electronic device may generate an emotional portrait of the target user based on the above first parameter of the target user recognized by the stored history, and the emotional portrait may characterize the target user's preferred emotions, that is, characterize the target user as a person with a negative emotion, or characterize the target user as a person with a positive emotion, or characterize the target user as a person with a neutral emotion.
[0067] In some embodiments, when the duration that the voice assistant is in the awake state is greater than the target duration, for example, greater than 30 days, greater than 6 months, etc., and the number of times the first parameter used to characterize the user emotional state of the target user is identified is greater than the target number of times, for example, greater than 50 times, greater than 100 times, etc., the electronic device can generate an emotional portrait of the target user based on the stored first parameter of the target user.
[0068] Step S350: Obtain second push content, where the second push content is determined based on the emotion portrait.
[0069] In an embodiment of the present application, after generating an emotional portrait of the target user, the second push content can be obtained based on the emotional portrait so as to output the second push content, thereby helping the target user to better improve his emotional state.
[0070] In some embodiments, the electronic device may obtain push content that matches the emotional portrait from the server and use it as the second push content. The electronic device may upload the emotional portrait to the server; the server determines the push content that matches the emotional portrait based on the emotional portrait, and returns the push content to the electronic device. Optionally, if the emotional portrait represents that the target user's preferred emotion is a negative emotion, the server may obtain push content with positive emotions to help the user improve his or her daily emotions; if the emotional portrait represents that the target user's preferred emotion is a positive emotion or a neutral emotion, the server may obtain push content with positive emotions or neutral emotions.
[0071] Step S360: output the second pushed content.
[0072] In an embodiment of the present application, after the electronic device obtains the second push content, it can output the second push content. In a possible implementation, when the voice assistant is in an awake state, if the electronic device recognizes that the user using the voice assistant is the target user, the second push content can be output through the voice assistant.
[0073] In some embodiments, the electronic device may also upload the above first parameter of the target user identified each time to the server, so that the server can obtain the first parameter representing the user's emotional state of the target user obtained by the historical identification of the electronic device; the server can generate an emotional portrait of the target user based on the first parameter representing the user's emotional state obtained by the historical identification of the electronic device; after generating the emotional portrait, the server can determine the push content based on the emotional portrait at every first time interval, and send the push content to the electronic device, so that the electronic device can output the second push content when it is identified that the above target user uses a voice assistant.
[0074] The voice interaction method provided in the embodiment of the present application determines the content output by the voice assistant according to the user attribute parameters detected when the voice assistant is awakened, including at least the first parameter used to characterize the user's emotional state, so that the content output by the voice assistant is more accurate and humanized, and the voice interaction is more intelligent, thereby improving the user's interactive experience when using the voice assistant. In addition, based on the parameters used to characterize the user's emotional state identified each time, an emotional portrait of the user is generated, and daily push is performed based on the emotional portrait, so as to help the user better improve his emotional state.
[0075] See also Figure 4, which shows a structural block diagram of a voice interaction device 400 provided in an embodiment of the present application. The voice interaction device 400 applies the above-mentioned electronic device, and the voice interaction device 400 includes: a voice acquisition module 410, a parameter identification module 420 and a content output module 430. Among them, the voice acquisition module 410 is used to acquire the input target voice when the voice assistant is awakened; the parameter identification module 420 is used to identify user attribute parameters based on the target voice, and the user attribute parameters at least include a first parameter for characterizing the user's emotional state; the content output module 430 is used to determine the target content to be output by the voice assistant based on the user attribute parameters, and output the target content.
[0076] In some embodiments, the parameter identification module 420 can be specifically used for: if the wake-up mode of the voice assistant this time is a voice wake-up mode, then based on the target voice, a first parameter for characterizing the user's emotional state is identified, and the first parameter is used as the user attribute parameter; if the wake-up mode is not a voice wake-up mode, then based on the target voice, a first parameter for characterizing the user's emotional state, a second parameter for characterizing the user's gender, and a third parameter for characterizing the user's age are identified, and the first parameter, the second parameter, and the third parameter are used as the user attribute parameters.
[0077] In one possible implementation, the content output module 430 can be specifically used for: if the wake-up method is a voice wake-up method, based on the user identity information recognized when the voice assistant is awakened by voice, determining the second parameter for characterizing the user's gender and the third parameter for characterizing the user's age corresponding to the user identity information; based on the user attribute parameters, the second parameter and the third parameter, determining the target content to be output by the voice assistant, and outputting the target content.
[0078] In a possible implementation, the content output module 430 can also be used to: if the wake-up method is not a voice wake-up method, determine the target content to be output by the voice assistant based on the first parameter, the second parameter and the third parameter in the user attribute parameters, and output the target content.
[0079] In a possible implementation, the parameter identification module 420 can also be used to input the target speech into a pre-trained first recognition model to obtain a first parameter output by the first recognition model for characterizing the user's emotional state; input the target speech into a pre-trained second recognition model to obtain a second parameter output by the second recognition model for characterizing the user's gender and a third parameter for characterizing the user's age.
[0080] In some implementations, the content output module 430 may be specifically configured to: determine the dialogue content to be output by the voice assistant based on the user attribute parameters and the target voice, and output the dialogue content; or
[0081] Based on the user attribute parameters, determine the first push content to be output by the voice assistant, and output the first push content.
[0082] In some embodiments, the voice interaction device 400 may further include a portrait generation module. The portrait generation module may be used to generate an emotional portrait of the target user based on a first parameter that is historically recognized and represents the emotional state of the target user corresponding to the target voice, wherein the emotional portrait is used to represent the target user's preferred emotions.
[0083] In a possible implementation, the voice interaction device 400 may further include a content acquisition module. The content acquisition module is used to acquire second push content after generating an emotional portrait of the target user based on the first parameter of the user emotional state of the target user corresponding to the target voice that is historically recognized, wherein the second push content is determined based on the emotional portrait; the content output module 430 may also be used to output the second push content.
[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0085] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0086] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0087] In summary, the solution provided by the present application is to obtain the input target voice when the voice assistant is awakened; based on the target voice, identify the user attribute parameters, the user attribute parameters at least include a first parameter for characterizing the user's emotional state; based on the user attribute parameters, determine the target content to be output by the voice assistant, and output the target content. Therefore, by determining the content to be output by the voice assistant based on the user attribute parameters detected when the voice assistant is awakened, which at least include the first parameter for characterizing the user's emotional state, the content output by the voice assistant is made more accurate and humane, and the voice interaction is made more intelligent, thereby improving the user's interactive experience when using the voice assistant.
[0088] Please refer to Figure 5 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, a smart watch, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0089] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0090] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.
[0091] Please refer to Figure 6 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0092] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A voice interaction method, It is characterized in that The method comprises: When the voice assistant is awakened, the input target voice is obtained; Based on the target speech, identifying and obtaining user attribute parameters, the user attribute parameters at least including a first parameter for characterizing the user's emotional state; Based on the user attribute parameters, the target content to be output by the voice assistant is determined, and the target content is output.
2. The method according to claim 1, It is characterized in that The step of recognizing and obtaining user attribute parameters based on the target speech includes: If the voice assistant is awakened this time by voice awakening, based on the target voice, a first parameter for characterizing the user's emotional state is identified and used as the user attribute parameter; If the wake-up method is not a voice wake-up method, based on the target voice, a first parameter for characterizing the user's emotional state, a second parameter for characterizing the user's gender, and a third parameter for characterizing the user's age are identified, and the first parameter, the second parameter, and the third parameter are used as the user attribute parameters.
3. The method according to claim 2, It is characterized in that The determining, based on the user attribute parameters, target content to be output by the voice assistant, and outputting the target content, comprises: If the wake-up mode is a voice wake-up mode, based on the user identity information recognized when the voice assistant is awakened by voice, determine a second parameter corresponding to the user identity information for characterizing the user's gender and a third parameter corresponding to the user identity information for characterizing the user's age; Based on the user attribute parameter, the second parameter and the third parameter, the target content to be output by the voice assistant is determined, and the target content is output.
4. The method according to claim 3, It is characterized in that The method of determining target content to be output by the voice assistant based on the user attribute parameters and outputting the target content further includes: If the wake-up method is not a voice wake-up method, based on the first parameter, the second parameter and the third parameter in the user attribute parameters, determine the target content to be output by the voice assistant, and output the target content.
5. The method according to claim 2, It is characterized in that The identifying, based on the target speech, a first parameter for characterizing the user's emotional state, a second parameter for characterizing the user's gender, and a third parameter for characterizing the user's age include: Inputting the target speech into a pre-trained first recognition model to obtain a first parameter output by the first recognition model for characterizing the user's emotional state; The target speech is input into a pre-trained second recognition model to obtain a second parameter for characterizing the user's gender and a third parameter for characterizing the user's age output by the second recognition model.
6. The method according to claim 1, It is characterized in that The determining, based on the user attribute parameters, target content to be output by the voice assistant, and outputting the target content, comprises: Based on the user attribute parameters and the target voice, determine the dialogue content to be output by the voice assistant, and output the dialogue content; or Based on the user attribute parameters, determine the first push content to be output by the voice assistant, and output the first push content.
7. The method according to claim 1, It is characterized in that The method further comprises: Based on the first parameter for characterizing the emotional state of the target user corresponding to the target voice that is historically recognized, an emotional portrait of the target user is generated, where the emotional portrait is used to characterize the emotion preferred by the target user.
8. The method according to claim 7, It is characterized in that After generating an emotional portrait of the target user based on the first parameter of the historically recognized user emotional state corresponding to the target voice, the method further includes: Acquire second push content, where the second push content is determined based on the emotion portrait; The second pushed content is output.
9. A voice interaction device, It is characterized in that The device comprises: a voice acquisition module, a parameter recognition module and a content output module, wherein: The voice acquisition module is used to acquire the input target voice when the voice assistant is awakened; The parameter recognition module is used to recognize user attribute parameters based on the target speech, and the user attribute parameters at least include a first parameter used to characterize the user's emotional state; The content output module is used to determine the target content to be output by the voice assistant based on the user attribute parameters, and output the target content.
10. An electronic device, It is characterized in that include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 8.
