Skip to content

Commit

Permalink
Fix #9
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrawal committed Feb 17, 2018
1 parent 999ff40 commit d4768d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
10 changes: 5 additions & 5 deletions deepsphinx/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def read_data_thread(
trans = tf.gfile.FastGFile(FLAGS.trans_file).readlines()
random.shuffle(trans)
for text, set_id_trans, speaker, audio_file in csv.reader(trans):
try:
text = [VOCAB_TO_INT[c]
for c in list(text)] + [VOCAB_TO_INT['</s>']]
except KeyError:
continue
text = [VOCAB_TO_INT[c] for c in list(text)]
# A space is required after the sentence due to the way FST is set up
if (text[-1] != VOCAB_TO_INT[' ']):
text.append(VOCAB_TO_INT[' '])
text.append(VOCAB_TO_INT['</s>'])
if (set_id == set_id_trans and
((not FLAGS.use_train_lm) or in_fst(fst, text))):
feat = get_features(audio_file)
Expand Down
17 changes: 0 additions & 17 deletions setup.py

This file was deleted.

0 comments on commit d4768d1

Please sign in to comment.