Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Hololens Grammar recognizer sometimes failing silently

Discussion in 'Windows Mixed Reality' started by wightwhale, Jan 29, 2019.

  1. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    383
    I'm having trouble with the hololens grammar recognizer. When I initially start my app and the room is quiet it works pretty close to perfectly. However if I'm demonstrating my app and there's a few people in the room the grammar recognizer will either have much more trouble picking up the commands or fail entirely and no commands will work until restarting the app. I can have 2-3 hololens in the same room and on the same build and 1 will sometimes not work and I'll get the following error when I boot up the application.

    Exception thrown: 'UnityEngine.UnityException' in UnityEngineProxy.dll
    'sbirs-ar.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\sbirs-arVS.Release_x86.ww31785\System.Diagnostics.StackTrace.dll'. Symbols loaded.
    UnityException: Speech recognition is not supported on this machine.
    at UnityEngineProxy.InternalCalls.PhraseRecognizer_CUSTOM_Start_Internal(IntPtr recognizer)
    at UnityEngine.Windows.Speech.PhraseRecognizer.Start()
    at Src_GrammarRecognizer.Start()
    at Src_GrammarRecognizer.$Invoke2(Int64 instance, Int64* args)
    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    (Filename: <Unknown> Line: 0)


    However this error doesn't always show up, if it does show up the app voice recognition won't work until restarting the hololens completely.

    If you're trying to give a demo, having the grammar recognizer break because people around you are talking is a huge pain.

    I'm on 10.0.17134.111 and unity 2017.4.12f1

    I found some other people having the same issue here:
    https://forums.hololens.com/discuss...ed-since-rs4-update-in-july-2018-on-hololens?
     
  2. ChimeraScorn

    ChimeraScorn

    Official Microsoft Employee

    Joined:
    Apr 20, 2017
    Posts:
    25
    Is there any chance that the difference between cases where speech is working/not working is whether that HL has gone to sleep at some point since the last boot? I'm investigating some issues which may be related, and wanted to see if perhaps this one is tied into those.
     
  3. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    383
    It could be the HL by default goes to sleep in 3 minutes or so, so I would think that would be the case most of the time.
     
  4. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    383
    @ChimeraScorn
    I've been experimenting with the issue some more and I've determined the voice recognition fails completely on the hololens not just in my app. I can't even say the commands on the main menu. It's possible it may be cortana related as I don't have connection to the internet when using the hololens.

    When I deploy a build to a hololens that has already stopped working for voice I don't receive the prompt to give the hololens permission to access the mic, and this will hang the app for a minute or so before it will continue if it does at all. I've found that when I deploy and the prompt is not given the voice commands won't work in the app even if they are working on the main menu. It seems this can be fixed by uninstalling the app and re deploying if the commands are working on the main menu.

    I've checked the app privacy settings for the microphone in the app and they're always on regardless if I say yes to the prompt or nothing at all.

    I don't know what is causing the voice commands to break on the device to begin with but it either has to do with the device going to sleep or me deploying an app with the same name from a different computer.

    Thanks for helping,
    I'm pulling my hair out over here
     
  5. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,405
    We gave up on speech because of this and similar issues. Its really difficult to get it to be working 100% of the time, and because of that we just cant sell it to any major client.
     
  6. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    383
    I've discovered that it's related to the Settings->Privacy->Speech->Online speech recognition. My setup is to connect the devices to a wifi router that's not connected to the internet. If this setting is enabled something in the Hololens is calling out to the internet to check the speech even though there's no internet access. There seems to be a timeout failure which causes issues with the speech recognition on the entire Hololens. Disabling online speech recognition has fixed the issue for me seemingly completely. However I think there's something on the Microsoft side that needs to be addressed still because all Hololens voice recognition shouldn't be breaking if the call out to the internet fails.
     
  7. En_Bee

    En_Bee

    Joined:
    Apr 26, 2018
    Posts:
    6
    I am running into this issue as well. I've turned off the online speech recognition but this doesn't seem to help. I tried restarting speech recognizer but that didn't make any difference. Has anyone been able to successfully get it to restart after the HoloLens has gone to sleep?

    My OS voice commands still work though so I'm wondering if maybe the app is losing access to the microphone somehow.