开发者

Sphinx4 vs Pocketsphinx

开发者 https://www.devze.com 2023-02-05 03:07 出处:网络
What\'s the easiest way to run a program written in sphinx4 on pocketshpinx? I need something that can be used on various mobile platforms, like the iphone and android phones.

What's the easiest way to run a program written in sphinx4 on pocketshpinx? I need something that can be used on various mobile platforms, like the iphone and android phones. I have already written demos in sphinx4 in Java, but 开发者_如何学JAVAnow I need them to be in C.

Thanks:)


From official documentation

Flexibility of sphinx4 allows you to build such a system quickly. It's easy to embed sphinx4 into flash server like red5 to provide web-based recognition, it's easy to manage many sphinx4 instances doing large-scale decoding on a cluster.

On the other side, if your system needs to be efficient and reasonably accurate, if you are running on embedded device or you are interested in using recognizer with some exotic language like Erlang, pocketsphinx is your choice. It's very hard to integrate Java with other languages not supported by JVM pocketsphinx is way better here.

in conclusion

  • need speed or portability -> use pockesphinx
  • need flexibility and managibility -> use sphinx4


TL;DR - use pocketshpinx

Use a C library if you plan to develop application on multiple platforms. Both Android (via NDK) and iOS(natively) support loading and calling C library. There is no JVM on iOS, thus, you won't be able to use sphinx on iOS.

To save time, pocketphinx-android-demo github repo has precompiled pocketsphinx libraries for all the relevant platforms - https://github.com/cmusphinx/pocketsphinx-android-demo/tree/master/app/src/main/jniLibs

You get both performance and potability(you have to compile for arm and x86) with C/C++ libraries. Here is a Dropbox, Inc. talk on how they use C++ for writing multi platform applications. https://www.youtube.com/watch?v=ZcBtF-JWJhM


If you wrote a JNI wrapper around pocketsphinx, then you could use that from your java code.

There are also python language bindings for pocketsphinx.

Essentially pocketsphinx is the speech recognizer you should use if you want a C language speech recognizer (and is also the one designed to be fast enough to work on a mobile phone).


Sphinx4 and PocketShpinx are completely different regarding implementation, you have to rewrite the demos or worse they might be not supported in PocketSphinx. That happens if you use some Sphinx4 advanced features.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号