Skip to content

Commit

Permalink
Update bin mlf reader
Browse files Browse the repository at this point in the history
  • Loading branch information
vmazalov committed Nov 15, 2018
1 parent d7101a2 commit 631392e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
abs_path = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.join(abs_path, "..", "..", "..", "..", "Examples", "Speech", "AN4", "Data")
e2e_data_path="../../../../Tests/EndToEndTests/Speech/Data/"

def test_htk_deserializers():
mbsize = 640
Expand Down Expand Up @@ -61,7 +62,7 @@ def test_multiple_mlf_files():
num_classes = 132
context = 2

test_mlf_path = "../../../../Tests/EndToEndTests/Speech/Data/glob_00001.mlf"
test_mlf_path = e2e_data_path+"glob_00001.mlf"

features_file = "glob_0000.scp"
label_files = [ "glob_0000.mlf", test_mlf_path]
Expand Down Expand Up @@ -91,7 +92,7 @@ def test_mlf_binary_files():
fd = HTKFeatureDeserializer(StreamDefs(
amazing_features = StreamDef(shape=feature_dim, context=(context,context), scp=features_file)))

ld = HTKMLFBinaryDeserializer(StreamDefs(awesome_labels = StreamDef(shape=num_classes, mlf="mlf2.bin")))
ld = HTKMLFBinaryDeserializer(StreamDefs(awesome_labels = StreamDef(shape=num_classes, mlf=e2e_data_path + "mlf2.bin")))

# Make sure we can read at least one minibatch.
mbsource = MinibatchSource([fd,ld])
Expand All @@ -107,7 +108,7 @@ def test_multiple_mlf_binary_files():
context = 2

features_file = "glob_0000.scp"
label_files = [ "mlf2.bin", "mlf2.bin"]
label_files = [ e2e_data_path+"mlf2.bin", e2e_data_path+"mlf2.bin"]

fd = HTKFeatureDeserializer(StreamDefs(
amazing_features = StreamDef(shape=feature_dim, context=(context,context), scp=features_file)))
Expand Down

0 comments on commit 631392e

Please sign in to comment.