Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datasets/timit_asr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ A typical data point comprises the path to the audio file, usually called `file`

- speaker_id: Unique id of the speaker. The same speaker id can be found for multiple data samples.

- id: Unique id of the data sample. Contains the <SENTENCE_TYPE><SENTENCE_NUMBER>.
- id: ID of the data sample. Contains the <SENTENCE_TYPE><SENTENCE_NUMBER>.


### Data Splits
Expand Down
4 changes: 2 additions & 2 deletions datasets/timit_asr/timit_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _split_generators(self, dl_manager):
def _generate_examples(self, split, data_dir):
"""Generate examples from TIMIT archive_path based on the test/train csv information."""
# Iterating the contents of the data to extract the relevant information
for wav_path in sorted(Path(data_dir).glob(f"**/{split.upper()}/**/*.WAV")):
for key, wav_path in enumerate(sorted(Path(data_dir).glob(f"**/{split.upper()}/**/*.WAV"))):

# extract transcript
with open(wav_path.with_suffix(".TXT"), encoding="utf-8") as op:
Expand Down Expand Up @@ -174,4 +174,4 @@ def _generate_examples(self, split, data_dir):
"id": id_,
}

yield id_, example
yield key, example