| Index: webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
|
| diff --git a/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h b/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
|
| index 234cb2799e34a45db318dcb5e7bd2cd9a580bc8f..2af742453173f6e1785a7412debd87bf3c279827 100644
|
| --- a/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
|
| +++ b/webrtc/modules/audio_processing/test/conversational_speech/multiend_call.h
|
| @@ -15,6 +15,8 @@
|
| #include <memory>
|
| #include <set>
|
| #include <string>
|
| +#include <utility>
|
| +#include <vector>
|
|
|
| #include "webrtc/base/array_view.h"
|
| #include "webrtc/base/constructormagic.h"
|
| @@ -36,16 +38,26 @@ class MultiEndCall {
|
| const std::set<std::string>& speaker_names() const;
|
| const std::map<std::string, std::unique_ptr<WavReaderInterface>>&
|
| audiotrack_readers() const;
|
| + bool valid();
|
|
|
| private:
|
| - // Find unique speaker names.
|
| + typedef std::pair<std::size_t, std::size_t> Interval;
|
| + typedef std::vector<Interval> IntervalsVector;
|
| +
|
| + // Finds unique speaker names.
|
| void FindSpeakerNames();
|
|
|
| - // Create one WavReader instance for each unique audiotrack.
|
| + // Creates one WavReader instance for each unique audiotrack.
|
| void CreateAudioTrackReaders();
|
|
|
| - // Check the speaking turns timing.
|
| - void CheckTiming();
|
| + // Validates the speaking turns timing information. Accepts cross-talk, but
|
| + // only up to 2 speakers. Rejects unordered turns and self cross-talk.
|
| + bool CheckTiming() const;
|
| +
|
| + // Detects cross-talk, which occurs when two turns from the same speaker
|
| + // overlap in time.
|
| + bool DetectSelfCrossTalk(IntervalsVector* speaker_intervals)
|
| + const;
|
|
|
| rtc::ArrayView<const Turn> timing_;
|
| const std::string& audiotracks_path_;
|
| @@ -53,6 +65,7 @@ class MultiEndCall {
|
| std::set<std::string> speaker_names_;
|
| std::map<std::string, std::unique_ptr<WavReaderInterface>>
|
| audiotrack_readers_;
|
| + bool valid_;
|
|
|
| RTC_DISALLOW_COPY_AND_ASSIGN(MultiEndCall);
|
| };
|
|
|