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.
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!!
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.
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.
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.
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.
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?
@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.
@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?
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