bastibe / python-soundfile

SoundFile is an audio library based on libsndfile, CFFI, and NumPy
BSD 3-Clause "New" or "Revised" License
717 stars 111 forks source link

raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) soundfile.LibsndfileError: Error opening 'soundwave.wav': System error. #400

Closed AadeshLawange-Guardinger closed 5 months ago

bastibe commented 1 year ago

System error almost always means your file name is incorrect.

a897456 commented 1 year ago

System error almost always means your file name is incorrect.

I tried to change the name of the file, but the problem is still there. Could it be the sampling rate?

12345678-beep commented 1 year ago

May I ask if your problem has been resolved? I have also encountered the same problem.

AadeshLawange-Guardinger commented 1 year ago

Check if the folder exists where you are writing the file

12345678-beep commented 1 year ago

检查写入文件的文件夹是否存在

I carefully checked the folder and confirmed that it exists

bastibe commented 1 year ago

Can you open the same file name with open? Try converting it to an absolute path if it's relative.

SRbone commented 8 months ago

sf.write(file_name, data, samplerate) Maybe the data is not right, numpy.ndarray with multiple dimensions.
such as '[[0,1,......]]' sf.write(file_name, data[0], samplerate)

gaoyiyao commented 7 months ago

In the MockingBird project training encountered the same problem, how to solve

gcbikram commented 7 months ago

i solved it by moving wav file to the same directory where the python code is running

o-candy commented 6 months ago

I also encountered this problem when I reproduced the paper. Specifically, when I loaded the training set, a piece of data could not be read successfully and the error was thrown at the same time. To my surprise, it worked successfully when I replaced the relative path of the data in the original file with an absolute path.

AadeshLawange-Guardinger commented 5 months ago

Solved