This is a torch.utils.data.Dataset
class
for the Deep Evaluation of Acoustic Representations (DEAR) dataset.
The corresponding paper is on the arXiv and the data is on Zenodo.
Copy the dear directory to the source repository,
then spawn a Dataset
for an evaluation task using the desired class.
environment_eval_dataset = EnvironmentDEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
target_variable_type=TargetVariableType.DISCRETE,
)
indoor_or_outdoor_eval_dataset = IndoorOutdoorDEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
target_variable_type=TargetVariableType.DISCRETE,
)
noise_eval_dataset = StationaryTransientNoiseDEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
target_variable_type=TargetVariableType.DISCRETE,
)
snr_eval_dataset = SNRDEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
target_variable_type=TargetVariableType.CONTINUOUS,
)
speech_present_eval_dataset = SpeechDEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
speech_present=True,
target_variable_type=TargetVariableType.DISCRETE,
)
speakers_active_eval_dataset = SpeechDEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
speech_present=False,
target_variable_type=TargetVariableType.CONTINUOUS,
)
drr_eval_dataset = DRRDEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
target_variable_type=TargetVariableType.CONTINUOUS,
)
rt60_eval_dataset = RT60DEARDataset(
base_path=Path("/data/evaluation/dear"),
split=DatasetType.TRAIN,
target_variable_type=TargetVariableType.CONTINUOUS,
)
Use the standard PyTorch pattern to run the evaluation, e.g.
model = Wav2Vec2Model()
for segments, labels in rt60_eval_dataset:
predicted_labels = model(segments)
score = metric(labels, predicted_labels)