Skip to content

Prepare Snowboy 1.4.0-rc.0 npm package - #2

Open
evancohen wants to merge 3 commits into
masterfrom
fix/npm-package-build
Open

evancohen wants to merge 3 commits into
masterfrom
fix/npm-package-build

Conversation

@evancohen

@evancohen evancohen commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Keep native hotword detection in the snowboy npm package so Sonus does not need to embed it. Companion Sonus PR: evancohen/sonus#109.

Changes:

  • Prepare unpublished version 1.4.0-rc.0.
  • Update node-pre-gyp/node-gyp/NAN dependencies, C++17 build settings, and TypeScript configuration.
  • Compile JavaScript and declarations before npm packing; declare native build tools as runtime install dependencies so normal npm hoisting works.
  • Preserve engine libraries and models. Adapt Sam's small wrapper fixes for exception handling, TypeScript indexing, and applyFrontend: false.
  • Build the native addon from source rather than depending on historical S3 binary hosting. This requires Python, compiler/make and CBLAS/ATLAS at installation time.
  • Explicitly package Node assets and omit the Android demo APK, iOS library, and unrelated examples. The candidate tarball is approximately 15 MB.

Validation: all Linux x64 package jobs passed on Node 14.21.3, 18, 20, and 22: https://github.com/evancohen/snowboy/actions/runs/34547751252 . Each job builds and packs the package, performs a normal consumer install from the tarball, initializes the native detector, and processes silent audio. Package contents were checked for the runtime JS, type declarations, header/source, engine library and models.

The tested tarball is available as the snowboy-1.4.0-rc.0 workflow artifact on that run. CI never publishes. npm release requires approval; prerelease should use a non-latest tag. macOS and Raspberry Pi hardware remain unverified, and real microphone/recognition-quality testing is outside this CI coverage.

Install verification is inline in the GitHub Actions workflow. No test directory or test scripts are included in the npm package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant