Spaces:
Configuration error
Configuration error
Kangarroar
commited on
Commit
•
657a354
1
Parent(s):
a16e3be
Delete renderer.pyback
Browse files- renderer.pyback +0 -33
renderer.pyback
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
from utils.hparams import hparams
|
2 |
-
from preprocessing.data_gen_utils import get_pitch_parselmouth,get_pitch_crepe
|
3 |
-
import numpy as np
|
4 |
-
import matplotlib.pyplot as plt
|
5 |
-
import IPython.display as ipd
|
6 |
-
import utils
|
7 |
-
import librosa
|
8 |
-
import torchcrepe
|
9 |
-
from infer import *
|
10 |
-
import logging
|
11 |
-
from infer_tools.infer_tool import *
|
12 |
-
############
|
13 |
-
logging.getLogger('numba').setLevel(logging.WARNING)
|
14 |
-
|
15 |
-
# 工程文件夹名,训练时用的那个
|
16 |
-
project_name = "Unnamed"
|
17 |
-
model_path = f'./checkpoints/Unnamed/model_ckpt_steps_192000.ckpt'
|
18 |
-
config_path=f'./checkpoints/Unnamed/config.yaml'
|
19 |
-
hubert_gpu=False
|
20 |
-
svc_model = Svc(project_name,config_path,hubert_gpu, model_path)
|
21 |
-
print('model loaded')
|
22 |
-
|
23 |
-
wav_fn='raw/cilliafinal.wav'#支持多数音频格式,无需手动转为wav
|
24 |
-
demoaudio, sr = librosa.load(wav_fn)
|
25 |
-
key = -8 # 音高调整,支持正负(半音)
|
26 |
-
# 加速倍数
|
27 |
-
|
28 |
-
pndm_speedup = 20
|
29 |
-
wav_gen='queeeeee.wav'#直接改后缀可以保存不同格式音频,如flac可无损压缩
|
30 |
-
f0_tst, f0_pred, audio = run_clip(svc_model,file_path=wav_fn, key=key, acc=pndm_speedup, use_crepe=True, use_pe=True, thre=0.05,
|
31 |
-
use_gt_mel=False, add_noise_step=500,project_name=project_name,out_path=wav_gen)
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|