|
|
|
|
@ -247,12 +247,13 @@ static void test_prefetch_deferred(UTUN_INSTANCE* instance) {
|
|
|
|
|
|
|
|
|
|
static std::vector<std::string> diagnostic_messages; |
|
|
|
|
static void capture_diagnostic(int, const char* category, const char* message) { |
|
|
|
|
if (category && !strcmp(category, "debug")) diagnostic_messages.emplace_back(message); |
|
|
|
|
if (category && (!strcmp(category, "vad") || !strcmp(category, "radio"))) diagnostic_messages.emplace_back(message); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Проверяем наблюдаемые причины отказа и старта на настоящем PCM/TX-пути. */ |
|
|
|
|
static void test_vad_diagnostics(UTUN_INSTANCE* instance) { |
|
|
|
|
debug_set_category_level(DEBUG_CATEGORY_DEBUG, DEBUG_LEVEL_TRACE); |
|
|
|
|
debug_set_category_level(DEBUG_CATEGORY_VAD, DEBUG_LEVEL_TRACE); |
|
|
|
|
debug_set_category_level(DEBUG_CATEGORY_RADIO, DEBUG_LEVEL_TRACE); |
|
|
|
|
debug_set_log_hook(capture_diagnostic); |
|
|
|
|
diagnostic_messages.clear(); events.clear(); packets.clear(); radio_compressor_enabled = 0; |
|
|
|
|
REQUIRE(radio_audio_start(7, 0) == 0 && radio_audio_capture_start(7, 1, 1) == 0); |
|
|
|
|
@ -285,8 +286,9 @@ static void test_vad_diagnostics(UTUN_INSTANCE* instance) {
|
|
|
|
|
"reason=silence_timeout", "reason=rx_busy", "rx_node=0000000000001234", "manual=1", |
|
|
|
|
"BEGIN dispatched", "capture discontinuity", "VAD capture stop", "model_rms="}) REQUIRE(contains(text)); |
|
|
|
|
debug_set_log_hook(nullptr); |
|
|
|
|
debug_set_category_level(DEBUG_CATEGORY_DEBUG, DEBUG_LEVEL_NONE); |
|
|
|
|
puts("voice TX: VAD debug logs identify confirmation reset, speech start/stop, RX blocking and manual override PASS"); |
|
|
|
|
debug_set_category_level(DEBUG_CATEGORY_VAD, DEBUG_LEVEL_NONE); |
|
|
|
|
debug_set_category_level(DEBUG_CATEGORY_RADIO, DEBUG_LEVEL_NONE); |
|
|
|
|
puts("voice TX: VAD/radio logs identify confirmation reset, speech start/stop, RX blocking and manual override PASS"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int main() { |
|
|
|
|
|