VoiceAvatarConfig
VoiceAvatar configuration. Can be passed as arguments to the VoximplantAvatar.createVoiceAvatar method.
Props
asrEndOfPhraseDetectorTimeout
asrEndOfPhraseDetectorTimeout: number
| undefined
Optional. End of phrase timeout in milliseconds. If the ASR is running in the interim mode, we may not wait for the final response from the ASR, but instead, take the last interim, after which there are no new ones during this timeout. It allows us to reduce the time of voice recognition. This parameter should be set individually for each ASR vendor. 1000ms is a good default value not to interrupt the user aggressively.
defaultListenTimeout
defaultListenTimeout: number
| undefined
Optional. ASR listen timeout in milliseconds. If there is no response from the customer, the AvatarState.onTimeout required callback function executes. You can override the global timeout via the AvatarResponseParameters.listenTimeout parameter for the current response. Default value is 10000 milliseconds (10 seconds).
onErrorCallback
onErrorCallback: (avatarErrorEvent: Events.Error) => void,Promise<void>
| undefined
Optional. Event handler that defines what happens to the call in case of internal errors of the avatar (for example, playing an error phrase or transferring the call to an agent).
NOTE: the handler ends current javascript session using the VoxEngine.terminate method by default.
onFinishCallback
onFinishCallback: (avatarFinishEvent: Events.Finish) => void,Promise<void>
| undefined
Optional. Triggered when the avatar finishes talking. Returns a dictionary with the data collected during the avatar working process.
ttsPlayerParameters
ttsPlayerParameters:
Optional. Player parameters: language, progressivePlayback, volume, rate, etc.