Android的离线语音识别与简单的命令/词汇 [英] Android offline voice recognition with simple commands/vocabulary
问题描述
我在找一些库,让我建立在我的Android应用程序离线语音识别。将有简单的词汇组成的高达15短(一个字)命令我的应用程序。响应时间是在我的情况是至关重要的。
I am looking for some library that would allow me to create an offline voice recognition inside my Android app. There will be simple vocabulary consisting of up to 15 short (one word) commands for my app. Response time is crucial in my case.
有没有可行的脱机选项(不含放大器;支付)?我知道狮身人面像的离线版本,但将它与最快的响应(再次,我只需要我的应用程序,以识别几个命令不整的语音到文本的功能)?
Is there any viable offline option (free & paid)? I am aware of offline version of Sphinx but will it be the option with fastest response (again, I only need my app to recognize few commands not the whole speech-to-text functionality)?
推荐答案
我已经使用PocketSphinx对于这种类型的应用取得了成功。我建议建立 PocketSphinx演示的应用程序,使用在线狮身人面像 lmtool 建立你简短的命令列表中的语言模型看它是否符合你的反应时间的需求。如果 onResults
回调不够快,你可以使用 onPartialResults
回调几乎立即返回 - 这就是我这样做,我很高兴的表现。该演示应用程序有一个小的内置计时器在UI了。
I've had success using PocketSphinx for this type of application. I'd suggest building the PocketSphinx Demo app, use the online sphinx lmtool to build language model of your short list of commands and see if it meets your response time needs. If the onResults
callback isn't fast enough, you can use the onPartialResults
callback which returns almost immediately--that's what I do and I'm happy with the performance. The demo app has a little built-in timer in the UI, too.
如果您使用在线 lmtool ,你可以采取流明
文件,并从它产生的字典
文件,使用这些更换相应流明
和字典
中的语言模型文件,它们指向您在演示设置说明。
If you use the online lmtool, you can just take the lm
file and the dict
file from what it produces, using those to replace the corresponding lm
and dict
files in the language model they point you to in the demo setup instructions.
这是得到建立了一个有点疼痛,但是这是我第一次使用NDK,这是挑剔的。
It was a bit of a pain to get built, but it was my first time using the NDK, which was finicky.
这篇关于Android的离线语音识别与简单的命令/词汇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!