我正在尝试使用语音识别来制作Xamarin.Forms项目。对于Android完成而且很简单,但我对iOS很不满。
我发现并且我开始关注Open Ears。
当试图使用它时,我发现了一些问题: 首先我尝试使用这个git: 但monotouch对Xamarin.iOS无效:
https://github.com/oganix/MonoTouch-OpenEars
接下来,我发现了这个问题https://www.dropbox.com/s/41rc7iyskbwby9n/error_phoenix.png?dl=0。
阅读之后,我尝试制作一个绑定的proyect,现在我在使用sharpie自动生成Open Ears API时遇到了这个问题:
/Users/cristian.fernandez/Workspace/Speech-iOS/OpenEarsDistribution/Framework/OpenEars.framework/Versions/A/Headers/acmod.h:50:10: fatal error: 'sphinxbase/cmd_ln.h' file not found
#include <sphinxbase/cmd_ln.h>
^
Binding...
System.ArgumentNullException: Value cannot be null.
Parameter name: annotation
at ICSharpCode.NRefactory.AbstractAnnotatable.AddAnnotation (System.Object annotation) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.AstNode.AddAnnotation (System.Object annotation) in <filename unknown>:line 0
at Sharpie.Bind.Massagers.AnonymousStructMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) in <filename unknown>:line 0
at Sharpie.Bind.Massagers.AnonymousStructMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) in <filename unknown>:line 0
at Sharpie.Bind.DocumentSyntaxTree.AcceptVisitor (IAstVisitor visitor) in <filename unknown>:line 0
at Sharpie.Bind.BindingMassager.Massage (ICSharpCode.NRefactory.CSharp.AstNode astNode, BindingTarget bindingTarget) in <filename unknown>:line 0
at Sharpie.Bind.BindingFrontend.Bind (Clang.Ast.Decl decl) in <filename unknown>:line 0
at Sharpie.BindTool.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl decl) in <filename unknown>:line 0
at Clang.Driver.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl translationUnit) in <filename unknown>:line 0
at Clang.Driver.HandleTranslationUnit (IntPtr translationUnit) in <filename unknown>:line 0
at (wrapper managed-to-native) Clang.Driver:RunInternal (Clang.Driver,string[],string,Clang.Frontend.DiagnosticConsumer)
at Clang.Driver.Run (System.String[] inputFiles, System.String[] clangArgs, Clang.Frontend.DiagnosticConsumer diagnosticConsumer) in <filename unknown>:line 0
at Sharpie.ParseTool.Run () in <filename unknown>:line 0
at Sharpie.BindTool.CoreRun () in <filename unknown>:line 0
at Sharpie.BindTool.Run () in <filename unknown>:line 0
我用它来发射锐利:
sharpie bind --output=libOpenEars --namespace=libOpenEars --sdk=iphoneos9.2 /Users/cristian.fernandez/Workspace/Speech-iOS/OpenEarsDistribution/Framework/OpenEars.framework/Versions/A/Headers/*.h
除了哭之外我现在能做什么?
谢谢大家,对不起我的英语。