18min

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

uneeqAsk()

Ask a text question to the digital human, which will be sent to your NLP.

Parameters: utterance: string

Returns void



uneeqSetLayoutMode

uneeqSetLayoutMode()

Set a layout mode that the client will be switched to.

Parameters: layoutMode: "overlay" | "splitScreen" | "fullScreen"

Returns void





uneeqStartSession

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

uneeqAsk()

Enable the users microphone, this will trigger user permissions if not previously accepted.

Parameters: no parameters

Returns void





uneeqSetCallToActionText

uneeqSetCallToActionText()

Update the call to action text.

Parameters: ctaText: string

Returns void





uneeqOpenStartSessionPopup

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

uneeqEndSession()

Ends the digital human session. This action will end billing usage for this session.

Parameters: no parameters

Returns void





uneeqStartRecording

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

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





uneeqShowSettings

uneeqShowSettings()

Set whether the uneeq digital human settings should be shown. If the value 'true' is used, the settings will be shown. If the value 'false' is used, the settings will be hidden.

Parameters: show: boolean

Returns void





uneeqSetShowUserInputInterface

uneeqSetShowUserInputInterface()

Set whether the voice and text input UI should be shown.

Parameters: show: boolean

Returns void





uneeqStopSpeaking

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