dueros / dcs-sdk-js

Apache License 2.0
79 stars 26 forks source link

run with problem on mac #2

Closed jacquesqiao closed 7 years ago

jacquesqiao commented 7 years ago

ERROR (ExpectToken():snowboy-io.cc:166) Expected token "", got instead "". /Users/qiaolongfei/project/duer/dcs-sdk-js/snowboy/lib/node/index.js:64 this.nativeInstance = new SnowboyDetectNative(options.resource, options.models.modelString); ^

Error: ERROR (ExpectToken():snowboy-io.cc:166) Expected token "", got instead "".

[stack trace: ] 0 snowboy.node 0x0000000104942e2e _ZN7snowboy13GetStackTraceEv + 94 1 snowboy.node 0x0000000104943b05 _ZN7snowboy13SnowboyLogMsgD2Ev + 421 2 snowboy.node 0x0000000104945ce4 _ZN7snowboy11ExpectTokenEbPKcPNSt3113basic_istreamIcNS2_11char_traitsIcEEEE + 1012 3 snowboy.node 0x000000010491f3a6 _ZN7snowboy21UniversalDetectStream16ReadHotwordModelERKNSt3112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 2438 4 snowboy.node 0x000000010491e03d _ZN7snowboy21UniversalDetectStreamC2ERKNS_28UniversalDetectStreamOptionsE + 1261 . . . 10 node 0x000000010017a644 _ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE + 356 11 node 0x00000001001c4a45 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperEPNS0_7IsolateENS1_16BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE3EEE + 1765 12 node 0x00000001001cf231 _ZN2v88internalL21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE + 465 13 ??? 0x0000393a29d060c7 0x0 + 62921972408519 14 ??? 0x0000393a29d1eb1f 0x0 + 62921972509471

boilingwater commented 7 years ago

我也出现这个问题,兄台解决了没,解决了同步下解决方案呐

boilingwater commented 7 years ago

snowboy.js 改一下 改成

models.add({ //file: dirname+'/resources/snowboy.umdl', file: dirname+'/resources/alexa.umdl', sensitivity: '0.5', hotwords : ['alexa'] //file: __dirname+'/resources/xiaoduxiaodu_xiaoyuxiaoyu_large.umdl', //sensitivity: '0.9,0.9', //hotwords : ['小度小度',"小度小度"] });

应该是唤醒词的问题,用alexa 就没问题

wwwppp0801 commented 7 years ago

更新了一版代码,请尝试下在snowboy目录下执行以下过程

npm install -g node-pre-gyp
node-pre-gyp clean
node-pre-gyp configure
node-pre-gyp build