blob: 62ed1cb83eb26ad393fd165967c0a9ae120d36a0 [file] [log] [blame]
alessiob1d886dd2017-03-22 15:23:461/*
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_TIMING_H_
12#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
13
14#include <string>
15#include <vector>
16
kwiberg23aa43d2017-09-04 12:43:1717#include "webrtc/api/array_view.h"
alessiob1d886dd2017-03-22 15:23:4618
19namespace webrtc {
20namespace test {
21namespace conversational_speech {
22
23struct Turn{
24 Turn(std::string new_speaker_name, std::string new_audiotrack_file_name,
25 int new_offset)
26 : speaker_name(new_speaker_name),
27 audiotrack_file_name(new_audiotrack_file_name),
28 offset(new_offset) {}
29 bool operator==(const Turn &b) const;
30 std::string speaker_name;
31 std::string audiotrack_file_name;
32 int offset;
33};
34
35// Loads a list of turns from a file.
36std::vector<Turn> LoadTiming(const std::string& timing_filepath);
37
38// Writes a list of turns into a file.
39void SaveTiming(const std::string& timing_filepath,
40 rtc::ArrayView<const Turn> timing);
41
42} // namespace conversational_speech
43} // namespace test
44} // namespace webrtc
45
46#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_