Convai Player

Actor component for the player

Convai Player is an Actor component responsible for capturing microphone audio and streaming it to a Convai character.

For voice chat to work in multiplayer, this component must be added to the player's possessed object and not the PlayerController.

Text to Speech and Speech To Speech


Is Recording()


Returns True if microphone audio is recorded, False otherwise.

Is Talking()


Returns True is microphone audio is been streamed, false otherwise.

Start Recording()


Start recording audio from microphone, use "Finish Recording" function afterwards.

Finish Recording()


Stops recording from the microphone and outputs the recorded audio from microphone.

Send Text(

UConvaiChatbotComponent* ConvaiChatbotComponent,

FString Text,

UConvaiEnvironment* Environment, bool GenerateActions,

bool VoiceResponse,

bool RunOnServer,

bool UseServerAPI_Key



Sends text to character.

Start Talking(

UConvaiChatbotComponent* ConvaiChatbotComponent, UConvaiEnvironment* Environment, bool GenerateActions,

bool VoiceResponse,

bool RunOnServer,

bool StreamPlayerMic,

bool UseServerAPI_Key



Starts streaming microphone audio to the character. Use "Finish Talking" afterwards to let the character know that you are doing talking.

Finish Talking()


Stops streaming microphone audio to the character.

Microphone Settings


Get Available Capture Device Names()


Returns all the available capture devices.

Get Microphone Volume Multiplier()


Gets microphone volume multiplier.

Set Capture Device Name()


Sets the capture device name.

Set Microphone Volume Multiplier()


Sets the microphone volume multiplier.

Get Active Capture Device()


Gets info about active capture device.

StartTalking() and SendText() Parameters


UConvaiChatbotComponent* ConvaiChatbotComponent

The character to talk to.

UConvaiEnvironment* Environment

Holds all relevant objects and characters in the scene including the (Player), and also all the actions doable by the character. Use the CreateConvaiEnvironment() function to create and then use functions like AddAction(), AddCharacter(), AddMainCharacter() to fill it up.

FString Text

Text to be sent to the character.

bool GenerateActions

Whether or not to generate actions (Environment has to be given and valid)

bool VoiceResponse

If true it will generate a voice response, otherwise, it will only generate a text response.

bool RunOnServer

If true it will run this function on the server, this can be used in multiplayer sessions to allow other players to hear the character's voice response.

bool StreamPlayerMic

If true it will stream the player's voice to other players in the multiplayer session, this is the same effect as voice chat.

Last updated