espnet3.systems.tts.system.TTSSystem
espnet3.systems.tts.system.TTSSystem
class espnet3.systems.tts.system.TTSSystem(training_config: DictConfig | None = None, inference_config: DictConfig | None = None, metrics_config: DictConfig | None = None, publication_config: DictConfig | None = None, stage_log_mapping: dict | None = None)
Bases: BaseSystem
TTS-specific system with local trainer customization.
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. - stage_log_mapping – Optional per-stage log directory overrides.
collect_stats(*args, **kwargs)
Run the collect_stats stage using the configured trainer.
Prepares the training runtime (directories, parallelism, seed), then delegates to the trainer’s collect_stats method. Positional and keyword stage arguments are rejected to avoid silent misconfiguration.
- Parameters:
- *args – Must be empty. Passing any positional argument raises
ValueErrorvia_reject_stage_args. - **kwargs – Must be empty. Passing any keyword argument raises
ValueErrorvia_reject_stage_args.
- *args – Must be empty. Passing any positional argument raises
- Returns: None
- Raises:ValueError – If any positional or keyword arguments are passed.
Notes
The normalize: null pattern from recipe configs is intentionally preserved — no normalization is applied during stats collection.
####### Examples
>>> from omegaconf import OmegaConf
>>> cfg = OmegaConf.create({"exp_dir": "/tmp/exp"})
>>> system = TTSSystem(training_config=cfg)
>>> system.collect_stats() # runs stats collection end-to-endtrain(*args, **kwargs)
Run the training stage using the configured trainer.
Prepares the runtime, optionally saves the ESPnet config, then calls trainer.fit with any keyword arguments drawn from training_config.fit. For GAN models, a GANTTSLightningTrainer is used automatically; for all other models, ESPnet3LightningTrainer is used.
- Parameters:
- *args – Must be empty. Passing any positional argument raises
ValueErrorvia_reject_stage_args. - **kwargs – Must be empty. Passing any keyword argument raises
ValueErrorvia_reject_stage_args.
- *args – Must be empty. Passing any positional argument raises
- Returns: None
- Raises:ValueError – If any positional or keyword arguments are passed.
Notes
training_config.fit is forwarded verbatim to trainer.fit. Common keys include max_epochs, ckpt_path, etc.
####### Examples
>>> from omegaconf import OmegaConf
>>> cfg = OmegaConf.create({
... "exp_dir": "/tmp/exp",
... "task": "tts",
... "model": {"_target_": "my.Model"},
... "fit": {"max_epochs": 10},
... })
>>> system = TTSSystem(training_config=cfg)
>>> system.train() # trains the model for 10 epochs