mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 02:55:05 +08:00
Add files via upload
This commit is contained in:
parent
5bcaa171ea
commit
0719b4aa5e
2
go-realtime-gui.bat
Normal file
2
go-realtime-gui.bat
Normal file
@ -0,0 +1,2 @@
|
||||
runtime\python.exe gui.py
|
||||
pause
|
5
gui.py
5
gui.py
@ -1,3 +1,6 @@
|
||||
import os,sys
|
||||
now_dir = os.getcwd()
|
||||
sys.path.append(now_dir)
|
||||
import PySimpleGUI as sg
|
||||
import sounddevice as sd
|
||||
import noisereduce as nr
|
||||
@ -12,7 +15,7 @@ from infer_pack.models import SynthesizerTrnMs256NSFsid, SynthesizerTrnMs256NSFs
|
||||
from i18n import I18nAuto
|
||||
|
||||
i18n = I18nAuto()
|
||||
|
||||
print(i18n.language_map)
|
||||
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
||||
|
||||
|
||||
|
@ -139,6 +139,8 @@ def vc_single(
|
||||
if hubert_model == None:
|
||||
load_hubert()
|
||||
if_f0 = cpt.get("f0", 1)
|
||||
file_index = file_index.strip(" ").strip('"').strip("\n").strip('"').strip(" ").replace("trained","added")#防止小白写错,自动帮他替换掉
|
||||
file_big_npy = file_big_npy.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
|
||||
audio_opt = vc.pipeline(
|
||||
hubert_model,
|
||||
net_g,
|
||||
@ -936,7 +938,7 @@ with gr.Blocks() as app:
|
||||
minimum=0,
|
||||
maximum=1,
|
||||
label="检索特征占比",
|
||||
value=1,
|
||||
value=0.6,
|
||||
interactive=True,
|
||||
)
|
||||
f0_file = gr.File(label=i18n("F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调"))
|
||||
|
@ -21,7 +21,7 @@ import torch.distributed as dist
|
||||
from torch.nn.parallel import DistributedDataParallel as DDP
|
||||
from torch.cuda.amp import autocast, GradScaler
|
||||
from infer_pack import commons
|
||||
|
||||
from time import sleep
|
||||
from time import time as ttime
|
||||
from data_utils import (
|
||||
TextAudioLoaderMultiNSFsid,
|
||||
@ -45,7 +45,7 @@ global_step = 0
|
||||
def main():
|
||||
# n_gpus = torch.cuda.device_count()
|
||||
os.environ["MASTER_ADDR"] = "localhost"
|
||||
os.environ["MASTER_PORT"] = "5555"
|
||||
os.environ["MASTER_PORT"] = "51515"
|
||||
|
||||
mp.spawn(
|
||||
run,
|
||||
@ -676,6 +676,7 @@ def train_and_evaluate(
|
||||
"saving final ckpt:%s"
|
||||
% (savee(ckpt, hps.sample_rate, hps.if_f0, hps.name, epoch))
|
||||
)
|
||||
sleep(1)
|
||||
os._exit(2333333)
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import sys, os, multiprocessing
|
||||
from scipy import signal
|
||||
|
||||
now_dir = os.getcwd()
|
||||
sys.path.append(now_dir)
|
||||
@ -38,6 +39,7 @@ class PreProcess:
|
||||
max_sil_kept=150,
|
||||
)
|
||||
self.sr = sr
|
||||
self.bh, self.ah = signal.butter(N=5, Wn=48, btype='high', fs=self.sr)
|
||||
self.per = 3.7
|
||||
self.overlap = 0.3
|
||||
self.tail = self.per + self.overlap
|
||||
@ -69,6 +71,7 @@ class PreProcess:
|
||||
def pipeline(self, path, idx0):
|
||||
try:
|
||||
audio = load_audio(path, self.sr)
|
||||
audio = signal.filtfilt(self.bh, self.ah, audio)
|
||||
idx1 = 0
|
||||
for audio in self.slicer.slice(audio):
|
||||
i = 0
|
||||
|
@ -4,7 +4,8 @@ import torch.nn.functional as F
|
||||
from config import x_pad, x_query, x_center, x_max
|
||||
import scipy.signal as signal
|
||||
import pyworld, os, traceback, faiss
|
||||
|
||||
from scipy import signal
|
||||
bh, ah = signal.butter(N=5, Wn=48, btype='high', fs=16000)
|
||||
|
||||
class VC(object):
|
||||
def __init__(self, tgt_sr, device, is_half):
|
||||
@ -189,6 +190,7 @@ class VC(object):
|
||||
index = big_npy = None
|
||||
else:
|
||||
index = big_npy = None
|
||||
audio = signal.filtfilt(bh, ah, audio)
|
||||
audio_pad = np.pad(audio, (self.window // 2, self.window // 2), mode="reflect")
|
||||
opt_ts = []
|
||||
if audio_pad.shape[0] > self.t_max:
|
||||
|
Loading…
Reference in New Issue
Block a user