VoiceAvatar
Voximplant voice avatar class is a superstructure over avatar with a pre-added bundle of ASR and TTS to handle calls. As arguments, it accepts: a set of configuration parameters, callback functions and the Call. It independently implements automation for the interaction of Avatar and Call via the and ASR modules (handles the events, causes business logic and execute the callback functions). For more details see the VoximplantAvatar.VoiceAvatarConfig.
Constructors
constructor
Parameters
config:
Methods
addEventListener
addEventListener(event: | | | , callback: Function
): void
Adds a handler for the specified VoximplantAvatar.Events, ASREvents or PlayerEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.
Parameters
event:
Event class (i.e., VoximplantAvatar.Events.Loaded, ASREvents.Stopped, PlayerEvents.PlaybackFinished)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void
removeEventListener
removeEventListener(event: | | | , callback: Function
): void
Removes a handler for the specified VoximplantAvatar.Events, ASREvents or PlayerEvents event.
Parameters
event:
Event class (i.e., VoximplantAvatar.Events.Loaded, ASREvents.Stopped, PlayerEvents.PlaybackFinished)
callback:
Function
Returns
type:
void