voicepaw / so-vits-svc-fork

so-vits-svc fork with realtime support, improved interface and more features.
Other
8.73k stars 1.16k forks source link

Crash with '.DS_Store': Format not recognised. #112

Closed DL909 closed 1 year ago

DL909 commented 1 year ago

I have solved this problem and I write this issue for who have the same question as me. I'm an Non-english users and I use Macbook, I ran 'svc pre-resample' after put the file I want to use to train my model. the computer started a Preprocess and soon crashed. here is the report:

joblib.externals.loky.process_executor._RemoteTraceback: """ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/librosa/core/audio.py", line 176, in load y, sr_native = soundfile_load(path, offset, duration, dtype) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/librosa/core/audio.py", line 209, in __soundfile_load context = sf.SoundFile(path) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/soundfile.py", line 658, in init__ self._file = self._open(file, mode_int, closefd) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/soundfile.py", line 1216, in _open raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) soundfile.LibsndfileError: Error opening 'dataset_raw/**/.DS_Store': Format not recognised. (I hide some information to protect my privacy)

And here is the solution: run in turns: cd dataset_raw/xx/.DS_Store (which means you go to the folder where you put the audio files) find . -name '.DS_Store' -type f -delete (which means you delete the .DS_Store file)

I think this issues is caused by the program mistakenly identifying .DS_Dtore file as a part of audio files. I believe this would be a general issue for MacOS user. Hopefully the developers will fix it in time.

DL909 commented 1 year ago

I found out that the whole work is useless because vits requires cuda to train but cuda isn't supported on macOS

34j commented 1 year ago

There is something called mps, but I doubt it is in the macbook.

chitsanfei commented 1 year ago

.DS_ Store files, also known as Desktop Services Store files, are commonly generated by Finder and are used to record the metadata of files display information in Finder APP. This issue only exists for MacOS users, and usually programmers do not consider this issue. Fixing this issue on python programs requires declaring the file format of the index in advance, but this can increase program complexity.

Actually, you can disable automatically generating this file at the system level. Because .DS_ Store can also interrupt your local repo when you try managing your local repo without setting gitignore. And disabling it has almost no influence on your system.

You can enter this command in your Terminal in order to disable it.

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Also, there is a stackoverflow article may give your more information.

Besides, due to no cuda support in Mac because a Nvidia GPU is required, you can consider training your data in Colab Notebook like me.

Hopefully it can help you. 😊

34j commented 1 year ago

I think this problem can be corrected with a single line change. Anyone can send a PR.

34j commented 1 year ago

@allcontributors add DL909 bug

allcontributors[bot] commented 1 year ago

@34j

I've put up a pull request to add @DL909! :tada:

escoolioinglesias commented 1 year ago

@DL909 I ran into this issue as well and just deleted the .DS_Store file and was able to proceed.

But, I have not been able to svc train.

Have you successfully trained a model on Mac ?

escoolioinglesias commented 1 year ago

@34j

There is something called mps, but I doubt it is in the macbook.

MPS = Metal Performance Shaders ??

https://developer.apple.com/metal/pytorch/

"mps device enables high-performance training on GPU for MacOS devices with Metal programming framework."

Would this, in theory, make it possible to train with so-vits-svc-fork on Apple Silicon?

34j commented 1 year ago

According to lightning, mps is supported by default ("auto"), but if it is not working please open another issue