7

I work with SpeechRecognitionEngine from the namespace System.Speech in inproc-mode for doing some automation work. The speech recognition is started via RecognizeAsync.

It works fine, however, when the computer gets locked, speech recognition stops. As soon as the computer gets unlocked, the recognition is active again. While this is probably a meaningful behavior for most applications, for mine, it is an issue. I have searched the web, but not found a solution to disable this behaviour.

How can I parameterize the SpeechRecognition not to stop when the computer is locked?

(Please note: The app is a conventional Windows WPF application, not a Windows Store App)

HCL
  • 34,231
  • 24
  • 150
  • 202
  • Why the close-request? It’s perfectly about coding. Is it because the word “configure”? Should I have better written “parameterize”? I’m not native english speaking and therefore please forgive me the wrongly used word. But I think, this question makes perfectly sense for SO. Changed the word. – HCL Dec 20 '13 at 18:38

3 Answers3

2

Some ideas which might be too crazy to work to hopefully trigger some ideas that might work:

  • Using ControlChannelTrigger to keep pinging your app to wake up and try recognizing speech at intervals? This listener allows your app to process network data in the background.
  • Try out Google Chrome's hotword (OK, Google) extension and see if it works behind the lock screen. If they can do it, then it's possible.
  • Do you have to lock the screen, isn't it possible to not have it locked?

Some references:

Similar questions:

David d C e Freitas
  • 7,146
  • 4
  • 54
  • 66
  • The app does not sleep, it does other tasks without problems (under the lock screen), it's only the speech recognition which stops to work. By the way, it's a conventional windows app, not a windows store app). But thanks anyway. – HCL Dec 11 '13 at 15:00
2

Do you have "Enable voice activation" option enabled in Windows?

It looks like the behavior you describe is expected when "Enable voice activation" option is disabled in Control Panel | Speech recognition. Though, it can be unrelated to locked Windows.

See "Setting speech options":

Enable voice activation
Sets Speech Recognition to start in sleep mode and allows Speech Recognition to enter sleep mode when you say "stop listening."

On the other hand, I don't think that using Speech Recognition with locked device is valid operation (security reasons). Unless you are going to spell your password instead of typing it. :)

bahrep
  • 26,679
  • 12
  • 95
  • 136
2

See this article on how to launch an application on the secure desktop (a.k.a. lock screen).

Obsidian Age
  • 36,816
  • 9
  • 39
  • 58
Knuckle-Dragger
  • 5,876
  • 4
  • 21
  • 38
  • +1 Interesting, this may help. I will try something in this direction as soon as possible. – HCL Dec 13 '13 at 13:17
  • My other idea was to run the app as a service similar to how the onscreen keyboard works. – Knuckle-Dragger Dec 13 '13 at 13:32
  • I have read the article and I think even when it works, it will not serve for my case. However I like the idea and maybe it would have worked. I will probably really try with implementing it in a service, what will give me a lot of overhead due to the UI-communication between my app and the service, but it seems the only solution (we will see). Thanks and I give you the bounty, the idea is not what I needed, but no one proposed a better one. – HCL Dec 13 '13 at 18:45