| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 | 11 |
| 12 #include <math.h> | 12 #include <math.h> |
| 13 #include <stdio.h> | 13 #include <stdio.h> |
| 14 #include <stdlib.h> | 14 #include <stdlib.h> |
| 15 | 15 |
| 16 #include <algorithm> | 16 #include <algorithm> |
| 17 | 17 |
| 18 #include "gflags/gflags.h" | 18 #include "gflags/gflags.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "webrtc/modules/audio_processing/agc/agc.h" | 20 #include "webrtc/modules/audio_processing/agc/agc.h" |
| 21 #include "webrtc/modules/audio_processing/agc/histogram.h" | 21 #include "webrtc/modules/audio_processing/agc/histogram.h" |
| 22 #include "webrtc/modules/audio_processing/agc/utility.h" | 22 #include "webrtc/modules/audio_processing/agc/utility.h" |
| 23 #include "webrtc/modules/audio_processing/vad/vad_audio_proc.h" | 23 #include "webrtc/modules/audio_processing/vad/vad_audio_proc.h" |
| 24 #include "webrtc/modules/audio_processing/vad/common.h" | 24 #include "webrtc/modules/audio_processing/vad/common.h" |
| 25 #include "webrtc/modules/audio_processing/vad/pitch_based_vad.h" | 25 #include "webrtc/modules/audio_processing/vad/pitch_based_vad.h" |
| 26 #include "webrtc/modules/audio_processing/vad/standalone_vad.h" | 26 #include "webrtc/modules/audio_processing/vad/standalone_vad.h" |
| 27 #include "webrtc/modules/interface/module_common_types.h" | 27 #include "webrtc/modules/include/module_common_types.h" |
| 28 | 28 |
| 29 static const int kAgcAnalWindowSamples = 100; | 29 static const int kAgcAnalWindowSamples = 100; |
| 30 static const double kDefaultActivityThreshold = 0.3; | 30 static const double kDefaultActivityThreshold = 0.3; |
| 31 | 31 |
| 32 DEFINE_bool(standalone_vad, true, "enable stand-alone VAD"); | 32 DEFINE_bool(standalone_vad, true, "enable stand-alone VAD"); |
| 33 DEFINE_string(true_vad, "", "name of a file containing true VAD in 'int'" | 33 DEFINE_string(true_vad, "", "name of a file containing true VAD in 'int'" |
| 34 " format"); | 34 " format"); |
| 35 DEFINE_string(video_vad, "", "name of a file containing video VAD (activity" | 35 DEFINE_string(video_vad, "", "name of a file containing video VAD (activity" |
| 36 " probabilities) in double format. One activity per 10ms is" | 36 " probabilities) in double format. One activity per 10ms is" |
| 37 " required. If no file is given the video information is not" | 37 " required. If no file is given the video information is not" |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 " one probability per frame.\n" | 375 " one probability per frame.\n" |
| 376 "\nUsage:\n\n" | 376 "\nUsage:\n\n" |
| 377 "activity_metric input_pcm [options]\n" | 377 "activity_metric input_pcm [options]\n" |
| 378 "where 'input_pcm' is the input audio sampled at 16 kHz in 16 bits " | 378 "where 'input_pcm' is the input audio sampled at 16 kHz in 16 bits " |
| 379 "format.\n\n"; | 379 "format.\n\n"; |
| 380 google::SetUsageMessage(kUsage); | 380 google::SetUsageMessage(kUsage); |
| 381 google::ParseCommandLineFlags(&argc, &argv, true); | 381 google::ParseCommandLineFlags(&argc, &argv, true); |
| 382 webrtc::void_main(argc, argv); | 382 webrtc::void_main(argc, argv); |
| 383 return 0; | 383 return 0; |
| 384 } | 384 } |
| OLD | NEW |