[FREE] AzSpeech plugin: Text-to-Speech, Speech-to-Text and more with Microsoft Azure Cognitive Services

Just a quick update, I found out that using “FileManager.CreateDirectoryTree” function instead of “FileManager.CreateDirectory” will create the tree of folders that I was looking for. Maybe this can be implemented in a future update!

Thanks

1 Like

Thanks! : )

Released a new version using this in a new new function: UEAzSpeech/AzSpeechHelper.cpp at main · lucoiso/UEAzSpeech (github.com)

AzSpeech v4.1.0

On GitHub: GitHub Release
On Marketplace: Unreal Marketplace

What’s Changed

Full Changelog: Comparing v4.0.0...v4.1.0 · lucoiso/UEAzSpeech · GitHub

2 Likes

Documentation Update

Moved the documentation to Github Wiki from Readme.md: Wiki (github.com)

Hi Guys,

I am using the voice to text async function and i have been tampering with the c++ code trying to find a way to constantly recognise someone talking and have them stop it with a button. I have managed to achieve this apart from the button part (my temporary fix is to stop when they say “answer ended”). However, i am really struggling with working out how i could get a bool checker into the voice recognition function. I have tried settings bools outside in the header file however these are not accessible within the synthesis function.

Any help would be much appreciated


1 Like

Hi @TomHodgkins-31 !

Take a look at this part of the Microsoft Documentation: Continuous Recognition - Speech service - Azure Cognitive Services | Microsoft Docs


I’ll (try) to add a similar function soon and will return to the development of another requested feature (Issue #12), the last few days have been hectic :face_with_spiral_eyes:

2 Likes

Last update about the auto language detection: Improve the plugin by adding Language Identification support · Issue #12 · lucoiso/UEAzSpeech · GitHub

Status: Testing


Issue: Improve the plugin by adding Language Identification support (github.com)
Branch: feature/LANGUAGE-IDEN-12 (github.com)

Official Microsoft Documentation: Language identification - Speech service - Azure AI services | Microsoft Learn


Last changes

The last commit adds a new setting:

Now the developer can use the keyword “Auto” to use candidates languages instead the default LanguageID:

image


Notes:

  1. This feature is currently in preview
  2. Synthesizers currently only supports “FromOpenRange” config: AutoDetectSourceLanguageConfig::FromOpenRange()
  3. Recognizers currently only supports “FromLanguages” config: AutoDetectSourceLanguageConfig::FromLanguages(Candidates)
2 Likes

AzSpeech 1.0.0


:warning: FAzSpeechData and related functions were removed. (Added CoreRedirects, but let me know if you encounter any issues)


Links

Pull requests

Full Changelog: https://github.com/lucoiso/UEAzSpeech/compare/v4.0.0...v5.0.0

Features

Updated documentation

New setting

New keyword: “Auto”

image

You can use this keyword in LanguageId camps to use language identification instead a static language.

Notes:
This feature is currently in preview

  • Synthesizers currently only supports “FromOpenRange” config: AutoDetectSourceLanguageConfig::FromOpenRange()
  • Recognizers currently only supports “FromLanguages” config: AutoDetectSourceLanguageConfig::FromLanguages(Candidates)

Microsoft Docs: Language identification - Speech service - Azure Cognitive Services | Microsoft Learn

New exposed functions

image

image

1 Like

Hi, I was using the plugin which was working perfectly, but when coming back to my project (plugin was updated), I’m not getting any output from the speech to text anymore.
Every time I trigger it, regardless if I say something or not, I get following error after about 5 seconds:

LogAzSpeech: Error: AzSpeech - ProcessAzSpeechResult: Task failed. Result: Canceled
LogAzSpeech: Error: AzSpeech - AsyncVoiceToText: Result: Error

I don’t know why it cancels, I’ve tried with disconnecting all logic (exect a print string) after the nodes, but it doesn’t help… I’ve broken it down to the bare minimum but still nothing.
image

I can use the text to speech, and I’m getting logs in my Azure dashboard, so the settings there are ok…

1 Like

That’s strange. Can you send me the log to check this?


I can’t replicate here:

Output: (I said “Testing”)

LogAzSpeech: Display: AzSpeech - AsyncVoiceToText: Initializing task
LogAzSpeech: Display: AzSpeech - ProcessAzSpeechResult: Task completed. Result: RecognizedSpeech
LogAzSpeech: Display: AzSpeech - AsyncVoiceToText: Result: Testing.

My settings:

I made the exact same setup now for extra test, still same…

settings:
image

I’ve sent complete log in pm

edit: I’ve tried adding to a different project, also same… I’m guessing something is going wrong with Azure, but I’ve double checked settings, API key is correct, and I can use text to voice with nor problems:

LogAzSpeech: Display: AzSpeech - AsyncTextToVoice: Initializing task
LogAzSpeech: Display: AzSpeech - ProcessAzSpeechResult: Task completed. Result: SynthesizingAudioCompleted
LogAzSpeech: Display: AzSpeech - AsyncTextToVoice: Result: Success

Hi,
I tried to package a project with this plugin for quest 2(android) on 4.27, using latest version from marketplace. Encountered these warning while packaging, app crashes when trying to use voice input.

UATHelper: Packaging (Android (ASTC)): LogAzSpeech: Warning: AzSpeech - LoadDependency: Failed to load required library …/…/…/Engine/Plugins/Marketplace/AzSpeech/Source/ThirdParty/AzureWrapper/libs/Win/Runtime/Microsoft.CognitiveServices.Speech.extension.codec.dll. Plug-in will not be functional.
UATHelper: Packaging (Android (ASTC)): LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent.
UATHelper: Packaging (Android (ASTC)): LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent.
PackagingResults: Warning: AzSpeech - LoadDependency: Failed to load required library …/…/…/Engine/Plugins/Marketplace/AzSpeech/Source/ThirdParty/AzureWrapper/libs/Win/Runtime/Microsoft.CognitiveServices.Speech.extension.codec.dll. Plug-in will not be functional.

When I tried to use it in editor play mode, the engine crashed. I got these errors.

Unhandled Exception: 0xe06d7363

KERNELBASE
VCRUNTIME140
UE4Editor_AzSpeech!__azac_handle_native_ex() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AzSpeech\Source\ThirdParty\AzureWrapper\include\azac_debug.h:698]
UE4Editor_AzSpeech!Microsoft::CognitiveServices::Speech::AutoDetectSourceLanguageConfig::FromLanguages() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AzSpeech\Source\ThirdParty\AzureWrapper\include\speechapi_cxx_auto_detect_source_lang_config.h:67]
UE4Editor_AzSpeech!AzSpeech::Internal::GetAzureRecognizer() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AzSpeech\Source\AzSpeech\Private\AzSpeech\AzSpeechInternalFuncs.h:111]
UE4Editor_AzSpeech!AzSpeechWrapper::Standard_Cpp::DoVoiceToTextWork() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AzSpeech\Source\AzSpeech\Private\AzSpeech\VoiceToTextAsync.cpp:17]
UE4Editor_AzSpeech!<lambda_2f4df2f557a945ec66877d04b0abd443>::operator()() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AzSpeech\Source\AzSpeech\Private\AzSpeech\VoiceToTextAsync.cpp:49]
UE4Editor_AzSpeech!UE4Function_Private::TFunctionRefCaller<<lambda_2f4df2f557a945ec66877d04b0abd443>,std::basic_string<char,std::char_traits,std::allocator > __cdecl(void)>::Call() [D:\RocketSync\4.27.0-17155196+++UE4+Release-4.27\Working\Engine\Source\Runtime\Core\Public\Templates\Function.h:539]
UE4Editor_AzSpeech!SetPromise<std::basic_string<char,std::char_traits,std::allocator >,TUniqueFunction<std::basic_string<char,std::char_traits,std::allocator > __cdecl(void)> &>() [D:\RocketSync\4.27.0-17155196+++UE4+Release-4.27\Working\Engine\Source\Runtime\Core\Public\Async\Async.h:50]
UE4Editor_AzSpeech!TAsyncRunnable<std::basic_string<char,std::char_traits,std::allocator > >::Run() [D:\RocketSync\4.27.0-17155196+++UE4+Release-4.27\Working\Engine\Source\Runtime\Core\Public\Async\Async.h:436]
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll

2 Likes

Tested here with 5.0 and 4.27 but i’m getting this crash only when there’s a empty candidate language in the list (Language Identification).

Can you check if there’s valid languages in your AzSpeech settings (Project Settings → AzSpeech) and try using the function with the LanguageID set to “Default” or another language from this list: Supported languages (microsoft.com)?


By a mistake, the Voice-to-Text is coming with Language Id set to “Auto” by default, this keyword tells the plugin to use Language Identification. And this function Microsoft::CognitiveServices::Speech::AutoDetectSourceLanguageConfig::FromLanguages() is currently throwing a exception when the given candidate languages are invalid.

I uploaded a hotfix yesterday to print some logs and cancel the task when this happens but is currently only on my github as its waiting for approval to update on marketplace too: AzSpeech v5.0.1 Latest 18 hours ago (github.com)

2 Likes

Hey :slight_smile: first of all, thanks for an amazing plugin! It’s exactly what I need, but I have one issue - I want to use this in editor (not in game), to generate wav files for VO but I’m having issues with Task Completed and Output Value. When I use this on an in-game blueprint it works correctly but when I trigger it in editor, the output value seems to be incorrect from time to time and Task Completed doesn’t seem to fire at all. I can probably fix it by rewriting the blueprint in C++ but before I do that I wanted to ask if you have encountered this or know something that might help.

Thanks a lot :slight_smile:

PS: by in editor I mean triggering the blueprint using this:
image

1 Like

Hi the new version Parameters are gone and also when i trigger it it crashed am i messing something? Please help.( im using 4.27 )

1 Like

Hi! : )

Interesting, i’ll check this soon, heheheh

Hi! : )
Did you add the settings in the Project Setting tab → AzSpeech Settings?

If everything is ok, send me the log to check this

Thanks so much it worked OMG!~ Thanks!!!
So the new version change the paramaters to th e project settings ,i didn`t noticed that.

1 Like

Hi, I am a UE beginner and trying to add speech sounds to my simulation. Could you make a tutorial for your plugin? I’m not very clear how to use those BP functions. Thank you!

1 Like

Hi, Thank you so much for your plugin! I tried all of your versions on MacOS Monterey 12.5 and there is the problem that after I enable the plugin in plugin settings nothing happens. There are no new blueprints available to add. I also tried to add a plugin while my project was open and sometimes I get that error:

failed to read file. invalid json token. line: 1 ch: 1 (/volumes/hotorel 1/foxforwork/projectsue5/azspeech_test/plugins/sphinx-ue4-master/plugins/speechrecognition/._speechrecognition.uplugin)

It would be nice if you can help me with it.

1 Like