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
Built Distribution
File details
Details for the file gpt_sovits_infer-0.2.4.tar.gz
.
File metadata
- Download URL: gpt_sovits_infer-0.2.4.tar.gz
- Upload date:
- Size: 3.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.4 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fae42c20b2d45f4b82dfc86e234667d4a54f46933ac783110a68e3a72a98b62 |
|
MD5 | 2b2402408e8a70e16cdd2c3ebe1c9494 |
|
BLAKE2b-256 | 24e6c870c6add6c68183ca58ffe22e397f09aaeadffa40f1b52041642a100fc6 |
File details
Details for the file gpt_sovits_infer-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: gpt_sovits_infer-0.2.4-py3-none-any.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.4 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31efbc999a90f7764d25d4b8c951c5f6b7e32b487294c948be01b8610661cedc |
|
MD5 | eecf1e3d166f4f0040ec8c2d54cefd2b |
|
BLAKE2b-256 | 4bfc0149265546465046023c3ed32c0dc636aa4876020eb1ef44de48eb80b1f8 |