-
Notifications
You must be signed in to change notification settings - Fork 28
/
go.py
37 lines (29 loc) · 798 Bytes
/
go.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys
from foo import high as high_foo
from foo.project_settings import get_watson_creds
"""
TODO
refactor into separate CLI-subcommands, so that splitting audio
is done totally separate from transcribing audio, and so forth...
"""
if __name__ == '__main__':
filepath = sys.argv[1].strip()
print("""
INITIALIZING PROJECT
====================
""")
# initialize project
project_slug = high_foo.init_project(filepath)
# extracts and splits audio
print("""
SPLITTING AUDIO
====================
""")
for seg_fn in high_foo.split_audio(project_slug):
print(seg_fn)
# transcribes audio
print("""
TRANSCRIBING AUDIO
====================
""")
high_foo.transcribe_audio(project_slug, creds=get_watson_creds())