NAOqi Audio - Overview | API | QiChat | Tutorials
Namespace : AL
#include <alproxies/aldialogproxy.h>
As any module, this module inherits methods from ALModule API. It also has the following specific methods:
Deprecated Methods
Loads the topic, exports and compiles the corresponding context files ready to be used in ASR. The name of the topic found in the specified file is given as an output of the function call.
Note that loading a topic file can be both CPU and time consuming.
Parameters: |
|
---|---|
Returns: | Name of the topic loaded. Syntax error are thrown as exceptions. |
Unloads the specified topic and frees the associated memory load. Any further call to loadTopic of an unloaded topic will require a new export and compilation.
Parameters: |
|
---|
Adds the specified topic to the list of the topics that are currently used by the dialog engine to parse inputs. Several topics can be active at the same time but only one will be used to generate proposals (this specific topic is said to have the focus).
Parameters: |
|
---|
Removes the specified topic from list of the topics that are currently used by the dialog engine to parse inputs. Several topics can be active at the same time but only one will be used to generate proposals. (this specific topic is said to have the focus).
Parameters: |
|
---|
Sets the language of the dialog engine.
Parameters: |
|
---|
If multiple topics can be active at the same time, only one of them is used to generate proposals. This topic is said to have the focus. A call to this function forces the focus to the specified topic. After this call, proposals will be generated from this topic and inputs will be first parsed through this topic. However, if a “User Rule” of a different active topic is matched, the focus will change automatically to that topic.
Parameters: |
|
---|
Activates the tag in the specified topic.
Parameters: |
|
---|
Deactivates the tag in the specified topic.
Parameters: |
|
---|
Sets the focus to the topic then says the first activated proposal of the topic (if any).
Parameters: |
|
---|
Sets dynamically the specified concept of the specified language with the given word list. The speech recognition must run to call setConcept (else speech recognition won’t be updated with concept content)
Parameters: |
|
---|
Sets the ALAnimatedSpeech’s configuration used by the dialog.
Parameters: |
|
---|
Sets the minimum confidence threshold used validate the output of the Automatic Speech Recognition (ASR) engine.
Parameters: |
|
---|
Gets the minimum confidence threshold currently used to validate the output of the Automatic Speech Recognition (ASR) engine.
Returns: | Threshold (from 0.0 to 1.0). 0.5 by default. |
---|
Inputs are normally provided by the Speech Recognition engine and the event system of the robot. A call to this function will stimulate the dialog engine with the given input as if this input had been given by the ASR engine.
Parameters: |
|
---|
Gets the list of loaded topics in the given language.
Parameters: |
|
---|
Gets the list of activated topics in the current language.
Allows to change event name at runTime.
Parameters: |
|
---|
Opens a new dialog session. A call to this function restores the dialog user variables to ALMemory from the dialog database.
Parameters: |
|
---|
Closes the current dialog session and stores all the related ALMemory variables in the database dedicated to ALDialog.
Insert directly a variable in user dialog database.
Parameters: |
|
---|
Get a variable value from user dialog database.
Parameters: |
|
---|---|
Returns: | Variable value (string). |
Get all variable list of a user.
Parameters: |
|
---|---|
Returns: | Variable name list. |
Can be optionally called after a series of loadTopic in order to build dialog model and speech recognition model. If not called the compilation occurs once at runtime.
The Dialog engine starts making automatically proposal. After an answer, the dialog engine will automatically say a proposal from the available topics. Dialog engine will first try to say a proposal from the topic having the current focus, then from other topics.
Asks the Dialog engine to stop and start an application.
Note: if autonomous Life is running, use ALAutonomousLifeProxy::switchFocus() instead.
Parameters: |
|
---|
Resets the status of all topics: all proposals are able to be used again.
Allows to update the Dialog model and the speech recognition model at runtime (experimental). Parameter are unused but fit to ALMemory API.
Generates all possible input sentences in a text file.
Parameters: |
|
---|
Deprecated since version 1.18: use ALDialogProxy::forceInput() instead.
Deprecated since version 1.22: unstable and inconclusive trial. Do not use.
Deprecated since version 1.22: unstable and inconclusive trial. Do not use.
Deprecated since version 1.22: unstable and inconclusive trial. Do not use.
Deprecated since version 1.22: unstable and inconclusive trial. Do not use.
Deprecated since version 1.22: unstable and inconclusive trial. Do not use.
Deprecated since version 1.22: unstable and inconclusive trial. Do not use.
Raised each time the robot says an output.
Contains the last robot output.
Subscribing to this event starts ALDialog.
Example
u:(what did you say before) I said $Dialog/Answered
Raised when 3 Dialog/Fallback or 3 Dialog/NotUnderstood have been consecutively raised.
Raised when fallback matches.
True if ALDialog is started.
Raised each time the robot catches a human input.
Contains the last human input.
Example
u:(hello) $Dialog/LastInput
Human hasn’t talked for 5 seconds.
Dialog/NotSpeaking5, Dialog/NotSpeaking10, Dialog/NotSpeaking15, Dialog/NotSpeaking20 are raised when the human didn’t talk for, respectively 5, 10, 15 and 20 seconds.
Example
u:(e:Dialog/NotSpeaking10) are you still there?
Human hasn’t talked for 10 seconds.
Human hasn’t talked for 15 seconds.
Human hasn’t talked for 20 seconds.
Raised when the robot heard some human input but no rule has matched.
Example
u:(e:Dialog/NotUnderstood) sorry, I didn't understand.
Raised when the robot didn’t understand 2 chains in a row.
Raised when the robot didn’t understand 3 chains in a row.
Raised when a rule is triggered twice in a row. Allows you to avoid a repetition.