1

My python version is 3.6, librosa version is 0.7.0

I read wav file using librosa library. y,fs = librosa.load("file1.wav")

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda_env/personal/susan/env1/lib/python3.6/site-packages/librosa/core/audio.py", line 138, in load
    y = sf_desc.read(frames=frame_duration, dtype=dtype, always_2d=False).T
  File "/anaconda_env/personal/susan/env1/lib/python3.6/site-packages/soundfile.py", line 860, in read
    frames = self._check_frames(frames, fill_value)
  File "/anaconda_env/personal/susan/env1/lib/python3.6/site-packages/soundfile.py", line 1268, in _check_frames
    raise ValueError("frames must be specified for non-seekable files")
ValueError: frames must be specified for non-seekable files

May I know how can I solve this issue?

Susan
  • 431
  • 1
  • 4
  • 16
  • duplicate of https://stackoverflow.com/questions/60496724/librosa-throws-valueerror – OrenIshShalom Apr 19 '22 at 18:16
  • I already checked that issue. The problem was not solved in that link. – Susan Apr 19 '22 at 18:16
  • is it working properly for other file types? – OrenIshShalom Apr 19 '22 at 18:17
  • No. It does not work . When I checked the libsndfile with this command ```ldconfig -v | grep libraryname```, I got ```/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once /sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once /sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.23.so is the dynamic linker, ignoring libsndfile.so.1 -> libsndfile.so.1.0.26 libsndfile.so.1 -> libsndfile.so.1.0.25 ``` – Susan Apr 19 '22 at 18:21
  • May I know does it mean I need libsndfile 1.0.25? I already tried replacing libsndfile1 with libsndfile 1.0.25 in the directory /usr/share/doc/ because in the directory /usr/share/doc/, I have libsndfile1 I got the same frame issue. – Susan Apr 19 '22 at 18:24
  • One thing is I can read the same wav file in the window via librosa. I got no issue in the window. However when I tried in the linux, I got the issue of ```ValueError: frames must be specified for non-seekable files```. I don't think the wav file is a problem. – Susan Apr 19 '22 at 18:25

0 Answers0