Skip to content

Commit

Permalink
optimize rmvpe inference
Browse files Browse the repository at this point in the history
  • Loading branch information
yxlllc committed Jul 21, 2023
1 parent 30810bb commit 599add9
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion configs/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data:
f0_extractor: 'crepe' # 'parselmouth', 'dio', 'harvest', or 'crepe'
f0_extractor: 'crepe' # 'parselmouth', 'dio', 'harvest', 'crepe', or 'rmvpe'
f0_min: 65 # about C2
f0_max: 800 # about G5
sampling_rate: 44100
Expand Down
2 changes: 1 addition & 1 deletion configs/config_naive.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data:
f0_extractor: 'crepe' # 'parselmouth', 'dio', 'harvest', or 'crepe'
f0_extractor: 'crepe' # 'parselmouth', 'dio', 'harvest', 'crepe', or 'rmvpe'
f0_min: 65 # about C2
f0_max: 800 # about G5
sampling_rate: 44100
Expand Down
2 changes: 1 addition & 1 deletion configs/config_shallow.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data:
f0_extractor: 'crepe' # 'parselmouth', 'dio', 'harvest', or 'crepe'
f0_extractor: 'crepe' # 'parselmouth', 'dio', 'harvest', 'crepe', or 'rmvpe'
f0_min: 65 # about C2
f0_max: 800 # about G5
sampling_rate: 44100
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def parse_args(args=None, namespace=None):
type=str,
required=False,
default='crepe',
help="pitch extrator type: parselmouth, dio, harvest, crepe (default)",
help="pitch extrator type: parselmouth, dio, harvest, crepe (default) or rmvpe",
)
parser.add_argument(
"-fmin",
Expand Down
2 changes: 1 addition & 1 deletion tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def extract(self, audio, uv_interp=False, device=None, silence_front=0, sr=None)
# f0 = np.pad(f0.astype('float'), (start_frame, n_frames - len(f0) - start_frame))
elif self.f0_extractor == "rmvpe":
if self.rmvpe is None:
from rmvpe import RMVPE
from encoder.rmvpe import RMVPE
self.rmvpe = RMVPE('pretrain/rmvpe/model.pt', hop_length=160)
f0 = self.rmvpe.infer_from_audio(audio, self.sample_rate, device=device, thred=0.05, use_viterbi=False)
f0 = np.array(
Expand Down

0 comments on commit 599add9

Please sign in to comment.