Convai Chatbot

Actor component for the AI character

Convai Chatbot is an Actor component responsible for processing and getting a response for the voice audio coming from the Convai Player component. It plays the audio response and has a variety of useful events for transcription, actions, text response, and others.

Properties and Functions

Character Variables

PropertyTypeDescription

Character Id

FString

The character ID you would like to assign to the component.

Interrupt Voice Fade Out Duration

Float

Time in seconds to gradually fade out voice response when interrupted until it is stopped.

Language Code

FString

Read the value of Language Code.

Ready Player Me Link

FString

Read the value of Ready Player Me Link.

Session Id

FString

To track memory of a previous conversation, set to -1 means no previous conversation, (this property will change as you talk to the character) you can save the session ID for a conversation and then set it back later on to resume a conversation.

Voice Type

FString

Read the value of the Variable VoiceType.

Environment

UConvaiEnvironment

Contains all relevant objects and characters in the scene including the (Player), and also all the actions doable by the character.

Avatar Image Link

FString

Read the value of Avatoar Image Link.

Character Name

FString

Read the value of variable CharacterName.

Backstory

FString

Read the value of variable Backstory.

Conversation States

FunctionReturns Description

Is in Conversation()

Boolean

Returns True, if the character is talked to, is talking, or is processing the response.

Is Talking( )

Boolean

Returns True, if the character is currently talking.

Is Thinking()

Boolean

Returns True, if the character is still processing and has not received the full response yet.

Is Listening ()

Boolean

Returns True, if the character is currently listening to the player.

Lip Sync

FunctionReturnsDescription

Supports Lip Sync()

Boolean

Returns True, if LipSync component is available and attached to the character.

Get Viseme Names()

Array of Strings

Returns list of viseme names.

Get Visemes()

Array of Float

Returns last predicted viseme scores.

Conversation Management

FunctionReturnsDescription

Interrupt Speech()

Void

Interrupts the current speech with a provided fade out duration.

Reset Conversation()

Void

Reset the conversation with the character and remove previous memory. This is the same as setting the session ID property to -1.

Events

Event Names and Description.

Event NameDescription

On Actions Received

Called when new actions are received from the character.

On Text Received

Called when new text is received from the character.

On Transcription Received

Called when new transcription is available.

On Started Talking

Called when the character starts talking.

On Finished Talking

Called when the character stops talking.

On Failure

Called when there is an error.

Event Parameters

ParameterDescription

Bot Text

The received text

Audio Duration

Duration of spoken received text. Is equal to zero if only text was received and no audio.

Is Final

True if this is the last chunk of text/transcription to be received.

Transcription

The transcription received.

Is Transcription Ready

True if the received transcription is ready and is not going to change anymore, false if the transcription is still in an intermediate state and is going to change.

Last updated