What is the best way to trigger back to back speeches from the character with no input from the user

Original Discord Post by chaolice | 2024-06-08 10:46:55

When you give the character a big chunk of text to say, the pace isn’t very natural. I’m looking for a way to trigger different speeches, back to back, without the user having to reply in between. My goal is to allow for a more natural monologue pacing.

I’m asking the question here as I’m currently doing it, so that once I figure out an answer, I can update this post with my version of how to do it. It most likely won’t be a very efficient one so I’m hoping this post can allow others to give me input so we can figure out the best way to do this.

Reply by chaolice | 2024-06-08 11:12:31

Found a way, will add screenshot soon

Reply by chaolice | 2024-06-09 19:58:52

I essentially use two things, a boolean to know if the moment has been triggered, and once it has been, I increment an integer each time the character is done speaking, and fire the same custom even with a switch on int.

Because it’s an ending, it works well enough for me.

What would be ideal and I’m open to hear what’s the best way to do that, would be to make the request in advance so that instead of a long pause in between each “invoke speech” I can have more control as all those sentences are fixed and won’t change ever. Would love to know what’s the best way to do that!

Images:


Reply by chaolice | 2024-06-09 19:59:25

I will prolly attach a cleaner screenschot after my exams are over as this seems like it could lead to confusions

Reply by nazbee | 2024-06-10 10:19:59

Curious to hear if someone has a better way. Seems fine if it works?

What more control are you thinking you want for it? Im not sure i understand the request in advance part

Replying to nazbee’s Message

Reply by nazbee | 2024-06-10 10:19:59
Curious to hear if someone has a better way. Seems fine if it works?

What more control are you thinking you want for it? Im not sure i understand the request in advance part

Reply by chaolice | 2024-06-10 10:22:55

I think better way so that I’m not too relient on whether “finished talking” was caught well. If for any reason something happens, it can stop the path.

There’s also a lot of pause in between each ones, because it’s being sent to convai and then waits to get it back, so I wonder if there’s a more streamlined ways to do it.

Reply by nazbee | 2024-06-10 10:35:22

If the speech is 100% always the same- you could run it through once and record/split as audio clips. Then during the game, disable convai while you play the audio clips + animation with whatever logic you need. Once the speech is over you reenable convai

Replying to nazbee’s Message

Reply by nazbee | 2024-06-10 10:35:22
If the speech is 100% always the same- you could run it through once and record/split as audio clips. Then during the game, disable convai while you play the audio clips + animation with whatever logic you need. Once the speech is over you reenable convai

Reply by chaolice | 2024-06-10 10:35:41

The only issue is lipsync

Reply by nazbee | 2024-06-10 10:37:35

Right, you would use pre-baked animation for that whole sequence

Replying to nazbee’s Message

Reply by nazbee | 2024-06-10 10:37:35
Right, you would use pre-baked animation for that whole sequence

Reply by chaolice | 2024-06-10 18:13:00

Do you know how I can go around doing that with this project?

Reply by nazbee | 2024-06-11 16:03:20

Hmm. Ok well if you want to use invoke speech and go through convai then the way youre doing it is not bad. Youll just need to figure out some backup logic to check if its interrupted?

Maybe you use a timer for each section, so like if the text takes 10 seconds to say you can make some additional logic that if it hasnt received finish talking completion in 20 seconds then it replays the failed segment with slightly different wording or starts the next invoke branch and so on. Its up to you

Reply by chaolice | 2024-06-11 16:08:42

I meant to prebake it

Reply by nazbee | 2024-06-11 17:11:04

Ah gotcha. So I think Take Recorder Plugin is what you want.

https://dev.epicgames.com/documentation/en-us/unreal-engine/take-recorder-in-unreal-engine?application_version=5.3
https://dev.epicgames.com/documentation/en-us/unreal-engine/recording-animation-using-take-recorder-in-unreal-engine?application_version=5.3

I tested it and it easily records the convai character body and face animation which you can create logic to playback.

Its SUPPOSED to record audio too, but unfortunately I havent figured out why audio is not recording for me. See if you can play around with it and get audio working too.

There is a “Microphone Audio Recorder” settings for “Audio Input Device”, ive tried also setting up source for both “Convai Character” and an additional source for “Microphone Audio” and it records a take but is silent. Ill let you know if i figure it out.

Embedded Content:
Take Recorder In Unreal Engine | Unreal Engine 5.3 Documentation | …
Record Editor, Gameplay, and Live Link Actors with Take Recorder.
Link: https://dev.epicgames.com/documentation/en-us/unreal-engine/take-recorder-in-unreal-engine?application_version=5.3
Recording Animation Using Take Recorder In Unreal Engine | Unreal E…
Learn how to use Take Recorder to capture animation from actor manipulation, physics simulations, and gameplay.
Link: https://dev.epicgames.com/documentation/en-us/unreal-engine/recording-animation-using-take-recorder-in-unreal-engine?application_version=5.3

Reply by chaolice | 2024-06-11 17:13:31

Thanks a lot!

Reply by nazbee | 2024-06-12 03:44:25

Sorry i havent been able to figure it out. Maybe someone from convai knows

Reply by chaolice | 2024-06-16 12:14:52

<@365628745886859267> Hey, I’m so sorry to ping, I really try to avoid doing it as I don’t want to bother but my first presentation is tomorrow and my character started going rogue again. Which means I’m going to implement my emergency solution during the entire path of the presentation : recording each answer she’s supposed to give to my prepared irl actor that will trigger them one by one whenever he releases the key. I’ll fake the interaction if it’s still not working (The path was fully functional Thursday). The issue is the lipsync which I have no idea how to make work with this solution. I’ve been waiting on <@1118275510926053447>'s answer since Thursday’s 13th of June (didn’t want to harass them) but I’m really running out of time.

Essentially, is there a fail free way to trigger multiple invoke speech back to back.

If not, how can I hook the lipsync to exported convai audios?

Reply by freezfast | 2024-06-16 12:57:36

Hi <@208679220287635456>, are you looking to get the character to speak a certain piece of text? If so, you can try creating multiple triggers in narrative design, a trigger for each text you want your character to speak, and in the trigger message use the speak tag syntax which tells your character that whenever this trigger is invoked via Invoke Narrative Trigger, it will speak this exact piece of text

Embedded Content:
Narrative Design | Documentation
Link: Narrative Design | Documentation

Replying to freezfast’s Message

Reply by freezfast | 2024-06-16 12:57:36
Hi <@208679220287635456>, are you looking to get the character to speak a certain piece of text? If so, you can try creating multiple triggers in narrative design, a trigger for each text you want your character to speak, and in the trigger message use the speak tag syntax which tells your character that whenever this trigger is invoked via Invoke Narrative Trigger, it will speak this exact piece of text

Reply by chaolice | 2024-06-16 12:59:37

That is what I use for my endings. The issue is now all of a sudden my character doesn’t follow the steps of the narrative design. The issue with this solution is that if there’s any errors, they won’t trigger one after an other either. I’m having this issue with my “good ending”.

Images:

Reply by chaolice | 2024-06-16 13:00:44

I’ve also had issues with the tag as my character gets more lost when I use it (I’m assuming because it doesn’t have any context) So I mostly gotten rid of it everywhere.

Reply by chaolice | 2024-06-16 13:01:07

Is it okay if I private message you?