提交 2b51d612 编写于 作者: H Haoxin Ma

delete _instance_reader_creator func in dataset

上级 c706dfec
...@@ -249,22 +249,22 @@ class ManifestDataset(Dataset): ...@@ -249,22 +249,22 @@ class ManifestDataset(Dataset):
def _instance_reader_creator(self, manifest): # def _instance_reader_creator(self, manifest):
""" # """
Instance reader creator. Create a callable function to produce # Instance reader creator. Create a callable function to produce
instances of data. # instances of data.
Instance: a tuple of ndarray of audio spectrogram and a list of # Instance: a tuple of ndarray of audio spectrogram and a list of
token indices for transcript. # token indices for transcript.
""" # """
def reader(): # def reader():
for instance in manifest: # for instance in manifest:
inst = self.process_utterance(instance["utt"], instance["feat"], # inst = self.process_utterance(instance["utt"], instance["feat"],
instance["text"]) # instance["text"])
yield inst # yield inst
return reader # return reader
def __len__(self): def __len__(self):
return len(self._manifest) return len(self._manifest)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册