[PLUGIN] Speech Recognition Plugin - Android Release

After doing several tests with different configurations on 2 different computers I managed to make the audio detection work on my android device and I realized that for me it only works using unreal version 4.18 under CodeWorks version 1R6u1. CodeWorks version 1R7u1 and engine version 4.19 have not worked for me.

I’m glad it works, now I can continue working.

I share an image with some of the configurations I made to point out what works and what not so far. Hope that info is helpful for someone.

It would be interesting to know if someone else had the same problem (audio not detected when packaging and installing to the device) and how he could solve it if that is the case.

Also has someone been able to package the device with audio detection running on a more updated version of the engine, maybe 4.22 or 4.23?

Has anyone been able to successfully compile the plugin for 4.22 or 4.23?

Have a great day.

That’s really great to hear, Really.
How do i choose the Codeworks version i want to use ?!

You can go to path C:\Program Files\Epic Games\UE_4.18\Engine\Extras\AndroidWorks\Win64 and install the .exe

Engine versions 4.16 to 4.20 I believe uses codeworks version 1R6u1, 4.21 and above uses 1R7u1. You need to reinstall from there and codeworks makes all the work downgrading whats needed.

thanks for your reply
tried it and still no luck, no voice detected :cry:

Are you using engine version 4.18 and plugin compiled for version 4.18?

Also make sure you are following the steps in the very first post of this thread on how to implement the plugin within your own project

Yup :cry: it seems it’s something in Android SDK or anything related to it , not the engine , as i tried a simple project to just give me the voice amplitude without the plugin and still no input form the mic

This is the settings I’m using for the Android SDK. Hope that helps

Anyone tried with 4.22 or newer? I tried here (4.22) and had no lucky… Is there any other solution to use voice commands in Unreal via Blueprint? Thanks!

i did every combination possible and nothing at all , i hope the author comeback someday

I keep getting this as well. What did you have to do in order to successfully package?

It’s so amazing! I used to exploree the POckert SPhinx for UE4 when it was for PC. Is there any wayt to to get theis to build as a PC file? I havce been trying for years to get a PC build of Pocket Sphinx ue4 Speech for 4.18 to run (as a PC build) but I have never gotten it to recompile I can do the whole recompile for a new version thing but only when it works, lie with VR Expansion plugin, it recompiles and doe sits whiole thing no peroblem! Pocket Sphinx UE4 always gives scary errors and I am 100% stuck… years later I still have never gotten Pocket Sphinx to work in 4.18 (for PC build) though I have a game waintg ever since 4.18 to finish (that has to be in 4.18)
PLEASE: is there ANY version out there ANYWHERE that I could use as a starting point in 4.18 for PC build?
After 5 years I am very good in UE4 especially character work,. but I am NOT GOOD in Visual Studio (yet) and the instructions to ‘compile for a different engine version’ at: GitHub - shanecolb/sphinx-ue4: A speech recognition plugin for Unreal Engine 4. This is essentially a simply did not work for me,. I either have to many version
of Visual Studio (or new ones are bad?) It could be any of ten billion things., I jusyt know it does not work at last for me., . (though I cna get it to wirjk in iolder versions like 4.12)

PLEASE HELP if you can. I just nee d a project build that works in 4.18 for PC build, I can do the rest as artist … THANK YOU.

Hi have anyone manage to port it to andriod
Target.Platform == UnrealTargetPlatform.Android

armv7?
I get these errors

UATHelper: Packaging (Android (ASTC)):     [1/4] Module.SpeechRecognition.cpp [armv7]
UATHelper: Packaging (Android (ASTC)):     In file included from D:/Others/Sppechtest/Plugins/SpeechRecognition/Intermediate/Build/Android/UE4/Development/SpeechRecognition/Module.SpeechRecognition.cpp:3:
UATHelper: Packaging (Android (ASTC)):     In file included from D:/Others/Sppechtest/Plugins/SpeechRecognition/Source/SpeechRecognition/Private/SpeechRecognitionGameStateBase.cpp:3:
UATHelper: Packaging (Android (ASTC)):     In file included from D:/Others/Sppechtest/Plugins/SpeechRecognition/Source/SpeechRecognition/Public\SpeechRecognitionSubsystem.h:6:
UATHelper: Packaging (Android (ASTC)):     D:/Others/Sppechtest/Plugins/SpeechRecognition/Source/SpeechRecognition/Public/SpeechRecognitionWorker.h(4,10): fatal error: 'sphinxbase/ad.h' file not found
UATHelper: Packaging (Android (ASTC)):     #include <sphinxbase/ad.h>
UATHelper: Packaging (Android (ASTC)):              ^~~~~~~~~~~~~~~~~
UATHelper: Packaging (Android (ASTC)):     1 error generated.
PackagingResults: Error: 'sphinxbase/ad.h' file not found

I found 4.19 let’s hope it works

I get this error.

UATHelper: Packaging (Android (ASTC)): > Task :app:compileDebugJavaWithJavac FAILED
UATHelper: Packaging (Android (ASTC)): The following annotation processors are not incremental: lifecycle-compiler-2.0.0.jar (androidx.lifecycle:lifecycle-compiler:2.0.0).
UATHelper: Packaging (Android (ASTC)): Make sure all annotation processors are incremental to improve your build speed.
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizerSetup.java:33: error: package edu.cmu.pocketsphinx.Decoder does not exist
UATHelper: Packaging (Android (ASTC)): import  edu.cmu.pocketsphinx.Decoder.defaultConfig;
UATHelper: Packaging (Android (ASTC)):                                     ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizerSetup.java:34: error: package edu.cmu.pocketsphinx.Decoder does not exist
UATHelper: Packaging (Android (ASTC)): import  edu.cmu.pocketsphinx.Decoder.fileConfig;
UATHelper: Packaging (Android (ASTC)):                                     ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:4: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)): import  edu.cmu.pocketsphinx.SpeechRecognizerSetup.defaultSetup;
UATHelper: Packaging (Android (ASTC)):                                                   ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class defaultSetup
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizerSetup
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:5: error: package edu.cmu.pocketsphinx.Decoder does not exist
UATHelper: Packaging (Android (ASTC)): import  edu.cmu.pocketsphinx.Decoder.defaultConfig;
UATHelper: Packaging (Android (ASTC)):                                     ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:6: error: package edu.cmu.pocketsphinx.Decoder does not exist
UATHelper: Packaging (Android (ASTC)): import  edu.cmu.pocketsphinx.Decoder.fileConfig;
UATHelper: Packaging (Android (ASTC)):                                     ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\RecognitionListener.java:33: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)): import edu.cmu.pocketsphinx.Hypothesis;
UATHelper: Packaging (Android (ASTC)):                            ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Hypothesis
UATHelper: Packaging (Android (ASTC)):   location: package edu.cmu.pocketsphinx
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:76: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     private Config config;
UATHelper: Packaging (Android (ASTC)):             ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Config
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognitionWorker
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:166: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     public void onPartialResult(Hypothesis hypothesis) {
UATHelper: Packaging (Android (ASTC)):                                 ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Hypothesis
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognitionWorker
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:183: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     public void onResult(Hypothesis hypothesis, ArrayList<String> words, ArrayList<Integer> startFrames, ArrayList<Integer> endFrames) {
UATHelper: Packaging (Android (ASTC)):                          ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Hypothesis
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognitionWorker
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizerSetup.java:49: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     private final Config config;
UATHelper: Packaging (Android (ASTC)):                   ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Config
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizerSetup
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizerSetup.java:69: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     private SpeechRecognizerSetup(Config config) {
UATHelper: Packaging (Android (ASTC)):                                   ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Config
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizerSetup
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\RecognitionListener.java:51: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     public void onPartialResult(Hypothesis hypothesis);
UATHelper: Packaging (Android (ASTC)):                                 ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Hypothesis
UATHelper: Packaging (Android (ASTC)):   location: interface RecognitionListener
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\RecognitionListener.java:56: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     public void onResult(Hypothesis hypothesis);
UATHelper: Packaging (Android (ASTC)):                          ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Hypothesis
UATHelper: Packaging (Android (ASTC)):   location: interface RecognitionListener
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizer.java:58: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     private final Decoder decoder;
UATHelper: Packaging (Android (ASTC)):                   ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Decoder
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizer
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizer.java:78: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     protected SpeechRecognizer(Config config) throws IOException {
UATHelper: Packaging (Android (ASTC)):                                ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Config
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizer
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizer.java:200: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     public Decoder getDecoder() {
UATHelper: Packaging (Android (ASTC)):            ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Decoder
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizer
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizer.java:220: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):     public void addFsgSearch(String searchName, FsgModel fsgModel) {
UATHelper: Packaging (Android (ASTC)):                                                 ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class FsgModel
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizer
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizer.java:414: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):         protected final Hypothesis hypothesis;
UATHelper: Packaging (Android (ASTC)):                         ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Hypothesis
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizer.ResultEvent
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\edu\cmu\pocketsphinx\SpeechRecognizer.java:417: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):         ResultEvent(Hypothesis hypothesis, boolean finalResult) {
UATHelper: Packaging (Android (ASTC)):                     ^
UATHelper: Packaging (Android (ASTC)):   symbol:   class Hypothesis
UATHelper: Packaging (Android (ASTC)):   location: class SpeechRecognizer.ResultEvent
UATHelper: Packaging (Android (ASTC)): 19 errors
UATHelper: Packaging (Android (ASTC)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ASTC)): * What went wrong:
UATHelper: Packaging (Android (ASTC)): Execution failed for task ':app:compileDebugJavaWithJavac'.
UATHelper: Packaging (Android (ASTC)): > Compilation failed; see the compiler error output for details.
UATHelper: Packaging (Android (ASTC)): * Try:
UATHelper: Packaging (Android (ASTC)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
UATHelper: Packaging (Android (ASTC)): 32 actionable tasks: 1 executed, 31 up-to-date
UATHelper: Packaging (Android (ASTC)): * Get more help at https://help.gradle.org
UATHelper: Packaging (Android (ASTC)): BUILD FAILED in 9s
UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c "D:\Others\Sppechtest\Intermediate\Android\armv7\gradle\rungradle.bat" :app:assembleDebug
UATHelper: Packaging (Android (ASTC)):        (see C:\Users\sssha\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.27\Log.txt for full exception trace)
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED
PackagingResults: Error: Unknown Error

I got the same error did you manage to resolve it?

Do you have Java linked in your Project Settings ANdroid (where it links to Android info, Android Studio etc. the bottom line should be a special version of Java that some WITH Android Studio (needs an installer prompt in settings).