Configuration Model Class

This section describes the different settings that you can configure for the ​Scene​ properties. An instance of a Configuration Model is used to define the properties of a ​Scene​.

Complete Example with all available properties:

var​ configuration = { audio: {    ambientNoiseLevel:       ​1​,     squelchLevel: ​1 }, render: { directionalLight: { ​0​, ​0​, ​0​}, eyePoint: { ​0​, ​0​, ​0​}, fieldOfViewVerticalRadians: ​0​, lookAtPoint: { ​0​, ​0​, ​0​}, upVector: { ​0​, ​0​, ​0​} },       statistics: { intervalSeconds: ​1​ } } };

 

Properties

Each of the available properties are described below:

audio (optional)

The audio​ property is a vanilla JavaScript object with two properties that specifies the ​Ambient Noise Level​ and the ​Squelch Level​ to use in the scene. These properties can be tweaked to optimize the accuracy of Speech-to-Text of the audio provided by the end user microphone. 

Example: 

var​ audio = {     ambientNoiseLevel: ​1​, squelchLevel: ​1 };

 

render

The render property specifies spatial parameters of how the scene is rendered on Soul Machines’ platform, before it is streamed to the end user. For example, it can be used to specify where the Digital Person should focus their eyes, and where the directional light comes from.

Example:

var​ render = { directionalLight: { ​0​, ​0​, ​0​}, ​ //format: {x, y, z}     eyePoint: { ​0​, ​0​, ​0​}, fieldOfViewVerticalRedians: ​0​, ​// units of Radians lookAtPoint: { ​0​, ​0​, ​0​}, upVector: { ​0​, ​0​, ​0​} };

 

statistics

The statistics property is a vanilla JavaScript object with a single property that enables you to set the intervals (in seconds), for the static events published by smwebsdk.

Example: