diff --git a/README.md b/README.md index d60fed19..4eabfd8e 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,17 @@ by [KITT.AI](http://kitt.ai). (The discussion group is new since September 2016 as we are getting many messages every day. Please send general questions there. For bugs, use Github issues.) -Version: 1.1.1 (3/24/2017) +Version: 1.2.0 (3/25/2017) ## Alexa support -Snowboy now brings hands-free experience to the [Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app) on Raspberry Pi! Here is how you can use other Snowboy models +Snowboy now brings hands-free experience to the [Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app) on Raspberry Pi! See more info below regarding the performance and how you can use other hotword models. + +**Performance** + +The performance of hotword detection usually depends on the actually environment, e.g., is it used with a quality microphone, is it used on the street, in a kitchen, or is there any background noise, etc. So we feel it is best for the users to evaluate it in their real environment. For the evaluation purpose, we have prepared an Android app which can be installed and run out of box. The app is here: + +* **resources/alexa/SnowboyAlexaDemo.apk** **Personal model** * Create your personal hotword model through our [website](https://snowboy.kitt.ai) or [hotword API](https://snowboy.kitt.ai/api/v1/train/) @@ -125,7 +131,7 @@ Currently we have built wrappers for: * Java/Android * Go (thanks to @brentnd) -* Node (thanks to @evancohen) +* Node (thanks to @evancohen and @nekuz0r) * Perl (thanks to @iboguslavsky) * Python * iOS/Swift3 (thanks to @grimlockrocks) @@ -160,10 +166,15 @@ Here is the list of the models, and the parameters that you have to use for them * **resources/snowboy.umdl**: Universal model for the hotword "Snowboy". Set SetSensitivity to 0.5 for better performance. * **resources/alexa.umdl**: Universal model for the hotword "Alexa". Set -SetSensitivity to 0.5, and preferably set ApplyFrontend to true. This model is -depressed. -* **resources/alexa_02092017.umdl**: Universal model for the hotword "Alexa". This -is still work in progress. Set SetSensitivity to 0.15. +SetSensitivity to 0.5, and preferably set ApplyFrontend (only works on Raspberry +Pi) to true. This model is depressed. +* **resources/alexa/alexa_02092017.umdl**: Universal model for the hotword +"Alexa". This is still work in progress. Set SetSensitivity to 0.15. +* **resources/alexa/alexa-avs-sample-app/alexa.umdl**: Universal model for the +hotword "Alexa" optimized for [Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app). +Set SetSensitivity to 0.6, and set ApplyFrontend (only works on Raspberry Pi) +to true. This is so far the best "Alexa" model we released publicly, when +ApplyFrontend is set to true. ## Precompiled node module @@ -178,13 +189,13 @@ dependencies like `fs`, `wav` or `node-record-lpcm16` depending on which script you use. ## Precompiled Binaries with Python Demo -* 64 bit Ubuntu [12.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1204-x86_64-1.1.1.tar.bz2) - / [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.1.1.tar.bz2) -* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.1.1.tar.bz2) +* 64 bit Ubuntu [12.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1204-x86_64-1.2.0.tar.bz2) + / [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.2.0.tar.bz2) +* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.2.0.tar.bz2) * Raspberry Pi with Raspbian 8.0, all versions - ([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.1.1.tar.bz2)) -* Pine64 (Debian Jessie 8.5 (3.10.102)) ([download](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/pine64-debian-jessie-1.1.1.tar.bz2)) -* Intel Edison (Ubilinux based on Debian Wheezy 7.8) ([download](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/edison-ubilinux-1.1.1.tar.bz2)) + ([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.2.0.tar.bz2)) +* Pine64 (Debian Jessie 8.5 (3.10.102)) ([download](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/pine64-debian-jessie-1.2.0.tar.bz2)) +* Intel Edison (Ubilinux based on Debian Wheezy 7.8) ([download](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/edison-ubilinux-1.2.0.tar.bz2)) If you want to compile a version against your own environment/language, read on. @@ -372,6 +383,11 @@ See [Full Documentation](http://docs.kitt.ai/snowboy). ## Change Log +**v1.2.0, 3/25/2017** + +* Added better Alexa model for [Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app) +* New decoder that works well for short hotwords like Alexa + **v1.1.1, 3/24/2017** * Added Android demo diff --git a/examples/Android/SnowboyAlexaDemo/assets/snowboy/alexa_02092017.umdl b/examples/Android/SnowboyAlexaDemo/assets/snowboy/alexa_02092017.umdl index b2d1387e..843305f7 120000 --- a/examples/Android/SnowboyAlexaDemo/assets/snowboy/alexa_02092017.umdl +++ b/examples/Android/SnowboyAlexaDemo/assets/snowboy/alexa_02092017.umdl @@ -1 +1 @@ -../../../../../resources/alexa_02092017.umdl \ No newline at end of file +../../../../../resources/alexa/alexa_02092017.umdl \ No newline at end of file diff --git a/examples/iOS/Swift3/SnowboyTest.xcodeproj/project.pbxproj b/examples/iOS/Swift3/SnowboyTest.xcodeproj/project.pbxproj index ed6d07d7..74673036 100644 --- a/examples/iOS/Swift3/SnowboyTest.xcodeproj/project.pbxproj +++ b/examples/iOS/Swift3/SnowboyTest.xcodeproj/project.pbxproj @@ -43,7 +43,7 @@ 045F549A1E58A7EA00F8F4A4 /* snowboy-detect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "snowboy-detect.h"; path = "../../../../include/snowboy-detect.h"; sourceTree = ""; }; 045F549C1E58A8FD00F8F4A4 /* libsnowboy-detect.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libsnowboy-detect.a"; path = "../../../lib/ios/libsnowboy-detect.a"; sourceTree = ""; }; 045F549F1E58AAEC00F8F4A4 /* common.res */ = {isa = PBXFileReference; lastKnownFileType = file; name = common.res; path = ../../../../resources/common.res; sourceTree = ""; }; - 045F54A11E58AAF900F8F4A4 /* alexa_02092017.umdl */ = {isa = PBXFileReference; lastKnownFileType = file; name = alexa_02092017.umdl; path = ../../../../resources/alexa_02092017.umdl; sourceTree = ""; }; + 045F54A11E58AAF900F8F4A4 /* alexa_02092017.umdl */ = {isa = PBXFileReference; lastKnownFileType = file; name = alexa_02092017.umdl; path = ../../../../resources/alexa/alexa_02092017.umdl; sourceTree = ""; }; 04D8BB881E52C242001D71B9 /* SnowboyTest-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SnowboyTest-Bridging-Header.h"; sourceTree = ""; }; 04D8BB891E5382BB001D71B9 /* SnowboyWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SnowboyWrapper.h; sourceTree = ""; }; 04D8BB8A1E539066001D71B9 /* SnowboyWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SnowboyWrapper.mm; sourceTree = ""; }; diff --git a/include/snowboy-detect.h b/include/snowboy-detect.h index 54e4cbea..ab903e10 100644 --- a/include/snowboy-detect.h +++ b/include/snowboy-detect.h @@ -63,9 +63,11 @@ class SnowboyDetect { // 2: Hotword 2 triggered. // ... // - // @param [in] data Small chunk of data to be detected. See - // above for the supported data format. - int RunDetection(const std::string& data); + // @param [in] data Small chunk of data to be detected. See + // above for the supported data format. + // @param [in] is_end Set it to true if it is the end of a + // utterance or file. + int RunDetection(const std::string& data, bool is_end = false); // Various versions of RunDetection() that take different format of audio. If // NumChannels() > 1, e.g., NumChannels() == 2, then the array is as follows: @@ -77,9 +79,14 @@ class SnowboyDetect { // @param [in] data Small chunk of data to be detected. See // above for the supported data format. // @param [in] array_length Length of the data array. - int RunDetection(const float* const data, const int array_length); - int RunDetection(const int16_t* const data, const int array_length); - int RunDetection(const int32_t* const data, const int array_length); + // @param [in] is_end Set it to true if it is the end of a + // utterance or file. + int RunDetection(const float* const data, + const int array_length, bool is_end = false); + int RunDetection(const int16_t* const data, + const int array_length, bool is_end = false); + int RunDetection(const int32_t* const data, + const int array_length, bool is_end = false); // Sets the sensitivity string for the loaded hotwords. A is // a list of floating numbers between 0 and 1, and separated by comma. For diff --git a/lib/android/armv7a/libsnowboy-detect.a b/lib/android/armv7a/libsnowboy-detect.a index f3a5afba..ace75615 100644 Binary files a/lib/android/armv7a/libsnowboy-detect.a and b/lib/android/armv7a/libsnowboy-detect.a differ diff --git a/lib/edison/libsnowboy-detect.a b/lib/edison/libsnowboy-detect.a index dbb69bce..3f78ab14 100644 Binary files a/lib/edison/libsnowboy-detect.a and b/lib/edison/libsnowboy-detect.a differ diff --git a/lib/fedora25-armv7/libsnowboy-detect.a b/lib/fedora25-armv7/libsnowboy-detect.a index 33f8f5cf..24f8ae4b 100644 Binary files a/lib/fedora25-armv7/libsnowboy-detect.a and b/lib/fedora25-armv7/libsnowboy-detect.a differ diff --git a/lib/ios/libsnowboy-detect.a b/lib/ios/libsnowboy-detect.a index 42703b20..6be483de 100644 Binary files a/lib/ios/libsnowboy-detect.a and b/lib/ios/libsnowboy-detect.a differ diff --git a/lib/osx/libsnowboy-detect.a b/lib/osx/libsnowboy-detect.a index 9ad0bd51..eca070ec 100644 Binary files a/lib/osx/libsnowboy-detect.a and b/lib/osx/libsnowboy-detect.a differ diff --git a/lib/pine64/libsnowboy-detect.a b/lib/pine64/libsnowboy-detect.a old mode 100644 new mode 100755 index 7063d47a..ef94636f Binary files a/lib/pine64/libsnowboy-detect.a and b/lib/pine64/libsnowboy-detect.a differ diff --git a/lib/rpi/libsnowboy-detect.a b/lib/rpi/libsnowboy-detect.a index 30f97b6f..ba6ab216 100644 Binary files a/lib/rpi/libsnowboy-detect.a and b/lib/rpi/libsnowboy-detect.a differ diff --git a/lib/ubuntu64/libsnowboy-detect.a b/lib/ubuntu64/libsnowboy-detect.a index 590fb95a..bc5b9991 100644 Binary files a/lib/ubuntu64/libsnowboy-detect.a and b/lib/ubuntu64/libsnowboy-detect.a differ diff --git a/package.json b/package.json index 1b760296..fae4e763 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "snowboy", - "version": "1.1.1", + "version": "1.2.0", "description": "Snowboy is a customizable hotword detection engine", "main": "lib/node/index.js", "binary": { diff --git a/resources/alexa/SnowboyAlexaDemo.apk b/resources/alexa/SnowboyAlexaDemo.apk new file mode 100644 index 00000000..f3f61fa5 Binary files /dev/null and b/resources/alexa/SnowboyAlexaDemo.apk differ diff --git a/resources/alexa/alexa-avs-sample-app/alexa.umdl b/resources/alexa/alexa-avs-sample-app/alexa.umdl new file mode 100644 index 00000000..f916312a Binary files /dev/null and b/resources/alexa/alexa-avs-sample-app/alexa.umdl differ diff --git a/resources/alexa_02092017.umdl b/resources/alexa/alexa_02092017.umdl similarity index 100% rename from resources/alexa_02092017.umdl rename to resources/alexa/alexa_02092017.umdl