khanhuitse05 / speech-and-text-unity-ios-android

Speed to text in Unity iOS use Native Speech Recognition
MIT License
286 stars 124 forks source link

Callbacks never get triggered on Oculus. #66

Open StuartWright opened 2 years ago

StuartWright commented 2 years ago

Got it working fine for my Android phone but when using it for Oculus after putting in logs the callbacks for OnStopRecording() never get triggered.

naki2 commented 2 years ago

Have you found some solution to this problem? I have the same issue.

StuartWright commented 2 years ago

I have found 2 solutions. First off this packet will never work for Oculus. After trying many SDK's and getting them working on mobile but not Oculus and with no reasons why it doesn't work, I came across a guy saying the Oculus is a bare bones Android device so it doesn't support some functionalities such as voice recognition by default.

The solutions I found you will unfortunately have to pay but their not too expensive/ you can get them on sales.

First solution: "Speech Recognition System" on the Unity asset store. Its quite expensive so I recommend getting it on sale but this is the one I ended up using. Its extremely easy to set up, you just add the prefab it provides and drag your text object in to the output, plus is supports a lot of languages as well as its usable offline.

Second solution: KeenASR. I sort of got this one working but it wasn't fully picking up words. I found out this is because you need a custom "decoding graph" (no idea what it is) but apparently its how it recognises speech or something(Im probable completely wrong) but from what the support guy said if your looking to only use key words or say a whole story then you choose a decoding graph appropriate to what your using it for. I haven't looked into the decoding graphs as I got the first solution working but I can confirm it is usable in VR.

naki2 commented 2 years ago

Thanks for the information, Stuart. I tested the "Speech Recognition System" and it looks that it work fine. But this system does not include the Text To Speech case, right? You have an alternative for the case Text to Speech? And thanks to you for the fast response, it was really useful :D

StuartWright commented 2 years ago

@naki2 I'm glad I could help but unfortunately I dont need text to speech so I've never looked into it:/ Im pretty sure ive seen a different packet on the asset store for it. Although it seems a pain to have to buy two different packs for a relatively similar function. Out of curiosity have you tried using this package (j1mmyto9) one for text to speech in VR, because I would have thought text to speech is a bit more basic and the device might support it?

StuartWright commented 2 years ago

Just a quick update for anyone that is interested. It seems KeenASR is primarily used for voice to text of the program knows what the user is going to say. For instance commands such as "go forward" etc, rather than voice dictation.