blob: ebfb84d9cd08d67e3aa51b0f09b89fd6b9a42ba6 [file] [log] [blame]
ajm@google.com808e0e02011-08-03 21:08:51 +00001syntax = "proto2";
2option optimize_for = LITE_RUNTIME;
3package webrtc.audioproc;
4
Minyue13b96ba2015-10-03 00:39:14 +02005// Contains the format of input/output/reverse audio. An Init message is added
6// when any of the fields are changed.
ajm@google.com808e0e02011-08-03 21:08:51 +00007message Init {
8 optional int32 sample_rate = 1;
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +00009 optional int32 device_sample_rate = 2 [deprecated=true];
ajm@google.com808e0e02011-08-03 21:08:51 +000010 optional int32 num_input_channels = 3;
11 optional int32 num_output_channels = 4;
12 optional int32 num_reverse_channels = 5;
andrew@webrtc.orga8b97372014-03-10 22:26:12 +000013 optional int32 reverse_sample_rate = 6;
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000014 optional int32 output_sample_rate = 7;
peahc7bdf8a2016-04-11 07:05:53 -070015 optional int32 reverse_output_sample_rate = 8;
16 optional int32 num_reverse_output_channels = 9;
Minyue Li656d6092018-08-10 15:38:52 +020017 optional int64 timestamp_ms = 10;
ajm@google.com808e0e02011-08-03 21:08:51 +000018}
19
andrew@webrtc.org17e40642014-03-04 20:58:13 +000020// May contain interleaved or deinterleaved data, but don't store both formats.
ajm@google.com808e0e02011-08-03 21:08:51 +000021message ReverseStream {
andrew@webrtc.org17e40642014-03-04 20:58:13 +000022 // int16 interleaved data.
ajm@google.com808e0e02011-08-03 21:08:51 +000023 optional bytes data = 1;
andrew@webrtc.org17e40642014-03-04 20:58:13 +000024
25 // float deinterleaved data, where each repeated element points to a single
26 // channel buffer of data.
27 repeated bytes channel = 2;
ajm@google.com808e0e02011-08-03 21:08:51 +000028}
29
andrew@webrtc.org17e40642014-03-04 20:58:13 +000030// May contain interleaved or deinterleaved data, but don't store both formats.
ajm@google.com808e0e02011-08-03 21:08:51 +000031message Stream {
andrew@webrtc.org17e40642014-03-04 20:58:13 +000032 // int16 interleaved data.
ajm@google.com808e0e02011-08-03 21:08:51 +000033 optional bytes input_data = 1;
34 optional bytes output_data = 2;
andrew@webrtc.org17e40642014-03-04 20:58:13 +000035
ajm@google.com808e0e02011-08-03 21:08:51 +000036 optional int32 delay = 3;
37 optional sint32 drift = 4;
38 optional int32 level = 5;
andrew@webrtc.orgce8e0772014-02-12 15:28:30 +000039 optional bool keypress = 6;
andrew@webrtc.org17e40642014-03-04 20:58:13 +000040
41 // float deinterleaved data, where each repeated element points to a single
42 // channel buffer of data.
43 repeated bytes input_channel = 7;
44 repeated bytes output_channel = 8;
ajm@google.com808e0e02011-08-03 21:08:51 +000045}
46
Minyue13b96ba2015-10-03 00:39:14 +020047// Contains the configurations of various APM component. A Config message is
48// added when any of the fields are changed.
49message Config {
Alejandro Luebsc9b0c262016-05-16 15:32:38 -070050 // Next field number 19.
Minyue13b96ba2015-10-03 00:39:14 +020051 // Acoustic echo canceler.
52 optional bool aec_enabled = 1;
53 optional bool aec_delay_agnostic_enabled = 2;
54 optional bool aec_drift_compensation_enabled = 3;
55 optional bool aec_extended_filter_enabled = 4;
56 optional int32 aec_suppression_level = 5;
57 // Mobile AEC.
58 optional bool aecm_enabled = 6;
59 optional bool aecm_comfort_noise_enabled = 7;
60 optional int32 aecm_routing_mode = 8;
61 // Automatic gain controller.
62 optional bool agc_enabled = 9;
63 optional int32 agc_mode = 10;
64 optional bool agc_limiter_enabled = 11;
65 optional bool noise_robust_agc_enabled = 12;
66 // High pass filter.
67 optional bool hpf_enabled = 13;
68 // Noise suppression.
69 optional bool ns_enabled = 14;
70 optional int32 ns_level = 15;
71 // Transient suppression.
72 optional bool transient_suppression_enabled = 16;
peah7789fe72016-04-15 01:19:44 -070073 // Semicolon-separated string containing experimental feature
74 // descriptions.
75 optional string experiments_description = 17;
Alex Loiko5feb30e2018-04-16 13:52:32 +020076 // Intelligibility Enhancer.
Alejandro Luebsc9b0c262016-05-16 15:32:38 -070077 optional bool intelligibility_enhancer_enabled = 18;
Alex Loiko5feb30e2018-04-16 13:52:32 +020078 // Pre amplifier.
79 optional bool pre_amplifier_enabled = 19;
80 optional float pre_amplifier_fixed_gain_factor = 20;
Minyue13b96ba2015-10-03 00:39:14 +020081}
82
ajm@google.com808e0e02011-08-03 21:08:51 +000083message Event {
84 enum Type {
85 INIT = 0;
86 REVERSE_STREAM = 1;
87 STREAM = 2;
Minyue13b96ba2015-10-03 00:39:14 +020088 CONFIG = 3;
89 UNKNOWN_EVENT = 4;
ajm@google.com808e0e02011-08-03 21:08:51 +000090 }
91
92 required Type type = 1;
93
94 optional Init init = 2;
95 optional ReverseStream reverse_stream = 3;
96 optional Stream stream = 4;
Minyue13b96ba2015-10-03 00:39:14 +020097 optional Config config = 5;
ajm@google.com808e0e02011-08-03 21:08:51 +000098}