Inference code for GPT-SoVITS
Project description
GPT-SoVITS-Infer
This is the inference code of GPT-SoVITS that can be developer-friendly.
Usage Example
Check out the example notebook for a quick start. Or open it in Colab
Prepare the environment
As we all know, the dependencies of an AI project are always a mess. Here is how I prepare the environment for this project:
Conda (Linux)
conda install python=3.10
conda install pytorch=2.1 torchvision torchaudio pytorch-lightning pytorch-cuda=12.1 -c pytorch -c nvidia
conda install ffmpeg=6.1.1 -c conda-forge
MacOS
brew install ffmpeg
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip3 install pytorch-lightning
pip3 install GPT-SoVITS-Infer
You can also try to prepare the environment with cpu only options, which should work, but I have not tested it yet.
After the environment is ready, you can install the package by pip:
pip install GPT-SoVITS
I do not add the packages related to torch to the dependencies of GPT-SoVITS-Infer. Check if the environment is ready if things go wrong.
Advanced Usage
GPTSoVITSInference.load_sovits
andGPTSoVITSInference.load_gpt
: You can load your own fine-tuned model by the methods.GPTSoVITSInference.set_prompt_audio
: Set the prompt audio for the inference.GPTSoVITSInference.get_tts_wav_stream
: Return a generator that yields the audio pieces of the generated audio. It will create a background thread to generate the audio, so you can get the audio pieces while the audio is still being generated.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gpt_sovits_infer-0.2.3.tar.gz
(3.3 MB
view hashes)
Built Distribution
Close
Hashes for gpt_sovits_infer-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4cd759f6c0f77fcf6f0f73969056967000d1bbacebbe1f1ac3f86f136e874e1 |
|
MD5 | 09ba76ef4122d8f51afc3613fa8455d6 |
|
BLAKE2b-256 | 6412c223e0e8c26fa3ea89a25ba93907d1b867a814ccc50759d37acd7abe1b91 |