Please HELP!! How to Get an Actor Blueprint to send string and event control to Level Blueprint using Event Dispatchers

I had been trying to do this for two days continuously but nothing works!

I am recording audio in an Actor Blueprint when Q is pressed and then transcribing it using the OpenAI plugin. There is an On Submix Recorded Done event which is executed when the recording stops and transcribing starts. I want it so that when the transcribing is done an event is executed that takes the string from transcription and gives it to a level blueprint which uses Metahuman SDK to convert it to Audio and then Lipsync Animation for the Metahuman. Also, how can I call events instantly inside the level blueprint when this Submix event I mentioned before is called?

Here is a screenshot of the Actor Blueprint of Metahuman where audio is captured.

Here is a screenshot of the Level Blueprint
image

It’s not printing anything in the log not even a blank reference from the Level Blueprint like
LogBlueprintUserMessages: [TrackerlessStudio_2_C_3]
Not even this!!

  • what does the ERROR! say when you mouse over it?
  • you attempt to register the dispatcher with a keypress, is this intentional?
  • is it safe to assume that the first screenshot is the BP_Shiela?

Firing a delegate from an actor to a level works in 5.1. Did you by chance change the input parameters of the “OnRecognizeTexts” at some point and not refresh the bind node?

Another thing is why is the bind being done by key input? It’s supposed to bind a delegate up front before it’s called.

Make sure your async OpenAI function is being called

its nothing previously I hadn’t connected BP_shiela so was showing the error this screenshot is right before compiling

Thanks for Replying @3dRaven and @Everynone . So, @3dRaven the OnSubmixRecorded Event occur only inside the Actor Blueprint, now I want it so that that event triggers OnRecognizeTexts event so I can call it in Level blueprint. Even if I bind it at the Begin Play, the text is not recognized at begin it will only come when I release Q and the audio recorded gets converted to text. Hope you understand what I mean?

Delegates are like forward declarations. They catch functions that are still to occur. If you are not late binding due to memory limitations then it would be better to bind on begin play.

The level blueprint needs to bind on begin play to the actor that owns the delegate that is being called after the openAI Transcription.

You need to drag in a reference to the actor that has “On Recognize Texts” into the level blueprint drag out it’s node and bind to the “On Recognize Texts” delegate on begin play.

The begin play is only when it’s bound, it has nothing to do with the release of Q or the transcription, it’s just binding a reaction to the calling of the delegate.

1 Like

First of all @3dRaven thanks for being there for me and giving time right now. So, I think there is a little misunderstanding.

So, see I understand what you said but my goal is to execute the event when the OnSubmixRecorded (circled in red) is executed but it’s not working for some reason.

am I missing on some checkboxes to be checked or anything ?

Does your transcription functions boolean return true once it has done its work?

Perhaps it’s failing on the branch node?
Try adding a print string before the call to the delegate.

Or keep the bp editor open and set your debug actor and see if the whole process goes through successfully.

Make sure the delegate is a 100% called.

Debugger was a little difficult for me to understand so I actually connected bunch of Print String for Debugging and the Output Log is showing everything fine. And for some apparent reason the OnSubmixRecorded is so â– â– â– â–  excited its executing it twice.

Is this a multiplayer project? Perhaps it’s being called simultaneously on client and server?

Is the Q input triggering only once? Perhaps it’s calling multiple times?


Q is only taking it once previously there were two actors with same blueprint in the level so that could be the reason but I am not worried about it executing twice but rather about why if its executing the OnRecognizedTexts is not being executed?

a) Well in your first post you called the delegate through the pass through node, not waiting for the operation to be finished.
b) you haven’t shown the code where you call “On Submix Recorded file done”.
I’m guessing it should somewhere be after the Finish recording output node?

B) So OnSubmixRecorded is an Event called by the “Submix to Record” Variable

A) And for the delegate pass through I actually have connected it to finished still not working

Is there a way I can use this Submix Record variable to call the event OnSubmixRecord inside Level blueprint?

I’m guessing you want to record audio then process it. Perhaps this will be more helpfull

1 Like

@3dRaven Thanks a lot for the advice, I have got it working now. When you asked how the OnSubmixRecorded was called, I started looking and found the Finish Recording Output node which was left hanging, and a sub-event (OnSubmixRecorded) was called through the Submix variable so, I just remove the OnSubmix Recorded and connected the Finish Recording Output node and it started working amazingly.


Before:


After:

Thanks a lot again to @3dRaven for the guidance and support throughout and quick response!

2 Likes

@3dRaven I have a new problem that arised, now that it is implemented and I am getting the event dispatcher’s call in one level the other level which is a duplicate of this level doesn’t get the event dispatcher to work. So, the OnRecognizedTexts works in Untitled level but not in the Trackerless Studio level. what to do? I even tried deleting the Untitled thinking that it might be only be able to call on one level but that too doesn’t work. Have you ever encountered such a problem?

Check that the duplicate level has the correct logic inside of the level blueprint. It might be missing the reference to the correct actor.

References are all correct, no compile errors

Did you put down a breakpoint F9 in your blueprint and step through the code? (remember to choose your debug actor)

Sorry I am pretty new to this so have to ask, I added the breakpoint at the call Event dispatcher node in BP_Shiela and Custom event in level blueprint, but don’t know what step through code means and how to do it