Passive Speech Listening on Windows Phone

 

I was running some passive speech recognition code in a Windows Phone project and I kept getting the following error

The speech privacy policy was not accepted prior to attempting a speech recognition

image

I was using the non-UI recognizer for passive listening on a thread.

SpeechRecognizer spchRecog = new SpeechRecognizer();

SpeechRecognitionResult spchResult = await spchRecog .RecognizeAsync();

instead of

SpeechRecognitionResult spchResult = await spchRecog .RecognizeWithUIAsync();

Found the privacy policy error on MSDN, and implemented the recommend exception handling.

http://msdn.microsoft.com/library/windows/apps/jj662934(v=vs.105).aspx#BKMK_Handlingthespeechprivacypolicyerror

In the exception handling code on MSDN, the default error message shown to the user is

“You will need to accept the speech privacy policy in order to use speech recognition in this app.”

Now imagine my mom using this application and she gets this message. There is no reference to what does it mean by speech privacy policy. My mom will get confused, and she does use a Windows Phone.

Actually, you have to just let the user know to enable the speech recognition service by navigating to

Home->Settings->Speech->Enable Speech Recognition Service

image

Ideally, the error message should automatically navigate the user to the appropriate setting. But that’s a long shot. In the short term, I modified the error message to

“In order to use speech recognition, you will need to enable the speech recognition service by navigating to Home Page->Settings->Speech->Enable Speech Recognition Service.”

image

Good enough for my mom for now. If you see any cryptic error message regarding speech privacy policy, first check whether the Speech Recognition Service is enabled on the phone or not.

That’s it! The recognizer to work like a charm.

 

Thanks,

Tejaswi

Tejaswi Redkar

Leave a Comment

Your email address will not be published. Required fields are marked *