/** * The singleton embodied dialog instance * Should not be used in normal operation, but made visible for testing and debugging purposes. * @type {EmbodiedDialog} * @private */ /** * @private */ /** * Initializes the embodied dialog instance. * @method jibo.embodied#init * @param {jibo} jibo jibo instance. * @param {jibo.embodied.EmbodiedOptions} [options] Embodied dialog initialization options. * @param {jibo.embodied.speech.AutoRuleConfig} [autoRuleConfig] Embodied speech AutoRule configuration. * @returns {Promise} Resolved when completed initialization. */ /** * Checks if embodied dialog is already initialized. * @method jibo.embodied#isInitialized * @returns {boolean} `true` if already initialized. */ /** * Get the state of embodied dialog. * @method jibo.embodied#getState * @returns {jibo.embodied#EmbodiedState} Embodied dialog state (derived from `jibo.embodied.speech` and `jibo.embodied.listen`). */ /** * @description Embodied speech provides a framework through which Jibo's * speech is expressed with character by wrapping it with sound * and animation behaviors (both automatically and via ESML tags). The * vast majority of the animations that are requested via these tags come * from the Animation Database (AnimDB). * * @namespace jibo.embodied.speech */ /** * Speaks text with coordinated animations and sounds (both auto-generated and user-defined). * @method jibo.embodied.speech#speak * @param {string} textToSpeak Text jibo should speak. * @param {jibo.embodied.speech.SpeakOptions} [speakOptions] Options to configure request * @param {jibo.embodied.speech.AutoRuleConfig} [autoRuleConfig] Configuration for AutoRules of request * @returns {Promise} A promise that is resolved when jibo is done speaking (naturally or via stop) */ /** * Stops the currently ongoing speak command. * @method jibo.embodied.speech#stop * @returns {Promise.} */ /** * Sets up the audio and anim paths for embodied speech. * @method jibo.embodied.speech#setPaths * @param {string} assetPack Asset */ /** * Get current activity status of embodied speech * @method jibo.embodied.speech#isActive * @returns {boolean} `true if` embodied speech is currently processing a speak request. */ /** * Retrieve a promise linked to the state embodied speech animation dispatch. * @method jibo.embodied.speech#waitForAnimDispatch * @returns {Promise} Promise providing the current state of embodied speech animation dispatch. */ /** * @description Embodied listen provides a framework through which Jibo's * listening states are clearly communicated and expressed with character. * * @namespace jibo.embodied.listen */ /** * Returns the current ambient listening mode. * @method jibo.embodied.listen#getAmbientMode * @return {jibo.embodied.listen#AmbientListenMode} */ /** * Returns the current active listening mode. * @method jibo.embodied.listen#getActiveMode * @return {jibo.embodied.listen#ActiveListenMode} */ /** * Set ambient mode for embodied listen. * @method jibo.embodied.listen#setMode * @param {jibo.embodied.listen#AmbientListenMode} mode Ambient listen mode to set. */ /** * Request active mode of embodied listen. * @method jibo.embodied.listen#enterActiveMode * @param {jibo.embodied.listen#ActiveListenMode} mode Requested active listen mode. * @param {jibo.embodied.listen.ActiveModeOptions} [options] Configuration options consumed by the different active modes. * @return {Promise} Resolves once embodied listen is in * requested active mode or interrupted by another active mode request. */ /** * Exit active mode of embodied listen. * @method jibo.embodied.listen#exitActiveMode * @param {boolean} [fastForward=true] `true` to fast forward state sequence to idle state. * @return {Promise} Resolves when embodied listen returns to idle. */ /** * Disposes of resources, unsubscribes from events. * Should be called when destroying instance. * @method jibo.embodied.listen#dispose */ /** * Resolves immediately if already in idle, otherwise waits until state machine reaches idle. * Can be fast forwarded to idle. In this case we will flush animation queue and head straight to idle. * @method jibo.embodied.listen#waitForIdle * @param {boolean} fastForward `true` to fast forward state sequence to idle state. * @returns {Promise} */ /** * Disables embodied listen for the next listen event. * @method jibo.embodied.listen#disableOnce */ /** * This method demonstrates the animation/led/sound used in both the engagement and disengagement states. * @method jibo.embodied.listen#demoEngaged * @param {boolean} turnOn Turn on/off the demo engaged state. * @returns {Promise} */