nomadkaraoke / python-audio-separator

Easy to use stem (e.g. instrumental/vocals) separation from CLI or as a python package, using a variety of amazing pre-trained models (primarily from UVR)
MIT License
511 stars 85 forks source link

Please support python3.9 #156

Open MonolithFoundation opened 4 days ago

MonolithFoundation commented 4 days ago

the 3.9 no longer supported.

blane187gt commented 4 days ago

update python

beveradb commented 4 days ago

Sorry, I won't be adding support for Python 3.9, as that Python version is EOL in less than 11 months. You're welcome to raise a PR adding support if you are really keen for it, but I don't think it's a good investment of resources. Why do you need it? Can't you upgrade your own code / environment to use 3.10?

lucasjinreal commented 3 days ago

Hello, Same request here.

Unsupport Python3.9 is reasonable, however, there are tons of servers using even lower python version, for some historical reason these machines hard to upgrade python versions, besides, python3.9 shouldn't be old enough and abandont imediately.

However, I would agree we stick with newest python version. The suggestion would be if the latest API add compatible to those old ones could be even better.

Lixi20 commented 3 days ago

I believe that iterating on Python versions is very necessary.

First, Python itself updates rapidly, so it’s not advisable to stick to old versions.

Many AI projects on GitHub rely on outdated Python versions and dependencies, and they often lack maintenance. This makes it very challenging to deploy and test them independently. Even if you want to deploy, there are hurdles like outdated dependencies and underlying libraries.

Moreover, AI projects use various Python versions. My suggestion is to use Python virtual environments, as they ensure consistency in the environment and prevent contamination of your local setup.

beveradb commented 3 days ago

Ultimately this comes down to developer motivation / effort - I'm not personally motivated to spend my limited hobby time adding support for EOL python versions. I'll only implement support for versions currently considered stable by the python maintainers.

If someone else with different motivations wants to work on this, I'll test and merge a PR.

MonolithFoundation commented 3 days ago

As from I can see, the project itself doesn't need massive modifications, there is no gramma uncompatible unique in python3.10 existed in code.

The only thing need to do is modify the config in pyproject.yml:

classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio :: Mixers", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ]

[tool.poetry.dependencies] python = ">=3.10"

If that is ok I would like open an PR for that.

beveradb commented 2 days ago

Pretty sure it's not as simple as that @MonolithFoundation but happy to be proven wrong!

We actually started out with 3.9 support but I removed it in July as something was broken and I didn't think it was worth investigating; https://github.com/nomadkaraoke/python-audio-separator/commits/main/?after=5fac6d27a79b331335d960be5bee6cd97c61f593+34 https://github.com/nomadkaraoke/python-audio-separator/commit/403cae6aecc84cec7afa6422ce7d932b1f756060

If you demonstrate test results showing inference works with the current code for all supported model architectures on Linux, Mac and Windows with Python 3.9, I'd be happy to repeat those tests and merge a PR.

But please do the testing first; I remember something being broken on Python 3.9 😄

lucasjinreal commented 2 days ago

If anyone want using mel-band-roformer or mxdnet-main vc-ft etc without any constraints on python, please using:

pip install audiotool

Its straight forward to use:

from audiotool.audioremovel.vocal import AudioSeparatorOne

separator = AudioSeparatorOne()
outs = self.separator.separate(audio_file)
# returns: {'vocals': vocal_file, 'instrumental': inst_file}
shutil.copy(outs["vocals"], vocal_file)
shutil.copy(outs["instrumental"], bk_file)

The default file saved same path as input audio file with extension added _vocal or _inst

It's so simply that a single line of code can help you do vocal removel!

MonolithFoundation commented 10 hours ago

Thanks so much, really useful.