On-the-Fly Audo Wav File to MetaHuman Animation

I have a Python project that generates on-the-fly audio wav files as input to an animated MetaHuman head. I have been successfully using the NeuroSync Live Link code, but I prefer the animations generated when creating a MetaHuman Performance and animation sequence within the engine.

Is there a way to dynamically create and execute the Performance and animation sequence through Live Link via an external python script? The code described at Python Scripting | MetaHuman Documentation | Epic Developer Community seems perfect for what I want to do, except it appears to be code designed to work inside the engine, rather than an external script and it can’t find a reference to unreal.MetaHumanPerformance when I try to execute it.

I am fairly new to Unreal, so it’s possible I’ve overlooked some obvious solutions.

I am using 5.6.

Thanks.