Skip to content

Commit 8e6542c

Browse files
committed
read columns correctly in speech_dataset
1 parent 2bddd8c commit 8e6542c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/spidr/data/dataset.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ def _load_audio(self, index: int) -> tuple[Tensor, int]:
231231

232232

233233
def speech_dataset(manifest_path: Path | str, *, normalize: bool) -> SpeechDataset:
234-
with Path(manifest_path).open("r", encoding="utf-8") as f:
235-
columns = set(f.readline().strip().split(","))
234+
columns = set(read_manifest(manifest_path).columns)
236235
if {"fileid", "path", "num_samples", "archive", "byte_offset", "byte_size"}.issubset(columns):
237236
return SpeechDatasetFromArchive(manifest_path, normalize=normalize)
238237
return SpeechDatasetFromFiles(manifest_path, normalize=normalize)

0 commit comments

Comments
 (0)