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 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL
_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_CALL
_H_ |
| 13 |
| 14 #include <map> |
| 15 #include <memory> |
| 16 #include <set> |
| 17 #include <string> |
| 18 |
| 19 #include "webrtc/base/array_view.h" |
| 20 #include "webrtc/base/constructormagic.h" |
| 21 #include "webrtc/modules/audio_processing/test/conversational_speech/timing.h" |
| 22 #include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_a
bstract_factory.h" |
| 23 #include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_i
nterface.h" |
| 24 |
| 25 namespace webrtc { |
| 26 namespace test { |
| 27 namespace conversational_speech { |
| 28 |
| 29 class MultiEndCall { |
| 30 public: |
| 31 MultiEndCall( |
| 32 rtc::ArrayView<const Turn> timing, const std::string& audiotracks_path, |
| 33 std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory); |
| 34 ~MultiEndCall(); |
| 35 |
| 36 const std::set<std::string>& speaker_names() const; |
| 37 const std::map<std::string, std::unique_ptr<WavReaderInterface>>& |
| 38 audiotrack_readers() const; |
| 39 |
| 40 private: |
| 41 // Find unique speaker names. |
| 42 void FindSpeakerNames(); |
| 43 |
| 44 // Create one WavReader instance for each unique audiotrack. |
| 45 void CreateAudioTrackReaders(); |
| 46 |
| 47 // Check the speaking turns timing. |
| 48 void CheckTiming(); |
| 49 |
| 50 rtc::ArrayView<const Turn> timing_; |
| 51 const std::string& audiotracks_path_; |
| 52 std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory_; |
| 53 std::set<std::string> speaker_names_; |
| 54 std::map<std::string, std::unique_ptr<WavReaderInterface>> |
| 55 audiotrack_readers_; |
| 56 |
| 57 RTC_DISALLOW_COPY_AND_ASSIGN(MultiEndCall); |
| 58 }; |
| 59 |
| 60 } // namespace conversational_speech |
| 61 } // namespace test |
| 62 } // namespace webrtc |
| 63 |
| 64 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_C
ALL_H_ |
OLD | NEW |