Skip to main content

A simple RVC Inference Python wrapper.

Project description

Simple RVC

counter

A Simple RVC Inference

How to Use

Initialize Configuration

First, initialize the configuration using your provided Config class:

config = Config(device="cuda:0", is_half=True)

Create an Instance of the RVC Utility

Next, create an instance of the RVCUtil:

from srvc import RVCUtil

rvc_util = RVCUtil(device="cuda:0", is_half=True, config=config)

Load the Hubert Model

Load the Hubert model with the following command:

hubert_model = rvc_util.load_hubert("path/to/hubert_model.pt")

Load the Voice Conversion Model

Load the voice conversion model using:

cpt, version, net_g, tgt_sr, vc = rvc_util.get_vc("path/to/vc_model.pth")

Run Inference

Finally, run the inference with the desired parameters:

rvc_util.rvc_infer(
    index_path="path/to/index_file",
    index_rate=0.5,
    input_path="path/to/input.wav",
    output_path="path/to/output.wav",
    pitch_change=0.0,
    f0_method="rmvpe",  # example: 'rmvpe' or 'fcpe'
    cpt=cpt,
    version=version,
    net_g=net_g,
    filter_radius=3,
    tgt_sr=tgt_sr,
    rms_mix_rate=0.33,
    protect=0.33,
    crepe_hop_length=160,
    vc=vc,
    hubert_model=hubert_model,
    f0autotune=False
)

Notes

  • Ensure that you replace the placeholder paths (e.g., path/to/hubert_model.pth) with the actual paths to your model files.
  • Adjust the inference parameters according to your requirements.

This should make the README more structured and easier to follow.

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

srvc-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

srvc-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file srvc-0.1.0.tar.gz.

File metadata

  • Download URL: srvc-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for srvc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3f9a114e60cdeb13cd5c45030134dda85391aded680e89c3e8be39a2c727b1e
MD5 9f0119021d73bea59e21b6256932a7a3
BLAKE2b-256 47aa03d8c25b93cb421edf58d1aa3bf652450c70e584f9f5732cfd6a2c70550b

See more details on using hashes here.

File details

Details for the file srvc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: srvc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for srvc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6460cbdd495c97df32a0a08d6554a038e37fdc2d297d21d8199ec827285912da
MD5 a9f9328bcb4012a4ba72bee2e4ea1f49
BLAKE2b-256 99aa63d52b2d2c4f3ab233274af4b1f64261627b67615bd90b2750e30f0580ac

See more details on using hashes here.

Supported by

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