Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #include <iostream> | |
| 12 | |
| 13 #include "gflags/gflags.h" | |
| 14 #include "webrtc/base/logging.h" | |
| 15 #include "webrtc/modules/audio_processing/test/conversational_speech/settings.h" | |
| 16 | |
| 17 namespace webrtc { | |
| 18 namespace test { | |
| 19 namespace { | |
| 20 | |
| 21 const char kUsageDescription[] = | |
| 22 "Usage: convspeech_gen\n" | |
| 23 " -i <path/to/source/audiotracks>\n" | |
| 24 " -t <path/to/timing_file.txt>\n" | |
| 25 " -o <output/path>\n" | |
| 26 "\n\n" | |
| 27 "Command-line tool to generate multiple-end audio tracks to simulate " | |
| 28 "conversational speech with two or more participants."; | |
| 29 | |
| 30 DEFINE_string(i, "", "Directory containing the speech turn wav files"); | |
| 31 DEFINE_string(t, "", "Path to the timing text file"); | |
| 32 DEFINE_string(o, "", "Output wav files destination path"); | |
| 33 | |
| 34 } // namespace | |
| 35 | |
| 36 int main(int argc, char* argv[]) { | |
| 37 google::SetUsageMessage(kUsageDescription); | |
| 38 google::ParseCommandLineFlags(&argc, &argv, true); | |
| 39 | |
| 40 convspeechgen::Settings settings(FLAGS_i, FLAGS_t, FLAGS_o); | |
| 41 if (!settings.ValidateAndReport()) { | |
|
hlundin-webrtc
2017/03/13 12:28:19
I've been increasingly radical about error handlin
AleBzk
2017/03/13 14:14:41
Done.
| |
| 42 exit(1); | |
| 43 } | |
| 44 | |
| 45 // TODO(alessiob): remove line below once debugged. | |
| 46 rtc::LogMessage::LogToDebug(rtc::LS_VERBOSE); | |
| 47 LOG(LS_VERBOSE) << "i = " << settings.AudiotracksPath(); | |
| 48 LOG(LS_VERBOSE) << "t = " << settings.TimingFilePath(); | |
| 49 LOG(LS_VERBOSE) << "o = " << settings.OutputPath(); | |
| 50 | |
| 51 return 0; | |
| 52 } | |
| 53 | |
| 54 } // namespace test | |
| 55 } // namespace webrtc | |
| 56 | |
| 57 int main(int argc, char* argv[]) { | |
| 58 return webrtc::test::main(argc, argv); | |
| 59 } | |
| OLD | NEW |