简体   繁体   English

在没有NDK的Android上使用CMUSphinx

[英]Using CMUSphinx on Android without NDK

I am trying to write a speech recognition program for Android, the most popular one for Windows seems to be here: https://sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo 我正在尝试为Android编写语音识别程序,最流行的Windows似乎在这里: https : //sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo

The link for PocketsphinxAndroidDemo seems to be broken, so downloaded it from here , which I found here . PocketsphinxAndroidDemo的链接似乎已断开,因此请从此处下载,我在此处找到该链接。 If I use this version of PocketSphinxAndroid, it needs a lot of modification in the Eclipse project settings, however, at the end of the day, I was able to get it to work 如果使用此版本的PocketSphinxAndroid,则需要在Eclipse项目设置中进行大量修改,但是最终,我能够使它正常工作

But now I realize that PocketSphinxAndroid is just a user interface for the phone, while pocketsphinx and sphinxbase are the ones that are actually doing the speech recognition. 但是现在我意识到PocketSphinxAndroid只是电话的用户界面,而Pocketsphinx和sphinxbase实际上是进行语音识别的用户界面。 Unlike Sphinx 4 (whichi s written in Java), they are written in C and so have to be compiled using the NDK, which is something I am not familier with. 与Sphinx 4(用Java编写)不同,它们是用C编写的,因此必须使用NDK进行编译,这是我不熟悉的。 I was hoping to to use something such as Sphinx 4, written in java, but for the Android DVM. 我希望使用以Java编写的Sphinx 4之类的东西,但要用于Android DVM。

So the question is, is a version of pocketsphinx available which is entirely written in Android Java , or is it possible to modify Sphinx 4 to work under android (for example, use Android'd AudioRecord instead of the Microphone class to get audio input samples) ? 因此,问题是, 是否可以使用完全用Android Java编写的Pocketsphinx版本 ,还是可以修改Sphinx 4以使其在android下工作(例如,使用Android的AudioRecord而不是Microphone类来获取音频输入样本) )

is there a version of pocketsphinx available which is entirely written in Android Java, 是否有可用的Pocketsphinx版本完全用Android Java编写,

No, there is no such thing, pocketsphinx is written in C, not in java. 不,没有这样的东西,pocketsphinx用C而不是Java编写。

is it possible to modify Sphinx 4 to work under android (for example, use Android'd AudioRecord instead of the Microphone class to get audio input samples)? 是否可以修改Sphinx 4以使其在android下工作(例如,使用Android的AudioRecord而不是Microphone类来获取音频输入样本)?

Yes, it is possible. 对的,这是可能的。 See for details: 查看详情:

https://sourceforge.net/p/cmusphinx/mailman/message/31316830/ https://sourceforge.net/p/cmusphinx/mailman/message/31316830/

There are attachment java files which implement everything required. 有附件Java文件,可实现所需的所有内容。

However, this system will be too slow for limited mobile device resources, it's better to use pocketsphinx for android, it's actually very easy to setup and you don not need any specific NDK knowledge for that. 但是,对于有限的移动设备资源而言,该系统太慢了,最好在Android上使用Pocketsphinx,它实际上非常容易设置,并且您不需要任何特定的NDK知识。 If you have issues with pocketsphinx setup on android, you are welcome to ask, see also 如果您在Android上的Pocketsphinx设置有问题,欢迎提出疑问,另请参见

Why does PocketSphinx Android demo require cygwin 为什么PocketSphinx Android演示需要cygwin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM