-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated README.md to reflect the recent changes
- Loading branch information
1 parent
bf89391
commit 9928607
Showing
2 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ by [KITT.AI](http://kitt.ai). | |
[Full Documentation](https://snowboy.kitt.ai/docs) | ||
|
||
|
||
Version: 1.0.2 (5/24/2016) | ||
Version: 1.0.3 (6/4/2016) | ||
|
||
Snowboy is a customizable hotword detection engine for you to create your own | ||
hotword like "OK Google" or "Alexa". It is powered by deep neural networks and has the following properties: | ||
|
@@ -26,12 +26,14 @@ Currently Snowboy supports: | |
* all versions of Raspberry Pi (with Raspbian based on Debian Jessie 8.0) | ||
* 64bit Mac OS X | ||
* 64bit Ubuntu (12.04 and 14.04) | ||
* iOS | ||
* Android | ||
|
||
It ships in the form of a **C library** with **Python** wrappers generated by SWIG. We welcome wrappers for other languages -- feel free to send a pull request! | ||
It ships in the form of a **C library** with language-dependent wrappers generated by SWIG. We welcome wrappers for new languages -- feel free to send a pull request! | ||
|
||
If you want support on other hardware/OS, please send your request to [[email protected]](mailto:snowboy.kitt.ai) | ||
|
||
## Precompiled Binaries | ||
## Precompiled Binaries with Python Demo | ||
* 64 bit Ubuntu [12.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1204-x86_64-1.0.2.tar.bz2) | ||
/ [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.0.2.tar.bz2) | ||
* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.0.2.tar.bz2) | ||
|
@@ -84,7 +86,47 @@ SWIG will generate a `_snowboydetect.so` file and a simple (but hard-to-read) py | |
Feel free to adapt the `Makefile` in `swig/Python` to your own system's setting if you cannot `make` it. | ||
|
||
|
||
## Quick Start | ||
## Compile an iOS Wrapper | ||
|
||
Using Snowboy library in Objective-C does not really require a wrapper. It is basically the same as using C++ library in Objective-C. We have compiled a "fat" static library for iOS devices, see the library here `lib/ios/libsnowboy-detect.a`. | ||
|
||
To initialize Snowboy detector in Objective-C: | ||
|
||
snowboy::SnowboyDetect* snowboyDetector = new snowboy::SnowboyDetect( | ||
std::string([[[NSBundle mainBundle]pathForResource:@"common" ofType:@"res"] UTF8String]), | ||
std::string([[[NSBundle mainBundle]pathForResource:@"snowboy" ofType:@"umdl"] UTF8String])); | ||
snowboyDetector->SetSensitivity("0.45"); // Sensitivity for each hotword | ||
snowboyDetector->SetAudioGain(2.0); // Audio gain for detection | ||
|
||
To run hotword detection in Objective-C: | ||
|
||
int result = snowboyDetector->RunDetection(buffer[0], bufferSize); // buffer[0] is a float array | ||
|
||
You may want to play with the frequency of the calls to `RunDetection()`, which controls the CPU usage and the detection latency. | ||
|
||
## Compile an Android Wrapper | ||
|
||
cd swig/Android | ||
# Make sure you set up the NDKROOT variable in Makefile before you run. | ||
make | ||
|
||
Using Snowboy library on Android devices is a little bit tricky. We have compiled Snowboy using Android's cross-compilation toolchain for ARMV7 architecture, see the library here `lib/android/armv7a/libsnowboy-detect.a`. We then use SWIG to generate the Java wrapper, and use Android's cross-compilation toolchain to generate the corresponding JNI libraries. After running `make`, two directories will be created: `java` and `jniLibs`. Copy these two directories to your Android app directory (e.g., `app/src/main/`) and you should be able to call Snowboy funcitons within Java. | ||
|
||
To initialize Snowboy detector in Java: | ||
|
||
# Assume you put the model related files under /sdcard/snowboy/ | ||
SnowboyDetect snowboyDetector = new SnowboyDetect("/sdcard/snowboy/common.res", | ||
"/sdcard/snowboy/snowboy.umdl"); | ||
snowboyDetector.SetSensitivity("0.45"); // Sensitivity for each hotword | ||
snowboyDetector.SetAudioGain(2.0); // Audio gain for detection | ||
|
||
To run hotword detection in Java: | ||
|
||
int result = snowboyDetector.RunDetection(buffer, buffer.length); // buffer is a short array. | ||
|
||
You may want to play with the frequency of the calls to `RunDetection()`, which controls the CPU usage and the detection latency. | ||
|
||
## Quick Start for Python Demo | ||
|
||
Go to the `examples/Python` folder and open your python console: | ||
|
||
|
@@ -120,6 +162,12 @@ See [Full Documentation](https://snowboy.kitt.ai/docs). | |
|
||
## Change Log | ||
|
||
**v1.0.3, 6/4/2016** | ||
|
||
* Updated universal `snowboy.umdl` model to make it more robust in non-speech environment. | ||
* Fixed bug when using float as input data. | ||
* Added library support for Android ARMV7 architecture. | ||
|
||
**v1.0.2, 5/24/2016** | ||
|
||
* Updated universal `snowboy.umdl` model | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters