Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: webrtc/modules/audio_processing/test/py_conversational_speech/generate_conversational_tracks.py

Issue 2740063004: C++ porting of the initial python script for conversational speech generation. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
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 """Generate multiple-end audio tracks to simulate conversational
11 speech with two or more participants.
12
13 Usage: generate_conversational_tracks.py
14 -i path/to/source/audiotracks
15 -t path/to/timing_file.txt
16 -o output/path
17 """
18
19 import argparse
20 import logging
21 import sys
22
23 def _InstanceArgumentsParser():
24 parser = argparse.ArgumentParser(description=(
25 'Generate multiple-end audio tracks to simulate conversational speech '
26 'with two or more participants.'))
27
28 parser.add_argument('-i', '--input_tracks_path', required=True,
29 help='directory containing the speech turn wav files')
30
31 parser.add_argument('-t', '--timing_file', required=True,
32 help='path to the timing text file')
33
34 parser.add_argument('-o', '--output_dir', required=False,
35 help=('base path to the output directory in which the '
36 'output wav files are saved'),
37 default='output')
38
39 return parser
40
41
42 def main():
43 # TODO(alessiob): level = logging.INFO once debugged.
44 logging.basicConfig(level=logging.DEBUG)
45
46 parser = _InstanceArgumentsParser()
47 args = parser.parse_args()
48
49 # TODO(alessiob): pass the arguments to the app controller.
50
51 # TODO(alessiob): remove when comment above addressed.
52 logging.debug(args)
53
54 sys.exit(0)
55
56
57 if __name__ == '__main__':
58 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698