-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaudio_control.proto
54 lines (40 loc) · 1.94 KB
/
audio_control.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//package hello;
option java_package = "com.hello.suripu.api.audio";
option java_outer_classname = "AudioControlProtos";
message AudioClassifierMessage {
enum ClassifierType {
LINEARSVM = 0;
}
repeated sint32 idata = 1;
optional int32 numclasses = 2;
optional ClassifierType type = 3;
}
message AudioControl {
//turn on/off audio capture
enum AudioCaptureAction {
OFF = 0;
ON = 1;
}
//minimum log2 audio energy above background noise to save off and classify.
//500 is a good value for this. Raise to 1000 to be less sensitive.
optional int32 audio_min_energy_threshold = 1;
//feature vectors come in every 32ms ( 256 / 16000Hz * 2, where the "2" is for the average 2, decimate)
//so every 1875 feat vecs is a minute.
optional int32 audio_num_feat_vecs_until_attempt_feature_upload = 2;
//buffer size in bytes of audio features. Note every ~330 bytes is 32 feat vecs, ergo 1 minute is about 20K
//the buffer should be sized for your upload period
optional int32 audio_feat_buffer_size = 3;
//frames are 16ms long (256/16000). When you detect snoring (or whatever), this is how many frames of data you want to record
optional int32 audio_recording_period_in_frames = 4;
//Matrix == 2D array of integers with some describing strings
//audio classifier and HMM determines when you should record to sd card
//You can think of the classifier as a high level feature extraction
//The HMM evaluation "fuses" the high level classification together
// optional Matrix audio_recording_classifier = 5;
// optional Matrix audio_recording_hmm = 6;
optional AudioCaptureAction audio_capture_action = 8;
optional AudioClassifierMessage audio_capture_classifier = 9;
optional AudioClassifierMessage audio_capture_hmm = 10;
optional AudioCaptureAction audio_save_raw_data = 11;
optional AudioCaptureAction audio_save_features = 12;
}