Persona Class
This section describes the different settings that you can configure for the Persona Class.Â
Constructor
new Persona(scene: Scene, personaId: PersonaId): Persona
Parameters
scene: Scene
The scene the persona resides in.personaId: PersonaId
The ID of the persona as received in a state callback.
Returns: Persona​
Â
Accessors
onConversationResultEvent
get onConversationResultEvent(): SmEvent
Returns: SmEvent​
onSpeechMarkerEvent
get onSpeechMarkerEvent(): SmEvent
Returns: SmEvent​
Â
Methods
Animate To a Named Camera With Orbit Pan
animateToNamedCameraWithOrbitPan(cameraName: string, time: number, orbitDegX: number, orbitDegY: number, panDeg: number, tiltDeg: number): Promise<VariablesModel>
Cut or animate to a named camera position, with support for camera adjustment.
Parameters
cameraName: string
Named camera position. The currently supported option is "CloseUp".
time: number
Time in seconds for the animation to run. 0 indicates a cut.
orbitDegX: number
Degrees of horizontal rotation around implicit orbit point of camera position (typically the middle of the Persona's head)
orbitDegY: number
Degrees of vertical rotation around implicit orbit point of camera position (typically the middle of the Persona's head)
panDeg: number
Degrees of camera pan. Orbital adjustment is applied before pan adjustment.
tiltDeg: number
Degrees of camera tilt. Orbital adjustment is applied before tilt adjustment.
Returns: Promise<VariablesModel>
Conversation Get Variables
conversationGetVariables(): Promise<any>
Get variables will return the current conversation variable values in the promise completion. Completion/promise receives an object with member 'variables'.
Returns: Promise<any>
Conversation Send
conversationSend(text: string, variables: VariablesModel, optionalArgs: object): Promise<any>
Send a chat message to conversation.
Parameters
text: string
Text to send to conversation.
variables: VariablesModel
Variables to send to the conversation provider.
optionalArgs: object
Optional arguments object (none currently supported).
Returns: Promise<any>
Conversation Set Variables
conversationSetVariables(variables: VariablesModel): Promise<any>
Set variables that are applied on the next conversation request, triggered by speech to text or a conversationSend().
Parameters
variables: VariablesModel
Variables to send to the conversation provider.
Returns: Promise<any>
Start Speaking
startSpeaking(text: string, context?: string | null, optionalArgs?: StartSpeakingOptionalArgs | null): Promise<any>
Start speaking the specified text.
Parameters
text: string
The text to speak.
Default value context: string | null = null
The context included in the transcript.
Default value optionalArgs: StartSpeakingOptionalArgs | null = null
Returns: Promise<any>
Stop Speaking
stopSpeaking(): Promise<any>
Stop speaking.
Returns: Promise<any>
Â
Contents
Â