Skip to content

Commit

Permalink
Merge pull request #372 from Kitt-AI/preparation_1.3.0
Browse files Browse the repository at this point in the history
v1.3.0
  • Loading branch information
chenguoguo authored Feb 19, 2018
2 parents 7d20d7f + 3c263b6 commit 052db34
Show file tree
Hide file tree
Showing 33 changed files with 161 additions and 76 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Snowboy.pm
/examples/C++/pa_stable_v190600_20161030.tgz
/examples/C++/portaudio
/examples/C++/demo
/examples/C++/demo2
/examples/Java/Demo.class
/examples/Perl/data/
/examples/iOS/Obj-C/Pods/Pods.xcodeproj/xcuserdata/
Expand Down
51 changes: 22 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ by [KITT.AI](http://kitt.ai).

[Commercial application FAQ](README_commercial.md)

Version: 1.2.0 (3/25/2017)
Version: 1.3.0 (2/19/2018)

## 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! 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: [SnowboyAlexaDemo.apk](https://github.com/Kitt-AI/snowboy/raw/master/resources/alexa/SnowboyAlexaDemo.apk) (please uninstall any previous one first if you installed this app before).
The performance of hotword detection usually depends on the actual 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: [SnowboyAlexaDemo.apk](https://github.com/Kitt-AI/snowboy/raw/master/resources/alexa/SnowboyAlexaDemo.apk) (please uninstall any previous versions first if you have installed this app before).

**Personal model**

* Create your personal hotword model through our [website](https://snowboy.kitt.ai) or [hotword API](https://snowboy.kitt.ai/api/v1/train/)

* Replace the hotword model in [Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app) (after installation) with your personal model

```
Expand All @@ -47,6 +49,7 @@ make
* Run the wake word agent with engine set to `kitt_ai`!

**Universal model**

* Replace the hotword model in [Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app) (after installation) with your universal model

```
Expand Down Expand Up @@ -114,14 +117,9 @@ Currently Snowboy supports (look into the [lib](lib) folder):

* all versions of Raspberry Pi (with Raspbian based on Debian Jessie 8.0)
* 64bit Mac OS X
* 64bit Ubuntu (12.04 and 14.04)
* 64bit Ubuntu 14.04
* iOS
* Android
* Pine64 (Debian Jessie 8.5, 3.10.102 BSP2)
* Nvidia Jetson TX1 (use above Pine64 package)
* Nvidia Jetson TX2 (use above Pine64 package)
* Intel Edison (Ubilinux based on Debian Wheezy 7.8)
* Samsung Artik (built with Fedora 25 for ARMv7)
* ARM64 (aarch64, Ubuntu 16.04)

It ships in the form of a **C++ library** with language-dependent wrappers
Expand All @@ -130,11 +128,12 @@ pull request!

Currently we have built wrappers for:

* C/C++
* Java/Android
* Go (thanks to @brentnd and @deadprogram)
* Node (thanks to @evancohen and @nekuz0r)
* Perl (thanks to @iboguslavsky)
* Python
* Python2/Python3
* iOS/Swift3 (thanks to @grimlockrocks)
* iOS/Object-C (thanks to @patrickjquinn)

Expand Down Expand Up @@ -164,18 +163,10 @@ environment.

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 (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.
* **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 to true. This is so far the best "Alexa" model we released publicly, when ApplyFrontend is set to true.
* **resources/models/snowboy.umdl**: Universal model for the hotword "Snowboy". Set SetSensitivity to 0.5 and ApplyFrontend to false.
* **resources/models/jarvis.umdl**: Universal model for the hotword "Jarvis" (https://snowboy.kitt.ai/hotword/29). It has two different models for the hotword Jarvis, so you have to use two sensitivites. Set sensitivities to "0.8,0.80" and ApplyFrontend to true.
* **resources/models/smart_mirror.umdl**: Universal model for the hotword "Smart Mirror" (https://snowboy.kitt.ai/hotword/47). Set sensitivity to Sensitivity to 0.5, and ApplyFrontend to false.

## Precompiled node module

Expand All @@ -190,13 +181,10 @@ 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.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)
* 64 bit Ubuntu [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.3.0.tar.bz2)
* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.3.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.2.0.tar.bz2))
* Pine64 (Debian Jessie 8.5 (3.10.102)), Nvidia Jetson TX1 and Nvidia Jetson TX2 ([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))
([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.3.0.tar.bz2))

If you want to compile a version against your own environment/language, read on.

Expand Down Expand Up @@ -386,9 +374,14 @@ See [Full Documentation](http://docs.kitt.ai/snowboy).

## Change Log

**1/4/2018**
**v1.3.0, 2/19/2018**

* Added `resources/smart_mirror.umdl`. This is trained with voices from https://snowboy.kitt.ai/hotword/47. We suspect that it'll work well with male voices as most of our developers are male.
* Added Frontend processing for all platforms
* Added `resources/models/smart_mirror.umdl` for https://snowboy.kitt.ai/hotword/47
* Added `resources/models/jarvis.umdl` for https://snowboy.kitt.ai/hotword/29
* Added README for Chinese
* Cleaned up the supported platforms
* Re-structured the model path

**v1.2.0, 3/25/2017**

Expand Down
38 changes: 20 additions & 18 deletions README_ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

(因为我们每天都会收到很多消息,从2016年9月开始建立了讨论组。请在这里发送一般性的讨论。关于错误,请使用Github问题标签。)

版本:1.2.0(3/25/2017
版本:1.3.0(2/19/2018

## Alexa支持

Expand Down Expand Up @@ -113,25 +113,21 @@ Snowboy是一款可定制的唤醒词检测引擎,可为您创建像 "OK Googl

* 所有版本的Raspberry Pi(Raspbian基于Debian Jessie 8.0)
* 64位Mac OS X
* 64位Ubuntu(12.04和14.04)
* 64位Ubuntu 14.04
* iOS
* Android
* Pine64(Debian Jessie 8.5,3.10.102 BSP2)
* Nvidia Jetson TX1(使用上面的Pine64包)
* Nvidia Jetson TX2(使用上面的Pine64包)
* 英特尔Edison(Ubilinux基于Debian Wheezy 7.8)
* 三星Artik(搭载Fedora 25为ARMv7)
* ARM64(aarch64,Ubuntu 16.04)

Snowboy底层库由C++写成,通过swig被封装成能在多种操作系统和语言上使用的软件库。我们欢迎新语言的封装,请随时发送你们的Pull Request!

目前我们已经现实封装的有:

* C/C++
* Java / Android
* Go(thanks to @brentnd and @deadprogram
* Node(thanks to @evancohen和@ nekuz0r)
* Perl(thanks to @iboguslavsky
* Python
* Python2/Python3
* iOS / Swift3(thanks to @grimlockrocks
* iOS / Object-C(thanks to @patrickjquinn

Expand All @@ -158,13 +154,10 @@ Snowboy底层库由C++写成,通过swig被封装成能在多种操作系统和

以下是模型列表和您必须使用的参数:

* resources/ snowboy.umdl:唤醒词为“snowboy”的通用模型。将`SetSensitivity`设置为`0.5`以获得更好的性能。
* resources/ alexa.umdl:唤醒词为“Alexa”的通用模型。将`SetSensitivity`设置为`0.5`,最好将`ApplyFrontend`
(仅适用于Raspberry Pi)设置为`true`。这个模型已经不建议使用了。
* resources/ alexa / alexa_02092017.umdl:唤醒词为“Alexa”的通用模型。这个仍然在优化中。
`SetSensitivity`设置为`0.15`
* resources/ alexa / alexa-avs-sample-app/alexa.umdl:这个是为[Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app)
优化过的唤醒词为“Alexa”的通用模型,将`SetSensitivity`设置为`0.6`,并将`ApplyFrontend`(仅适用于Raspberry Pi)设置为true。当`ApplyFrontend`设置为`true`时,这是迄今为止我们公开发布的最好的“Alexa”的模型。
* **resources/alexa/alexa-avs-sample-app/alexa.umdl**:这个是为[Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app)优化过的唤醒词为“Alexa”的通用模型,将`SetSensitivity`设置为`0.6`,并将`ApplyFrontend`设置为true。当`ApplyFrontend`设置为`true`时,这是迄今为止我们公开发布的最好的“Alexa”的模型。
* **resources/models/snowboy.umdl**:唤醒词为“snowboy”的通用模型。将`SetSensitivity`设置为`0.5``ApplyFrontend`设置为`false`
* **resources/models/jarvis.umdl**: 唤醒词为“Jarvis” (https://snowboy.kitt.ai/hotword/29)的通用模型,其中包含了对应于“Jarvis”的两个唤醒词模型,所以需要设置两个`sensitivity`。将`SetSensitivity`设置为`0.8,0.8`,`ApplyFrontend`设置为`true`。
* **resources/models/smart_mirror.umdl**: 唤醒词为“Smart Mirror” (https://snowboy.kitt.ai/hotword/47)的通用模型。将`SetSensitivity`设置为`0.5`,`ApplyFrontend`设置为`false`。

## 预编译node模块

Expand All @@ -176,10 +169,10 @@ Snowboy为一下平台编译了node模块:64位Ubuntu,MacOS X和Raspberry Pi

## 预编译Python Demo的二进制文件
* 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)
/ [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.3.0.tar.bz2)
* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.3.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.2.0.tar.bz2))
([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.3.0.tar.bz2))
* Pine64 (Debian Jessie 8.5 (3.10.102)), Nvidia Jetson TX1 and Nvidia Jetson TX2 ([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))

Expand Down Expand Up @@ -367,6 +360,15 @@ Perl示例包括使用KITT.AI RESTful API训练个人唤醒词,在检测到唤

## 更改日志

**v1.3.0, 2/19/2018**

* 添加前端处理到所有平台
* 添加`resources/models/smart_mirror.umdl`https://snowboy.kitt.ai/hotword/47
* 添加`resources/models/jarvis.umdl`https://snowboy.kitt.ai/hotword/29
* 添加中文文档
* 清理支持的平台
* 重新定义了模型路径

**v1.2.0, 3/25/2017**

*[Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app)添加更好的Alexa模型
Expand Down
7 changes: 4 additions & 3 deletions examples/C++/demo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,11 @@ int main(int argc, char* argv[]) {
// Parameter section.
// If you have multiple hotword models (e.g., 2), you should set
// <model_filename> and <sensitivity_str> as follows:
// model_filename = "resources/snowboy.umdl,resources/alexa.pmdl";
// sensitivity_str = "0.4,0.4";
// model_filename =
// "resources/models/snowboy.umdl,resources/models/smart_mirror.umdl";
// sensitivity_str = "0.5,0.5";
std::string resource_filename = "resources/common.res";
std::string model_filename = "resources/snowboy.umdl";
std::string model_filename = "resources/models/snowboy.umdl";
std::string sensitivity_str = "0.5";
float audio_gain = 1;

Expand Down
2 changes: 1 addition & 1 deletion examples/C++/demo2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "portaudio.h"

#define resource_filename "resources/common.res"
#define model_filename "resources/snowboy.umdl"
#define model_filename "resources/models/snowboy.umdl"
#define sensitivity_str "0.5"

struct wavHeader { //44 byte HEADER only
Expand Down
7 changes: 4 additions & 3 deletions examples/C/demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ int main(int argc, char* argv[]) {
// Parameter section.
// If you have multiple hotword models (e.g., 2), you should set
// <model_filename> and <sensitivity_str> as follows:
// model_filename = "resources/snowboy.umdl,resources/alexa.pmdl";
// sensitivity_str = "0.4,0.4";
// model_filename =
// "resources/models/snowboy.umdl,resources/models/smart_mirror.umdl";
// sensitivity_str = "0.5,0.5";
const char resource_filename[] = "resources/common.res";
const char model_filename[] = "resources/snowboy.umdl";
const char model_filename[] = "resources/models/snowboy.umdl";
const char sensitivity_str[] = "0.5";
float audio_gain = 1;

Expand Down
4 changes: 2 additions & 2 deletions examples/Go/detect/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ go build -o snowboy main.go

### Examples
Cmd:
`./snowboy ../../../resources/snowboy.umdl ../../../resources/snowboy.wav`
`./snowboy ../../../resources/models/snowboy.umdl ../../../resources/snowboy.wav`

Output:
```
Expand All @@ -37,4 +37,4 @@ Output:
```
Snowboy detecting keyword in ../../resources/snowboy.wav
Snowboy detected nothing
```
```
2 changes: 1 addition & 1 deletion examples/Go/listen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ go build -o listen main.go

### Examples
Cmd:
`./listen ../../../resources/common.res ../../../resources/snowboy.umdl`
`./listen ../../../resources/common.res ../../../resources/models/snowboy.umdl`

Output:
```
Expand Down
2 changes: 1 addition & 1 deletion examples/Java/Demo.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void main(String[] args) {

// Sets up Snowboy.
SnowboyDetect detector = new SnowboyDetect("resources/common.res",
"resources/snowboy.umdl");
"resources/models/snowboy.umdl");
detector.SetSensitivity("0.5");
detector.SetAudioGain(1);

Expand Down
2 changes: 1 addition & 1 deletion examples/Node/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Models = require('../../').Models;
const models = new Models();

models.add({
file: 'resources/snowboy.umdl',
file: 'resources/models/snowboy.umdl',
sensitivity: '0.5',
hotwords : 'snowboy'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/Node/microphone.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Models = require('../../').Models;
const models = new Models();

models.add({
file: 'resources/snowboy.umdl',
file: 'resources/models/snowboy.umdl',
sensitivity: '0.5',
hotwords : 'snowboy'
});
Expand Down
18 changes: 9 additions & 9 deletions examples/Perl/snowboy_googlevoice.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# This script first uses Snowboy to wake up, then collects audio and sends to
# Google Speech API for further recognition. It works with both personal and
# universal models. By default, it uses the Snowboy universal model at
# resources/snowboy.umdl, you can change it to other universal models, or your
# own personal models. You also have to provide your Google API key in order to
# use it.
# resources/models/snowboy.umdl, you can change it to other universal models, or
# your own personal models. You also have to provide your Google API key in
# order to use it.

use Snowboy;

Expand All @@ -23,16 +23,16 @@
This script first uses Snowboy to wake up, then collects audio and sends to
Google Speech API for further recognition. It works with both personal and
universal models. By default, it uses the Snowboy universal model at
resources/snowboy.umdl, you can change it to other universal models, or your own
personal models. You also have to provide your Google API key in order to use
it.
resources/models/snowboy.umdl, you can change it to other universal models, or
your own personal models. You also have to provide your Google API key in order
to use it.
Note: Google is now moving to Google Cloud Speech API, so we will have to update
the API query later.
Usage: ./snowboy_googlevoice.pl <Google_API_Key> [Hotword_Model]
e.g.: ./snowboy_googlevoice.pl \
abcdefghijklmnopqrstuvwxyzABC0123456789 resources/snowboy.umdl
abcdefghijklmnopqrstuvwxyzABC0123456789 resources/models/snowboy.umdl
Allowed options:
--language : Language for speech recognizer. (string, default="en")
Expand All @@ -48,9 +48,9 @@

# Gets parameters.
my $api_key = shift @ARGV;
my $model = shift @ARGV || 'resources/snowboy.umdl';
my $model = shift @ARGV || 'resources/models/snowboy.umdl';

if ($model eq 'resources/snowboy.umdl') {
if ($model eq 'resources/models/snowboy.umdl') {
$hotword = "Snowboy";
} else {
$hotword = "your hotword";
Expand Down
2 changes: 1 addition & 1 deletion examples/Perl/snowboy_unit_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
close WAV;

$sb = new Snowboy::SnowboyDetect('resources/common.res',
'resources/snowboy.umdl');
'resources/models/snowboy.umdl');

$sb->SetSensitivity ("0.5");
$sb->SetAudioGain (1);
Expand Down
4 changes: 2 additions & 2 deletions examples/Python/demo3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# Demo code for detecting hotword in a .wav file
# Example Usage:
# $ python demo3.py resources/snowboy.wav resources/snowboy.umdl
# $ python demo3.py resources/snowboy.wav resources/models/snowboy.umdl
# Should print:
# Hotword Detected!
#
# $ python demo3.py resources/ding.wav resources/snowboy.umdl
# $ python demo3.py resources/ding.wav resources/models/snowboy.umdl
# Should print:
# Hotword Not Detected!

Expand Down
4 changes: 2 additions & 2 deletions examples/Python3/demo3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# Demo code for detecting hotword in a .wav file
# Example Usage:
# $ python demo3.py resources/snowboy.wav resources/snowboy.umdl
# $ python demo3.py resources/snowboy.wav resources/models/snowboy.umdl
# Should print:
# Hotword Detected!
#
# $ python demo3.py resources/ding.wav resources/snowboy.umdl
# $ python demo3.py resources/ding.wav resources/models/snowboy.umdl
# Should print:
# Hotword Not Detected!

Expand Down
Loading

0 comments on commit 052db34

Please sign in to comment.