summaryrefslogtreecommitdiff
path: root/word-aligner/force_align.py
diff options
context:
space:
mode:
Diffstat (limited to 'word-aligner/force_align.py')
-rwxr-xr-xword-aligner/force_align.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/word-aligner/force_align.py b/word-aligner/force_align.py
index d5d59d11..8386e6a5 100755
--- a/word-aligner/force_align.py
+++ b/word-aligner/force_align.py
@@ -21,9 +21,13 @@ def main():
sys.exit(2)
aligner = ForceAligner(*sys.argv[1:])
-
- for line in sys.stdin:
+
+ while True:
+ line = sys.stdin.readline()
+ if not line:
+ break
sys.stdout.write('{}\n'.format(aligner.align_formatted(line.strip())))
+ sys.stdout.flush()
aligner.close()