Keyword Spotting in Speech on Android?

ぃ、小莉子 提交于 2019-11-27 19:05:23

问题


I need to use speech input to insert text. How can i detect keyword when I'm speaking ?

Can i do this with Android Speech Input or I need external library ? Any ideas ?

Thanks


回答1:


Keyword detection task is different from a speech recognition task. While second tries to understand the text being spoken and check all possible word combinations, keyword spotting usually check two hypothesis - word is here or garbage is here. Its way more efficient to check keyword presence but it requires custom algorithm. You can implement one with the open source speech recognition toolkit like CMUSphinx.

http://cmusphinx.sourceforge.net

Which runs on Android too, you can check

Voice command keyword listener in Android

to see how to integrate it.




回答2:


Absolutely.

See this for some code that detects the "magic word"

Just launch an Intent with ACTION_RECOGNIZE_SPEECH and then check the results for your keyword. Checking for the keyword can be complicated, but this code should get you started.

https://github.com/gmilette/Say-the-Magic-Word-




回答3:


I used the Snowboy library for this task
Website: https://snowboy.kitt.ai
Github: https://github.com/kitt-ai/snowboy

It is a C library but it can be included in Android code using the JNI. The only downside to it is that you have to train it with audio samples if you want to use another keyword than the ones that come with the library.



来源:https://stackoverflow.com/questions/9533808/keyword-spotting-in-speech-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!