PhoneGap +语音识别SDK

时间:2012-10-29 11:37:50

标签: iphone ios cordova sdk speech-recognition

我正在使用HTML5和PhoneGap开发一个多平台应用程序,我的应用程序应该包括语音识别。 Android版本运行良好,但我无法在iPhone上获得语音识别功能。

我写了一个运行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)

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

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

非常感谢。

4 个答案:

答案 0 :(得分:3)

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

现在,一切都好!

答案 1 :(得分:3)

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

使用Nuance的NDEV Mobile SDK构建PhoneGap应用程序的参考实现

答案 2 :(得分:0)

你有把这个Phonegap插件上传到任何地方,所以我们也可以在我们的项目中使用它吗?

这也只是Android,还是可以在iOS上运行?

答案 3 :(得分:0)

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