ertk.preprocessing.encodec.EncodecExtractorConfig

class ertk.preprocessing.encodec.EncodecExtractorConfig(model: Model = Model.ENCODEC_48kHz, aggregate: Agg = Agg.MEAN, device: str = 'cuda', vq_ids: bool = False, vq_ids_as_string: bool = True, max_input_len: int = 1500000)

Bases: ERTKConfig

Configuration for the Encodec feature extractor.

__init__(model: Model = Model.ENCODEC_48kHz, aggregate: Agg = Agg.MEAN, device: str = 'cuda', vq_ids: bool = False, vq_ids_as_string: bool = True, max_input_len: int = 1500000) None

Methods

__init__([model, aggregate, device, vq_ids, ...])

Inherited Methods

default()

Create default config.

from_config(config)

Create config object from any compatible config.

from_file(path)

Create config from YAML file and optionlly override some values.

merge_with_args(args)

Merge config with command-line arguments.

merge_with_config(config)

Merge other config into this config.

to_dictconfig()

Convert config to DictConfig.

to_file(path)

Write config to YAML file.

to_string()

Generate YAML string representation of config.

Attributes

aggregate

The aggregation method to use.

device

The device to use for inference.

max_input_len

The maximum input length for the model.

model

The Encodec model to use.

vq_ids

Whether to return the VQ-VAE IDs.

vq_ids_as_string

Whether to return the VQ-VAE IDs as a string.

aggregate: Agg = 'mean'

The aggregation method to use.

device: str = 'cuda'

The device to use for inference.

max_input_len: int = 1500000

The maximum input length for the model.

model: Model = '48kHz'

The Encodec model to use.

vq_ids: bool = False

Whether to return the VQ-VAE IDs.

vq_ids_as_string: bool = True

Whether to return the VQ-VAE IDs as a string.