2012-10-29 58 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上給我發消息,並需要幫助安裝和使用它。