espnet3.systems.f5tts.system.F5TTSSystem
espnet3.systems.f5tts.system.F5TTSSystem
class espnet3.systems.f5tts.system.F5TTSSystem(training_config: DictConfig | None = None, inference_config: DictConfig | None = None, metrics_config: DictConfig | None = None, publication_config: DictConfig | None = None, demo_config: DictConfig | None = None)
Bases: BaseSystem
System for recipes that train espnet3.systems.f5tts.src.f5tts.F5TTS.
The stage order of an F5-TTS recipe is create_dataset -> remove_long_short -> create_token_list -> collect_stats -> train -> infer -> measure -> pack_model -> upload_model -> pack_demo -> upload_demo. Every stage other than the two added here is inherited from BaseSystem unchanged: the model is instantiated directly from training_config.model._target_, with task left unset.
######### Examples
>>> [s.name for s in F5TTSSystem.stages[:3]]
['create_dataset', 'remove_long_short', 'create_token_list']Initialize the system with optional stage configs.
- Parameters:
- training_config – Training configuration for data preparation, statistics collection, and model training.
- inference_config – Inference configuration used by the
inferstage. - metrics_config – Measurement configuration used by the
measurestage. - publication_config – Publication configuration for
pack_modelandupload_modelstages. - demo_config – Demo configuration for the
demostage.
create_token_list(*args, **kwargs)
Build the token list from the training manifest.
Runs the create_token_list stage on training_config. See espnet3.systems.f5tts.src.create_token_list.create_token_list() for the training_config.create_token_list fields and the file written.
- Raises:
- TypeError – If any positional or keyword argument is passed.
- RuntimeError – If required configuration is missing or the manifest file is not found.
######### Examples
>>> system = F5TTSSystem(training_config=training_config)
>>> system.create_token_list()NOTE
The model and the dataset preprocessor both read the token list this stage writes, so it has to run before collect_stats.
remove_long_short(*args, **kwargs)
Filter the recipe’s manifests by audio duration.
Runs the remove_long_short stage on training_config. See espnet3.systems.f5tts.src.remove_long_short.remove_long_short() for the training_config.remove_long_short fields and the files written.
- Raises:
- TypeError – If any positional or keyword argument is passed.
- RuntimeError – If required configuration is missing or a manifest file is not found.
######### Examples
>>> system = F5TTSSystem(training_config=training_config)
>>> system.remove_long_short()NOTE
Run it after create_dataset, which writes the manifests it reads, and before create_token_list, which reads the filtered training manifest.
stages : ClassVar[tuple[StageSpec, ...]] = (StageSpec(name='create_dataset', config='training', log_dir='data_dir'), StageSpec(name='remove_long_short', config='training', log_dir='remove_long_short.save_path'), StageSpec(name='create_token_list', config='training', log_dir='create_token_list.save_path'), StageSpec(name='collect_stats', config='training', log_dir='stats_dir'), StageSpec(name='train', config='training', log_dir='exp_dir'), StageSpec(name='infer', config='inference', log_dir='inference_dir'), StageSpec(name='measure', config='metrics', log_dir='inference_dir'), StageSpec(name='pack_model', config=('training', 'publication'), log_dir=None), StageSpec(name='upload_model', config='publication', log_dir=None), StageSpec(name='pack_demo', config='demo', log_dir='pack.out_dir'), StageSpec(name='upload_demo', config='demo', log_dir='pack.out_dir'))
