diff --git a/test/torchaudio_unittest/sox_effect/dataset_test.py b/test/torchaudio_unittest/sox_effect/dataset_test.py index 4e99fad9cfc..cb90a645100 100644 --- a/test/torchaudio_unittest/sox_effect/dataset_test.py +++ b/test/torchaudio_unittest/sox_effect/dataset_test.py @@ -96,6 +96,7 @@ def test_apply_effects_file(self): batch_size=32, num_workers=4, worker_init_fn=init_random_seed, + multiprocessing_context=torch.multiprocessing.get_context('spawn'), ) for batch in loader: assert batch.shape == (32, 2, 2 * sample_rate) @@ -117,6 +118,7 @@ def test_apply_effects_tensor(self): batch_size=32, num_workers=4, worker_init_fn=init_random_seed, + multiprocessing_context=torch.multiprocessing.get_context('spawn'), ) for batch in loader: assert batch.shape == (32, 2, 2 * sample_rate)