linto-ai / WebVoiceSDK

Buildings block for voice-enabled applications in the browser
GNU Affero General Public License v3.0
33 stars 10 forks source link

Hotwords detection is not working with a fresh build #3

Closed pierreclr closed 3 years ago

pierreclr commented 3 years ago

Description

Hotword service worker throw an error message ExitStatus {name: "ExitStatus", message: "Program terminated with exit(1)", status: 1} after a fresh build.

How to reproduce

I'm afraid that my knowledges and skills doesn't allow me a further investigation ...

damienlaine commented 3 years ago

Hello, I can confirm that there's something fishy. I'll try to fix that by the week-end

damienlaine commented 3 years ago

Still need some time to investigate that. If you fancy it, it would be super-nice if you have some time for simply trying to update TFJS to the latest version and building again.

The problem certainly comes from an external dependency, as you suggest, and i can't rly figure out which one. Things are pretty constrained in the current package.json file.

I guess there's something fishy in https://github.com/linto-ai/WebVoiceSDK/blob/master/src/webvoicesdk/nodes/hotword.js#L1-L8 in the worker itself (that loads a specific version of TFJS) i guess they have rebuilt the version and changed, somehow, some bits.

I'll check all of that at one point in the future time but i'm super-booked on other subjects these upcoming weeks. Try to motivate me, i might enjoy a week-end of coding if it's enjoyable...

pierreclr commented 3 years ago

I found the problem : fixing tensorflow dependencies to 2.6.0 in package.json or increasing to 2.8.6 the ones loaded trough CDN fixed the problem. I choose to increase those loaded through CDN since it allows us to use minified tf-backend-wasm.min.js

See 593f8c99e3cb684717fa080ff84663c30e79b8ab

For the future I suggest to use yarn for dependencies management to ensure versions are locked by adding yarn.lock in the repository. If you want to keep it the old way through npm we should probably remove package-lock.json from .gitignore

What do you think about that ?

For now I fixed the versions directly in package.json added the related commit to my initial PR and rebuild webVoiceSDK-linto.min.js

damienlaine commented 3 years ago

Thx for the test and for your successful contribution. I will clean-up all of this very soon.

I'm perfectly aware of the yarn.lock or package-lock and these files are mandatory in the commits accordingly to the best practices. My mistake, for some reason i ended up adding the package-lock in gitignore. Sorry for that.

Let's keep in touch for further testing of the lib, i would be very pleased to see that used in your production worflow.