NeoPy commited on
Commit
efab996
·
verified ·
1 Parent(s): 5c3584e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -19
README.md CHANGED
@@ -34,32 +34,32 @@ pip install git+https://github.com/One-sixth/fairseq.git
34
 
35
  Below is an example of how to use rvc-inferpy in your Python project:
36
  ```
37
- from rvc_inferpy import RVCConverter
 
38
 
39
- # Initialize the converter with default settings
40
- converter = RVCConverter(device="cuda:0", is_half=True)
41
 
42
- # Define the voice model name (ensure the model exists under "models/{voice_model}/")
43
- voice_model = "default"
 
44
 
45
- # Path to the input audio file
46
- audio_path = "input_audio.wav"
47
 
48
- # Perform voice conversion
 
 
 
 
 
 
 
 
49
  output_path = converter.infer_audio(
50
- voice_model=voice_model,
51
- audio_path=audio_path,
52
- f0_change=0, # Pitch change (in semitones)
53
- f0_method="rmvpe+", # Pitch estimation method
54
- split_infer=False, # Whether to split audio based on silence
55
- index_rate=0.75, # Index rate (adjusts voice timbre)
56
- filter_radius=3, # Filter smoothing radius
57
- resample_sr=0, # Resample audio (0 keeps original sample rate)
58
- protect=0.33, # Protect voiced consonants from distortion
59
  )
60
 
61
- # Output the path to the generated audio file
62
- print(f"Generated voice conversion output: {output_path}")
63
  ```
64
  The infer_audio function returns the processed audio object based on the provided parameters.
65
 
 
34
 
35
  Below is an example of how to use rvc-inferpy in your Python project:
36
  ```
37
+ # Method 1: Direct import
38
+ from rvc_inferpy.converter import RVCConverter
39
 
40
+ # Method 2: Import with alias
41
+ from rvc_inferpy.converter import RVCConverter as VoiceConverter
42
 
43
+ # Method 3: Import entire module
44
+ import rvc_inferpy.converter
45
+ converter = rvc_inferpy.converter.RVCConverter()
46
 
 
 
47
 
48
+ # Create an instance
49
+ converter = RVCConverter(
50
+ device="cuda:0", # GPU device (or "cpu" if no GPU)
51
+ is_half=True, # Use half precision
52
+ models_dir=MODELS_DIR, # Directory containing models
53
+ download_if_missing=True # Download models if not found
54
+ )
55
+
56
+ # Use the converter
57
  output_path = converter.infer_audio(
58
+ voice_model="your_model_name",
59
+ audio_path="input_audio.wav"
 
 
 
 
 
 
 
60
  )
61
 
62
+
 
63
  ```
64
  The infer_audio function returns the processed audio object based on the provided parameters.
65