Methods
The following methods will be added to your website and be available to be called. These methods can give fine tuned control of your experience after the digital human session has started. For example, you could change the layout mode from full screen to overlay at a certain point in the conversation when you want to show content on your website.
uneeqAsk()
Ask a text question to the digital human, which will be sent to your NLP.
Parameters: utterance: string
Returns void
uneeqSetLayoutMode()
Set a layout mode that the client will be switched to.
Parameters: layoutMode: "overlay" | "splitScreen" | "fullScreen"
Returns void
uneeqSetShowClosedCaptions()
Show or hide closed captions. Speech Recognition voice input mode only.
Parameters: show: boolean
Returns void
uneeqStartSession()
Call this method to start the digital human session. Note, this can only be called during a click/key press handling, or after the user has taken action on the page.
Parameters: no parameters
Returns void
uneeqEnableMicrophone()
Enable the users microphone, this will trigger user permissions if not previously accepted.
Parameters: no parameters
Returns void
uneeqSetCallToActionText()
Update the call to action text.
Parameters: ctaText: string
Returns void
uneeqOpenStartSessionPopup()
Open a modal dialog to request the user to start a digital human sesion. This can be custom styled.
Parameters: { content: string, startButtonText: string }
Example: uneeqOpenStartSessionPopup({ content: "HTML Content", startButtonText: "Start" })
Returns void
uneeqEndSession()
Ends the digital human session. This action will end billing usage for this session.
Parameters: no parameters
Returns void
uneeqStartRecording()
Starts listening to what the user is speaking and captures it to be used as an utterance/question to the NLP system.
Parameters: no parameters
Returns void
uneeqStopRecording()
Stops listening to the user speaking and uses this audio as a utterance/question and sends it to the NLP system. All audio captured since uneeqStartRecoding will be used as the utterance/question.
Parameters: no parameters
Returns void
uneeqPauseSpeechRecognition()
Pauses speech recognition when using SPEECH_RECOGNITION voiceInputMode. The users microphone will be muted, and audio data not processed.
Parameters: no parameters
Returns void
uneeqResumeSpeechRecognition()
Resumes speech recognition when using SPEECH_RECOGNITION voiceInputMode. The users microphone will be unmuted, and audio data will begin processing again.
Parameters: no parameters
Returns void
uneeqSetShowUserInputInterface()
Set whether the voice and text input UI should be shown.
Parameters: show: boolean
Returns void
uneeqStopSpeaking()
Instruct the digital human to stop speaking. This method will only have an effect if the digital human is actively speaking.
Parameters: no parameters
Returns void
uneeqUnmuteDigitalHuman()
Unmute the digital humans audio if it audio was blocked from playing due to browser auto play policy. When a digital human is started in muted mode you will receive a DigitalHumanPlayedInMutedModeSuccess message.
Parameters: no parameters
Returns void
uneeqUpdateDisplayContent()
Update the html displayed content. Provide the HTML content as a string, or set the value to null to hide the content window.
Example: To set the content window to display a header tag with the word "hello": uneeqUpdateDisplayContent('<h1>hello</h1>')
Example: To hide the content window call uneeqUpdateDisplayContent(null)
Parameters: string or null
Returns void
uneeqSetCustomChatMetadata(string)
Set meta data (stringified json) that will be sent with text or speech questions. When setting chat meta data it will persist with all future questions until overwritten with a new value.
Example: To have the users name sent as meta data to your NLP system on all questions you could set chat metadata uneeqSetCustomChatMetadata( JSON.stringify({name: 'John'}) )
Example: To clear the metadata uneeqSetCustomChatMetadata(''). After this method is called, text or speech questions will no longer pass the meta data {name: 'John'}
Parameters: string
Returns void
uneeq.init()
Initialise the digital human frame manually. To be used if you have set uneeqInteractionsOptions.initLoadHandler = false . See initLoadHandler.
Parameters: no parameters
Returns void