File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ interface SnowboyDetectNativeInterface {
3
3
Reset ( ) : boolean ;
4
4
RunDetection ( audioData : Buffer ) : number ;
5
5
SetSensitivity ( sensitivity : string ) : void ;
6
+ SetHighSensitivity ( highSensitivity : string ) : void ;
6
7
GetSensitivity ( ) : string ;
7
8
SetAudioGain ( audioGain : number ) : void ;
8
9
UpdateModel ( ) : void ;
Original file line number Diff line number Diff line change @@ -34,12 +34,14 @@ export interface DetectorOptions {
34
34
models : HotwordModels ;
35
35
audioGain ?: number ;
36
36
applyFrontend ?: boolean ;
37
+ highSensitivity ?: string ;
37
38
}
38
39
39
40
export interface SnowboyDetectInterface {
40
41
reset ( ) : boolean ;
41
42
runDetection ( buffer : Buffer ) : number ;
42
43
setSensitivity ( sensitivity : string ) : void ;
44
+ setHighSensitivity ( highSensitivity : string ) : void ;
43
45
getSensitivity ( ) : string ;
44
46
setAudioGain ( gain : number ) : void ;
45
47
updateModel ( ) : void ;
@@ -121,6 +123,10 @@ export class SnowboyDetect extends stream.Writable implements SnowboyDetectInter
121
123
if ( options . applyFrontend ) {
122
124
this . nativeInstance . ApplyFrontend ( options . applyFrontend ) ;
123
125
}
126
+
127
+ if ( options . highSensitivity ) {
128
+ this . nativeInstance . SetHighSensitivity ( options . highSensitivity ) ;
129
+ }
124
130
}
125
131
126
132
reset ( ) : boolean {
@@ -137,6 +143,10 @@ export class SnowboyDetect extends stream.Writable implements SnowboyDetectInter
137
143
this . nativeInstance . SetSensitivity ( sensitivity ) ;
138
144
}
139
145
146
+ setHighSensitivity ( highSensitivity : string ) : void {
147
+ this . nativeInstance . SetHighSensitivity ( highSensitivity ) ;
148
+ }
149
+
140
150
getSensitivity ( ) : string {
141
151
return this . nativeInstance . GetSensitivity ( ) ;
142
152
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " snowboy" ,
3
- "version" : " 1.2 .0" ,
3
+ "version" : " 1.3 .0" ,
4
4
"description" : " Snowboy is a customizable hotword detection engine" ,
5
5
"main" : " lib/node/index.js" ,
6
6
"typings" : " lib/node/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments