Goal - Give Pepper the ability to chat with a user by interrogating one or several chatbots and select the most appropriate answer given the priorities of the chatbots.
Typical usage - You want Pepper to have an elaborate conversation with someone.
How it works¶
To build a
Chat, use one or several
Chat action takes care of speech recognition and the feedbacks.
In order to get an answer, it calls each
Chatbot sequentially and picks one,
according to his priority rules.
For further information you can check: Chatbot.
Why chat supports multiple chatbots¶
No chatbot can understand and have a good answer for every user input but most people think that the robot can answer to anything. Instead of trying to make a unique chatbot answer to everything and re-develop already existing content such as Wikipedia, weather and so on, we think that combining different already existing chatbots that perform well in their domain could be a solution.
QiChat allows you to develop language interaction for the robot but there are many other frameworks that can do it (Dialogflow, Botfuel, Microsoft Bot Framework) and could be used for the robot.
Things such as speech recognition, text to speech, robot feedback might be difficult to make the robot behavior consistent.
Priorities and answer picking¶
The order of chatbots within the list determines the order in which the chat asks them for an
answer and picks one of them depending of the Reply priority of the
The chat selects the first
ReplyReaction which has the
reply priority “Normal”.
If there is no
ReplyReaction with a “Normal” priority then the first
with the “Fallback” priorities is picked.
Observing the Chat states¶
To be understood, the user should only speak to the robot when the
is in a listening state.
The listening state of the
Chat is accessible at any time, via the
And a listener:
You can be notified when the robot hears human voice via the
And a listener:
The phrase the robot is saying is accessible via the
And a listener:
When the robot is not saying anything, the String contained in the Phrase is empty.
Observing the user input¶
You can observe what the robot hears via a listener:
Sometimes the robot detects human voice but cannot determine the content of the phrase said:
After the robot heard human speech, there can be 3 different cases:
- Normal reply
- Fallback reply
- No reply
The type of the reply is normal when the robot provides an answer provided by any rule except fallback rules. It is accessible via a listener:
The type of the reply is fallback when a phrase was heard but the robot cannot
provide a good answer, for example when a QiChatbot matches a rule containing a
In the case where the robot determined the content of the phrase said,
input parameter will contain the phrase, otherwise, it will be empty.
If the user input doesn’t match any rule and there is no fallback reply, the robot will not reply.
In the case where the robot determined the content of the phrase said, the
parameter will contain the phrase, otherwise, it will be empty.
Performance & Limitations¶
Chat or Say/Listen?¶
Chat is relevant when you want Pepper to be able to
answer with relevance to a human input.
If you want Pepper to ultimately say something specific or listen to a precise
human input, you should use Say and Listen