Git Product home page Git Product logo

node-personal-wakeword's People

Contributors

decahedron1 avatar dependabot[bot] avatar mathquis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-personal-wakeword's Issues

No License File

Hi, this looks to be exactly what I need, but without a license picked, I cannot use it.
An MIT or other Commercial friendly choice would be awesome.

Thanks

Keywords

Can you provide the audio samples that you used ?

// Add a new keyword using multiple "templates"
	await detector.addKeyword('alexa', [
		// WAV templates (trimmed with no noise!)
		'./keywords/alexa1.wav',
		'./keywords/alexa2.wav',
		'./keywords/alexa3.wav'
	], {
		// Options
		disableAveraging: true, // Disabled by default, disable templates averaging (note that resources consumption will increase)
		threshold: 0.52 // Per keyword threshold
	})

npm install on Macos not work

Node v18.8.0:

npm i
npm ERR! code 1
npm ERR! path /Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist
npm ERR! command failed
npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build
npm ERR! CXX(target) Release/obj.target/gist/src/binding.o
npm ERR! Failed to execute '/Users/xxx/.nvm/versions/node/v18.8.0/bin/node /Users/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v108-darwin-x64/gist.node --module_name=gist --module_path=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v108-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | x64
npm ERR! node-pre-gyp info check checked for "/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v108-darwin-x64/gist.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/mathquis/node-gist/releases/download/1.0.3/gist-v1.0.3-node-v108-darwin-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/mathquis/node-gist/releases/download/1.0.3/gist-v1.0.3-node-v108-darwin-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @mathquis/[email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/mathquis/node-gist/releases/download/1.0.3/gist-v1.0.3-node-v108-darwin-x64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/xxx/Library/Caches/node-gyp/18.8.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/xxx/Library/Caches/node-gyp/18.8.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/xxx/Library/Caches/node-gyp/18.8.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! clang: error: no such file or directory: '2/node_modules/@mathquis/node-gist/node_modules/node-addon-api'
npm ERR! make: *** [Release/obj.target/gist/src/binding.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.6.0
npm ERR! gyp ERR! command "/Users/xxx/.nvm/versions/node/v18.8.0/bin/node" "/Users/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v108-darwin-x64/gist.node" "--module_name=gist" "--module_path=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v108-darwin-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd /Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist
npm ERR! gyp ERR! node -v v18.8.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/xxx/.nvm/versions/node/v18.8.0/bin/node /Users/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v108-darwin-x64/gist.node --module_name=gist --module_path=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v108-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.6.0
npm ERR! node-pre-gyp ERR! command "/Users/xxx/.nvm/versions/node/v18.8.0/bin/node" "/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist
npm ERR! node-pre-gyp ERR! node -v v18.8.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2022-10-29T17_41_54_178Z-debug-0.log

Node v16.18.0:

npm i
npm ERR! code 1
npm ERR! path /Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist
npm ERR! command failed
npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build
npm ERR! CXX(target) Release/obj.target/gist/src/binding.o
npm ERR! Failed to execute '/Users/xxx/.nvm/versions/node/v16.18.0/bin/node /Users/xxx/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v93-darwin-x64/gist.node --module_name=gist --module_path=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v93-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | x64
npm ERR! node-pre-gyp info check checked for "/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v93-darwin-x64/gist.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/mathquis/node-gist/releases/download/1.0.3/gist-v1.0.3-node-v93-darwin-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/mathquis/node-gist/releases/download/1.0.3/gist-v1.0.3-node-v93-darwin-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @mathquis/[email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/mathquis/node-gist/releases/download/1.0.3/gist-v1.0.3-node-v93-darwin-x64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.18.0/node-v16.18.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.18.0/node-v16.18.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.18.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.18.0/SHASUMS256.txt
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/xxx/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/xxx/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/xxx/Library/Caches/node-gyp/16.18.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/xxx/Library/Caches/node-gyp/16.18.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/xxx/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/xxx/Library/Caches/node-gyp/16.18.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! clang: error: no such file or directory: '2/node_modules/@mathquis/node-gist/node_modules/node-addon-api'
npm ERR! make: *** [Release/obj.target/gist/src/binding.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/xxx/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 21.6.0
npm ERR! gyp ERR! command "/Users/xxx/.nvm/versions/node/v16.18.0/bin/node" "/Users/xxx/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v93-darwin-x64/gist.node" "--module_name=gist" "--module_path=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v93-darwin-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist
npm ERR! gyp ERR! node -v v16.18.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/xxx/.nvm/versions/node/v16.18.0/bin/node /Users/xxx/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v93-darwin-x64/gist.node --module_name=gist --module_path=/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/lib/binding/Release/node-v93-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1100:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.6.0
npm ERR! node-pre-gyp ERR! command "/Users/xxx/.nvm/versions/node/v16.18.0/bin/node" "/Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist
npm ERR! node-pre-gyp ERR! node -v v16.18.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2022-10-29T17_42_43_230Z-debug-0.log

Node v14.20.1:

npm i

> @mathquis/[email protected] preinstall /Users/xxx/Desktop/test 2/node_modules/@mathquis/node-gist
> npm install @mapbox/node-pre-gyp

npm notice created a lockfile as package-lock.json. You should commit this file.
+ @mapbox/[email protected]
added 56 packages from 22 contributors and audited 56 packages in 1.419s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities


> [email protected] install /Users/xxx/Desktop/test 2/node_modules/node-vad
> node-gyp rebuild

  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/complex_fft.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/ilbc_specific_functions.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/levinson_durbin.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/min_max_operations.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/randomization_functions.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/real_fft.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/resample.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/resample_48khz.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/resample_by_2.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/resample_by_2_internal.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/resample_fractional.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/spl_core.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/spl_init.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/splitting_filter.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/spl_sqrt.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/spl/spl_sqrt_floor.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/vad/vad_core.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/vad/vad_filterbank.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/vad/vad_gmm.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/vad/vad_sp.o
  CC(target) Release/obj.target/webrtc_vad/vendor/webrtc_vad/vad/webrtc_vad.o
  LIBTOOL-STATIC Release/webrtc_vad.a
env: python: No such file or directory
make: *** [Release/webrtc_vad.a] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/xxx/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/xxx/.nvm/versions/node/v14.20.1/bin/node" "/Users/xxx/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xxx/Desktop/test 2/node_modules/node-vad
gyp ERR! node -v v14.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN test 2 No description
npm WARN test 2 No repository field.
npm WARN test 2 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2022-10-29T17_46_20_812Z-debug.log

Question Mobile

hi I would like to ask a trivial information, could I implement this library for a project in react native? simply a personal assistant

Unable to detect keyword more than 17 times

It seems that node-personal-wakeword doesn't want to detect a keyword more than 17 times. I have it hooked up to Discord.js, an API for interacting with Discord. It gives me a 48KHz stereo audio stream which I use node-libsamplerate to resample to 16KHz/mono. (Also, Discord only gives audio when the user is speaking; the audio stream isn't continuous and doesn't have silence, not sure if that has anything to do with it). Everything works fine, except if it detects the wakeword more than 17 times, it completely stops detecting wakewords.

Code (the wakeword bit anyways):

// manual ending ensures the stream doesn't stop when the user stops speaking
const audioStream = connection.receiver.createStream(user, { mode: 'pcm', end: 'manual' });
const resampler = new Resample({
	type: Resample.SRC_SINC_MEDIUM_QUALITY,
	channels: 1,
	fromRate: 48000,
	fromDepth: 16,
	toRate: 16000,
	toDepth: 16
});
resampler.setRatio((1 / 3) / 2);

const detector = new WakewordDetector({
	threshold: 0.1
});

const numSamples = 9;
const samplePaths = [];
for (let i = 1; i <= numSamples; i++)
	samplePaths.push(resolve(__dirname, `../../samples/${i}.wav`));

detector.addKeyword('test', samplePaths, {
	disableAveraging: true,
	threshold: 0.1
}).then(() => {
	detector.on('keyword', ({ keyword, score }) => {
		console.log(`Detected ${keyword}, score ${score}`);
		//(<VoiceChannel>vc).leave();
		//client.destroy();
		//process.exit(0);
	});

	audioStream.pipe(resampler).pipe(detector);
});

Logs from multiple runs (the entire output before stopping the program):
Log 1
Log 2
Log 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.