espnet3.systems.f5tts.src.remove_long_short.remove_long_short
Less than 1 minute
espnet3.systems.f5tts.src.remove_long_short.remove_long_short
espnet3.systems.f5tts.src.remove_long_short.remove_long_short(config: DictConfig) → None
Write duration-filtered copies of the recipe’s manifests.
The body of the remove_long_short stage. For every configured split it reads the manifest written by create_dataset, drops rows without text, checks each remaining utterance’s duration from its audio header (in parallel, honouring config.parallel), and writes the surviving rows, unchanged and in order, to save_path/<manifest file name>.
Configuration should include (under remove_long_short):
min_wav_duration: Minimum duration in seconds. Utterances at or below it are dropped.max_wav_duration: Maximum duration in seconds. Utterances at or above it are dropped.save_path: Directory in which to save the filtered manifests.splits: Splits to process, a name or a list of names. Defaults to[train, valid, test].manifest_paths: Optional mapping from split to manifest path. A split without an entry usesdata/manifest/{split}.tsv, relative to the working directory.batch_size: Optional number of utterances per runner call.
- Parameters:config – Training config holding the
remove_long_shortblock and, optionally,parallel. - Raises:RuntimeError – If the
remove_long_shortblock,save_pathor a duration bound is missing, or a split’s manifest does not exist.
Example
remove_long_short:
min_wav_duration: 1.0
max_wav_duration: 20.0
save_path: ${data_dir}/manifest_filtered
splits: [train, valid, test]
manifest_paths:
train: ${data_dir}/manifest/train.tsv>>> remove_long_short(training_config)NOTE
Running the stage again overwrites the filtered manifests. Shard results from an earlier run are never reused, because the keep/drop decisions depend on the duration bounds.
