New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bumblebee-hotword

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bumblebee-hotword - npm Package Compare versions

Comparing version 0.0.9 to 0.1.0

24

lib/bumblebee.js

@@ -123,3 +123,4 @@ const EventEmitter = require('events');

this.webWorkersPath+"/downsampling_worker.js",
this.bufferSize);
this.bufferSize,
this.microphone);

@@ -161,2 +162,23 @@ let keywordIDs = {};

}
setMicrophone(id) {
this.microphone = id;
}
async getMicrophones() {
const deviceInfos = await navigator.mediaDevices.enumerateDevices();
const mics = [];
for (let i = 0; i !== deviceInfos.length; ++i) {
const deviceInfo = deviceInfos[i];
if (deviceInfo.kind === 'audioinput') {
let id = deviceInfo.deviceId;
let name = deviceInfo.label || 'microphone '+i;
mics.push({
id,
name
});
}
}
return mics;
}
}

@@ -163,0 +185,0 @@

4

lib/porcupine_manager.js

@@ -1,2 +0,2 @@

const PorcupineManager = (function (webVoiceProcessor, porcupineWorkerScript, downsamplingScript, bufferSize) {
const PorcupineManager = (function (webVoiceProcessor, porcupineWorkerScript, downsamplingScript, bufferSize, microphone) {
let porcupineWorker;

@@ -17,3 +17,3 @@

webVoiceProcessor.start([this], volume, downsamplingScript, errorCallback, audioProcessCallback, audioContextCallback, bufferSize);
webVoiceProcessor.start([this], volume, downsamplingScript, errorCallback, audioProcessCallback, audioContextCallback, bufferSize, microphone);
};

@@ -20,0 +20,0 @@

@@ -11,5 +11,10 @@ let downsampler;

let start = function (engines, volume, downsamplerScript, errorCallback, audioProcessCallback, audioContextCallback, bufferSize) {
let start = function (engines, volume, downsamplerScript, errorCallback, audioProcessCallback, audioContextCallback, bufferSize, microphone) {
if (!downsampler) {
navigator.mediaDevices.getUserMedia({audio: true})
const constraints = {
audio: {
deviceId: microphone ? {exact: microphone} : undefined
}
};
navigator.mediaDevices.getUserMedia(constraints)
.then(stream => {

@@ -16,0 +21,0 @@

{
"name": "bumblebee-hotword",
"version": "0.0.9",
"version": "0.1.0",
"description": "A minimalist hotword / wake word for the web, based on Porcupine",

@@ -5,0 +5,0 @@ "main": "lib/bumblebee.js",

@@ -161,3 +161,3 @@ ![screenshot](logo.png)

yarn install
yarn run
yarn start
```

@@ -170,3 +170,3 @@

yarn install
yarn run
yarn start
```

@@ -180,2 +180,6 @@

**0.1.0:**
- add microphone selection
**0.0.9:**

@@ -182,0 +186,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc