pytorch/audio

torchaudio load opus failed

Mddct opened this issue ยท 1 comments

๐Ÿ› Describe the bug

>>> torchaudio.backend.soundfile_backend.load('test.opus')
(tensor([[-5.2875e-12,  2.0960e-11,  2.4085e-11,  ...,  2.9903e-06,
         -6.7451e-06,  3.6049e-05]]), 16000)
>>> torchaudio.backend.sox_io_backend.load('test.opus')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/miniconda3/envs/cloud-ai-lab/lib/python3.8/site-packages/torchaudio/backend/_sox_io_backend.py", line 126, in load
    return sox_ext.load_audio_file(filepath, frame_offset, num_frames, normalize, channels_first, format)
  File "/usr/local/lib/miniconda3/envs/cloud-ai-lab/lib/python3.8/site-packages/torch/_ops.py", line 755, in __call__
    return self._op(*args, **(kwargs or {}))
RuntimeError: Error loading audio file: failed to open file test.opus

Versions

os: ubuntu

>>> torchaudio.__version__
2.2.1+cu121 

Tasks

No tasks being tracked yet.