Audio2Face headless background play issue

I am trying to use headless Audio2Face mode using API calls which is triggered from Unreal engine. When the unreal engine is in foreground and the headless app is in background after I trigger Play, the sound which is played from the Audio2Face app is terrible. It sounds robotic. When I switch focus to Audio2Face headless app, then the audio is clear. Any advice? Or maybe is possible to disable the audio from this app and I will trigger the audio async from Unreal engine?

This is usually due to wrong sample rate between UE Livelink and the audio file being streamed from Unreal Engine. You need to use the same sample rate on the audio in the Livelink setting.

1 Like

I am not using Livelink. The sounds is comming from the headless app. Even when I dissable the system (UE) audio I still can hear that robotic sound. Is possible to disable the sound from the headless app without disabling it from win?

Are you streaming non-wav files by any chance? Are you using numpy to convert your audio file to chunks? There might be some conversion issues in your code. Please take a look at this thread and let us know if it helps or not.

No. I am definitely using .wav files. Now I opened the Audio2Face app and connected it to Unreal Engine via live link. When I run audio from the app (its streamed to UE with audio) and then I click to unreal (that means the UE is in foreground and the A2F app is in background) then the app starts acting weird. Its not working smooth but the audio begins to be processed in sections with a delay

Here is video screenshot. You can see, when I switch to UE then the A2F app starts freezing or something like that.

Can you please try different settings for Audio Sample Rate when creating the LiveLink connection?
For me it sounded robotic when using 16k Hz, but sounded normal when using 48k Hz

I tried that. But its not problem of the Settings of audio sample rate. As you can see, the audio2face app starts freezing when its not focused in foreground. Check the video. There is literally problem when the app is in background. But this happens only with unreal. (The project in the right is clear project with your plugin, nothing else.) And when I focus back (the a2f app), it starts working fine.

I found something similar here Audio2Face2023.1.0 to UE get stuck

Ok, I found that. If is UE in foreground it takes huge performance at 60FPS. I had to lover the FPS to get smooth working of the A2F app.

1 Like

Oh great to see you solved the issue. Did you set the max fps in Unreal Engine like so t.MaxFPS 30?

I forced it through the project settings to 45 fps

lower all settings in Audio2face, use wireframe… anything and everything to lower the settings… get max fps as possible. this really needs to be a easier setting.