Skip to content

Commit bff91f6

Browse files
committed
Re-structured the model path
1 parent 57d4f6f commit bff91f6

File tree

15 files changed

+37
-34
lines changed

15 files changed

+37
-34
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,10 @@ environment.
163163

164164
Here is the list of the models, and the parameters that you have to use for them:
165165

166-
* **resources/snowboy.umdl**: Universal model for the hotword "Snowboy". Set
167-
SetSensitivity to 0.5 for better performance.
168-
* **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).
169-
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.
170-
* **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. The suggested sensitivities are "0.8,0.80". Please also set ApplyFrontend to true.
166+
* **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.
167+
* **resources/models/snowboy.umdl**: Universal model for the hotword "Snowboy". Set SetSensitivity to 0.5 and ApplyFrontend to false.
168+
* **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.
169+
* **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.
171170

172171
## Precompiled node module
173172

@@ -375,11 +374,13 @@ See [Full Documentation](http://docs.kitt.ai/snowboy).
375374

376375
## Change Log
377376

378-
**v1.3.0, 2/14/2018**
377+
**v1.3.0, 2/19/2018**
379378

380-
* Added Frontend processing
379+
* Added Frontend processing for all platforms
381380
* Added `resources/smart_mirror.umdl` for https://snowboy.kitt.ai/hotword/47
382381
* Added `resources/jarvis.umdl` for https://snowboy.kitt.ai/hotword/29
382+
* Cleaned up the supported platforms
383+
* Re-structured the model path
383384

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

examples/C++/demo.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,11 @@ int main(int argc, char* argv[]) {
200200
// Parameter section.
201201
// If you have multiple hotword models (e.g., 2), you should set
202202
// <model_filename> and <sensitivity_str> as follows:
203-
// model_filename = "resources/snowboy.umdl,resources/alexa.pmdl";
204-
// sensitivity_str = "0.4,0.4";
203+
// model_filename =
204+
// "resources/models/snowboy.umdl,resources/models/smart_mirror.umdl";
205+
// sensitivity_str = "0.5,0.5";
205206
std::string resource_filename = "resources/common.res";
206-
std::string model_filename = "resources/snowboy.umdl";
207+
std::string model_filename = "resources/models/snowboy.umdl";
207208
std::string sensitivity_str = "0.5";
208209
float audio_gain = 1;
209210

examples/C++/demo2.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "portaudio.h"
44

55
#define resource_filename "resources/common.res"
6-
#define model_filename "resources/snowboy.umdl"
6+
#define model_filename "resources/models/snowboy.umdl"
77
#define sensitivity_str "0.5"
88

99
struct wavHeader { //44 byte HEADER only

examples/C/demo.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@ int main(int argc, char* argv[]) {
183183
// Parameter section.
184184
// If you have multiple hotword models (e.g., 2), you should set
185185
// <model_filename> and <sensitivity_str> as follows:
186-
// model_filename = "resources/snowboy.umdl,resources/alexa.pmdl";
187-
// sensitivity_str = "0.4,0.4";
186+
// model_filename =
187+
// "resources/models/snowboy.umdl,resources/models/smart_mirror.umdl";
188+
// sensitivity_str = "0.5,0.5";
188189
const char resource_filename[] = "resources/common.res";
189-
const char model_filename[] = "resources/snowboy.umdl";
190+
const char model_filename[] = "resources/models/snowboy.umdl";
190191
const char sensitivity_str[] = "0.5";
191192
float audio_gain = 1;
192193

examples/Go/detect/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ go build -o snowboy main.go
2222

2323
### Examples
2424
Cmd:
25-
`./snowboy ../../../resources/snowboy.umdl ../../../resources/snowboy.wav`
25+
`./snowboy ../../../resources/models/snowboy.umdl ../../../resources/snowboy.wav`
2626

2727
Output:
2828
```
@@ -37,4 +37,4 @@ Output:
3737
```
3838
Snowboy detecting keyword in ../../resources/snowboy.wav
3939
Snowboy detected nothing
40-
```
40+
```

examples/Go/listen/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ go build -o listen main.go
2323

2424
### Examples
2525
Cmd:
26-
`./listen ../../../resources/common.res ../../../resources/snowboy.umdl`
26+
`./listen ../../../resources/common.res ../../../resources/models/snowboy.umdl`
2727

2828
Output:
2929
```

examples/Java/Demo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void main(String[] args) {
2121

2222
// Sets up Snowboy.
2323
SnowboyDetect detector = new SnowboyDetect("resources/common.res",
24-
"resources/snowboy.umdl");
24+
"resources/models/snowboy.umdl");
2525
detector.SetSensitivity("0.5");
2626
detector.SetAudioGain(1);
2727

examples/Node/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Models = require('../../').Models;
66
const models = new Models();
77

88
models.add({
9-
file: 'resources/snowboy.umdl',
9+
file: 'resources/models/snowboy.umdl',
1010
sensitivity: '0.5',
1111
hotwords : 'snowboy'
1212
});

examples/Node/microphone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const Models = require('../../').Models;
55
const models = new Models();
66

77
models.add({
8-
file: 'resources/snowboy.umdl',
8+
file: 'resources/models/snowboy.umdl',
99
sensitivity: '0.5',
1010
hotwords : 'snowboy'
1111
});

examples/Perl/snowboy_googlevoice.pl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# This script first uses Snowboy to wake up, then collects audio and sends to
44
# Google Speech API for further recognition. It works with both personal and
55
# universal models. By default, it uses the Snowboy universal model at
6-
# resources/snowboy.umdl, you can change it to other universal models, or your
7-
# own personal models. You also have to provide your Google API key in order to
8-
# use it.
6+
# resources/models/snowboy.umdl, you can change it to other universal models, or
7+
# your own personal models. You also have to provide your Google API key in
8+
# order to use it.
99

1010
use Snowboy;
1111

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

4949
# Gets parameters.
5050
my $api_key = shift @ARGV;
51-
my $model = shift @ARGV || 'resources/snowboy.umdl';
51+
my $model = shift @ARGV || 'resources/models/snowboy.umdl';
5252

53-
if ($model eq 'resources/snowboy.umdl') {
53+
if ($model eq 'resources/models/snowboy.umdl') {
5454
$hotword = "Snowboy";
5555
} else {
5656
$hotword = "your hotword";

examples/Perl/snowboy_unit_test.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
close WAV;
1313

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

1717
$sb->SetSensitivity ("0.5");
1818
$sb->SetAudioGain (1);

examples/Python/demo3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
# Demo code for detecting hotword in a .wav file
66
# Example Usage:
7-
# $ python demo3.py resources/snowboy.wav resources/snowboy.umdl
7+
# $ python demo3.py resources/snowboy.wav resources/models/snowboy.umdl
88
# Should print:
99
# Hotword Detected!
1010
#
11-
# $ python demo3.py resources/ding.wav resources/snowboy.umdl
11+
# $ python demo3.py resources/ding.wav resources/models/snowboy.umdl
1212
# Should print:
1313
# Hotword Not Detected!
1414

examples/Python3/demo3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
# Demo code for detecting hotword in a .wav file
66
# Example Usage:
7-
# $ python demo3.py resources/snowboy.wav resources/snowboy.umdl
7+
# $ python demo3.py resources/snowboy.wav resources/models/snowboy.umdl
88
# Should print:
99
# Hotword Detected!
1010
#
11-
# $ python demo3.py resources/ding.wav resources/snowboy.umdl
11+
# $ python demo3.py resources/ding.wav resources/models/snowboy.umdl
1212
# Should print:
1313
# Hotword Not Detected!
1414

resources/alexa.umdl

-953 KB
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)