Skip to main content

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, by conda:

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

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 and GPTSoVITSInference.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


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.1.1.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

gpt_sovits_infer-0.1.1-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

Details for the file gpt_sovits_infer-0.1.1.tar.gz.

File metadata

  • Download URL: gpt_sovits_infer-0.1.1.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

Hashes for gpt_sovits_infer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ec5ee736dca48866ab06d10516feab1b8f728a48c5fd34e89680346baba5979b
MD5 56443d5527bd41741178d0082c7a20e9
BLAKE2b-256 691e4027d3139e2797fb15415d501f823625eb41785fff079a0a0e1435d45c16

See more details on using hashes here.

File details

Details for the file gpt_sovits_infer-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gpt_sovits_infer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8da20f91155164b79bdcb142c05197a2b6e78bd5b7359b8c9612b79af77b02d
MD5 6d55abddb033b4bec9d49dcdf246d546
BLAKE2b-256 a3382913bcbe39fbe5da4432c7922df38abaf5fa406bc35db25322bc7df5eff8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page