The format of the wav file is unknown.
See original GitHub issueI get a RuntimeError when I run the fourth Try out random prediction codebase present in test.py.
in Setup.
I found that the format of the wav file in data/test was unknown.
I opened this wav file in audacity, but it showed up as a file of unknown format.
Is this wav file the correct one?
Sorry if this is my mistake.
The full text of the error is below.
> python3 test.py
Mixture file is present at following location: /home/shun/aicrowd/music-demixing-challenge-starter-kit/data/test/Mu - Too Bright/mixture.wav
Traceback (most recent call last):
File "/home/shun/aicrowd/music-demixing-challenge-starter-kit/evaluator/music_demixing.py", line 142, in run
self.evaluation()
File "/home/shun/aicrowd/music-demixing-challenge-starter-kit/evaluator/music_demixing.py", line 129, in evaluation
self.prediction(mixture_file_path=self.get_music_file_location(music_name),
File "test.py", line 52, in prediction
x, rate = sf.read(mixture_file_path) # mixture is stereo with sample rate of 44.1kHz
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 256, in read
with SoundFile(file, 'r', samplerate, channels,
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 629, in __init__
self._file = self._open(file, mode_int, closefd)
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 1183, in _open
_error_check(_snd.sf_error(file_ptr),
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 1357, in _error_check
raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening '/home/shun/aicrowd/music-demixing-challenge-starter-kit/data/test/Mu - Too Bright/mixture.wav': File contains data in an unknown format.
Traceback (most recent call last):
File "test.py", line 64, in <module>
submission.run()
File "/home/shun/aicrowd/music-demixing-challenge-starter-kit/evaluator/music_demixing.py", line 148, in run
raise e
File "/home/shun/aicrowd/music-demixing-challenge-starter-kit/evaluator/music_demixing.py", line 142, in run
self.evaluation()
File "/home/shun/aicrowd/music-demixing-challenge-starter-kit/evaluator/music_demixing.py", line 129, in evaluation
self.prediction(mixture_file_path=self.get_music_file_location(music_name),
File "test.py", line 52, in prediction
x, rate = sf.read(mixture_file_path) # mixture is stereo with sample rate of 44.1kHz
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 256, in read
with SoundFile(file, 'r', samplerate, channels,
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 629, in __init__
self._file = self._open(file, mode_int, closefd)
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 1183, in _open
_error_check(_snd.sf_error(file_ptr),
File "/home/shun/.local/share/virtualenvs/music-demixing-challenge-starter-kit-dMCFg2FA/lib/python3.8/site-packages/soundfile.py", line 1357, in _error_check
raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening '/home/shun/aicrowd/music-demixing-challenge-starter-kit/data/test/Mu - Too Bright/mixture.wav': File contains data in an unknown format.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Error: unknown format: 3 (When trying to read audio wavfile)
Looks like the fmt chunk of your wav has unexpected data (per soundfile.sapp.org/doc/WaveFormat). The .wav files you're reading may be invalid; ...
Read more >wav file contains data in an unknown format #3647 - GitHub
Wav audio files should be monochannel and 16khz sample rate only. Preprocess you dataset using either Sox or FFMPEG to be in a...
Read more >File contains data in an unknown format" when trying to play ...
The first thing to do is to identify the file format. Try this page: File Identifier - Identify unknown files instantly. You should...
Read more >Albums containing wav files are seen as "Unkown artist ...
Albums containing wav files are seen as "Unkown artist"/"Unknown album", ... In my library, I have some albums with tracks in wav format....
Read more >Error opening 'female_present.wav': File contains data in an ...
As indicated in the title, the sound module doesn't play my file and says it's of an unknown format, despite being a .wav....
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
@skbly7 should we add more docs on git lfs installation requirement?
@skbly7 I got the git-lfs error as you suggested. Here is what I did. I checked the file size.
The file size was 132 bytes, which is very small. I installed git lfs and ran
git lfs pull
ondata/test/Mu - Too Bright
.The file was successfully executed. Thank you for your help!