METHOD FOR HUMAN-MACHINE INTERACTION, ELECTRONIC DEVICE, AND COMPUTER-READABLE STORAGE MEDIUM
Embodiments of the present disclosure provide a method for human-machine interaction, an electronic device, and a computer-readable storage medium. In the method, a word used in a speech instruction from a user is recognized at a cloud side. An emotion contained in the speech instruction and feedback to be provided to the user is determined based on a predetermined mapping between words, emotions and feedback adapted to the emotion, and providing the feedback to the user is enabled.
1 . A method for human-machine interaction, comprising:
recognizing a word used in a speech instruction from a user;
determining an emotion contained in the speech instruction and feedback to be provided to the user based on a predetermined mapping between words, emotions and feedback, wherein the feedback is adapted to the emotion; and
enabling providing the feedback to the user.
2 . The method according to claim 1 , wherein recognizing the word used in the speech instruction from the user comprises:
obtaining an audio signal comprising the speech instruction;
converting the speech instruction into text information; and
extracting the word from the text information.
3 . The method according to claim 1 , wherein enabling providing the feedback to the user comprises at least one of:
enabling displaying a predetermined color to the user;
enabling playing a predetermined speech to the user;
enabling playing a predetermined video to the user; and
enabling changing a temperature of a device used by the user.
4 . The method according to claim 1 , wherein the predetermined mapping is obtained by training based on history information of the words, the emotions, and the feedback.
5 . The method according to claim 1 , wherein the method is implemented in a cloud side or a human-machine interaction device.
6 . The method according to claim 5 , wherein, when the method is implemented in the cloud side, the method further comprises:
receiving an audio signal comprising the speech instruction from the human-machine interaction device; and
enabling providing the feedback to the user comprises:
sending information to the human-machine interaction device, wherein the information indicates the feedback to be provided to the user, such that the human-machine interaction device provides the feedback to the user.
7 . The method according to claim 6 , wherein the information comprises text information representing a predetermined speech to be played to the user, and providing the feedback to the user comprises:
converting the text information into the predetermined speech.
8 . An electronic device, comprising:
one or more processors; and
a memory, configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a method for human-machine interaction, wherein the method comprises:
recognizing a word used in a speech instruction from a user;
determining an emotion contained in the speech instruction and feedback to be provided to the user based on a predetermined mapping between words, emotions and feedback, wherein the feedback is adapted to the emotion; and
enabling providing the feedback to the user.
9 . The electronic device according to claim 8 , wherein recognizing the word used in the speech instruction from the user comprises:
obtaining an audio signal comprising the speech instruction;
converting the speech instruction into text information; and
extracting the word from the text information.
10 . The electronic device according to claim 8 , wherein enabling providing the feedback to the user comprises at least one of:
enabling displaying a predetermined color to the user;
enabling playing a predetermined speech to the user;
enabling playing a predetermined video to the user; and
enabling changing a temperature of a device used by the user.
11 . The electronic device according to claim 8 , wherein the predetermined mapping is obtained by training based on history information of the words, the emotions, and the feedback.
12 . The electronic device according to claim 8 , wherein the electronic device is implemented in a cloud side or a human-machine interaction device.
13 . The electronic device according to claim 12 , wherein, when the electronic device is implemented in the cloud side, the method further comprises:
receiving an audio signal comprising the speech instruction from the human-machine interaction device; and
enabling providing the feedback to the user comprises:
sending information to the human-machine interaction device, wherein the information indicates the feedback to be provided to the user, such that the human-machine interaction device provides the feedback to the user.
14 . The electronic device according to claim 13 , wherein the information comprises text information representing a predetermined speech to be played to the user, and providing the feedback to the user comprises:
converting the text information into the predetermined speech.
15 . A computer-readable storage medium, having computer programs stored thereon, when executed by a processor, causing the processor to perform a method for human-machine interaction, wherein the method comprises:
recognizing a word used in a speech instruction from a user;
determining an emotion contained in the speech instruction and feedback to be provided to the user based on a predetermined mapping between words, emotions and feedback, wherein the feedback is adapted to the emotion; and
enabling providing the feedback to the user.
16 . The computer-readable storage medium according to claim 15 , wherein recognizing the word used in the speech instruction from the user comprises:
obtaining an audio signal comprising the speech instruction;
converting the speech instruction into text information; and
extracting the word from the text information.
17 . The computer-readable storage medium according to claim 15 , wherein enabling providing the feedback to the user comprises at least one of:
enabling displaying a predetermined color to the user;
enabling playing a predetermined speech to the user;
enabling playing a predetermined video to the user; and
enabling changing a temperature of a device used by the user.
18 . The computer-readable storage medium according to claim 15 , wherein the predetermined mapping is obtained by training based on history information of the words, the emotions, and the feedback.
19 . The computer-readable storage medium according to claim 15 , wherein the electronic device is implemented in a cloud side or a human-machine interaction device.
20 . The computer-readable storage medium according to claim 19 , wherein, when the electronic device is implemented in the cloud side, the method further comprises:
receiving an audio signal comprising the speech instruction from the human-machine interaction device; and
enabling providing the feedback to the user comprises:
sending information to the human-machine interaction device, wherein the information indicates the feedback to be provided to the user, such that the human-machine interaction device provides the feedback to the user.