SongSuro is an AI project to swap the lyrics from the original song. It keeps the song style, pitch, rhythm, and melody unchanged, but only the lyrics are swapped to your input lyrics.
# UNIX, Mac, Linux, WSL
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"In Pycharm, you can set a local interpreter using uv (need to update Pycharm to the latest version)
Install pre-commit to use ruff as linter and reformat.
pre-commit install
We use pytest for testing.
python3 -m pytest -n auto tests/E LookupError:
E **********************************************************************
E Resource cmudict not found.
E Please use the NLTK Downloader to obtain the resource:
E
E >>> import nltk
E >>> nltk.download('cmudict')
E
E For more information see: https://www.nltk.org/data.html
E
E Attempted to load corpora/cmudictThis error occurs when the cmudict resource is not installed in your NLTK data directory.
Try running the following command in your Python environment to download the cmudict resource:
import nltk
nltk.download('cmudict')You may see a similar error message for other resources, such as blahblah or averaged_perceptron_tagger.
E LookupError:
E **********************************************************************
E Resource blahblah not found.
E Please use the NLTK Downloader to obtain the resource:
E
E >>> import nltk
E >>> nltk.download('blahblah')
E
E For more information see: https://www.nltk.org/data.html
E
E Attempted to load corpora/blahblahYou can use the same command to download the resource that is not found.
import nltk
nltk.download('blahblah')The error message is like this:
[nltk_data] Error loading cmudict: <urlopen error
[SSL: [nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data] unable to get local issuer certificate (_ssl.c:1000)>or
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
[nltk_data] failed: unable to get local issuer certificate
[nltk_data] (_ssl.c:1007)>
import nltkWay 1 Disable SSL certificate verification
Try this first.
import nltk
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
pass
else:
ssl._create_default_https_context = _create_unverified_https_contextThis code snippet will disable SSL certificate verification for the NLTK downloader, allowing it to download resources without encountering SSL errors.
And run the following command to download the your_nltk resource again.:
import nltk
nltk.download('YOUR_RESOURCE')Way 2 Install certificates
Run the following command to install the certificates. Please replace Python 3.x with your Python version.
/Applications/Python 3.x/Install Certificates.commandRefers this