lucoiso / UEAzSpeech

This plugin integrates Azure Speech Cognitive Services in Unreal Engine.
https://forums.unrealengine.com/t/free-azspeech-plugin-async-text-to-voice-and-voice-to-text-with-microsoft-azure/495394
MIT License
201 stars 49 forks source link

Shipping builds crashing when a TTS function is called #70

Open lucoiso opened 1 year ago

ocinon commented 1 year ago

@lucois: sorry, just to clarify, I was using TTS not STT in my test.

lucoiso commented 1 year ago

@lucois: sorry, just to clarify, I was using TTS not STT in my test.

oops! xD

lucoiso commented 1 year ago

@ocinon I can replicate this issue in UE5.1 but isn't occurring in UE4.27.

When I package the project using UE5.1, it generates a Symbols folder containing only libUnreal.so, but UE4.27 packaging occurs exactly as UE5.1 in Development or DebugGame mode and the application works without crashes. lol

It looks like they introduced a bug in the Engine related to third party linkages in Android builds, but I need to confirm.

I'll continue looking for a solution and will also report this behavior in Unreal's Bug Submission.

ocinon commented 1 year ago

@lucoiso thanks for looking into it. Let me know if there is any help you need.

Yak0vkaSup commented 1 year ago

I have got a same bug actually, TTS crash the engine

Unhandled Exception: 0xc06d007e

KERNELBASE UnrealEditor_AzSpeech!__delayLoadHelper2() [D:\a_work\1\s\src\vctools\delayimp\delayhlp.cpp:312] UnrealEditor_AzSpeech!_tailMerge_microsoft_cognitiveservices_speech_core_dll() UnrealEditor_AzSpeech!UAzSpeechAudioDataSynthesisBase::StartAzureTaskWork() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AzSpeech\Source\AzSpeech\Private\AzSpeech\Tasks\Bases\AzSpeechAudioDataSynthesisBase.cpp:19] UnrealEditor_AzSpeech!UAzSpeechTaskBase::Activate() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AzSpeech\Source\AzSpeech\Private\AzSpeech\Tasks\Bases\AzSpeechTaskBase.cpp:24]

lucoiso commented 1 year ago

Hello! @Yak0vkaSup : )

Can you enable the option "Enable Internal Logs" in Project Settings -> Plugins -> AzSpeech and send me the output log?

The logs will be printed in the Output Log inside the engine and also in the file located at PROJECT_FOLDER/Saved/Logs

And can you send me the SDK logs? You can enable in the same settings page with the option "Enable SDK Logs" and find it inside: PROJECT_FOLDER/Saved/Logs/AzSpeech

Yak0vkaSup commented 1 year ago

Hey Lucoiso, here it is cef3.log and i dont have AzSpeech folder/file

and here is crash logs image

Yak0vkaSup commented 1 year ago

image

lucoiso commented 1 year ago

@Yak0vkaSup 😯 Can you try the ver. v1.3.8? https://github.com/lucoiso/UEAzSpeech/releases/tag/v1.3.8

Yak0vkaSup commented 1 year ago

image

lucoiso commented 1 year ago

@Yak0vkaSup can you send the last log?

Yak0vkaSup commented 1 year ago

RPM_studio.log

Yak0vkaSup commented 1 year ago

and this one also RPM_studio.log

Yak0vkaSup commented 1 year ago

thank you in advance!

lucoiso commented 1 year ago

@Yak0vkaSup

Do you have Visual Studio w/ C++ modules and .NET installed? For some reason the plugin appears not to have compiled and the engine cannot load it. (looking the v1.3.8 log)

Yak0vkaSup commented 1 year ago

Maybe I need to reinstall .net SDK, I will try it, thank you

Yak0vkaSup commented 1 year ago

Your are my hero! thank you very much! Good luck!

lucoiso commented 1 year ago

Glad the problem was resolved! Any problems, you can get in touch! :) I'll take a look at this Marketplace v1.3.7 issue, thanks for letting me know!

Now I'm trying to resolve a packaging issue for HoloLens, due to some changes Epic made in UE5.0 and UE5.1 😵‍💫

Yak0vkaSup commented 1 year ago

Glad the problem was resolved! Any problems, you can get in touch! :) I'll take a look at this Marketplace v1.3.7 issue, thanks for letting me know!

Now I'm trying to resolve a packaging issue for HoloLens, due to some changes Epic made in UE5.0 and UE5.1 😵‍💫

Sounds great. I tried to connect your plugin TTS to Metahuman LipSync but there is a problem with ATL. Did you try to do it by yourself? Probably its gonna be really cool. I connected your plugin to ChatGPT and now tring to figure out how to make lipsync.

lucoiso commented 1 year ago

@Yak0vkaSup

Related to lipsync, the plugin currently only outputs the Viseme Data before the synthesis occurs. You can enable it in Project Settings -> Plugins -> AzSpeech -> Enable Viseme

https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-speech-synthesis-viseme?tabs=visemeid&pivots=programming-language-cpp

Yak0vkaSup commented 1 year ago

Hello again, Yes, of course I enabled Viseme for my tests. I read all docs 🥸. But it doesn’t work for me, did it work for you? I will try again later to try to understand why it doesn’t work with MetaHuman for me.

lucoiso commented 1 year ago

Hello again, Yes, of course I enabled Viseme for my tests. I read all docs 🥸. But it doesn’t work for me, did it work for you? I will try again later to try to understand why it doesn’t work with MetaHuman for me.

@Yak0vkaSup

I didn't use it with MetaHumans, but the plugin returns these viseme data: Id, Offset and Animation, depending on the type of synthesis. And the values are updated and can be obtained using some getters hehehe:

image

  1. Get Viseme Data: returns the last received viseme data
  2. Get Viseme Data Array: returns a array containing all generated viseme data structs
Yak0vkaSup commented 1 year ago

At the moment i inspect this problem Screenshot_1

Yak0vkaSup commented 1 year ago

SSML doesnt work by the way

lucoiso commented 1 year ago

SSML doesnt work by the way

Did an error occur while using SSML? What happened? :0

lucoiso commented 1 year ago

@ocinon

UE5.1.1 Hotfix released and found this fix in the notes:

UE-170079 | Requesting Android Permissions causes an Ensure on Android Devices

The TTS function requests permission to access the microphone. Maybe this is the reason for the problem. I'll update the engine and check! 👀

https://forums.unrealengine.com/t/5-1-1-hotfix-released/765638

ocinon commented 1 year ago

@lucoiso tested TTS with UE5.1.1 on Android, and it still crashes. Sorry, no dice ;)

ocinon commented 1 year ago

@lucoiso any update on this from Epic's support?

lucoiso commented 1 year ago

@ocinon

They still haven't answered me. I even sent them a sample project to test in the bug report, but I haven't had a response so far, and I haven't found what could be causing this either. :S

lucoiso commented 1 year ago

Will check if this is still occurring in the new versions.

kulghuys commented 11 months ago

Hi, I'm also having this problem using UE 5.2.1, developing For Oculus Quest (tested on Quest2 and Quest Pro). I'm using the default options node with a phrase list group. image

When i work in a dev build, everything works perfectly, but when I start a shipping build, it crashes at the moment I call the speech to text function. Since it is a shipping build, I'm also not having any logs printed. I do have logs directly from the Oculus device, but those are quite extensive, so here are the last 5 seconds (I paused as soon as possible after the crash) SpeechToTextCrash.txt

sunny7610 commented 9 months ago

@lucoiso any update? I am facing the same issue in UE 5.3.2

Repiya commented 1 month ago

@lucoiso any update? I am facing the same issue in UE 5.3.2

same issues still nod solved shipping mode just doest work