语音到文本在模拟器上工作正常,但我在手机上收到错误

时间:2014-10-10 19:46:42

标签: winrt-xaml windows-phone-8.1

我尝试运行下面的代码,该代码在模拟器上正常运行,但如果我在设备上运行,我会在Operation is not valid due to the current state of the object.获得RecognizeWithUIAsync() 。< / p>

// Compile the dictation grammar    
await speechRecog.CompileConstraintsAsync();

// Start Recognition    
SpeechRecognitionResult speechRecognitionResult = await this.speechRecog.RecognizeWithUIAsync();

// Show Output    
var sttDialog = new Windows.UI.Popups.MessageDialog(speechRecognitionResult.Text, "Heard You said...");

await sttDialog.ShowAsync();

其他一些信息: 我的方法是;我检查了清单文件中的麦克风权限,我的设备上安装了四个声音。

0 个答案:

没有答案