Skip to content

Commit

Permalink
v0.2.1: add ok_google
Browse files Browse the repository at this point in the history
  • Loading branch information
dsteinman committed May 11, 2021
1 parent 8df507f commit c74cca7
Show file tree
Hide file tree
Showing 40 changed files with 17,058 additions and 119 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

/porcupine
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ The hotwords available by default are:
* hey google
* hey siri
* jarvis
* ok google
* porcupine
* terminator

Expand All @@ -101,6 +102,24 @@ bumblebee.on('hotword', function(hotword) {

The [Picovoice hotwords open source hotwords](https://github.com/Picovoice/Porcupine/tree/master/resources/keyword_files) are freely usable under the Apache 2.0 license. Custom hotwords can be licensed from [https://picovoice.ai](https://picovoice.ai/).

### Adding a Custom Hotword

Like the open source hotwords, the file must be in Porcupine's "_wasm.ppn" format.

You can use the [tools/convert_ppn.sh](tools/convert_ppn.sh) shell script (uses the xdd command line program) to convert the PPN file to a JavaScript file:

```
sh tools/convert_ppn.sh my_custom_hotword_wasm.ppn
```

The resulting .js file can then be added to Bumblebee:

```
import my_custom_hotword from './my_custom_hotword'
bumblebee.addHotword('my_custom_hotword', my_custom_hotword, 0.5)
```


### Sensitivity

Hotword detection sensitivity (0.0 to 1.0) is configurable only before the first call to `bumblebee.start()`
Expand Down
8 changes: 4 additions & 4 deletions docs/basic-example/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"files": {
"main.css": "./static/css/main.dbd2b449.chunk.css",
"main.js": "./static/js/main.5cf207a9.chunk.js",
"main.js.map": "./static/js/main.5cf207a9.chunk.js.map",
"main.js": "./static/js/main.5afd7853.chunk.js",
"main.js.map": "./static/js/main.5afd7853.chunk.js.map",
"runtime-main.js": "./static/js/runtime-main.6b8e0405.js",
"runtime-main.js.map": "./static/js/runtime-main.6b8e0405.js.map",
"static/js/2.5bd4005b.chunk.js": "./static/js/2.5bd4005b.chunk.js",
"static/js/2.5bd4005b.chunk.js.map": "./static/js/2.5bd4005b.chunk.js.map",
"index.html": "./index.html",
"precache-manifest.3c4073749c1c9ab32969e7a92d979ce8.js": "./precache-manifest.3c4073749c1c9ab32969e7a92d979ce8.js",
"precache-manifest.5c5d159c5207c8f00a2be76d04302bd2.js": "./precache-manifest.5c5d159c5207c8f00a2be76d04302bd2.js",
"service-worker.js": "./service-worker.js",
"static/css/main.dbd2b449.chunk.css.map": "./static/css/main.dbd2b449.chunk.css.map",
"static/js/2.5bd4005b.chunk.js.LICENSE.txt": "./static/js/2.5bd4005b.chunk.js.LICENSE.txt"
Expand All @@ -17,6 +17,6 @@
"static/js/runtime-main.6b8e0405.js",
"static/js/2.5bd4005b.chunk.js",
"static/css/main.dbd2b449.chunk.css",
"static/js/main.5cf207a9.chunk.js"
"static/js/main.5afd7853.chunk.js"
]
}
2 changes: 1 addition & 1 deletion docs/basic-example/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><title>BumbleBee Test</title><link href="./static/css/main.dbd2b449.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><a target="top" href="https://github.com/jaxcore/bumblebee-hotword" style="position:absolute;top:0;right:0"><img width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_red_aa0000.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a><div id="root"></div><script>!function(e){function r(r){for(var n,l,a=r[0],i=r[1],p=r[2],c=0,b=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&b.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);b.length;)b.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var i=t[a];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var a=this["webpackJsonpbumblebee-basic-example"]=this["webpackJsonpbumblebee-basic-example"]||[],i=a.push.bind(a);a.push=r,a=a.slice();for(var p=0;p<a.length;p++)r(a[p]);var f=i;t()}([])</script><script src="./static/js/2.5bd4005b.chunk.js"></script><script src="./static/js/main.5cf207a9.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><title>BumbleBee Test</title><link href="./static/css/main.dbd2b449.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><a target="top" href="https://github.com/jaxcore/bumblebee-hotword" style="position:absolute;top:0;right:0"><img width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_red_aa0000.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a><div id="root"></div><script>!function(e){function r(r){for(var n,l,a=r[0],i=r[1],p=r[2],c=0,b=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&b.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);b.length;)b.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var i=t[a];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var a=this["webpackJsonpbumblebee-basic-example"]=this["webpackJsonpbumblebee-basic-example"]||[],i=a.push.bind(a);a.push=r,a=a.slice();for(var p=0;p<a.length;p++)r(a[p]);var f=i;t()}([])</script><script src="./static/js/2.5bd4005b.chunk.js"></script><script src="./static/js/main.5afd7853.chunk.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "70ab9e10a7ac91c2b2b7c534c9ef679f",
"revision": "e8a51058a160c92fed2a2bd172de55b6",
"url": "./index.html"
},
{
"revision": "49065fb0d4118cc3632d",
"revision": "f2e82f7a67465be3fd7d",
"url": "./static/css/main.dbd2b449.chunk.css"
},
{
Expand All @@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "./static/js/2.5bd4005b.chunk.js.LICENSE.txt"
},
{
"revision": "49065fb0d4118cc3632d",
"url": "./static/js/main.5cf207a9.chunk.js"
"revision": "f2e82f7a67465be3fd7d",
"url": "./static/js/main.5afd7853.chunk.js"
},
{
"revision": "c4645b88da130efb2181",
Expand Down
2 changes: 1 addition & 1 deletion docs/basic-example/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"./precache-manifest.3c4073749c1c9ab32969e7a92d979ce8.js"
"./precache-manifest.5c5d159c5207c8f00a2be76d04302bd2.js"
);

self.addEventListener('message', (event) => {
Expand Down
2 changes: 2 additions & 0 deletions docs/basic-example/static/js/main.5afd7853.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/basic-example/static/js/main.5afd7853.chunk.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/basic-example/static/js/main.5cf207a9.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/basic-example/static/js/main.5cf207a9.chunk.js.map

This file was deleted.

28 changes: 13 additions & 15 deletions docs/full-example/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{
"files": {
"main.css": "./static/css/main.dbd2b449.chunk.css",
"main.js": "./static/js/main.39f44ac1.chunk.js",
"main.js.map": "./static/js/main.39f44ac1.chunk.js.map",
"runtime-main.js": "./static/js/runtime-main.c215b75a.js",
"runtime-main.js.map": "./static/js/runtime-main.c215b75a.js.map",
"static/js/2.8e7d9a43.chunk.js": "./static/js/2.8e7d9a43.chunk.js",
"static/js/2.8e7d9a43.chunk.js.map": "./static/js/2.8e7d9a43.chunk.js.map",
"main.css": "./static/css/main.517725b2.chunk.css",
"main.js": "./static/js/main.19b9efef.chunk.js",
"main.js.map": "./static/js/main.19b9efef.chunk.js.map",
"runtime-main.js": "./static/js/runtime-main.93a025cc.js",
"runtime-main.js.map": "./static/js/runtime-main.93a025cc.js.map",
"static/js/2.0f236e45.chunk.js": "./static/js/2.0f236e45.chunk.js",
"static/js/2.0f236e45.chunk.js.map": "./static/js/2.0f236e45.chunk.js.map",
"index.html": "./index.html",
"precache-manifest.2b4d748bbf8a94d182b3e4be199ac71a.js": "./precache-manifest.2b4d748bbf8a94d182b3e4be199ac71a.js",
"service-worker.js": "./service-worker.js",
"static/css/main.dbd2b449.chunk.css.map": "./static/css/main.dbd2b449.chunk.css.map",
"static/js/2.8e7d9a43.chunk.js.LICENSE.txt": "./static/js/2.8e7d9a43.chunk.js.LICENSE.txt"
"static/css/main.517725b2.chunk.css.map": "./static/css/main.517725b2.chunk.css.map",
"static/js/2.0f236e45.chunk.js.LICENSE.txt": "./static/js/2.0f236e45.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.c215b75a.js",
"static/js/2.8e7d9a43.chunk.js",
"static/css/main.dbd2b449.chunk.css",
"static/js/main.39f44ac1.chunk.js"
"static/js/runtime-main.93a025cc.js",
"static/js/2.0f236e45.chunk.js",
"static/css/main.517725b2.chunk.css",
"static/js/main.19b9efef.chunk.js"
]
}
2 changes: 1 addition & 1 deletion docs/full-example/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><title>BumbleBee Test</title><link href="./static/css/main.dbd2b449.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><a target="top" href="https://github.com/jaxcore/bumblebee-hotword" style="position:absolute;top:0;right:0"><img width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_red_aa0000.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a><div id="root"></div><script>!function(e){function r(r){for(var n,l,f=r[0],a=r[1],p=r[2],c=0,b=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&b.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(i&&i(r);b.length;)b.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var a=t[f];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var f=this["webpackJsonpbumblebee-full-example"]=this["webpackJsonpbumblebee-full-example"]||[],a=f.push.bind(f);f.push=r,f=f.slice();for(var p=0;p<f.length;p++)r(f[p]);var i=a;t()}([])</script><script src="./static/js/2.8e7d9a43.chunk.js"></script><script src="./static/js/main.39f44ac1.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><title>BumbleBee Test</title><link href="./static/css/main.517725b2.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><a target="top" href="https://github.com/jaxcore/bumblebee-hotword" style="position:absolute;top:0;right:0"><img width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_red_aa0000.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a><div id="root"></div><script>!function(e){function r(r){for(var n,l,f=r[0],a=r[1],p=r[2],c=0,b=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&b.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(i&&i(r);b.length;)b.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var a=t[f];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var f=this["webpackJsonpbumblebee-full-example"]=this["webpackJsonpbumblebee-full-example"]||[],a=f.push.bind(f);f.push=r,f=f.slice();for(var p=0;p<f.length;p++)r(f[p]);var i=a;t()}([])</script><script src="./static/js/2.0f236e45.chunk.js"></script><script src="./static/js/main.19b9efef.chunk.js"></script></body></html>

This file was deleted.

Binary file removed docs/full-example/pv_porcupine.wasm
Binary file not shown.
39 changes: 0 additions & 39 deletions docs/full-example/service-worker.js

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/full-example/static/css/main.517725b2.chunk.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/full-example/static/css/main.dbd2b449.chunk.css.map

This file was deleted.

3 changes: 3 additions & 0 deletions docs/full-example/static/js/2.0f236e45.chunk.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object-assign
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.13.1
/** @license React v16.14.0
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
Expand All @@ -22,7 +22,16 @@ object-assign
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.13.1
/** @license React v16.14.0
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.14.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
Expand Down
1 change: 1 addition & 0 deletions docs/full-example/static/js/2.0f236e45.chunk.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions docs/full-example/static/js/2.8e7d9a43.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/full-example/static/js/2.8e7d9a43.chunk.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions docs/full-example/static/js/main.19b9efef.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/full-example/static/js/main.19b9efef.chunk.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/full-example/static/js/main.39f44ac1.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/full-example/static/js/main.39f44ac1.chunk.js.map

This file was deleted.

Loading

0 comments on commit c74cca7

Please sign in to comment.