Scenario globals
Top-level functions and type aliases available in every VoxEngine scenario.
Functions
base64_decode
Decodes the data in the Base64 encoding
Parameters
base64_encode
Encodes a string or array of integers from 0 to 255 to the Base64 encoding
Parameters
bytes2hex
Creates a hex string from given bytes array.
Parameters
bytes2str
Creates a string from an array of numbers with specified encoding
Parameters
clearInterval
Cancels a timed, repeating action which is previously established by a call to setInterval().
Parameters
clearTimeout
Cancels a timeout previously established by calling setTimeout().
Parameters
getLocalTime
Converts the date to the specified local timezone. Note that new Date() always returns time in the UTC+0 timezone.
Parameters
hex2bytes
Creates an array of numbers from parsing a hex string
Parameters
levenshtein_distance
Count the number of deletions, insertions, or substitutions required to transform str1 into str2. The number shows a measure of the similarity between two strings. It is also known as edit distance.
Parameters
require
Parameters
setInterval
Repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.
Parameters
setTimeout
Sets a timer which executes a function or specified piece of code once after the timer expires.
Parameters
str2bytes
Creates an array of numbers from parsing string in specified codepage
Parameters
trace
Parameters
uuidgen
Generates unique identifier and returns it is string representation.
Type aliases
PlaybackParameters
Avatar voice channel playback parameters. Can be passed via the VoiceChannelParameters.playback parameter.
RecorderLayoutPriority
An object that specifies video frame layout priority. Can be passed via the CallRecordParameters.videoParameters and RecorderParameters.videoParameters parameter.
Add the following line to your scenario code to use the type:
SequencePlaybackSegment
Sequence of the voice channel TTS and URL playback segments. Can be passed via the SequencePlaybackParameters.segments parameter.
SequencePlayerSegment
Sequence player segment, represented by TTS or URL Player. Can be passed via the SequencePlayerParameters.segments parameter.
SmartQueue
Represents an instance of a Smart Queue. Queue identifier or queue name must be provided.