npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@imtoanle/snowboy

v1.0.8

Published

Snowboy is a customizable hotword detection engine

Downloads

16

Readme

snowboy

This package was cloned from @bugsounet/snowboy.

Sorry!!! and Thank to @bugsounet

snowboy project will to shut down ... in Dec. 31st, 2020.

So i will try to maintened it ;)

I will ONLY maintened JS code for node use for continue to use snowboy as detector for home assistant or other. (exemple for MagicMirror Project) I have decoded other version of snowboy

I will start this new versioning at v1.4.0 (same as v1.3.1 in Kitt-AI repository)

Update

  • V1.5.0 (20/05/31)

    • Update library
  • v1.4.6-v1.4.7 (20/05/06)

    • installer review
    • use @bugousnet/lpcm16 library
  • v1.4.5 (20/05/02)

    • add log on start
  • v1.4.4 (20/04/22)

    • writing help and sample
  • v1.4.3 (20/04/21)

    • prepare npm library
    • create new Snowboy library
    • create sample
    • update package.json
  • v1.4.2 (20/04/19)

    • internal test for npm install
  • v1.4.1 (20/04/10)

    • Cleaning: now ONLY for Node version
    • update library database
    • compilation error solved
    • npm install complete without error
    • added Alexa keyword in database
  • V1.4.0

    • initial version of Kitt-AI@snowboy

Dependencies

For listening keyword, you have to use a mic, so snowboy need some dependencies to use it

sudo apt install libmagic-dev libatlas-base-dev sox libsox-fmt-all build-essential

Installation

npm install @imtoanle/snowboy

In the ending of installation, if you use electron you can do electron rebuild step.

Do you want to execute electron rebuild ? [Y/n]
Your choice:

Sample with new Snowboy contructor

/** sample code for using snowboy library **/
/** @imtoanle **/

const Snowboy = require("@imtoanle/snowboy").Snowboy

var config = {
  debug: true,
  snowboy: {
    audioGain: 2.0,
    Frontend: true,
    Model: "ecovy",
    Sensitivity: null
  },
  micConfig: {
    recorder: "arecord",
    device: "plughw:1",
  },
}

this.snowboy = new Snowboy(config.snowboy, config.micConfig, (detected) => { detect(detected) }, config.debug )
this.snowboy.init()
this.snowboy.start()

function detect(detected) {
  console.log("Make your script if " + detected + " is detected")
}

constructor of Snowboy

Snowboy(snowboyConfig, micConfig, callback, debug)

SnowboyConfig

  • AudioGain - set the gain of mic. Usually you don't need to set or adjust this value.

  • Frontend - set pre-processing of hotword detection. When you use only snowboy and smart_mirror, false is better. But with other models, true is better to recognize.

  • Model - set the name of your detector. Available: "smart_mirror", "jarvis", "computer", "snowboy", "subex", "neo_ya", "hey_extreme", "view_glass", "ecovy"

  • Sensitivity - Override default sensitivity value for applied model defined in Model.

    • Value could be within a range from 0.0 to 1.0.

    • Default sensitivity values for preconfigured models are:

      • smart_mirror: 0.5
      • ecovy: 0.7
      • jarvis: 0.7
      • computer: 0.6
      • snowboy: 0.5
      • subex: 0.6
      • neo_ya: 0.7
      • hey_extreme: 0.6
      • view_glass: 0.7
      • alexa: 0.6
    • null will set default sensitivity.

micConfig

  • recorder - record program, rec, arecord, sox, parec is available.

    • On RaspberryPi or some linux machines, arecord is better.
    • On OSX, rec is better.
    • If you prefer to use pulse audio, parec would be available also.
  • device - recording device (microphone) name of your environment. (e.g. "plughw:1")

    • Find proper device name by yourself. (arecord -l will be help on Raspberry Pi or linux platform)

callback

if snowboy detect a keyword, it return it with his name

debug

if you want debuging information, just set to true

Functions

  • init() : initialize the constructor
  • start() : start listening and waiting for your keyword
  • stop() : force stop listening

Old constructor of Kitt-AI still also available !

see Kitt-AI@snowboy repository for manual of Models, Detector