blob: dc4336181502d16978511a56de322a776de3646e [file] [log] [blame]
alessiobce302b82017-03-22 08:23:46 -07001/*
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
12#define MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_
alessiobce302b82017-03-22 08:23:46 -070013
14#include <string>
15#include <vector>
16
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020017#include "api/array_view.h"
alessiobce302b82017-03-22 08:23:46 -070018
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020046#endif // MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_TIMING_H_