Tag: pocketsphinx android

在C#AccesViolationException中调用Pocketsphinx

我正在尝试使用pinvoke在C#中执行pocketsphinx 教程 ,但在尝试使用ps_decode_raw()进行解码时会获得AccessViolationException。 IntPtr ps = PocketSphinx.ps_init(config); IntPtr fh = Win32Util.fopen(@”goforward.raw”, “rb”); int rv = PocketSphinx.ps_decode_raw(ps, fh, “goforward”, -1); function包括如下 //ps_decoder_t* ps_init(cmd_ln_t* config) [DllImport(“pocketsphinx.dll”, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] public extern static IntPtr ps_init( IntPtr config); //int ps_decode_raw(ps_decoder_t *ps, FILE *rawfh, char const *uttid, long maxsamps); [DllImport(“pocketsphinx.dll”, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] public […]