diff --git a/lerobot/common/datasets/video_utils.py b/lerobot/common/datasets/video_utils.py index d1b25023..c7a5da61 100644 --- a/lerobot/common/datasets/video_utils.py +++ b/lerobot/common/datasets/video_utils.py @@ -64,12 +64,12 @@ def decode_audio( if backend == "torchcodec": raise NotImplementedError("torchcodec is not yet supported for audio decoding") elif backend == "ffmpeg": - return decode_audio_torchvision(audio_path, timestamps, duration) + return decode_audio_torchaudio(audio_path, timestamps, duration) else: raise ValueError(f"Unsupported video backend: {backend}") -def decode_audio_torchvision( +def decode_audio_torchaudio( audio_path: Path | str, timestamps: list[float], duration: float, diff --git a/tests/datasets/test_compute_stats.py b/tests/datasets/test_compute_stats.py index 9cf9f760..2ebf95f2 100644 --- a/tests/datasets/test_compute_stats.py +++ b/tests/datasets/test_compute_stats.py @@ -87,7 +87,7 @@ def test_sample_audio_from_path(mock_load): assert len(audio_samples) == estimate_num_samples(16000) -def test_sample_audio_from_data(mock_load): +def test_sample_audio_from_data(): audio_data = np.ones((16000, 2), dtype=np.float32) audio_samples = sample_audio_from_data(audio_data) assert isinstance(audio_samples, np.ndarray)