repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/api.py
api.py
""" # api.py usage ` python api.py -dr "123.wav" -dt "一二三。" -dl "zh" ` ## 执行参数: `-s` - `SoVITS模型路径, 可在 config.py 中指定` `-g` - `GPT模型路径, 可在 config.py 中指定` 调用请求缺少参考音频时使用 `-dr` - `默认参考音频路径` `-dt` - `默认参考音频文本` `-dl` - `默认参考音频语种, "中文","英文","日文","韩文","粤语,"zh","en","ja","ko","yue"` `-d` - `推理设备, "cuda","cpu"` `-a` - `绑定地址...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
true
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/webui.py
webui.py
import os import sys os.environ["version"] = version = "v2Pro" now_dir = os.getcwd() sys.path.insert(0, now_dir) import warnings warnings.filterwarnings("ignore") import json import platform import shutil import signal import psutil import torch import yaml os.environ["TORCH_DISTRIBUTED_DEBUG"] = "INFO" torch.manua...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
true
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/config.py
config.py
import os import re import sys import torch from tools.i18n.i18n import I18nAuto i18n = I18nAuto(language=os.environ.get("language", "Auto")) pretrained_sovits_name = { "v1": "GPT_SoVITS/pretrained_models/s2G488k.pth", "v2": "GPT_SoVITS/pretrained_models/gsv-v2final-pretrained/s2G2333k.pth", "v3": "GPT...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/api_v2.py
api_v2.py
""" # WebAPI文档 ` python api_v2.py -a 127.0.0.1 -p 9880 -c GPT_SoVITS/configs/tts_infer.yaml ` ## 执行参数: `-a` - `绑定地址, 默认"127.0.0.1"` `-p` - `绑定端口, 默认9880` `-c` - `TTS配置文件路径, 默认"GPT_SoVITS/configs/tts_infer.yaml"` ## 调用: ### 推理 endpoint: `/tts` GET: ``` http://127.0.0.1:9880/tts?text=先帝创业未半而中道崩殂,今天下三分,益州...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/assets.py
tools/assets.py
js = """ function deleteTheme() { const params = new URLSearchParams(window.location.search); if (params.has('__theme')) { params.delete('__theme'); const newUrl = `${window.location.pathname}?${params.toString()}`; window.location.replace(newUrl); } } """ css = """ /* CSSStyleRule */ .markdown { pad...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/audio_sr.py
tools/audio_sr.py
from __future__ import absolute_import, division, print_function, unicode_literals import sys import os AP_BWE_main_dir_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "AP_BWE_main") sys.path.append(AP_BWE_main_dir_path) import json import torch import torchaudio.functional as aF # from attrdict import...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/cmd-denoise.py
tools/cmd-denoise.py
import os import argparse import traceback from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks from tqdm import tqdm path_denoise = "tools/denoise-model/speech_frcrn_ans_cirm_16k" path_denoise = path_denoise if os.path.exists(path_denoise) else "damo/speech_frcrn_ans_cirm_16k" ans = ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/slicer2.py
tools/slicer2.py
import numpy as np # This function is obtained from librosa. def get_rms( y, frame_length=2048, hop_length=512, pad_mode="constant", ): padding = (int(frame_length // 2), int(frame_length // 2)) y = np.pad(y, padding, mode=pad_mode) axis = -1 # put our new within-frame axis at the end...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/slice_audio.py
tools/slice_audio.py
import os import sys import numpy as np import traceback from scipy.io import wavfile # parent_directory = os.path.dirname(os.path.abspath(__file__)) # sys.path.append(parent_directory) from tools.my_utils import load_audio from slicer2 import Slicer def slice(inp, opt_root, threshold, min_length, min_interval, hop_...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/subfix_webui.py
tools/subfix_webui.py
import sys from tools.i18n.i18n import I18nAuto, scan_language_list language = sys.argv[-1] if sys.argv[-1] in scan_language_list() else "Auto" i18n = I18nAuto(language=language) import argparse import copy import json import os import uuid try: import gradio.analytics as analytics analytics.version_check = ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/__init__.py
tools/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/my_utils.py
tools/my_utils.py
import ctypes import os import sys from pathlib import Path import ffmpeg import gradio as gr import numpy as np import pandas as pd from tools.i18n.i18n import I18nAuto i18n = I18nAuto(language=os.environ.get("language", "Auto")) def load_audio(file, sr): try: # https://github.com/openai/whisper/blob/...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/asr/fasterwhisper_asr.py
tools/asr/fasterwhisper_asr.py
import argparse import os import traceback import requests import torch from faster_whisper import WhisperModel from huggingface_hub import snapshot_download as snapshot_download_hf from modelscope import snapshot_download as snapshot_download_ms from tqdm import tqdm from tools.asr.config import get_models from tool...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/asr/config.py
tools/asr/config.py
def get_models(): model_size_list = [ "medium", "medium.en", "large-v2", "large-v3", "large-v3-turbo", #"distil-large-v2", #"distil-large-v3", #"distil-large-v3.5", ] return model_size_list asr_dict = { "达摩 ASR (中文)": {"lang": ["zh", "yue...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/asr/funasr_asr.py
tools/asr/funasr_asr.py
# -*- coding:utf-8 -*- import argparse import os import traceback from funasr import AutoModel from modelscope import snapshot_download from tqdm import tqdm funasr_models = {} # 存储模型避免重复加载 def only_asr(input_file, language): try: model = create_model(language) text = model.generate(input=inpu...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/i18n/scan_i18n.py
tools/i18n/scan_i18n.py
import ast import glob import json import os from collections import OrderedDict I18N_JSON_DIR: os.PathLike = os.path.join(os.path.dirname(os.path.relpath(__file__)), "locale") DEFAULT_LANGUAGE: str = "zh_CN" # 默认语言 TITLE_LEN: int = 60 # 标题显示长度 KEY_LEN: int = 30 # 键名显示长度 SHOW_KEYS: bool = False # 是否显示键信息 SORT_KEYS...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/i18n/i18n.py
tools/i18n/i18n.py
import json import locale import os I18N_JSON_DIR: os.PathLike = os.path.join(os.path.dirname(os.path.relpath(__file__)), "locale") def load_language_list(language): with open(os.path.join(I18N_JSON_DIR, f"{language}.json"), "r", encoding="utf-8") as f: language_list = json.load(f) return language_li...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/AP_BWE_main/models/model.py
tools/AP_BWE_main/models/model.py
import torch import torch.nn.functional as F import torch.nn as nn from torch.nn.utils import weight_norm, spectral_norm # from utils import init_weights, get_padding def get_padding(kernel_size, dilation=1): return int((kernel_size * dilation - dilation) / 2) def init_weights(m, mean=0.0, std=0.01): classn...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/AP_BWE_main/models/__init__.py
tools/AP_BWE_main/models/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/AP_BWE_main/datasets1/dataset.py
tools/AP_BWE_main/datasets1/dataset.py
import os import random import torch import torchaudio import torch.utils.data import torchaudio.functional as aF def amp_pha_stft(audio, n_fft, hop_size, win_size, center=True): hann_window = torch.hann_window(win_size).to(audio.device) stft_spec = torch.stft( audio, n_fft, hop_length...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/AP_BWE_main/datasets1/__init__.py
tools/AP_BWE_main/datasets1/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/vr.py
tools/uvr5/vr.py
import os parent_directory = os.path.dirname(os.path.abspath(__file__)) import logging logger = logging.getLogger(__name__) import librosa import numpy as np import soundfile as sf import torch from lib.lib_v5 import nets_61968KB as Nets from lib.lib_v5 import spec_utils from lib.lib_v5.model_param_init import Model...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/webui.py
tools/uvr5/webui.py
import logging import os import traceback import gradio as gr from tools.i18n.i18n import I18nAuto from tools.my_utils import clean_path i18n = I18nAuto() logger = logging.getLogger(__name__) import sys import ffmpeg import torch from bsroformer import Roformer_Loader from mdxnet import MDXNetDereverb from vr impo...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/bsroformer.py
tools/uvr5/bsroformer.py
# This code is modified from https://github.com/ZFTurbo/ import os import warnings import librosa import numpy as np import soundfile as sf import torch import torch.nn as nn import yaml from tqdm import tqdm warnings.filterwarnings("ignore") class Roformer_Loader: def get_config(self, config_path): wit...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/mdxnet.py
tools/uvr5/mdxnet.py
import os import logging logger = logging.getLogger(__name__) import librosa import numpy as np import soundfile as sf import torch from tqdm import tqdm cpu = torch.device("cpu") class ConvTDFNetTrim: def __init__(self, device, model_name, target_name, L, dim_f, dim_t, n_fft, hop=1024): super(ConvTDFN...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/bs_roformer/attend.py
tools/uvr5/bs_roformer/attend.py
from packaging import version import torch from torch import nn, einsum import torch.nn.functional as F def exists(val): return val is not None def default(v, d): return v if exists(v) else d class Attend(nn.Module): def __init__(self, dropout=0.0, flash=False, scale=None): super().__init__() ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/bs_roformer/mel_band_roformer.py
tools/uvr5/bs_roformer/mel_band_roformer.py
from functools import partial import torch from torch import nn from torch.nn import Module, ModuleList import torch.nn.functional as F from bs_roformer.attend import Attend from torch.utils.checkpoint import checkpoint from typing import Tuple, Optional, Callable # from beartype.typing import Tuple, Optional, List,...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/bs_roformer/bs_roformer.py
tools/uvr5/bs_roformer/bs_roformer.py
from functools import partial import torch from torch import nn from torch.nn import Module, ModuleList import torch.nn.functional as F from bs_roformer.attend import Attend from torch.utils.checkpoint import checkpoint from typing import Tuple, Optional, Callable # from beartype.typing import Tuple, Optional, List,...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/bs_roformer/__init__.py
tools/uvr5/bs_roformer/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/utils.py
tools/uvr5/lib/utils.py
import json import numpy as np import torch from tqdm import tqdm def load_data(file_name: str = "./lib/name_params.json") -> dict: with open(file_name, "r") as f: data = json.load(f) return data def make_padding(width, cropsize, offset): left = offset roi_size = cropsize - left * 2 if...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/layers_new.py
tools/uvr5/lib/lib_v5/layers_new.py
import torch import torch.nn.functional as F from torch import nn from . import spec_utils class Conv2DBNActiv(nn.Module): def __init__(self, nin, nout, ksize=3, stride=1, pad=1, dilation=1, activ=nn.ReLU): super(Conv2DBNActiv, self).__init__() self.conv = nn.Sequential( nn.Conv2d( ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/layers_123821KB.py
tools/uvr5/lib/lib_v5/layers_123821KB.py
import torch import torch.nn.functional as F from torch import nn from . import spec_utils class Conv2DBNActiv(nn.Module): def __init__(self, nin, nout, ksize=3, stride=1, pad=1, dilation=1, activ=nn.ReLU): super(Conv2DBNActiv, self).__init__() self.conv = nn.Sequential( nn.Conv2d( ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/layers_123812KB.py
tools/uvr5/lib/lib_v5/layers_123812KB.py
import torch import torch.nn.functional as F from torch import nn from . import spec_utils class Conv2DBNActiv(nn.Module): def __init__(self, nin, nout, ksize=3, stride=1, pad=1, dilation=1, activ=nn.ReLU): super(Conv2DBNActiv, self).__init__() self.conv = nn.Sequential( nn.Conv2d( ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/spec_utils.py
tools/uvr5/lib/lib_v5/spec_utils.py
import hashlib import json import math import os import librosa import numpy as np import soundfile as sf from tqdm import tqdm def crop_center(h1, h2): h1_shape = h1.size() h2_shape = h2.size() if h1_shape[3] == h2_shape[3]: return h1 elif h1_shape[3] < h2_shape[3]: raise ValueError...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/model_param_init.py
tools/uvr5/lib/lib_v5/model_param_init.py
import json import pathlib default_param = {} default_param["bins"] = 768 default_param["unstable_bins"] = 9 # training only default_param["reduction_bins"] = 762 # training only default_param["sr"] = 44100 default_param["pre_filter_start"] = 757 default_param["pre_filter_stop"] = 768 default_param["band"] = {} de...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets_new.py
tools/uvr5/lib/lib_v5/nets_new.py
import torch import torch.nn.functional as F from torch import nn from . import layers_new class BaseNet(nn.Module): def __init__(self, nin, nout, nin_lstm, nout_lstm, dilations=((4, 2), (8, 4), (12, 6))): super(BaseNet, self).__init__() self.enc1 = layers_new.Conv2DBNActiv(nin, nout, 3, 1, 1) ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/dataset.py
tools/uvr5/lib/lib_v5/dataset.py
import os import random import numpy as np import torch import torch.utils.data from tqdm import tqdm from . import spec_utils class VocalRemoverValidationSet(torch.utils.data.Dataset): def __init__(self, patch_list): self.patch_list = patch_list def __len__(self): return len(self.patch_lis...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets_61968KB.py
tools/uvr5/lib/lib_v5/nets_61968KB.py
import torch import torch.nn.functional as F from torch import nn from . import layers_123821KB as layers class BaseASPPNet(nn.Module): def __init__(self, nin, ch, dilations=(4, 8, 16)): super(BaseASPPNet, self).__init__() self.enc1 = layers.Encoder(nin, ch, 3, 2, 1) self.enc2 = layers.En...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/layers_33966KB.py
tools/uvr5/lib/lib_v5/layers_33966KB.py
import torch import torch.nn.functional as F from torch import nn from . import spec_utils class Conv2DBNActiv(nn.Module): def __init__(self, nin, nout, ksize=3, stride=1, pad=1, dilation=1, activ=nn.ReLU): super(Conv2DBNActiv, self).__init__() self.conv = nn.Sequential( nn.Conv2d( ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets_537227KB.py
tools/uvr5/lib/lib_v5/nets_537227KB.py
import torch import torch.nn.functional as F from torch import nn from . import layers_537238KB as layers class BaseASPPNet(nn.Module): def __init__(self, nin, ch, dilations=(4, 8, 16)): super(BaseASPPNet, self).__init__() self.enc1 = layers.Encoder(nin, ch, 3, 2, 1) self.enc2 = layers.En...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/layers_537227KB.py
tools/uvr5/lib/lib_v5/layers_537227KB.py
import torch import torch.nn.functional as F from torch import nn from . import spec_utils class Conv2DBNActiv(nn.Module): def __init__(self, nin, nout, ksize=3, stride=1, pad=1, dilation=1, activ=nn.ReLU): super(Conv2DBNActiv, self).__init__() self.conv = nn.Sequential( nn.Conv2d( ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets_123812KB.py
tools/uvr5/lib/lib_v5/nets_123812KB.py
import torch import torch.nn.functional as F from torch import nn from . import layers_123821KB as layers class BaseASPPNet(nn.Module): def __init__(self, nin, ch, dilations=(4, 8, 16)): super(BaseASPPNet, self).__init__() self.enc1 = layers.Encoder(nin, ch, 3, 2, 1) self.enc2 = layers.En...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets.py
tools/uvr5/lib/lib_v5/nets.py
import layers import torch import torch.nn.functional as F from torch import nn class BaseASPPNet(nn.Module): def __init__(self, nin, ch, dilations=(4, 8, 16)): super(BaseASPPNet, self).__init__() self.enc1 = layers.Encoder(nin, ch, 3, 2, 1) self.enc2 = layers.Encoder(ch, ch * 2, 3, 2, 1) ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets_537238KB.py
tools/uvr5/lib/lib_v5/nets_537238KB.py
import torch import torch.nn.functional as F from torch import nn from . import layers_537238KB as layers class BaseASPPNet(nn.Module): def __init__(self, nin, ch, dilations=(4, 8, 16)): super(BaseASPPNet, self).__init__() self.enc1 = layers.Encoder(nin, ch, 3, 2, 1) self.enc2 = layers.En...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets_123821KB.py
tools/uvr5/lib/lib_v5/nets_123821KB.py
import torch import torch.nn.functional as F from torch import nn from . import layers_123821KB as layers class BaseASPPNet(nn.Module): def __init__(self, nin, ch, dilations=(4, 8, 16)): super(BaseASPPNet, self).__init__() self.enc1 = layers.Encoder(nin, ch, 3, 2, 1) self.enc2 = layers.En...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/layers_537238KB.py
tools/uvr5/lib/lib_v5/layers_537238KB.py
import torch import torch.nn.functional as F from torch import nn from . import spec_utils class Conv2DBNActiv(nn.Module): def __init__(self, nin, nout, ksize=3, stride=1, pad=1, dilation=1, activ=nn.ReLU): super(Conv2DBNActiv, self).__init__() self.conv = nn.Sequential( nn.Conv2d( ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/nets_33966KB.py
tools/uvr5/lib/lib_v5/nets_33966KB.py
import torch import torch.nn.functional as F from torch import nn from . import layers_33966KB as layers class BaseASPPNet(nn.Module): def __init__(self, nin, ch, dilations=(4, 8, 16, 32)): super(BaseASPPNet, self).__init__() self.enc1 = layers.Encoder(nin, ch, 3, 2, 1) self.enc2 = layers...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/tools/uvr5/lib/lib_v5/layers.py
tools/uvr5/lib/lib_v5/layers.py
import torch import torch.nn.functional as F from torch import nn from . import spec_utils class Conv2DBNActiv(nn.Module): def __init__(self, nin, nout, ksize=3, stride=1, pad=1, dilation=1, activ=nn.ReLU): super(Conv2DBNActiv, self).__init__() self.conv = nn.Sequential( nn.Conv2d( ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/export_torch_script_v3v4.py
GPT_SoVITS/export_torch_script_v3v4.py
import os from export_torch_script import ( T2SModel, get_raw_t2s_model, resamplex, spectrogram_torch, ) from f5_tts.model.backbones.dit import DiT from inference_webui import get_phones_and_bert import librosa from module import commons from module.mel_processing import mel_spectrogram_torch from modul...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
true
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/inference_webui_fast.py
GPT_SoVITS/inference_webui_fast.py
""" 按中英混合识别 按日英混合识别 多语种启动切分识别语种 全部按中文识别 全部按英文识别 全部按日文识别 """ import psutil import os def set_high_priority(): """把当前 Python 进程设为 HIGH_PRIORITY_CLASS""" if os.name != "nt": return # 仅 Windows 有效 p = psutil.Process(os.getpid()) try: p.nice(psutil.HIGH_PRIORITY_CLASS) print("已将进程优先级...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/s1_train.py
GPT_SoVITS/s1_train.py
# modified from https://github.com/feng-yufei/shared_debugging_code/blob/main/train_t2s.py import os if "_CUDA_VISIBLE_DEVICES" in os.environ: os.environ["CUDA_VISIBLE_DEVICES"] = os.environ["_CUDA_VISIBLE_DEVICES"] import argparse import logging import platform from pathlib import Path import torch from AR.data....
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/inference_gui.py
GPT_SoVITS/inference_gui.py
import os import sys from PyQt5.QtCore import QEvent from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QLineEdit, QPushButton, QTextEdit from PyQt5.QtWidgets import QGridLayout, QVBoxLayout, QWidget, QFileDialog, QStatusBar, QComboBox import soundfile as sf from tools.i18n.i18n import I18nAuto i18n = I18...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/inference_webui.py
GPT_SoVITS/inference_webui.py
""" 按中英混合识别 按日英混合识别 多语种启动切分识别语种 全部按中文识别 全部按英文识别 全部按日文识别 """ import psutil import os def set_high_priority(): """把当前 Python 进程设为 HIGH_PRIORITY_CLASS""" if os.name != "nt": return # 仅 Windows 有效 p = psutil.Process(os.getpid()) try: p.nice(psutil.HIGH_PRIORITY_CLASS) print("已将进程优先级...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
true
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/process_ckpt.py
GPT_SoVITS/process_ckpt.py
import traceback from collections import OrderedDict from time import time as ttime import shutil import os import torch from tools.i18n.i18n import I18nAuto i18n = I18nAuto() def my_save(fea, path): #####fix issue: torch.save doesn't support chinese path dir = os.path.dirname(path) name = os.path.basename(...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/inference_cli.py
GPT_SoVITS/inference_cli.py
import argparse import os import soundfile as sf from tools.i18n.i18n import I18nAuto from GPT_SoVITS.inference_webui import change_gpt_weights, change_sovits_weights, get_tts_wav i18n = I18nAuto() def synthesize( GPT_model_path, SoVITS_model_path, ref_audio_path, ref_text_path, ref_language, ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/stream_v2pro.py
GPT_SoVITS/stream_v2pro.py
# 这是一个实验性质的实现,旨在探索 stream infer 的可能性。(xiao hai xie zhe wan de) from typing import List from export_torch_script import ExportERes2NetV2, SSLModel, T2SModel, VitsModel, get_raw_t2s_model, init_sv_cn, resamplex, sample, spectrogram_torch import export_torch_script from my_utils import load_audio import torch from torch i...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/s2_train_v3_lora.py
GPT_SoVITS/s2_train_v3_lora.py
import warnings warnings.filterwarnings("ignore") import os import utils hps = utils.get_hparams(stage=2) os.environ["CUDA_VISIBLE_DEVICES"] = hps.train.gpu_numbers.replace("-", ",") import logging import torch import torch.distributed as dist import torch.multiprocessing as mp from torch.cuda.amp import GradScaler...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/s2_train.py
GPT_SoVITS/s2_train.py
import warnings warnings.filterwarnings("ignore") import os import utils hps = utils.get_hparams(stage=2) os.environ["CUDA_VISIBLE_DEVICES"] = hps.train.gpu_numbers.replace("-", ",") import logging import torch import torch.distributed as dist import torch.multiprocessing as mp from torch.cuda.amp import GradScaler...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/s2_train_v3.py
GPT_SoVITS/s2_train_v3.py
import warnings warnings.filterwarnings("ignore") import os import utils hps = utils.get_hparams(stage=2) os.environ["CUDA_VISIBLE_DEVICES"] = hps.train.gpu_numbers.replace("-", ",") import logging import torch import torch.distributed as dist import torch.multiprocessing as mp from torch.cuda.amp import GradScaler...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/utils.py
GPT_SoVITS/utils.py
import argparse import glob import json import logging import os import subprocess import sys import traceback import librosa import numpy as np import torch logging.getLogger("numba").setLevel(logging.ERROR) logging.getLogger("matplotlib").setLevel(logging.ERROR) logging.getLogger("httpx").setLevel(logging.ERROR) MA...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/download.py
GPT_SoVITS/download.py
import os import sys now_dir = os.getcwd() sys.path.insert(0, now_dir) from text.g2pw import G2PWPinyin g2pw = G2PWPinyin( model_dir="GPT_SoVITS/text/G2PWModel", model_source="GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large", v_to_u=False, neutral_tone_with_five=True, )
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/export_torch_script.py
GPT_SoVITS/export_torch_script.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/t2s_model.py # reference: https://github.com/lifeiteng/vall-e import argparse from io import BytesIO from typing import Optional from my_utils import load_audio import torch import torchaudio from torch import IntTensor, Lon...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
true
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/sv.py
GPT_SoVITS/sv.py
import sys import os import torch sys.path.append(f"{os.getcwd()}/GPT_SoVITS/eres2net") sv_path = "GPT_SoVITS/pretrained_models/sv/pretrained_eres2netv2w24s4ep4.ckpt" from ERes2NetV2 import ERes2NetV2 import kaldi as Kaldi class SV: def __init__(self, device, is_half): pretrained_state = torch.load(sv_pa...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/onnx_export.py
GPT_SoVITS/onnx_export.py
import torch import torchaudio from AR.models.t2s_lightning_module_onnx import Text2SemanticLightningModule from feature_extractor import cnhubert from module.models_onnx import SynthesizerTrn, symbols_v1, symbols_v2 from torch import nn cnhubert_base_path = "GPT_SoVITS/pretrained_models/chinese-hubert-base" cnhubert....
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/meldataset.py
GPT_SoVITS/BigVGAN/meldataset.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. # Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. import math import os import random import torch import torch.utils.data import numpy as np import librosa from librosa.filte...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/train.py
GPT_SoVITS/BigVGAN/train.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. # Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. import warnings warnings.simplefilter(action="ignore", category=FutureWarning) import itertools import os import time impor...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/utils0.py
GPT_SoVITS/BigVGAN/utils0.py
# Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. import glob import os import matplotlib import torch from torch.nn.utils import weight_norm matplotlib.use("Agg") import matplotlib.pylab as plt from .meldataset import MAX_WAV_VALUE from scipy.io.wavfi...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/inference.py
GPT_SoVITS/BigVGAN/inference.py
# Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. from __future__ import absolute_import, division, print_function, unicode_literals import os import argparse import json import torch import librosa from utils import load_checkpoint from meldataset imp...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/bigvgan.py
GPT_SoVITS/BigVGAN/bigvgan.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. # Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. import os import json from pathlib import Path from typing import Optional, Union, Dict import torch import torch.nn as nn f...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/discriminators.py
GPT_SoVITS/BigVGAN/discriminators.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. # Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. import torch import torch.nn.functional as F import torch.nn as nn from torch.nn import Conv2d from torch.nn.utils import we...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/loss.py
GPT_SoVITS/BigVGAN/loss.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. # Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. import torch import torch.nn as nn from librosa.filters import mel as librosa_mel_fn from scipy import signal import typing...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/inference_e2e.py
GPT_SoVITS/BigVGAN/inference_e2e.py
# Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. from __future__ import absolute_import, division, print_function, unicode_literals import glob import os import numpy as np import argparse import json import torch from scipy.io.wavfile import write fr...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/activations.py
GPT_SoVITS/BigVGAN/activations.py
# Implementation adapted from https://github.com/EdwardDixon/snake under the MIT license. # LICENSE is in incl_licenses directory. import torch from torch import nn, sin, pow from torch.nn import Parameter class Snake(nn.Module): """ Implementation of a sine-based periodic activation function Shape: ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/env.py
GPT_SoVITS/BigVGAN/env.py
# Adapted from https://github.com/jik876/hifi-gan under the MIT license. # LICENSE is in incl_licenses directory. import os import shutil class AttrDict(dict): def __init__(self, *args, **kwargs): super(AttrDict, self).__init__(*args, **kwargs) self.__dict__ = self def build_env(config, confi...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/tests/test_activation_snake_beta.py
GPT_SoVITS/BigVGAN/tests/test_activation_snake_beta.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. import os import sys # to import modules from parent_dir parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.append(parent_dir) import torch from alias_free_activation.cuda import activation1d from activatio...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/tests/test_cuda_vs_torch_model.py
GPT_SoVITS/BigVGAN/tests/test_cuda_vs_torch_model.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. import os import sys # to import modules from parent_dir parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.append(parent_dir) import torch import json from env import AttrDict from bigvgan import BigVGAN f...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/tests/test_activation.py
GPT_SoVITS/BigVGAN/tests/test_activation.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. import os import sys # to import modules from parent_dir parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.append(parent_dir) import torch from alias_free_activation.cuda import activation1d from activatio...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/alias_free_activation/cuda/load.py
GPT_SoVITS/BigVGAN/alias_free_activation/cuda/load.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. import os import pathlib import subprocess from torch.utils import cpp_extension """ Setting this param to a list has a problem of generating different compilation commands (with diferent order of architectures) and leading to recompilation...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/alias_free_activation/cuda/__init__.py
GPT_SoVITS/BigVGAN/alias_free_activation/cuda/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/alias_free_activation/cuda/activation1d.py
GPT_SoVITS/BigVGAN/alias_free_activation/cuda/activation1d.py
# Copyright (c) 2024 NVIDIA CORPORATION. # Licensed under the MIT license. import torch import torch.nn as nn from alias_free_activation.torch.resample import UpSample1d, DownSample1d # load fused CUDA kernel: this enables importing anti_alias_activation_cuda from alias_free_activation.cuda import load anti_alias_...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/alias_free_activation/torch/filter.py
GPT_SoVITS/BigVGAN/alias_free_activation/torch/filter.py
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0 # LICENSE is in incl_licenses directory. import torch import torch.nn as nn import torch.nn.functional as F import math if "sinc" in dir(torch): sinc = torch.sinc else: # This code is adopted from adefossez's julius.c...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/alias_free_activation/torch/act.py
GPT_SoVITS/BigVGAN/alias_free_activation/torch/act.py
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0 # LICENSE is in incl_licenses directory. import torch.nn as nn from .resample import UpSample1d, DownSample1d class Activation1d(nn.Module): def __init__( self, activation, up_ratio: int = 2, ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/alias_free_activation/torch/__init__.py
GPT_SoVITS/BigVGAN/alias_free_activation/torch/__init__.py
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0 # LICENSE is in incl_licenses directory. from .filter import * from .resample import * from .act import *
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/BigVGAN/alias_free_activation/torch/resample.py
GPT_SoVITS/BigVGAN/alias_free_activation/torch/resample.py
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0 # LICENSE is in incl_licenses directory. import torch.nn as nn from torch.nn import functional as F from .filter import LowPassFilter1d from .filter import kaiser_sinc_filter1d class UpSample1d(nn.Module): def __init__(s...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/feature_extractor/whisper_enc.py
GPT_SoVITS/feature_extractor/whisper_enc.py
import torch def get_model(): import whisper model = whisper.load_model("small", device="cpu") return model.encoder def get_content(model=None, wav_16k_tensor=None): from whisper import log_mel_spectrogram, pad_or_trim dev = next(model.parameters()).device mel = log_mel_spectrogram(wav_16...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/feature_extractor/cnhubert.py
GPT_SoVITS/feature_extractor/cnhubert.py
import torch import os from transformers import logging as tf_logging tf_logging.set_verbosity_error() import logging logging.getLogger("numba").setLevel(logging.WARNING) from transformers import ( Wav2Vec2FeatureExtractor, HubertModel, ) import utils import torch.nn as nn cnhubert_base_path = None clas...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/feature_extractor/__init__.py
GPT_SoVITS/feature_extractor/__init__.py
from . import cnhubert, whisper_enc content_module_map = {"cnhubert": cnhubert, "whisper": whisper_enc}
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/__init__.py
GPT_SoVITS/AR/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/text_processing/symbols.py
GPT_SoVITS/AR/text_processing/symbols.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/text_processing/symbols.py # reference: https://github.com/lifeiteng/vall-e PAD = "_" PUNCTUATION = ';:,.!?¡¿—…"«»“” ' LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" IPA_LETTERS = ( "ɑɐɒæɓʙβɔɕçɗɖðʤəɘɚɛɜɝɞɟʄɡɠɢʛ...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/text_processing/phonemizer.py
GPT_SoVITS/AR/text_processing/phonemizer.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/text_processing/phonemizer.py # reference: https://github.com/lifeiteng/vall-e import itertools import re from typing import Dict from typing import List import regex from gruut import sentences from gruut.const import Sentence fro...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/text_processing/__init__.py
GPT_SoVITS/AR/text_processing/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/models/t2s_model.py
GPT_SoVITS/AR/models/t2s_model.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/t2s_model.py # reference: https://github.com/lifeiteng/vall-e import math from typing import List, Optional import torch from torch import nn from torch.nn import functional as F from torchmetrics.classification import Multi...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
true
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/models/t2s_lightning_module.py
GPT_SoVITS/AR/models/t2s_lightning_module.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/t2s_lightning_module.py # reference: https://github.com/lifeiteng/vall-e import os import sys now_dir = os.getcwd() sys.path.append(now_dir) from typing import Dict import torch from pytorch_lightning import LightningModule...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/models/utils.py
GPT_SoVITS/AR/models/utils.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/utils.py # reference: https://github.com/lifeiteng/vall-e from typing import Tuple import torch import torch.nn.functional as F def sequence_mask(length, max_length=None): if max_length is None: max_length = le...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/models/t2s_model_onnx.py
GPT_SoVITS/AR/models/t2s_model_onnx.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/t2s_model.py # reference: https://github.com/lifeiteng/vall-e import torch from torch import nn from torch.nn import functional as F from torchmetrics.classification import MulticlassAccuracy from AR.modules.embedding_onnx i...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/models/__init__.py
GPT_SoVITS/AR/models/__init__.py
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py
GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/t2s_lightning_module.py # reference: https://github.com/lifeiteng/vall-e import os import sys now_dir = os.getcwd() sys.path.append(now_dir) from typing import Dict import torch from pytorch_lightning import LightningModule...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/utils/__init__.py
GPT_SoVITS/AR/utils/__init__.py
import re def str2bool(str): return True if str.lower() == "true" else False def get_newest_ckpt(string_list): # 定义一个正则表达式模式,用于匹配字符串中的数字 pattern = r"epoch=(\d+)-step=(\d+)\.ckpt" # 使用正则表达式提取每个字符串中的数字信息,并创建一个包含元组的列表 extracted_info = [] for string in string_list: match = re.match(patt...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/utils/initialize.py
GPT_SoVITS/AR/utils/initialize.py
#!/usr/bin/env python3 """Initialize modules for espnet2 neural networks.""" import torch from typeguard import check_argument_types def initialize(model: torch.nn.Module, init: str): """Initialize weights of a neural network module. Parameters are initialized using the given method or distribution. Cu...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false
RVC-Boss/GPT-SoVITS
https://github.com/RVC-Boss/GPT-SoVITS/blob/c767f0b83b998e996a4d230d86da575a03f54a3f/GPT_SoVITS/AR/utils/io.py
GPT_SoVITS/AR/utils/io.py
import sys import torch import yaml def load_yaml_config(path): with open(path) as f: config = yaml.full_load(f) return config def save_config_to_yaml(config, path): assert path.endswith(".yaml") with open(path, "w") as f: f.write(yaml.dump(config)) f.close() def write_arg...
python
MIT
c767f0b83b998e996a4d230d86da575a03f54a3f
2026-01-04T14:39:21.477961Z
false