espnet3.systems.f5tts.src.remove_long_short.load_manifest_entries
Less than 1 minute
espnet3.systems.f5tts.src.remove_long_short.load_manifest_entries
espnet3.systems.f5tts.src.remove_long_short.load_manifest_entries(manifest_path: str | Path) → Tuple[List[Tuple[str, str, str]], int]
Parse a TSV manifest into its usable rows.
Each line is expected to be utt_id\twav_path\ttext\tspeaker_id; any columns after the third are carried along untouched. Blank lines are skipped.
- Parameters:manifest_path – Manifest written by the recipe’s
create_datasetstage. - Returns: A tuple
(entries, num_dropped_empty).entriesis a list of(utt_id, wav_path, line)tuples in manifest order, wherelineis the original row, newline-terminated for direct write-back.num_dropped_emptycounts the rows dropped for having no text. - Raises:FileNotFoundError – If
manifest_pathdoes not exist.
Example
>>> entries, num_dropped_empty = load_manifest_entries(
... "data/manifest/train.tsv"
... )
>>> [utt_id for utt_id, _, _ in entries], num_dropped_empty
(['utt_a', 'utt_b'], 1)
>>> entries[0]
('utt_a', 'corpus/utt_a.wav',
'utt_a\tcorpus/utt_a.wav\thello world\tspk1\n')NOTE
Rows with fewer than three columns or an empty transcript are dropped here, mirroring espnet2’s NF != 1 filter, so they never reach duration filtering and their audio file is never opened.
