2012-10-29 56 views
0

我正在开发一个使用HTML5和PhoneGap的多平台应用程序,并且我的应用程序应该包含语音识别。 Android版本完美运行,但我无法在iPhone上获得语音识别工作。PhoneGap +语音识别SDK

我写了一个运行Objective-C代码的PhoneGap插件,我想用Nuance Dragon SDK进行语音识别。问题是,我有很多的问题:

Undefined symbols for architecture i386: 
    "_SecCertificateCopyData", referenced from: 
     l792 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_SecCertificateCopySubjectSummary", referenced from: 
     l791 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_SecItemAdd", referenced from: 
     l800 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_SecItemCopyMatching", referenced from: 
     l793 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l799 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l800 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_SecItemDelete", referenced from: 
     l797 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_SecItemUpdate", referenced from: 
     l800 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecAttrAccessGroup", referenced from: 
     l800 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecAttrAccount", referenced from: 
     l797 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecAttrDescription", referenced from: 
     l797 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecAttrGeneric", referenced from: 
     l793 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecAttrLabel", referenced from: 
     l797 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecClass", referenced from: 
     l793 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l798 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l799 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l800 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecClassGenericPassword", referenced from: 
     l793 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l798 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l799 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecMatchLimit", referenced from: 
     l793 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecMatchLimitOne", referenced from: 
     l793 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecReturnAttributes", referenced from: 
     l793 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecReturnData", referenced from: 
     l799 in SpeechKit(libSpeechKit.a-i386-master.o) 
    "_kSecValueData", referenced from: 
     l784 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l797 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l798 in SpeechKit(libSpeechKit.a-i386-master.o) 
     l799 in SpeechKit(libSpeechKit.a-i386-master.o) 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我还发现,这是可以使用谷歌浏览器的API,但它需要一个FLAC音频文件,它是iOS不支持。

任何人都可以在iOS上使用Nuance SDK或FLAC帮助我吗?任何帮助将是有用的!

非常感谢。

+0

尝试在真实设备上进行测试和/或从有效体系结构中删除i386。 – jcesarmobile

+0

我已经尝试过了,而且我没有在有效的体系结构上使用i386 ... –

回答

3

感谢H2CO3,我找到了解决我的问题的方法。我需要在我的项目中包含两个其他框架,Security.frameworkCoreFoundation.framework

现在,一切都好!

0

您是否将此Phonegap插件上传到任何地方,以便我们可以在我们的项目中使用它?

此外,这是唯一的Android或它会在iOS上运行吗?

+0

使用本机SDK与PhoneGap应用程序进行语音识别(据我所知)是不可能的。原因是大多数SDK(Nuance,iSpeech ...)都使用异步请求来获取识别结果,因此,您从PhoneGap应用程序调用的方法(用JS编写)将返回而无需等待语音服务器响应。您将无法使用识别结果(例如显示它...)。 –

+0

这是可能的,我创建了一个iSpeech插件,你可以等待,甚至发送多个回调 – jcesarmobile

3

虽然找到了解决这个问题的解决方案,但我想提一下,值得看看NuanceDev on Github

有使用Nuance的NDEV移动SDK构建PhoneGap的应用程序的参考实现对

+0

感谢您的信息!我将测试这个解决方案,以便对我的应用程序进行下一次更新:) –

+0

我检查了此iOS链接,并能够快速启动并运行。感谢领先 – abritez

0

我居然遇到了很多同样的问题在这帖子。我试图使用Nuance编写的参考phonegap项目,但它是为cordova 2.6项目编写的,而不是plugman兼容的。我一直在努力创建一个真正基础的跨平台插件,它允许使用细微差别sdk和cordova 3.x兼容性进行语音识别。我没有真正写过大量文档,但它确实有效,并且我已经编写了使用它的IOS 7和Android 4.x应用程序。 https://github.com/chalettu/nuance-phonegap-plugin是回购的地方。如果有人想使用它,请在github上给我发消息,并需要帮助安装和使用它。