Following This tutorial i am doing a sample program of speech recognition in WP8.I code like:
public async void SpeechToText_Click(object sender, RoutedEventArgs e)
{
SpeechRecognizerUI speechRecognition=new SpeechRecognizerUI();
SpeechRecognitionUIResult recoResult=await speechRecognition.RecognizeWithUIAsync();
if (recoResult.ResultStatus == SpeechRecognitionUIStatus.Succeeded)
{
MessageBox.Show(string.Format("You said {0}.", recoResult.RecognitionResult.Text));
}
}
After running the program,i always face a message "We're sorry but we can't access the network right now" said by a voice.
Does internet connection needed for it?I check my internet connection but it is good,so what's the problem there,can anyone explain?Is it a emulator problem or i am missing something?
Speech Recognition is one of the Ease of Access facilities available in Windows 8 that gives you the ability to command you computer or device by voice.
Enter speech recognition in the search box, and then tap or click Windows Speech Recognition. Say "start listening," or tap or click the microphone button to start the listening mode. Open the app you want to use, or select the text box you want to dictate text into. Say the text you want to dictate.
Speech recognition requires access to Microsoft Cloud Services. Many people have problems getting their emulator to work well with internet enabled apps. Here's the MSDN article on troubleshooting that issue. If I were you I'd verify you can actually access the internet on the emulator using a simple WebBrowser
and trying to navigate to a site of your choosing. If you aren't able to access an external site, voice recognition will not work on your emulator.
You might want to test voice recognition on the emulator as you would initiate it on a regular phone. Just click and hold the mouse button over the top of Windows button, at the bottom of the emulator.
On a freshly started emulator this should bring up a 'license agreement' & instructions for using voice commands, to which the user has to accept/decline the license agreement.
Then you can test the open ended voice recognition through the system, to see if it's something wrong in your app or on the phone/system.
It doesn't sound like this is your problem, but in my dealings with WP8's voice recognition, this 'first-run license message' can cause some problems with your app. That license notice will pop up even if you are not using the WP dialog for voice recognition. You particularly see this on the emulator, because every time you start it up, it's essentially a 'new phone', requiring the user to accept the license.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With