Hello all! Hoping to find some help on this, or get this fixed ASAP if it is a bug, as it is holding up progress.
I’m currently creating a system within Unreal 5.1, utilizing a couple of plugins and mainly blueprints, to run an automated character. The blueprint currently takes audio from the microphone, and transcribes it to text. It then feeds that text into ChatGPT, and sends the answer from ChatGPT to AWS Polly. The plan is to then feed the audio from AWS polly into Nvidia Omniverse Face2Audio Streaming Audio Player, and livelink the facial animation to a character. The end result would be a character that you can speak to, powered by ChatGPT, that responds and is animated practically in real-time (very slight delays).
Anyway, on to the issue. The way we are calling to ChatGPT is using the OpenAI API plugin for 5.1. This stores ChatGPT’s answer in the blueprint as a variable. Omniverse Face2Audio is scripted using Python, and the examples/documentation are all pertaining to Python, so I installed the Python Scripting Plugin for Unreal. I set up a script that in theory, should simply get the blueprint asset and retrieve the text variable from it. Here’s that script pasted below
import unreal
Load blueprint asset
blueprint = unreal.EditorAssetLibrary.load_asset(“/Audio2Face/Content/BP_OpenAI.uasset”)
if blueprint:
# Get the ‘TextForPythonScript’ property
text_variable = blueprint.get_editor_property(“TextForPythonScript”)
if text_variable:
print(text_variable)
else:
print("The 'TextForPythonScript' property is not found in the Blueprint.")
else:
print(“The Blueprint asset was not found.”)
When I run this script inside the editor widget utility off a button click, it gives me this error.
LogEditorAssetSubsystem: Error: LoadAsset failed: Can’t convert the path ‘/Audio2Face/Content/BP_OpenAI.uasset’ because it does not map to a root.
Okay, so I must have just gotten the path wrong…
Nope.
I change the path to the root, and it’s now giving me this error.
LogEditorAssetSubsystem: Error: LoadAsset failed: Can’t convert path ‘C:\Users\artery\Documents\Unreal_Projects\a_kurtz\Audio2FaceSetup\BP_OpenAI.uasset’ because the PackagePath ‘C’ doesn’t start with a ‘/’.
Keep in mind, below is the path I’m using. The path definitely does start with a ‘/’.
(C:/Users/artery/Documents/Unreal_Projects/a_kurtz/Audio2Face/Content/BP_OpenAI.uasset)
These errors are completely contradictory to each other. No matter what I try, forward and backslashes, different concatenations of the path, nothing gets it to work. When I use the root path, it says it doesn’t start with a ‘/’ when it does, and when I use the game path it tells me I need to path it to the root.
I am almost 100% sure this is some sort of bug. If not I’d definitely like to know what I’m doing wrong as this really should be working no problem. It’s a very simple thing to be done and a very simple script, there isn’t much that could have gone wrong here. I’ve checked the path about 30 times over at this point, and it is 100% correct. I’ve literally even copied and pasted the path, from right clicking the blueprint inside the content browser.
Hopefully this can be worked out soon, it’s hindering our progress on getting this test set up, and it’s beginning to drive me nuts!