AI NPC by Convai

Transcription and other Events



Modify the accuracy of voice input to let convai to understand, when:

1.the 1st transcription/sentence is defined as finished;
2.separate between 1st and 2nd transcription.

In the metahuman BP, select Convai Chatbot complenment and click on Transcription Received
image.png
add the append and set as below between the transcirption received node and print string node:
image.png
Logic: Check if 1st sentence transcription ready is finished (true in boolean) in C; but now final is still false.
If 2nd sentence is finished as well, both C and E are boolean true
image.png

To improve the methuman character received:

Click on Text Received button to create its node (to show text in the chat box)
image.png

Go to Meta_Player BP
The BP need to Download the convai metal human project below (only up to 5.1 version)\
Add event beginplay and create transcription WB widget (made by myself if can’t find it), add to viewport
image.png
image.png

Back to the metahuman BP, to add a custom interface to see the chat messages:
image.png
Copy the same graphs on Text received node, except change the Name from player to character
image.png
(by attend Character name variable, set the character name as below:

Set the Convai character Name in event begin play as:
image.png
make sure paste the char ID in Details in ConvaiCharBot
image.png

Test the game

Other events (no demo showed in tutorial):


On Started Takling,
On finished talking,
On Failure (used when incorrect API key, char ID, etc. So that the game can go on as a backup plan, even wrong info occur)
On action received (related to Meta player BP, where tick generate actions: will execute action when enivornment is set, while generate action is true)

image.png
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.