Kitt-AI / snowboy

Future versions with model training module will be maintained through a forked version here: https://github.com/seasalt-ai/snowboy
Other
3.08k stars 997 forks source link

license error when using Jarvis hotword #447

Closed jincio92 closed 6 years ago

jincio92 commented 6 years ago

I'm having this error when i try to use the 'jarvis.umdl' model. i'm using the npm package version 1.3.1, ubuntu 16.04

ERROR (CheckLicense():universal-detect-stream.cc:1391) Your license for Snowboy has been expired. Please contact KITT.AI at snowboy@kitt.ai
terminate called after throwing an instance of 'std::runtime_error'
  what():  ERROR (CheckLicense():universal-detect-stream.cc:1391) Your license for Snowboy has been expired. Please contact KITT.AI at snowboy@kitt.ai

[stack trace: ]
/home/developer/Projects/trinity-raspberry-client/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-x64/snowboy.node(_ZN7snowboy13GetStackTraceEv+0x35) [0x7fc2e64b44e5]
/home/developer/Projects/trinity-raspberry-client/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-x64/snowboy.node(_ZN7snowboy13SnowboyLogMsgD1Ev+0x47a) [0x7fc2e64b4aca]
/home/developer/Projects/trinity-raspberry-client/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-x64/snowboy.node(_ZNK7snowboy21UniversalDetectStream12CheckLicenseEi+0xfc) [0x7fc2e64d01ec]
/home/developer/Projects/trinity-raspberry-client/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-x64/snowboy.node(_ZN7snowboy21UniversalDetectStreamC2ERKNS_28UniversalDetectStreamOptionsE+0x94a) [0x7fc2e64d8a1a]
/home/developer/Projects/trinity-raspberry-client/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-x64/snowboy.node(_ZN7snowboy14PipelineDetect4InitEv+0x75b) [0x7fc2e64a204b]
.
.
.
/home/developer/Projects/trinity-raspberry-client/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-x64/snowboy.node(+0x20ee7) [0x7fc2e6490ee7]
node(_ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE+0x193) [0xac5493]
node() [0xb43b3b]
node(_ZN2v88internal21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE+0x105) [0xb449b5]
[0x40886840bd]

when using the Alexa or the Snowboy model all it's working fine but when using Jarvis. I'm using the setting explained in the README.md with sensitivity set to '0.8,0.80' and applyFrontend set to 'true', thanks for any help or advice.

jincio92 commented 6 years ago

ok so using the Jarvis model in the master repository fix the problem, but another came up:

Loaded hotwords count does not match number of hotwords defined.

when I try to instantiate the Detector, the current Detector definition is :

this.models.add({
                file: __dirname + '/../../models/jarvis.umdl',
                sensitivity: '0.8,0.80',
                hotwords: 'jarvis'
            });
this.detector = new Detector({
    resource: __dirname + '/../../models/common.res',
    models: this.models,
    audioGain: 2.0,
    applyFrontend: true
    });

the problem appear to be that the number of model loaded from the jarvis.umdl (that seems to be 2 as explained in the README.md) and the length of the models array (that in this case is 1). Digging the library I've found this solution:

this.models.add({
                file: __dirname + '/../../models/jarvis.umdl',
                sensitivity: '0.8,0.80',
                hotwords: ['jarvis','jarvis2']
            });

I don't know if is expected to be this way, but work , in case I think the Documentation should be updated to avoid similar problem in the future. Unless it's already in....in that case I'm blind.....

chenguoguo commented 6 years ago

You are right. Could you submit a PR to README to reflect this?

The reason is that we have two models in jarvis.umdl both representing the hotword jarvis, so that's why you have to provide two sensitivities and two hotword names.

pallaviMN commented 5 years ago

@jincio92 , i am facing this issue in android & iOS, can you please give me the model that you have used. The one in the resources folder still carshes