Metadata-Version: 2.5
Name: huggingface-hub-rvc
Version: 0.1.0
Summary: Hugging Face Hub reader, writer, and runnable pipeline for RVC voice conversion models.
Project-URL: Homepage, https://github.com/SimpleTuner-io/huggingface-hub-rvc
Project-URL: Repository, https://github.com/SimpleTuner-io/huggingface-hub-rvc
Author: SimpleTuner Contributors
License-Expression: MIT
Keywords: huggingface,rvc,safetensors,voice-conversion
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: >=3.10
Requires-Dist: huggingface-hub>=0.24
Requires-Dist: numpy>=1.24
Requires-Dist: packaging>=23
Requires-Dist: safetensors>=0.5
Requires-Dist: scipy>=1.11
Requires-Dist: torch>=2.1
Requires-Dist: torchaudio>=2.1
Requires-Dist: transformers>=4.40
Provides-Extra: dev
Requires-Dist: demucs>=4.0; extra == 'dev'
Requires-Dist: faiss-cpu>=1.8; extra == 'dev'
Requires-Dist: praat-parselmouth>=0.4.5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: timm>=1.0; extra == 'dev'
Requires-Dist: torchcrepe>=0.0.23; extra == 'dev'
Provides-Extra: inference
Requires-Dist: demucs>=4.0; extra == 'inference'
Requires-Dist: faiss-cpu>=1.8; extra == 'inference'
Requires-Dist: praat-parselmouth>=0.4.5; extra == 'inference'
Requires-Dist: timm>=1.0; extra == 'inference'
Requires-Dist: torchcrepe>=0.0.23; extra == 'inference'
Provides-Extra: pitch
Requires-Dist: praat-parselmouth>=0.4.5; extra == 'pitch'
Requires-Dist: timm>=1.0; extra == 'pitch'
Requires-Dist: torchcrepe>=0.0.23; extra == 'pitch'
Provides-Extra: retrieval
Requires-Dist: faiss-cpu>=1.8; extra == 'retrieval'
Provides-Extra: separation
Requires-Dist: demucs>=4.0; extra == 'separation'
Provides-Extra: train
Requires-Dist: demucs>=4.0; extra == 'train'
Requires-Dist: faiss-cpu>=1.8; extra == 'train'
Requires-Dist: praat-parselmouth>=0.4.5; extra == 'train'
Requires-Dist: timm>=1.0; extra == 'train'
Requires-Dist: torchcrepe>=0.0.23; extra == 'train'
Description-Content-Type: text/markdown

# huggingface-hub-rvc

`huggingface-hub-rvc` provides a small Hugging Face style API for RVC voice conversion artifacts:

- `RVCPipeline.from_pretrained(...)`
- `RVCPipeline.save_pretrained(...)`
- `RVCPipeline.push_to_hub(...)`
- `RVCPipeline.train(...)`
- `RVCPipeline.convert_file(...)`
- `RVCPipeline.convert_directory(...)`

The package uses the working RVC v2 F0 48 kHz architecture and stores new model weights as safetensors.

## Artifact Layout

```text
config.json
voice_transform/
  manifest.json
  model.safetensors
  features.safetensors
  index.index
```

`model.safetensors` contains the RVC generator weights plus string metadata for the RVC config and training summary.
`features.safetensors` contains retrieval vectors as tensor payload. `index.index` is the FAISS index and remains a separate binary file.

Legacy `model.pth` and `features.npy` artifacts can still be loaded.

## Load

```python
from huggingface_hub_rvc import RVCPipeline

pipe = RVCPipeline.from_pretrained("org/rvc-model")
pipe.convert_directory("input_audio", "converted_audio")
```

Use `local_files_only=True` to avoid network lookup:

```python
pipe = RVCPipeline.from_pretrained("./my-rvc-model", local_files_only=True)
```

## Train

```python
from huggingface_hub_rvc import RVCPipeline

pipe = RVCPipeline.train(
    identity_dir="identity_audio",
    output_dir="rvc_artifact",
    training_steps=1000,
    identity_audio_mode="separate",
)
pipe.convert_directory("source_audio", "converted_audio")
```

## Save And Push

```python
pipe.save_pretrained("rvc_artifact")
pipe.push_to_hub("org/rvc-model", folder_path="rvc_artifact")
```

or:

```python
pipe.save_pretrained("rvc_artifact", push_to_hub=True, repo_id="org/rvc-model")
```
