espnet3.systems.tts.remove_long_short_provider.RemoveLongShortProvider
Less than 1 minute
espnet3.systems.tts.remove_long_short_provider.RemoveLongShortProvider
class espnet3.systems.tts.remove_long_short_provider.RemoveLongShortProvider(config: DictConfig, params: Dict[str, Any] | None = None)
Bases: EnvironmentProvider
Provider for the remove_long_short stage.
Builds the manifest entries and duration bounds shared by RemoveLongShortRunner workers. No model needs to be loaded here since duration filtering only reads WAV headers.
Initialize the provider.
- Parameters:
- config – Configuration with remove_long_short settings.
- params – Extra parameters (
manifest_path,min_duration,max_duration) forwarded from the driver to workers.
build_env_local() → Dict[str, Any]
Build environment once on driver for local execution.
- Returns: A dictionary containing the manifest entries and duration bounds needed by
RemoveLongShortRunner.forward. - Raises:RuntimeError – If required parameters are missing.
build_worker_setup_fn() → Callable[[], Dict[str, Any]]
Create a worker setup function for distributed execution.
- Returns: A zero-arg callable executed once per worker that returns the environment dictionary consumed by
RemoveLongShortRunner.forward.
