summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormjdenkowski <michael.j.denkowski@gmail.com>2013-12-04 14:28:48 -0500
committermjdenkowski <michael.j.denkowski@gmail.com>2013-12-04 14:28:48 -0500
commit52fcde1cdffbefee730bb90e535c54c9d426f6d3 (patch)
treef15caa76e9a2e3133173b5fcb3e3e477a154e027
parent7d391d8eb88d27c5637042fefe2d27e7b12f5587 (diff)
Remove dependency on pycdec for force alignment
-rw-r--r--realtime/rt/util.py2
-rwxr-xr-xword-aligner/force_align.py8
2 files changed, 4 insertions, 6 deletions
diff --git a/realtime/rt/util.py b/realtime/rt/util.py
index 52767dac..a7333bbd 100644
--- a/realtime/rt/util.py
+++ b/realtime/rt/util.py
@@ -4,8 +4,6 @@ import subprocess
import sys
import threading
-from cdec.configobj import ConfigObj
-
SA_INI_FILES = set((
'f_sa_file',
'e_file',
diff --git a/word-aligner/force_align.py b/word-aligner/force_align.py
index b03d446e..d5d59d11 100755
--- a/word-aligner/force_align.py
+++ b/word-aligner/force_align.py
@@ -3,6 +3,10 @@
import os
import sys
+# Hook into realtime
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'realtime', 'rt'))
+from aligner import ForceAligner
+
def main():
if len(sys.argv[1:]) < 4:
@@ -16,10 +20,6 @@ def main():
sys.stderr.write('where heuristic is one of: (intersect union grow-diag grow-diag-final grow-diag-final-and) default=grow-diag-final-and\n')
sys.exit(2)
- # Hook into realtime
- sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'realtime'))
- from rt.aligner import ForceAligner
-
aligner = ForceAligner(*sys.argv[1:])
for line in sys.stdin: