[PLUGIN] Speech Recognition Plugin - Android Release

The Demo project only works on android device, however when i add the plugin to my project it doesn’t recognize the voice commands.
Means everything runs perfectly with 0 errors, and the voice recognition is activated, but it doesn’t listen to the voice commands.

Any idea how to resolve this please?

Oh well, i managed to get it resolved through a turn around on the problem.
@ShaneC Please let us know if you are still developing the plugin. and if you have any plans to add it to IOS.
thanks again for all your efforts.

I didn’t realise iOS was a no-go, I was planning to try this on both mobile platforms at some point. +1 for iOS support.

@Antidamage hopefully @ShaneC will update us with good news!

Just a side note, it would be nice if the project could be split into a git repo and a web download with a setup script. It’s much nicer having a git checkout that you can update.

If you’d like a hand getting that set up I’m ready to help!

Hi ShaneC, I am now trying to use your project to deal with a speech recognition task in Mi VR device, which is similar to Oculus Go. I have successfully run your demo project on windows platform and made a package in my Mi VR device (Android platform). But it seems there was not any reaction when I tried to input some voice in Mi VR project. I really don’t know how to solve this problem. I will appreciate if you get attention to my problem. Thank you!

Hi Shane, I’ll be giving this a try on 4.19 and see if I can deploy to the Oculus Go. I want to see if we can use this for voice menus. I’ll let you know how well it works. Thanks for all your effort!

So, the good news is that it works on the Oculus Go in 4.19. The bad news is that I get hard crashes reasonably often. I admit that I may not really know what I’m doing in Sphinx, but as it stands it doesn’t really inspire confidence that this can work in something we’d give to a client.

Hi. It really looks awesome ! I downloaded the project file but my earliest engine is 4.19 and got some hard time to package. Any chance to get link to a packaged file on Android or PC to test it directly ? So I can decide to downgrade my version just to use this plugin. Anyway, great work.

I tried to update the code to 4.21 or 4.22 but got no lucky. After 4.21 the engine is handling #includes and Precompiled Headers in a different way. (it seems)
would be awesome if you could update the plugin for the latest when you got the time.

Is there a possibility of this getting any support for the Oculus Quest? I’ve been trying to get it to work, but I am unable to update the plugin past 4.19. It seems like I either need 4.22 or 4.23 for the Quest :frowning: (preferably 4.23) I would love to be able to use the keyword/phrase bit of this plugin in the app that I am working on. Does anyone have any success getting this to work on the Oculus Quest?

I’m trying to use it on the Oculus Quest. I’m assuming the Go and Quest are similar enough to get working on both. What all did you have to do to get it working on the Go? When I try to launch it on the Quest I don’t get any input or anything, but I get a Success init for the plugin.

Out of curiosity, what was your workaround for this? I had the same issue when test building the 4.19 version for the oculus quest. I got a successful init, but no sound input was being recognized.

Hi there
if someone can help me
i get this error when i try to package the game

UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:4: error: package edu.cmu.pocketsphinx does not exist
UATHelper: Packaging (Android (ASTC)): import static edu.cmu.pocketsphinx.SpeechRecognizerSetup.defaultSetup;
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:4: error: static import only from classes and interfaces
UATHelper: Packaging (Android (ASTC)): import static edu.cmu.pocketsphinx.SpeechRecognizerSetup.defaultSetup;
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:5: error: package edu.cmu.pocketsphinx does not exist
UATHelper: Packaging (Android (ASTC)): import static edu.cmu.pocketsphinx.Decoder.defaultConfig;
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:5: error: static import only from classes and interfaces
UATHelper: Packaging (Android (ASTC)): import static 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 does not exist
UATHelper: Packaging (Android (ASTC)): import static edu.cmu.pocketsphinx.Decoder.fileConfig;
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:6: error: static import only from classes and interfaces
UATHelper: Packaging (Android (ASTC)): import static edu.cmu.pocketsphinx.Decoder.fileConfig;
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:41: error: package edu.cmu.pocketsphinx does not exist
UATHelper: Packaging (Android (ASTC)): import edu.cmu.pocketsphinx.*;
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\sphinxue4\SpeechRecognitionWorker.java:45: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)): public class SpeechRecognitionWorker implements Runnable, RecognitionListener {
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): symbol: class RecognitionListener
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:77: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)): private SpeechRecognizer recognizer;
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): symbol: class SpeechRecognizer
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)): 12 errors
UATHelper: Packaging (Android (ASTC)): :app:compileDebugJavaWithJavac FAILED
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)): * Get more help at https://help.gradle.org
UATHelper: Packaging (Android (ASTC)): 38 actionable tasks: 38 executed
UATHelper: Packaging (Android (ASTC)): BUILD FAILED in 22s
UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c “L:\UE4\GraduationProject\Sphinx_UE4_Demo [4.19 Android]\Intermediate\Android\APK\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ASTC)): (see C:\Users\eleme\AppData\Roaming\Unreal Engine\AutomationTool\Logs\L+UE4+UE_4.23\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 dont know if someone will help but here goes nothing, my device doesnt read the mobile’s microphone , to anyone get to run this on his device , how did you allow the game to read and use mobile microphone

Hi all. I previously had managed to package a test project (not the demo) succesfully to an android device using version 4.18, then I downloaded the 4.19 demo version and it packaged smoothly but when I try to package a different project using version 4.19 implementing the SpeechRecognition plugin I get an error mentioning not finding the SpeechRecognitionWorker symbol when “making APK with gradle” process. I tried to manually place the “sphinxue4” folder in ‘ProjectName\Intermediate\Android\APK\gradle\app\src\main\java\com’ but it seems it need to be declared somewhere else because everytime I try to package the game the folder gets deleted and the same error appears.

Does anyone knows where do I need to declare or point out in code or config file that this symbol needs to be in that path? What am I doing wrong?

Can anyone please help? I can make some $ donation to someone who’s willing to help me.

Thank you very much.

I was able to package succesfully! I forgot to copy the build folders from demo project to my new project. Thanks again

It would be nice if you could post step by step mini-tutorial on how to update it for 4.23 and build it for shipping :o

Hi **GoldenZero123, **how did you get this issue to work? Could you please share with us what work around you did. I’m having the same problem.

Thank you.

I was just able to package using version 4.19. It would be nice if someone could help update the plugin to a 4.22 or 4.23 version, I haven’t tried myself.

What I did to solve the issue was to follow the steps on the very first post of this thread on how to implement the plugin in your project. Hope that helps