【问题标题】:PhoneGap + Speech Recognition SDKPhoneGap + 语音识别SDK
【发布时间】:2015-03-15 12:15:00
【问题描述】:

我正在使用 HTML5 和 PhoneGap 开发一个多平台应用程序,我的应用程序应该包括语音识别。安卓版完美运行,但我无法在 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)

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

谁能帮助我使用 iOS 上的 Nuance SDK 或 FLAC?任何帮助都会很有用!

非常感谢。

【问题讨论】:

  • 尝试在真实设备上进行测试和/或从有效架构中移除 i386。
  • 我已经尝试过了,但在有效架构上我还没有 i386...

标签: iphone ios cordova sdk speech-recognition


【解决方案1】:

感谢H2CO3,我找到了解决问题的方法。我需要在我的项目中加入另外两个框架,Security.frameworkCoreFoundation.framework

现在,一切正常!

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

    • 感谢您的信息!我将为我的应用程序的下一次更新测试此解决方案:)
    • 我查看了这个 iOS 链接并且能够非常快速地启动并运行一些东西。感谢领导
    【解决方案3】:

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

    这只是 Android 还是 iOS 也能用?

    【讨论】:

    • 使用带有 PhoneGap 应用程序的原生 SDK 进行语音识别(据我所知)是不可能的。原因是大多数 SDK(Nuance、iSpeech...)使用异步请求来获取识别结果,因此您从 PhoneGap 应用程序(用 JS 编写)调用的方法将返回,而无需等待语音服务器响应。您将无法使用识别结果(例如显示它...)。
    • 有可能,我创建了一个iSpeech插件,你可以等待甚至发送多个回调
    【解决方案4】:

    我实际上在这篇文章中遇到了很多相同的问题。我尝试使用 Nuance 编写的参考 phonegap 项目,但它是为 cordova 2.6 项目编写的,与 plugman 不兼容。我致力于创建一个非常基本的跨平台插件,它允许使用 nuances sdk 和 cordova 3.x 兼容性进行语音识别。我还没有真正写过关于它的大量文档,但它确实有效,并且我已经编写了正在使用它的 IOS 7 和 android 4.x 应用程序。 https://github.com/chalettu/nuance-phonegap-plugin 是仓库所在的位置。如果有人想使用它并需要帮助安装和使用它,请在 github 上给我留言。

    【讨论】:

      猜你喜欢
      • 2011-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多