torchaudio load opus failed
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 799
- Avg merge
- 58m
- Merged PRs (30d)
- 3
Description
🐛 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported torchaudio 2.2.1 behavior on Ubuntu with test.opus, comparing soundfile_backend.load and sox_io_backend.load. Done means the sox_io backend can load the same Opus file successfully, with an appropriate regression check added if the relevant test location is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100