Tag: pocketphinx android

使用pocketsphinx识别器进行语音反馈

仍然使用相同的项目,这是Run pocketSphinx和Google TTS的延续。 我已经根据Nikolay Shymyrev的指南做了修改并做了很多帮助。 但我想要实现的最终function仍然存在。 谷歌TTS现在运行得很好,但识别器有一些问题。 如果谷歌TTS有些话很长,那么识别器就无法启动 Speaker.speak(“Drive mode now will be enabled. I will read your new messages for you now.”); 然后我的onPartialResult如果条件不能满足就好 if (text.equals(“exit”)) { speaker.speak(“yeah get in”); recognizer.cancel(); Intent i = new Intent(getApplicationContext(),PocketSphinxActivity.class); startActivity(i); 我认为识别器总是听,因为它在后台运行,然后它听取谷歌TTS句子,导致它后来不会识别我的演讲。 因为当我使用免提麦克风时, speaker.Speak的句子只是”Drive mode enabled” ,它会很好地识别我的下一个字,并在我说”exit”时执行上面的if条件。 但是,如果句子很长,就像”Drive mode now will be enabled, I will read bla bla bla”它不会听我的”exit”字。 […]