Skip to content

Commit 300c055

Browse files
authored
Merge pull request #365 from cuitianxiang001/master
update snowboy version to 1.3.0
2 parents 7d20d7f + 92d025a commit 300c055

File tree

10 files changed

+95
-11
lines changed

10 files changed

+95
-11
lines changed

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ by [KITT.AI](http://kitt.ai).
1010

1111
[Commercial application FAQ](README_commercial.md)
1212

13-
Version: 1.2.0 (3/25/2017)
13+
Version: 1.3.0 (2/14/2018)
1414

1515
## Alexa support
1616

@@ -191,10 +191,10 @@ you use.
191191

192192
## Precompiled Binaries with Python Demo
193193
* 64 bit Ubuntu [12.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1204-x86_64-1.2.0.tar.bz2)
194-
/ [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.2.0.tar.bz2)
195-
* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.2.0.tar.bz2)
194+
/ [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.3.0.tar.bz2)
195+
* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.3.0.tar.bz2)
196196
* Raspberry Pi with Raspbian 8.0, all versions
197-
([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.2.0.tar.bz2))
197+
([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.3.0.tar.bz2))
198198
* 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))
199199
* 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))
200200

@@ -386,9 +386,11 @@ See [Full Documentation](http://docs.kitt.ai/snowboy).
386386

387387
## Change Log
388388

389-
**1/4/2018**
389+
**v1.3.0, 2/14/2018**
390390

391-
* 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.
391+
* Added Frontend processing
392+
* Added `resources/smart_mirror.umdl` for https://snowboy.kitt.ai/hotword/47
393+
* Added `resources/jarvis.umdl` for https://snowboy.kitt.ai/hotword/29
392394

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

README_ZH_CN.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

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

13-
版本:1.2.0(3/25/2017
13+
版本:1.3.0(2/14/2018
1414

1515
## Alexa支持
1616

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

177177
## 预编译Python Demo的二进制文件
178178
* 64 bit Ubuntu [12.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1204-x86_64-1.2.0.tar.bz2)
179-
/ [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.2.0.tar.bz2)
180-
* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.2.0.tar.bz2)
179+
/ [14.04](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/ubuntu1404-x86_64-1.3.0.tar.bz2)
180+
* [MacOS X](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/osx-x86_64-1.3.0.tar.bz2)
181181
* Raspberry Pi with Raspbian 8.0, all versions
182-
([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.2.0.tar.bz2))
182+
([1/2/3/Zero](https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.3.0.tar.bz2))
183183
* 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))
184184
* 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))
185185

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

368368
## 更改日志
369369

370+
**v1.3.0, 2/14/2018**
371+
372+
* 添加前端处理
373+
* 添加`resources/smart_mirror.umdl`https://snowboy.kitt.ai/hotword/47
374+
* 添加`resources/jarvis.umdl`https://snowboy.kitt.ai/hotword/29
375+
370376
**v1.2.0, 3/25/2017**
371377

372378
*[Alexa AVS sample app](https://github.com/alexa/alexa-avs-sample-app)添加更好的Alexa模型

include/snowboy-detect.h

+77-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace snowboy {
1313
// Forward declaration.
1414
struct WaveHeader;
1515
class PipelineDetect;
16+
class PipelineVad;
1617

1718
////////////////////////////////////////////////////////////////////////////////
1819
//
@@ -78,7 +79,7 @@ class SnowboyDetect {
7879
//
7980
// @param [in] data Small chunk of data to be detected. See
8081
// above for the supported data format.
81-
// @param [in] array_length Length of the data array in samples.
82+
// @param [in] array_length Length of the data array.
8283
// @param [in] is_end Set it to true if it is the end of a
8384
// utterance or file.
8485
int RunDetection(const float* const data,
@@ -96,6 +97,7 @@ class SnowboyDetect {
9697
// Make sure you properly align the sensitivity value to the corresponding
9798
// hotword.
9899
void SetSensitivity(const std::string& sensitivity_str);
100+
void SetHighSensitivity(const std::string& high_sensitivity_str);
99101

100102
// Returns the sensitivity string for the current hotwords.
101103
std::string GetSensitivity() const;
@@ -133,6 +135,80 @@ class SnowboyDetect {
133135
std::unique_ptr<PipelineDetect> detect_pipeline_;
134136
};
135137

138+
////////////////////////////////////////////////////////////////////////////////
139+
//
140+
// SnowboyVad class interface.
141+
//
142+
////////////////////////////////////////////////////////////////////////////////
143+
class SnowboyVad {
144+
public:
145+
// Constructor that takes a resource file. It shares the same resource file
146+
// with SnowboyDetect.
147+
SnowboyVad(const std::string& resource_filename);
148+
149+
// Resets the VAD.
150+
bool Reset();
151+
152+
// Runs the VAD algorithm. Supported audio format is WAVE (with linear PCM,
153+
// 8-bits unsigned integer, 16-bits signed integer or 32-bits signed integer).
154+
// See SampleRate(), NumChannels() and BitsPerSample() for the required
155+
// sampling rate, number of channels and bits per sample values. You are
156+
// supposed to provide a small chunk of data (e.g., 0.1 second) each time you
157+
// call RunDetection(). Larger chunk usually leads to longer delay, but less
158+
// CPU usage.
159+
//
160+
// Definition of return values:
161+
// -2: Silence.
162+
// -1: Error.
163+
// 0: Non-silence.
164+
//
165+
// @param [in] data Small chunk of data to be detected. See
166+
// above for the supported data format.
167+
// @param [in] is_end Set it to true if it is the end of a
168+
// utterance or file.
169+
int RunVad(const std::string& data, bool is_end = false);
170+
171+
// Various versions of RunVad() that take different format of audio. If
172+
// NumChannels() > 1, e.g., NumChannels() == 2, then the array is as follows:
173+
//
174+
// d1c1, d1c2, d2c1, d2c2, d3c1, d3c2, ..., dNc1, dNc2
175+
//
176+
// where d1c1 means data point 1 of channel 1.
177+
//
178+
// @param [in] data Small chunk of data to be detected. See
179+
// above for the supported data format.
180+
// @param [in] array_length Length of the data array.
181+
// @param [in] is_end Set it to true if it is the end of a
182+
// utterance or file.
183+
int RunVad(const float* const data,
184+
const int array_length, bool is_end = false);
185+
int RunVad(const int16_t* const data,
186+
const int array_length, bool is_end = false);
187+
int RunVad(const int32_t* const data,
188+
const int array_length, bool is_end = false);
189+
190+
// Applied a fixed gain to the input audio. In case you have a very weak
191+
// microphone, you can use this function to boost input audio level.
192+
void SetAudioGain(const float audio_gain);
193+
194+
// If <apply_frontend> is true, then apply frontend audio processing;
195+
// otherwise turns the audio processing off.
196+
void ApplyFrontend(const bool apply_frontend);
197+
198+
// Returns the required sampling rate, number of channels and bits per sample
199+
// values for the audio data. You should use this information to set up your
200+
// audio capturing interface.
201+
int SampleRate() const;
202+
int NumChannels() const;
203+
int BitsPerSample() const;
204+
205+
~SnowboyVad();
206+
207+
private:
208+
std::unique_ptr<WaveHeader> wave_header_;
209+
std::unique_ptr<PipelineVad> vad_pipeline_;
210+
};
211+
136212
} // namespace snowboy
137213

138214
#endif // SNOWBOY_INCLUDE_SNOWBOY_DETECT_H_
107 KB
Binary file not shown.
-1.89 MB
Binary file not shown.
-2.8 MB
Binary file not shown.

lib/ios/libsnowboy-detect.a

1.91 MB
Binary file not shown.

lib/osx/libsnowboy-detect.a

106 KB
Binary file not shown.

lib/rpi/libsnowboy-detect.a

-256 KB
Binary file not shown.

lib/ubuntu64/libsnowboy-detect.a

467 KB
Binary file not shown.

0 commit comments

Comments
 (0)