webrtc/modules/audio_processing/debug.proto
Sam Zackrisson 2836729ee0 Add APM config string to aecdump config message
The aecdump config message requires a lot of duplication and boilerplate
in exchange for being able to read the config back at offline simulation
time. The message tends to slip out of sync with APM configuration,
missing many important parameters which hampers reproducibility.

This CL adds many recently added parameters to the dump message, and
makes the message more likely to contain future parameters as well.

This creates some redundancy with older params. They are kept in, to
maintain the ability to parse old aecdumps and to keep our existing
(limited) reproducibility with audioproc_f.

Bug: webrtc:42224259, webrtc:442444736, b:428638881
Change-Id: Ib6e57435a58b0ed417c83ecc627678adb0d0164f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/444260
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46771}
2026-01-29 05:38:33 -08:00

121 lines
3.6 KiB
Protocol Buffer

syntax = "proto2";
package webrtc.audioproc;
option optimize_for = LITE_RUNTIME;
// Contains the format of input/output/reverse audio. An Init message is added
// when any of the fields are changed.
message Init {
optional int32 sample_rate = 1;
optional int32 device_sample_rate = 2 [deprecated = true];
optional int32 num_input_channels = 3;
optional int32 num_output_channels = 4;
optional int32 num_reverse_channels = 5;
optional int32 reverse_sample_rate = 6;
optional int32 output_sample_rate = 7;
optional int32 reverse_output_sample_rate = 8;
optional int32 num_reverse_output_channels = 9;
optional int64 timestamp_ms = 10;
}
// May contain interleaved or deinterleaved data, but don't store both formats.
message ReverseStream {
// int16 interleaved data.
optional bytes data = 1;
// float deinterleaved data, where each repeated element points to a single
// channel buffer of data.
repeated bytes channel = 2;
}
// May contain interleaved or deinterleaved data, but don't store both formats.
message Stream {
// int16 interleaved data.
optional bytes input_data = 1;
optional bytes output_data = 2;
optional int32 delay = 3;
optional sint32 drift = 4;
optional int32 applied_input_volume = 5;
optional bool keypress = 6;
// float deinterleaved data, where each repeated element points to a single
// channel buffer of data.
repeated bytes input_channel = 7;
repeated bytes output_channel = 8;
}
// Contains the configurations of various APM component. A Config message is
// added when any of the fields are changed.
message Config {
reserved 6 to 8; // AECm
// Acoustic echo canceler.
optional bool aec_enabled = 1;
optional bool aec_delay_agnostic_enabled = 2;
optional bool aec_drift_compensation_enabled = 3;
optional bool aec_extended_filter_enabled = 4;
optional int32 aec_suppression_level = 5;
// Automatic gain controller.
optional bool agc_enabled = 9;
optional int32 agc_mode = 10;
optional bool agc_limiter_enabled = 11;
optional bool noise_robust_agc_enabled = 12;
// High pass filter.
optional bool hpf_enabled = 13;
// Noise suppression.
optional bool ns_enabled = 14;
optional int32 ns_level = 15;
// Transient suppression.
optional bool transient_suppression_enabled = 16;
// Semicolon-separated string containing experimental feature
// descriptions.
optional string experiments_description = 17;
reserved 18; // Intelligibility enhancer enabled (deprecated).
// Pre amplifier.
optional bool pre_amplifier_enabled = 19;
optional float pre_amplifier_fixed_gain_factor = 20;
// General string version of webrtc::AudioProcessing::Config. Partially
// overlaps with other fields in this Config message, but is more likely to be
// up-to-date.
optional string api_config_string = 21;
// Next field number 21.
}
message PlayoutAudioDeviceInfo {
optional int32 id = 1;
optional int32 max_volume = 2;
}
message RuntimeSetting {
optional float capture_pre_gain = 1;
optional float custom_render_processing_setting = 2;
optional float capture_fixed_post_gain = 3;
optional int32 playout_volume_change = 4;
optional PlayoutAudioDeviceInfo playout_audio_device_change = 5;
optional bool capture_output_used = 6;
optional float capture_post_gain = 7;
}
message Event {
enum Type {
INIT = 0;
REVERSE_STREAM = 1;
STREAM = 2;
CONFIG = 3;
UNKNOWN_EVENT = 4;
RUNTIME_SETTING = 5;
}
required Type type = 1;
optional Init init = 2;
optional ReverseStream reverse_stream = 3;
optional Stream stream = 4;
optional Config config = 5;
optional RuntimeSetting runtime_setting = 6;
}