mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 02:55:05 +08:00
优化代码结构
This commit is contained in:
parent
4e0d399cba
commit
5e09a55e5f
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ __pycache__
|
||||
*.pyd
|
||||
hubert_base.pt
|
||||
/logs
|
||||
.venv
|
||||
|
85
LICENSE
85
LICENSE
@ -1,21 +1,64 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 liujing04
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 liujing04
|
||||
Copyright (c) 2023 源文雨
|
||||
|
||||
本软件及其相关代码以MIT协议开源,作者不对软件具备任何控制力,使用软件者、传播软件导出的声音者自负全责。
|
||||
如不认可该条款,则不能使用或引用软件包内任何代码和文件。
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
特此授予任何获得本软件和相关文档文件(以下简称“软件”)副本的人免费使用、复制、修改、合并、出版、分发、再授权和/或销售本软件的权利,以及授予本软件所提供的人使用本软件的权利,但须符合以下条件:
|
||||
上述版权声明和本许可声明应包含在软件的所有副本或实质部分中。
|
||||
软件是“按原样”提供的,没有任何明示或暗示的保证,包括但不限于适销性、适用于特定目的和不侵权的保证。在任何情况下,作者或版权持有人均不承担因软件或软件的使用或其他交易而产生、产生或与之相关的任何索赔、损害赔偿或其他责任,无论是在合同诉讼、侵权诉讼还是其他诉讼中。
|
||||
|
||||
|
||||
The LICENCEs for related libraries are as follows.
|
||||
相关引用库协议如下:
|
||||
|
||||
ContentVec
|
||||
https://github.com/auspicious3000/contentvec/blob/main/LICENSE
|
||||
MIT License
|
||||
|
||||
VITS
|
||||
https://github.com/jaywalnut310/vits/blob/main/LICENSE
|
||||
MIT License
|
||||
|
||||
HIFIGAN
|
||||
https://github.com/jik876/hifi-gan/blob/master/LICENSE
|
||||
MIT License
|
||||
|
||||
gradio
|
||||
https://github.com/gradio-app/gradio/blob/main/LICENSE
|
||||
Apache License 2.0
|
||||
|
||||
ffmpeg
|
||||
https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3
|
||||
https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-02-28-12-32/ffmpeg-n4.3.2-160-gfbb9368226-win64-lgpl-4.3.zip
|
||||
LPGLv3 License
|
||||
MIT License
|
||||
|
||||
ultimatevocalremovergui
|
||||
https://github.com/Anjok07/ultimatevocalremovergui/blob/master/LICENSE
|
||||
https://github.com/yang123qwe/vocal_separation_by_uvr5
|
||||
MIT License
|
||||
|
||||
audio-slicer
|
||||
https://github.com/openvpi/audio-slicer/blob/main/LICENSE
|
||||
MIT License
|
||||
|
@ -1,11 +1,9 @@
|
||||
import soundfile as sf
|
||||
import torch, pdb, time, argparse, os, warnings, sys, librosa
|
||||
import torch, pdb, os, warnings, librosa
|
||||
import numpy as np
|
||||
import onnxruntime as ort
|
||||
from scipy.io.wavfile import write
|
||||
from tqdm import tqdm
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
dim_c = 4
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
|
||||
|
||||
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE)
|
||||
[![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
|
||||
|
||||
[![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
|
||||
|
5
app.py
5
app.py
@ -1,4 +1,3 @@
|
||||
import io
|
||||
import os
|
||||
import torch
|
||||
|
||||
@ -6,14 +5,12 @@ import torch
|
||||
import gradio as gr
|
||||
import librosa
|
||||
import numpy as np
|
||||
import soundfile
|
||||
import logging
|
||||
from fairseq import checkpoint_utils
|
||||
from my_utils import load_audio
|
||||
from vc_infer_pipeline import VC
|
||||
import traceback
|
||||
from config import Config
|
||||
from infer_pack.models import (
|
||||
from lib.infer_pack.models import (
|
||||
SynthesizerTrnMs256NSFsid,
|
||||
SynthesizerTrnMs256NSFsid_nono,
|
||||
SynthesizerTrnMs768NSFsid,
|
||||
|
@ -81,11 +81,11 @@ class Config:
|
||||
or "1070" in self.gpu_name
|
||||
or "1080" in self.gpu_name
|
||||
):
|
||||
print("16|10|P40 series, force to fp32")
|
||||
print("Found GPU", self.gpu_name, ", force to fp32")
|
||||
self.is_half = False
|
||||
use_fp32_config()
|
||||
else:
|
||||
self.gpu_name = None
|
||||
print("Found GPU", self.gpu_name)
|
||||
self.gpu_mem = int(
|
||||
torch.cuda.get_device_properties(i_device).total_memory
|
||||
/ 1024
|
||||
@ -99,12 +99,12 @@ class Config:
|
||||
with open("trainset_preprocess_pipeline_print.py", "w") as f:
|
||||
f.write(strr)
|
||||
elif self.has_mps():
|
||||
print("No supported Nvidia GPU, use MPS instead")
|
||||
print("No supported Nvidia GPU found, use MPS instead")
|
||||
self.device = "mps"
|
||||
self.is_half = False
|
||||
use_fp32_config()
|
||||
else:
|
||||
print("No supported Nvidia GPU, use CPU instead")
|
||||
print("No supported Nvidia GPU found, use CPU instead")
|
||||
self.device = "cpu"
|
||||
self.is_half = False
|
||||
use_fp32_config()
|
||||
|
@ -7,7 +7,7 @@
|
||||
"betas": [0.8, 0.99],
|
||||
"eps": 1e-9,
|
||||
"batch_size": 4,
|
||||
"fp16_run": true,
|
||||
"fp16_run": false,
|
||||
"lr_decay": 0.999875,
|
||||
"segment_size": 12800,
|
||||
"init_lr_ratio": 1,
|
||||
|
@ -7,7 +7,7 @@
|
||||
"betas": [0.8, 0.99],
|
||||
"eps": 1e-9,
|
||||
"batch_size": 4,
|
||||
"fp16_run": true,
|
||||
"fp16_run": false,
|
||||
"lr_decay": 0.999875,
|
||||
"segment_size": 12800,
|
||||
"init_lr_ratio": 1,
|
||||
|
@ -7,7 +7,7 @@
|
||||
"betas": [0.8, 0.99],
|
||||
"eps": 1e-9,
|
||||
"batch_size": 4,
|
||||
"fp16_run": true,
|
||||
"fp16_run": false,
|
||||
"lr_decay": 0.999875,
|
||||
"segment_size": 11520,
|
||||
"init_lr_ratio": 1,
|
||||
|
@ -29,7 +29,7 @@ todolist:
|
||||
- 废弃32k模型的训练
|
||||
|
||||
### 20230513更新
|
||||
- 清除一键包内部老版本runtime内残留的infer_pack和uvr5_pack
|
||||
- 清除一键包内部老版本runtime内残留的lib.infer_pack和uvr5_pack
|
||||
- 修复训练集预处理伪多进程的bug
|
||||
- 增加harvest识别音高可选通过中值滤波削弱哑音现象,可调整中值滤波半径
|
||||
- 导出音频增加后处理重采样
|
||||
|
@ -27,7 +27,7 @@ todolist:
|
||||
- v1 32k model training is no more supported
|
||||
|
||||
### 2023-05-13
|
||||
- Clear the redundant codes in the old version of runtime in the one-click-package: infer_pack and uvr5_pack
|
||||
- Clear the redundant codes in the old version of runtime in the one-click-package: lib.infer_pack and uvr5_pack
|
||||
- Fix pseudo multiprocessing bug in training set preprocessing
|
||||
- Adding median filtering radius adjustment for harvest pitch recognize algorithm
|
||||
- Support post processing resampling for exporting audio
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
### 2023년 5월 13일 업데이트
|
||||
|
||||
- 원클릭 패키지의 이전 버전 런타임 내, 불필요한 코드(infer_pack 및 uvr5_pack) 제거.
|
||||
- 원클릭 패키지의 이전 버전 런타임 내, 불필요한 코드(lib.infer_pack 및 uvr5_pack) 제거.
|
||||
- 훈련 세트 전처리의 유사 다중 처리 버그 수정.
|
||||
- Harvest 피치 인식 알고리즘에 대한 중위수 필터링 반경 조정 추가.
|
||||
- 오디오 내보낼 때, 후처리 리샘플링 지원.
|
||||
|
@ -8,7 +8,7 @@ An easy-to-use Voice Conversion framework based on VITS.<br><br>
|
||||
<img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
|
||||
|
||||
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE)
|
||||
[![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
|
||||
|
||||
[![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
|
||||
|
@ -8,7 +8,7 @@ VITSに基づく使いやすい音声変換(voice changer)framework<br><br>
|
||||
<img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
|
||||
|
||||
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE)
|
||||
[![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
|
||||
|
||||
[![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
|
||||
|
@ -8,7 +8,7 @@ VITS基盤의 簡單하고使用하기 쉬운音聲變換틀<br><br>
|
||||
<img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
|
||||
|
||||
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE)
|
||||
[![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
|
||||
|
||||
[![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
|
||||
|
@ -8,7 +8,7 @@ VITS 기반의 간단하고 사용하기 쉬운 음성 변환 프레임워크.<b
|
||||
<img src="https://counter.seku.su/cmoe?name=rvc&theme=r34" /><br>
|
||||
|
||||
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt)
|
||||
[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE)
|
||||
[![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/)
|
||||
|
||||
[![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk)
|
||||
|
@ -4,7 +4,6 @@ now_dir = os.getcwd()
|
||||
sys.path.append(now_dir)
|
||||
from my_utils import load_audio
|
||||
import pyworld
|
||||
from scipy.io import wavfile
|
||||
import numpy as np, logging
|
||||
|
||||
logging.getLogger("numba").setLevel(logging.WARNING)
|
||||
|
2
gui.py
2
gui.py
@ -31,7 +31,7 @@ import scipy.signal as signal
|
||||
|
||||
|
||||
# import matplotlib.pyplot as plt
|
||||
from infer_pack.models import (
|
||||
from lib.infer_pack.models import (
|
||||
SynthesizerTrnMs256NSFsid,
|
||||
SynthesizerTrnMs256NSFsid_nono,
|
||||
SynthesizerTrnMs768NSFsid,
|
||||
|
@ -7,7 +7,7 @@
|
||||
"step3a:正在训练模型": "Step 3a: Model training started",
|
||||
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Training complete. You can check the training logs in the console or the 'train.log' file under the experiment folder.",
|
||||
"全流程结束!": "All processes have been completed!",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.": "This software is open source under the MIT license. The author does not have any control over the software. Users who use the software and distribute the sounds exported by the software are solely responsible. <br>If you do not agree with this clause, you cannot use or reference any codes and files within the software package. See the root directory <b>Agreement-LICENSE.txt</b> for details.",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "This software is open source under the MIT license. The author does not have any control over the software. Users who use the software and distribute the sounds exported by the software are solely responsible. <br>If you do not agree with this clause, you cannot use or reference any codes and files within the software package. See the root directory <b>Agreement-LICENSE.txt</b> for details.",
|
||||
"模型推理": "Model Inference",
|
||||
"推理音色": "Inferencing voice:",
|
||||
"刷新音色列表和索引路径": "Refresh voice list and index path",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"step3a:正在训练模型": "Paso 3a: Entrenando el modelo",
|
||||
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Entrenamiento finalizado, puede ver el registro de entrenamiento en la consola o en el archivo train.log en la carpeta del experimento",
|
||||
"全流程结束!": "¡Todo el proceso ha terminado!",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.": "Este software es de código abierto bajo la licencia MIT, el autor no tiene ningún control sobre el software, y aquellos que usan el software y difunden los sonidos exportados por el software son los únicos responsables.<br>Si no está de acuerdo con esta cláusula , no puede utilizar ni citar ningún código ni archivo del paquete de software Consulte el directorio raíz <b>Agreement-LICENSE.txt</b> para obtener más información.",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Este software es de código abierto bajo la licencia MIT, el autor no tiene ningún control sobre el software, y aquellos que usan el software y difunden los sonidos exportados por el software son los únicos responsables.<br>Si no está de acuerdo con esta cláusula , no puede utilizar ni citar ningún código ni archivo del paquete de software Consulte el directorio raíz <b>Agreement-LICENSE.txt</b> para obtener más información.",
|
||||
"模型推理": "inferencia del modelo",
|
||||
"推理音色": "inferencia de voz",
|
||||
"刷新音色列表和索引路径": "Actualizar la lista de timbres e índice de rutas",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"step3a:正在训练模型": "step3a:トレーニング中のモデル",
|
||||
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "トレーニング終了時に、トレーニングログやフォルダ内のtrain.logを確認することができます",
|
||||
"全流程结束!": "全工程が完了!",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.": "本ソフトウェアはMITライセンスに基づくオープンソースであり、製作者は本ソフトウェアに対していかなる責任を持ちません。本ソフトウェアの利用者および本ソフトウェアから派生した音源(成果物)を配布する者は、本ソフトウェアに対して自身で責任を負うものとします。 <br>この条項に同意しない場合、パッケージ内のコードやファイルを使用や参照を禁じます。詳しくは<b>使用需遵守的协议-LICENSE.txt</b>をご覧ください。",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本ソフトウェアはMITライセンスに基づくオープンソースであり、製作者は本ソフトウェアに対していかなる責任を持ちません。本ソフトウェアの利用者および本ソフトウェアから派生した音源(成果物)を配布する者は、本ソフトウェアに対して自身で責任を負うものとします。 <br>この条項に同意しない場合、パッケージ内のコードやファイルを使用や参照を禁じます。詳しくは<b>LICENSE</b>をご覧ください。",
|
||||
"模型推理": "モデル推論",
|
||||
"推理音色": "音源推論",
|
||||
"刷新音色列表和索引路径": "音源リストとインデックスパスの更新",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"step3a:正在训练模型": "step3a:正在训练模型",
|
||||
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log",
|
||||
"全流程结束!": "全流程结束!",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.": "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.",
|
||||
"模型推理": "模型推理",
|
||||
"推理音色": "推理音色",
|
||||
"刷新音色列表和索引路径": "刷新音色列表和索引路径",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"step3a:正在训练模型": "step3a:正在训练模型",
|
||||
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log",
|
||||
"全流程结束!": "全流程结束!",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。<br>如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄<b>使用需遵守的協議-LICENSE.txt</b>。",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。<br>如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄<b>使用需遵守的協議-LICENSE.txt</b>。",
|
||||
"模型推理": "模型推理",
|
||||
"推理音色": "推理音色",
|
||||
"刷新音色列表和索引路径": "刷新音色列表和索引路徑",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"step3a:正在训练模型": "step3a:正在训练模型",
|
||||
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log",
|
||||
"全流程结束!": "全流程结束!",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。<br>如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄<b>使用需遵守的協議-LICENSE.txt</b>。",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。<br>如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄<b>使用需遵守的協議-LICENSE.txt</b>。",
|
||||
"模型推理": "模型推理",
|
||||
"推理音色": "推理音色",
|
||||
"刷新音色列表和索引路径": "刷新音色列表和索引路徑",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"step3a:正在训练模型": "step3a:正在训练模型",
|
||||
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log",
|
||||
"全流程结束!": "全流程结束!",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。<br>如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄<b>使用需遵守的協議-LICENSE.txt</b>。",
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。<br>如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄<b>使用需遵守的協議-LICENSE.txt</b>。",
|
||||
"模型推理": "模型推理",
|
||||
"推理音色": "推理音色",
|
||||
"刷新音色列表和索引路径": "刷新音色列表和索引路徑",
|
||||
|
10
infer-web.py
10
infer-web.py
@ -25,15 +25,14 @@ import soundfile as sf
|
||||
from config import Config
|
||||
from fairseq import checkpoint_utils
|
||||
from i18n import I18nAuto
|
||||
from infer_pack.models import (
|
||||
from lib.infer_pack.models import (
|
||||
SynthesizerTrnMs256NSFsid,
|
||||
SynthesizerTrnMs256NSFsid_nono,
|
||||
SynthesizerTrnMs768NSFsid,
|
||||
SynthesizerTrnMs768NSFsid_nono,
|
||||
)
|
||||
from infer_pack.models_onnx import SynthesizerTrnMsNSFsidM
|
||||
from lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM
|
||||
from infer_uvr5 import _audio_pre_, _audio_pre_new
|
||||
from MDXNet import MDXNetDereverb
|
||||
from my_utils import load_audio
|
||||
from train.process_ckpt import change_info, extract_small_model, merge, show_info
|
||||
from vc_infer_pipeline import VC
|
||||
@ -44,7 +43,7 @@ logging.getLogger("numba").setLevel(logging.WARNING)
|
||||
|
||||
tmp = os.path.join(now_dir, "TEMP")
|
||||
shutil.rmtree(tmp, ignore_errors=True)
|
||||
shutil.rmtree("%s/runtime/Lib/site-packages/infer_pack" % (now_dir), ignore_errors=True)
|
||||
shutil.rmtree("%s/runtime/Lib/site-packages/lib.infer_pack" % (now_dir), ignore_errors=True)
|
||||
shutil.rmtree("%s/runtime/Lib/site-packages/uvr5_pack" % (now_dir), ignore_errors=True)
|
||||
os.makedirs(tmp, exist_ok=True)
|
||||
os.makedirs(os.path.join(now_dir, "logs"), exist_ok=True)
|
||||
@ -328,6 +327,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
|
||||
save_root_ins.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
|
||||
)
|
||||
if model_name == "onnx_dereverb_By_FoxJoy":
|
||||
from MDXNet import MDXNetDereverb
|
||||
pre_fun = MDXNetDereverb(15)
|
||||
else:
|
||||
func = _audio_pre_ if "DeEcho" not in model_name else _audio_pre_new
|
||||
@ -1301,7 +1301,7 @@ def export_onnx(ModelPath, ExportedPath):
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown(
|
||||
value=i18n(
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>使用需遵守的协议-LICENSE.txt</b>."
|
||||
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>."
|
||||
)
|
||||
)
|
||||
with gr.Tabs():
|
||||
|
@ -8,8 +8,6 @@ import os, sys, pdb, torch
|
||||
|
||||
now_dir = os.getcwd()
|
||||
sys.path.append(now_dir)
|
||||
import argparse
|
||||
import glob
|
||||
import sys
|
||||
import torch
|
||||
import tqdm as tq
|
||||
@ -112,7 +110,7 @@ config = Config(device, is_half)
|
||||
now_dir = os.getcwd()
|
||||
sys.path.append(now_dir)
|
||||
from vc_infer_pipeline import VC
|
||||
from infer_pack.models import (
|
||||
from lib.infer_pack.models import (
|
||||
SynthesizerTrnMs256NSFsid,
|
||||
SynthesizerTrnMs256NSFsid_nono,
|
||||
SynthesizerTrnMs768NSFsid,
|
||||
|
@ -10,12 +10,12 @@ import importlib
|
||||
import numpy as np
|
||||
import hashlib, math
|
||||
from tqdm import tqdm
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from uvr5_pack.utils import _get_name_params, inference
|
||||
from uvr5_pack.lib_v5.model_param_init import ModelParameters
|
||||
from lib.uvr5_pack.lib_v5 import spec_utils
|
||||
from lib.uvr5_pack.utils import _get_name_params, inference
|
||||
from lib.uvr5_pack.lib_v5.model_param_init import ModelParameters
|
||||
import soundfile as sf
|
||||
from uvr5_pack.lib_v5.nets_new import CascadedNet
|
||||
from uvr5_pack.lib_v5 import nets_61968KB as nets
|
||||
from lib.uvr5_pack.lib_v5.nets_new import CascadedNet
|
||||
from lib.uvr5_pack.lib_v5 import nets_61968KB as nets
|
||||
|
||||
|
||||
class _audio_pre_:
|
||||
@ -31,7 +31,7 @@ class _audio_pre_:
|
||||
"agg": agg,
|
||||
"high_end_process": "mirroring",
|
||||
}
|
||||
mp = ModelParameters("uvr5_pack/lib_v5/modelparams/4band_v2.json")
|
||||
mp = ModelParameters("lib/uvr5_pack/lib_v5/modelparams/4band_v2.json")
|
||||
model = nets.CascadedASPPNet(mp.param["bins"] * 2)
|
||||
cpk = torch.load(model_path, map_location="cpu")
|
||||
model.load_state_dict(cpk)
|
||||
@ -195,7 +195,7 @@ class _audio_pre_new:
|
||||
"agg": agg,
|
||||
"high_end_process": "mirroring",
|
||||
}
|
||||
mp = ModelParameters("uvr5_pack/lib_v5/modelparams/4band_v3.json")
|
||||
mp = ModelParameters("lib/uvr5_pack/lib_v5/modelparams/4band_v3.json")
|
||||
nout = 64 if "DeReverb" in model_path else 48
|
||||
model = CascadedNet(mp.param["bins"] * 2, nout)
|
||||
cpk = torch.load(model_path, map_location="cpu")
|
||||
|
@ -5,9 +5,9 @@ import torch
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
|
||||
from infer_pack import commons
|
||||
from infer_pack import modules
|
||||
from infer_pack.modules import LayerNorm
|
||||
from lib.infer_pack import commons
|
||||
from lib.infer_pack import modules
|
||||
from lib.infer_pack.modules import LayerNorm
|
||||
|
||||
|
||||
class Encoder(nn.Module):
|
@ -3,15 +3,15 @@ from time import time as ttime
|
||||
import torch
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
from infer_pack import modules
|
||||
from infer_pack import attentions
|
||||
from infer_pack import commons
|
||||
from infer_pack.commons import init_weights, get_padding
|
||||
from lib.infer_pack import modules
|
||||
from lib.infer_pack import attentions
|
||||
from lib.infer_pack import commons
|
||||
from lib.infer_pack.commons import init_weights, get_padding
|
||||
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
|
||||
from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm
|
||||
from infer_pack.commons import init_weights
|
||||
from lib.infer_pack.commons import init_weights
|
||||
import numpy as np
|
||||
from infer_pack import commons
|
||||
from lib.infer_pack import commons
|
||||
|
||||
|
||||
class TextEncoder256(nn.Module):
|
@ -3,15 +3,15 @@ from time import time as ttime
|
||||
import torch
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
from infer_pack import modules
|
||||
from infer_pack import attentions
|
||||
from infer_pack import commons
|
||||
from infer_pack.commons import init_weights, get_padding
|
||||
from lib.infer_pack import modules
|
||||
from lib.infer_pack import attentions
|
||||
from lib.infer_pack import commons
|
||||
from lib.infer_pack.commons import init_weights, get_padding
|
||||
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
|
||||
from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm
|
||||
from infer_pack.commons import init_weights
|
||||
from lib.infer_pack.commons import init_weights
|
||||
import numpy as np
|
||||
from infer_pack import commons
|
||||
from lib.infer_pack import commons
|
||||
|
||||
|
||||
class TextEncoder256(nn.Module):
|
@ -9,9 +9,9 @@ from torch.nn import functional as F
|
||||
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
|
||||
from torch.nn.utils import weight_norm, remove_weight_norm
|
||||
|
||||
from infer_pack import commons
|
||||
from infer_pack.commons import init_weights, get_padding
|
||||
from infer_pack.transforms import piecewise_rational_quadratic_transform
|
||||
from lib.infer_pack import commons
|
||||
from lib.infer_pack.commons import init_weights, get_padding
|
||||
from lib.infer_pack.transforms import piecewise_rational_quadratic_transform
|
||||
|
||||
|
||||
LRELU_SLOPE = 0.1
|
@ -1,4 +1,4 @@
|
||||
from infer_pack.modules.F0Predictor.F0Predictor import F0Predictor
|
||||
from lib.infer_pack.modules.F0Predictor.F0Predictor import F0Predictor
|
||||
import pyworld
|
||||
import numpy as np
|
||||
|
@ -1,4 +1,4 @@
|
||||
from infer_pack.modules.F0Predictor.F0Predictor import F0Predictor
|
||||
from lib.infer_pack.modules.F0Predictor.F0Predictor import F0Predictor
|
||||
import pyworld
|
||||
import numpy as np
|
||||
|
@ -1,4 +1,4 @@
|
||||
from infer_pack.modules.F0Predictor.F0Predictor import F0Predictor
|
||||
from lib.infer_pack.modules.F0Predictor.F0Predictor import F0Predictor
|
||||
import parselmouth
|
||||
import numpy as np
|
||||
|
@ -33,19 +33,19 @@ class ContentVec:
|
||||
|
||||
def get_f0_predictor(f0_predictor, hop_length, sampling_rate, **kargs):
|
||||
if f0_predictor == "pm":
|
||||
from infer_pack.modules.F0Predictor.PMF0Predictor import PMF0Predictor
|
||||
from lib.infer_pack.modules.F0Predictor.PMF0Predictor import PMF0Predictor
|
||||
|
||||
f0_predictor_object = PMF0Predictor(
|
||||
hop_length=hop_length, sampling_rate=sampling_rate
|
||||
)
|
||||
elif f0_predictor == "harvest":
|
||||
from infer_pack.modules.F0Predictor.HarvestF0Predictor import HarvestF0Predictor
|
||||
from lib.infer_pack.modules.F0Predictor.HarvestF0Predictor import HarvestF0Predictor
|
||||
|
||||
f0_predictor_object = HarvestF0Predictor(
|
||||
hop_length=hop_length, sampling_rate=sampling_rate
|
||||
)
|
||||
elif f0_predictor == "dio":
|
||||
from infer_pack.modules.F0Predictor.DioF0Predictor import DioF0Predictor
|
||||
from lib.infer_pack.modules.F0Predictor.DioF0Predictor import DioF0Predictor
|
||||
|
||||
f0_predictor_object = DioF0Predictor(
|
||||
hop_length=hop_length, sampling_rate=sampling_rate
|
@ -6,7 +6,7 @@ import torch
|
||||
import torch.utils.data
|
||||
from tqdm import tqdm
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class VocalRemoverValidationSet(torch.utils.data.Dataset):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class Conv2DBNActiv(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class Conv2DBNActiv(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class Conv2DBNActiv(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class Conv2DBNActiv(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class Conv2DBNActiv(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class Conv2DBNActiv(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class Conv2DBNActiv(nn.Module):
|
@ -2,8 +2,8 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import layers
|
||||
from uvr5_pack.lib_v5 import spec_utils
|
||||
import layers
|
||||
from . import spec_utils
|
||||
|
||||
|
||||
class BaseASPPNet(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import layers_123821KB as layers
|
||||
from . import layers_123821KB as layers
|
||||
|
||||
|
||||
class BaseASPPNet(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import layers_123821KB as layers
|
||||
from . import layers_123821KB as layers
|
||||
|
||||
|
||||
class BaseASPPNet(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import layers_33966KB as layers
|
||||
from . import layers_33966KB as layers
|
||||
|
||||
|
||||
class BaseASPPNet(nn.Module):
|
@ -3,7 +3,7 @@ import numpy as np
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import layers_537238KB as layers
|
||||
from . import layers_537238KB as layers
|
||||
|
||||
|
||||
class BaseASPPNet(nn.Module):
|
@ -3,7 +3,7 @@ import numpy as np
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import layers_537238KB as layers
|
||||
from . import layers_537238KB as layers
|
||||
|
||||
|
||||
class BaseASPPNet(nn.Module):
|
@ -2,7 +2,7 @@ import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
from uvr5_pack.lib_v5 import layers_123821KB as layers
|
||||
from . import layers_123821KB as layers
|
||||
|
||||
|
||||
class BaseASPPNet(nn.Module):
|
@ -1,7 +1,7 @@
|
||||
import torch
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
from uvr5_pack.lib_v5 import layers_new as layers
|
||||
from . import layers_new
|
||||
|
||||
|
||||
class BaseNet(nn.Module):
|
||||
@ -9,19 +9,19 @@ class BaseNet(nn.Module):
|
||||
self, nin, nout, nin_lstm, nout_lstm, dilations=((4, 2), (8, 4), (12, 6))
|
||||
):
|
||||
super(BaseNet, self).__init__()
|
||||
self.enc1 = layers.Conv2DBNActiv(nin, nout, 3, 1, 1)
|
||||
self.enc2 = layers.Encoder(nout, nout * 2, 3, 2, 1)
|
||||
self.enc3 = layers.Encoder(nout * 2, nout * 4, 3, 2, 1)
|
||||
self.enc4 = layers.Encoder(nout * 4, nout * 6, 3, 2, 1)
|
||||
self.enc5 = layers.Encoder(nout * 6, nout * 8, 3, 2, 1)
|
||||
self.enc1 = layers_new.Conv2DBNActiv(nin, nout, 3, 1, 1)
|
||||
self.enc2 = layers_new.Encoder(nout, nout * 2, 3, 2, 1)
|
||||
self.enc3 = layers_new.Encoder(nout * 2, nout * 4, 3, 2, 1)
|
||||
self.enc4 = layers_new.Encoder(nout * 4, nout * 6, 3, 2, 1)
|
||||
self.enc5 = layers_new.Encoder(nout * 6, nout * 8, 3, 2, 1)
|
||||
|
||||
self.aspp = layers.ASPPModule(nout * 8, nout * 8, dilations, dropout=True)
|
||||
self.aspp = layers_new.ASPPModule(nout * 8, nout * 8, dilations, dropout=True)
|
||||
|
||||
self.dec4 = layers.Decoder(nout * (6 + 8), nout * 6, 3, 1, 1)
|
||||
self.dec3 = layers.Decoder(nout * (4 + 6), nout * 4, 3, 1, 1)
|
||||
self.dec2 = layers.Decoder(nout * (2 + 4), nout * 2, 3, 1, 1)
|
||||
self.lstm_dec2 = layers.LSTMModule(nout * 2, nin_lstm, nout_lstm)
|
||||
self.dec1 = layers.Decoder(nout * (1 + 2) + 1, nout * 1, 3, 1, 1)
|
||||
self.dec4 = layers_new.Decoder(nout * (6 + 8), nout * 6, 3, 1, 1)
|
||||
self.dec3 = layers_new.Decoder(nout * (4 + 6), nout * 4, 3, 1, 1)
|
||||
self.dec2 = layers_new.Decoder(nout * (2 + 4), nout * 2, 3, 1, 1)
|
||||
self.lstm_dec2 = layers_new.LSTMModule(nout * 2, nin_lstm, nout_lstm)
|
||||
self.dec1 = layers_new.Decoder(nout * (1 + 2) + 1, nout * 1, 3, 1, 1)
|
||||
|
||||
def __call__(self, x):
|
||||
e1 = self.enc1(x)
|
||||
@ -52,7 +52,7 @@ class CascadedNet(nn.Module):
|
||||
|
||||
self.stg1_low_band_net = nn.Sequential(
|
||||
BaseNet(2, nout // 2, self.nin_lstm // 2, nout_lstm),
|
||||
layers.Conv2DBNActiv(nout // 2, nout // 4, 1, 1, 0),
|
||||
layers_new.Conv2DBNActiv(nout // 2, nout // 4, 1, 1, 0),
|
||||
)
|
||||
|
||||
self.stg1_high_band_net = BaseNet(
|
||||
@ -61,7 +61,7 @@ class CascadedNet(nn.Module):
|
||||
|
||||
self.stg2_low_band_net = nn.Sequential(
|
||||
BaseNet(nout // 4 + 2, nout, self.nin_lstm // 2, nout_lstm),
|
||||
layers.Conv2DBNActiv(nout, nout // 2, 1, 1, 0),
|
||||
layers_new.Conv2DBNActiv(nout, nout // 2, 1, 1, 0),
|
||||
)
|
||||
self.stg2_high_band_net = BaseNet(
|
||||
nout // 4 + 2, nout // 2, self.nin_lstm // 2, nout_lstm // 2
|
@ -4,92 +4,92 @@
|
||||
"model_hash_name" : [
|
||||
{
|
||||
"hash_name": "47939caf0cfe52a0e81442b85b971dfd",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "4e4ecb9764c50a8c414fee6e10395bbe",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_v2.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2.json",
|
||||
"param_name": "4band_v2"
|
||||
},
|
||||
{
|
||||
"hash_name": "ca106edd563e034bde0bdec4bb7a4b36",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_v2.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2.json",
|
||||
"param_name": "4band_v2"
|
||||
},
|
||||
{
|
||||
"hash_name": "e60a1e84803ce4efc0a6551206cc4b71",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "a82f14e75892e55e994376edbf0c8435",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "6dd9eaa6f0420af9f1d403aaafa4cc06",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_v2_sn.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json",
|
||||
"param_name": "4band_v2_sn"
|
||||
},
|
||||
{
|
||||
"hash_name": "08611fb99bd59eaa79ad27c58d137727",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_v2_sn.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json",
|
||||
"param_name": "4band_v2_sn"
|
||||
},
|
||||
{
|
||||
"hash_name": "5c7bbca45a187e81abbbd351606164e5",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json",
|
||||
"param_name": "3band_44100_msb2"
|
||||
},
|
||||
{
|
||||
"hash_name": "d6b2cb685a058a091e5e7098192d3233",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json",
|
||||
"param_name": "3band_44100_msb2"
|
||||
},
|
||||
{
|
||||
"hash_name": "c1b9f38170a7c90e96f027992eb7c62b",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "c3448ec923fa0edf3d03a19e633faa53",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "68aa2c8093d0080704b200d140f59e54",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100.json",
|
||||
"param_name": "3band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "fdc83be5b798e4bd29fe00fe6600e147",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_mid.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json",
|
||||
"param_name": "3band_44100_mid.json"
|
||||
},
|
||||
{
|
||||
"hash_name": "2ce34bc92fd57f55db16b7a4def3d745",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_mid.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json",
|
||||
"param_name": "3band_44100_mid.json"
|
||||
},
|
||||
{
|
||||
"hash_name": "52fdca89576f06cf4340b74a4730ee5f",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100.json"
|
||||
},
|
||||
{
|
||||
"hash_name": "41191165b05d38fc77f072fa9e8e8a30",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100.json"
|
||||
},
|
||||
{
|
||||
"hash_name": "89e83b511ad474592689e562d5b1f80e",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/2band_32000.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_32000.json",
|
||||
"param_name": "2band_32000.json"
|
||||
},
|
||||
{
|
||||
"hash_name": "0b954da81d453b716b114d6d7c95177f",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/2band_32000.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_32000.json",
|
||||
"param_name": "2band_32000.json"
|
||||
}
|
||||
|
||||
@ -97,47 +97,47 @@
|
||||
"v4 Models": [
|
||||
{
|
||||
"hash_name": "6a00461c51c2920fd68937d4609ed6c8",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json",
|
||||
"param_name": "1band_sr16000_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "0ab504864d20f1bd378fe9c81ef37140",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"param_name": "1band_sr32000_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "7dd21065bf91c10f7fccb57d7d83b07f",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"param_name": "1band_sr32000_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "80ab74d65e515caa3622728d2de07d23",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"param_name": "1band_sr32000_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "edc115e7fc523245062200c00caa847f",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json",
|
||||
"param_name": "1band_sr33075_hl384"
|
||||
},
|
||||
{
|
||||
"hash_name": "28063e9f6ab5b341c5f6d3c67f2045b7",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json",
|
||||
"param_name": "1band_sr33075_hl384"
|
||||
},
|
||||
{
|
||||
"hash_name": "b58090534c52cbc3e9b5104bad666ef2",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json",
|
||||
"param_name": "1band_sr44100_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "0cdab9947f1b0928705f518f3c78ea8f",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json",
|
||||
"param_name": "1band_sr44100_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "ae702fed0238afb5346db8356fe25f13",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json",
|
||||
"param_name": "1band_sr44100_hl1024"
|
||||
}
|
||||
]
|
||||
@ -148,113 +148,113 @@
|
||||
"1 Band": [
|
||||
{
|
||||
"hash_name": "1band_sr16000_hl512",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json",
|
||||
"param_name": "1band_sr16000_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "1band_sr32000_hl512",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json",
|
||||
"param_name": "1band_sr16000_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "1band_sr33075_hl384",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json",
|
||||
"param_name": "1band_sr33075_hl384"
|
||||
},
|
||||
{
|
||||
"hash_name": "1band_sr44100_hl256",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json",
|
||||
"param_name": "1band_sr44100_hl256"
|
||||
},
|
||||
{
|
||||
"hash_name": "1band_sr44100_hl512",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json",
|
||||
"param_name": "1band_sr44100_hl512"
|
||||
},
|
||||
{
|
||||
"hash_name": "1band_sr44100_hl1024",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json",
|
||||
"param_name": "1band_sr44100_hl1024"
|
||||
}
|
||||
],
|
||||
"2 Band": [
|
||||
{
|
||||
"hash_name": "2band_44100_lofi",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json",
|
||||
"param_name": "2band_44100_lofi"
|
||||
},
|
||||
{
|
||||
"hash_name": "2band_32000",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/2band_32000.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_32000.json",
|
||||
"param_name": "2band_32000"
|
||||
},
|
||||
{
|
||||
"hash_name": "2band_48000",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/2band_48000.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_48000.json",
|
||||
"param_name": "2band_48000"
|
||||
}
|
||||
],
|
||||
"3 Band": [
|
||||
{
|
||||
"hash_name": "3band_44100",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100.json",
|
||||
"param_name": "3band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "3band_44100_mid",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_mid.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json",
|
||||
"param_name": "3band_44100_mid"
|
||||
},
|
||||
{
|
||||
"hash_name": "3band_44100_msb2",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json",
|
||||
"param_name": "3band_44100_msb2"
|
||||
}
|
||||
],
|
||||
"4 Band": [
|
||||
{
|
||||
"hash_name": "4band_44100",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json",
|
||||
"param_name": "4band_44100"
|
||||
},
|
||||
{
|
||||
"hash_name": "4band_44100_mid",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_mid.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_mid.json",
|
||||
"param_name": "4band_44100_mid"
|
||||
},
|
||||
{
|
||||
"hash_name": "4band_44100_msb",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_msb.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb.json",
|
||||
"param_name": "4band_44100_msb"
|
||||
},
|
||||
{
|
||||
"hash_name": "4band_44100_msb2",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json",
|
||||
"param_name": "4band_44100_msb2"
|
||||
},
|
||||
{
|
||||
"hash_name": "4band_44100_reverse",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json",
|
||||
"param_name": "4band_44100_reverse"
|
||||
},
|
||||
{
|
||||
"hash_name": "4band_44100_sw",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_sw.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_sw.json",
|
||||
"param_name": "4band_44100_sw"
|
||||
},
|
||||
{
|
||||
"hash_name": "4band_v2",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_v2.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2.json",
|
||||
"param_name": "4band_v2"
|
||||
},
|
||||
{
|
||||
"hash_name": "4band_v2_sn",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/4band_v2_sn.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json",
|
||||
"param_name": "4band_v2_sn"
|
||||
},
|
||||
{
|
||||
"hash_name": "tmodelparam",
|
||||
"model_params": "uvr5_pack/lib_v5/modelparams/tmodelparam.json",
|
||||
"model_params": "lib/uvr5_pack/lib_v5/modelparams/tmodelparam.json",
|
||||
"param_name": "User Model Param Set"
|
||||
}
|
||||
]
|
@ -4,7 +4,7 @@ from tqdm import tqdm
|
||||
import json
|
||||
|
||||
|
||||
def load_data(file_name: str = "./uvr5_pack/name_params.json") -> dict:
|
||||
def load_data(file_name: str = "./lib/uvr5_pack/name_params.json") -> dict:
|
||||
with open(file_name, "r") as f:
|
||||
data = json.load(f)
|
||||
|
@ -39,5 +39,5 @@ uvicorn>=0.21.1
|
||||
colorama>=0.4.5
|
||||
pyworld>=0.3.2
|
||||
httpx==0.23.0
|
||||
onnxruntime-gpu
|
||||
#onnxruntime-gpu
|
||||
torchcrepe==0.0.20
|
||||
|
@ -1,5 +1,7 @@
|
||||
@echo off && chcp 65001
|
||||
|
||||
cd ..
|
||||
|
||||
echo working dir is %cd%
|
||||
echo downloading requirement aria2 check.
|
||||
echo=
|
@ -1,4 +1,4 @@
|
||||
from infer_pack.models_onnx import SynthesizerTrnMsNSFsidM
|
||||
from lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM
|
||||
import torch
|
||||
|
||||
if __name__ == "__main__":
|
@ -9,12 +9,12 @@ import numpy as np
|
||||
import soundfile as sf
|
||||
|
||||
# from models import SynthesizerTrn256#hifigan_nonsf
|
||||
# from infer_pack.models import SynthesizerTrn256NSF as SynthesizerTrn256#hifigan_nsf
|
||||
from infer_pack.models import (
|
||||
# from lib.infer_pack.models import SynthesizerTrn256NSF as SynthesizerTrn256#hifigan_nsf
|
||||
from lib.infer_pack.models import (
|
||||
SynthesizerTrnMs256NSFsid as SynthesizerTrn256,
|
||||
) # hifigan_nsf
|
||||
|
||||
# from infer_pack.models import SynthesizerTrnMs256NSFsid_sim as SynthesizerTrn256#hifigan_nsf
|
||||
# from lib.infer_pack.models import SynthesizerTrnMs256NSFsid_sim as SynthesizerTrn256#hifigan_nsf
|
||||
# from models import SynthesizerTrn256NSFsim as SynthesizerTrn256#hifigan_nsf
|
||||
# from models import SynthesizerTrn256NSFsimFlow as SynthesizerTrn256#hifigan_nsf
|
||||
|
@ -1,5 +1,5 @@
|
||||
import soundfile
|
||||
from infer_pack.onnx_inference import OnnxRVC
|
||||
from ..lib.infer_pack.onnx_inference import OnnxRVC
|
||||
|
||||
hop_size = 512
|
||||
sampling_rate = 40000 # 采样率
|
@ -22,7 +22,7 @@ import torch.multiprocessing as mp
|
||||
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 lib.infer_pack import commons
|
||||
from time import sleep
|
||||
from time import time as ttime
|
||||
from data_utils import (
|
||||
@ -34,13 +34,13 @@ from data_utils import (
|
||||
)
|
||||
|
||||
if hps.version == "v1":
|
||||
from infer_pack.models import (
|
||||
from lib.infer_pack.models import (
|
||||
SynthesizerTrnMs256NSFsid as RVC_Model_f0,
|
||||
SynthesizerTrnMs256NSFsid_nono as RVC_Model_nof0,
|
||||
MultiPeriodDiscriminator,
|
||||
)
|
||||
else:
|
||||
from infer_pack.models import (
|
||||
from lib.infer_pack.models import (
|
||||
SynthesizerTrnMs768NSFsid as RVC_Model_f0,
|
||||
SynthesizerTrnMs768NSFsid_nono as RVC_Model_nof0,
|
||||
MultiPeriodDiscriminatorV2 as MultiPeriodDiscriminator,
|
||||
|
@ -40,7 +40,7 @@ class PreProcess:
|
||||
)
|
||||
self.sr = sr
|
||||
self.bh, self.ah = signal.butter(N=5, Wn=48, btype="high", fs=self.sr)
|
||||
self.per = 3.7
|
||||
self.per = 3.0
|
||||
self.overlap = 0.3
|
||||
self.tail = self.per + self.overlap
|
||||
self.max = 0.9
|
||||
|
@ -1,50 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 liujing04
|
||||
Copyright (c) 2023 源文雨
|
||||
|
||||
本软件及其相关代码以MIT协议开源,作者不对软件具备任何控制力,使用软件者、传播软件导出的声音者自负全责。
|
||||
如不认可该条款,则不能使用或引用软件包内任何代码和文件。
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
特此授予任何获得本软件和相关文档文件(以下简称“软件”)副本的人免费使用、复制、修改、合并、出版、分发、再授权和/或销售本软件的权利,以及授予本软件所提供的人使用本软件的权利,但须符合以下条件:
|
||||
上述版权声明和本许可声明应包含在软件的所有副本或实质部分中。
|
||||
软件是“按原样”提供的,没有任何明示或暗示的保证,包括但不限于适销性、适用于特定目的和不侵权的保证。在任何情况下,作者或版权持有人均不承担因软件或软件的使用或其他交易而产生、产生或与之相关的任何索赔、损害赔偿或其他责任,无论是在合同诉讼、侵权诉讼还是其他诉讼中。
|
||||
|
||||
相关引用库协议如下:
|
||||
#################
|
||||
ContentVec
|
||||
https://github.com/auspicious3000/contentvec/blob/main/LICENSE
|
||||
MIT License
|
||||
#################
|
||||
VITS
|
||||
https://github.com/jaywalnut310/vits/blob/main/LICENSE
|
||||
MIT License
|
||||
#################
|
||||
HIFIGAN
|
||||
https://github.com/jik876/hifi-gan/blob/master/LICENSE
|
||||
MIT License
|
||||
#################
|
||||
gradio
|
||||
https://github.com/gradio-app/gradio/blob/main/LICENSE
|
||||
Apache License 2.0
|
||||
#################
|
||||
ffmpeg
|
||||
https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3
|
||||
https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-02-28-12-32/ffmpeg-n4.3.2-160-gfbb9368226-win64-lgpl-4.3.zip
|
||||
LPGLv3 License
|
||||
MIT License
|
||||
#################
|
||||
ultimatevocalremovergui
|
||||
https://github.com/Anjok07/ultimatevocalremovergui/blob/master/LICENSE
|
||||
https://github.com/yang123qwe/vocal_separation_by_uvr5
|
||||
MIT License
|
||||
#################
|
||||
audio-slicer
|
||||
https://github.com/openvpi/audio-slicer/blob/main/LICENSE
|
||||
MIT License
|
Loading…
Reference in New Issue
Block a user