Blame view
egs/hkust/s5/local/hkust_segment.py
428 Bytes
8dcb6dfcb first commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#!/usr/bin/env python2.7 #coding:utf-8 from __future__ import print_function import sys from mmseg import seg_txt for line in sys.stdin: blks = str.split(line) out_line = blks[0] for i in range(1, len(blks)): if blks[i] == "[VOCALIZED-NOISE]" or blks[i] == "[NOISE]" or blks[i] == "[LAUGHTER]": out_line += " " + blks[i] continue for j in seg_txt(blks[i]): out_line += " " + j print(out_line) |