在pocketshpinx上运行用sphinx4编写的程序的最简单方法是什么?我需要可以在各种移动平台上使用的东西,比如 iphone 和 android 手机。我已经用 Java 用 sphinx4 编写了演示,但现在我需要它们用 C 语言编写。
谢谢:)
来自官方文档
sphinx4 的灵活性使您可以快速构建这样的系统。很容易将 sphinx4 嵌入到 red5 之类的 flash 服务器中以提供基于 Web 的识别,很容易管理许多在集群上进行大规模解码的 sphinx4 实例。
另一方面,如果您的系统需要高效且相当准确,如果您在嵌入式设备上运行,或者您对使用 Erlang 等外来语言的识别器感兴趣,那么 pocketsphinx 是您的选择。将 Java 与 JVM 不支持的其他语言集成起来非常困难,pocketsphinx 在这里要好得多。
综上所述
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
Sphinx4 和 PocketShpinx 在实现方面完全不同,您必须重写演示,或者更糟糕的是,PocketSphinx 可能不支持它们。如果您使用一些 Sphinx4 高级功能,就会发生这种情况。
如果您围绕pocketsphinx 编写了一个JNI 包装器,那么您可以在您的java 代码中使用它。
pocketsphinx 也有 python 语言绑定。
本质上,pocketsphinx 是你应该使用的语音识别器,如果你想要一个 C 语言语音识别器(它也是一个设计得足够快,可以在手机上工作的语音识别器)。