libsox does not detect mp3 when extension is missing
See original GitHub issue🐛 Bug
Sox IO backend doesn’t allow to load file with explicit filetype while doesn’t offer auto detection.
To Reproduce
Steps to reproduce the behavior:
>>> torchaudio.set_audio_backend("sox")
>>> torchaudio.load("/path/to/extensionless/file", filetype='mp3')
(tensor([[0., 0., 0., ..., 0., 0., 0.]]), 16000)
>>> torchaudio.set_audio_backend("sox_io")
>>> torchaudio.load("/path/to/extensionless/file", filetype='mp3')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: load() got an unexpected keyword argument 'filetype'
>>> torchaudio.load("/path/to/extensionless/file")
formats: can't determine type of file `/path/to/extensionless/file'
Expected behavior
Expected an autodetect feature or allowance to pass an explicit format argument
Environment
torch/torchaudio build from source. master of v0.7.0 affected
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
[SOLVED] Sox errors playing mp3 files even with libsox-fmt ...
I tried to play an MP3 file from the command line with the play invocation of the sox command. The stock install of...
Read more >How to add a mp3 handler to sox? - ubuntu
Show activity on this post. Pipe? lame --decode music.mp3 - | play -. Won't leave any trace. ... sudo apt-get install libsox-fmt-mp3.
Read more >Sox + MP3: libsox-fmt-mp3 not working
For me the problem is that I was receiving an audio stream that I thought was mp3 but which was actually aac ....
Read more >sox returns an error when I try to handle mp3 files
when I do yum install lame, it returns package not found.it says sox installed.but no lame package lame available. – cppit. Nov 2,...
Read more >SoX error while extracting bin/import_cv.py · Issue #1195
I've installed SoX from pip install -r requirements, but it gives me this error. sh: 1: sox: not found SoX could not be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, confirmed the issue. I will come back with the solution.
Hi, @mthrok. Sure, I’ll try it tomorrow.