SYMBOL INDEX (1241 symbols across 104 files) FILE: cluster/__init__.py function get_cluster_model (line 5) | def get_cluster_model(ckpt_path): function get_cluster_result (line 16) | def get_cluster_result(model, x, speaker): function get_cluster_center_result (line 23) | def get_cluster_center_result(model, x,speaker): function get_center (line 28) | def get_center(model, x,speaker): FILE: cluster/kmeans.py function _kpp (line 10) | def _kpp(data: torch.Tensor, k: int, sample_size: int = -1): class KMeansGPU (line 51) | class KMeansGPU: method __init__ (line 82) | def __init__(self, n_clusters, max_iter=200, tol=1e-4, verbose=0, mode... method cos_sim (line 96) | def cos_sim(a, b): method euc_sim (line 108) | def euc_sim(a, b): method max_sim (line 117) | def max_sim(self, a, b): method fit_predict (line 133) | def fit_predict(self, X): FILE: cluster/train_cluster.py function train_cluster (line 16) | def train_cluster(in_dir, n_clusters, use_minibatch=True, verbose=False,... FILE: compress_model.py function copyStateDict (line 9) | def copyStateDict(state_dict): function removeOptimizer (line 21) | def removeOptimizer(config: str, input_model: str, ishalf: bool, output_... FILE: data_utils.py class TextAudioSpeakerLoader (line 18) | class TextAudioSpeakerLoader(torch.utils.data.Dataset): method __init__ (line 25) | def __init__(self, audiopaths, hparams, all_in_mem: bool = False, vol_... method get_audio (line 47) | def get_audio(self, filename): method random_slice (line 94) | def random_slice(self, c, f0, spec, audio_norm, spk, uv, volume): method __getitem__ (line 121) | def __getitem__(self, index): method __len__ (line 127) | def __len__(self): class TextAudioCollate (line 131) | class TextAudioCollate: method __call__ (line 133) | def __call__(self, batch): FILE: diffusion/data_loaders.py function traverse_dir (line 13) | def traverse_dir( function get_data_loaders (line 54) | def get_data_loaders(args, whole_audio=False): class AudioDataset (line 98) | class AudioDataset(Dataset): method __init__ (line 99) | def __init__( method __getitem__ (line 208) | def __getitem__(self, file_idx): method get_data (line 218) | def get_data(self, name_ext, data_buffer): method __len__ (line 287) | def __len__(self): FILE: diffusion/diffusion.py function exists (line 12) | def exists(x): function default (line 16) | def default(val, d): function extract (line 22) | def extract(a, t, x_shape): function noise_like (line 28) | def noise_like(shape, device, repeat=False): function linear_beta_schedule (line 36) | def linear_beta_schedule(timesteps, max_beta=0.02): function cosine_beta_schedule (line 44) | def cosine_beta_schedule(timesteps, s=0.008): class GaussianDiffusion (line 63) | class GaussianDiffusion(nn.Module): method __init__ (line 64) | def __init__(self, method q_mean_variance (line 115) | def q_mean_variance(self, x_start, t): method predict_start_from_noise (line 121) | def predict_start_from_noise(self, x_t, t, noise): method q_posterior (line 127) | def q_posterior(self, x_start, x_t, t): method p_mean_variance (line 136) | def p_mean_variance(self, x, t, cond): method p_sample_ddim (line 146) | def p_sample_ddim(self, x, t, interval, cond): method p_sample (line 158) | def p_sample(self, x, t, cond, clip_denoised=True, repeat_noise=False): method p_sample_plms (line 167) | def p_sample_plms(self, x, t, interval, cond, clip_denoised=True, repe... method q_sample (line 203) | def q_sample(self, x_start, t, noise=None): method p_losses (line 210) | def p_losses(self, x_start, t, cond, noise=None, loss_type='l2'): method forward (line 225) | def forward(self, method norm_spec (line 392) | def norm_spec(self, x): method denorm_spec (line 395) | def denorm_spec(self, x): FILE: diffusion/diffusion_onnx.py function exists (line 14) | def exists(x): function default (line 18) | def default(val, d): function extract (line 24) | def extract(a, t): function noise_like (line 28) | def noise_like(shape, device, repeat=False): function linear_beta_schedule (line 36) | def linear_beta_schedule(timesteps, max_beta=0.02): function cosine_beta_schedule (line 44) | def cosine_beta_schedule(timesteps, s=0.008): function extract_1 (line 63) | def extract_1(a, t): function predict_stage0 (line 67) | def predict_stage0(noise_pred, noise_pred_prev): function predict_stage1 (line 71) | def predict_stage1(noise_pred, noise_list): function predict_stage2 (line 76) | def predict_stage2(noise_pred, noise_list): function predict_stage3 (line 82) | def predict_stage3(noise_pred, noise_list): class SinusoidalPosEmb (line 89) | class SinusoidalPosEmb(nn.Module): method __init__ (line 90) | def __init__(self, dim): method forward (line 98) | def forward(self, x): class ResidualBlock (line 104) | class ResidualBlock(nn.Module): method __init__ (line 105) | def __init__(self, encoder_hidden, residual_channels, dilation): method forward (line 113) | def forward(self, x, conditioner, diffusion_step): class DiffNet (line 129) | class DiffNet(nn.Module): method __init__ (line 130) | def __init__(self, in_dims, n_layers, n_chans, n_hidden): method forward (line 151) | def forward(self, spec, diffusion_step, cond): class AfterDiffusion (line 172) | class AfterDiffusion(nn.Module): method __init__ (line 173) | def __init__(self, spec_max, spec_min, v_type='a'): method forward (line 179) | def forward(self, x): class Pred (line 187) | class Pred(nn.Module): method __init__ (line 188) | def __init__(self, alphas_cumprod): method forward (line 192) | def forward(self, x_1, noise_t, t_1, t_prev): class GaussianDiffusion (line 203) | class GaussianDiffusion(nn.Module): method __init__ (line 204) | def __init__(self, method q_mean_variance (line 259) | def q_mean_variance(self, x_start, t): method predict_start_from_noise (line 265) | def predict_start_from_noise(self, x_t, t, noise): method q_posterior (line 271) | def q_posterior(self, x_start, x_t, t): method p_mean_variance (line 280) | def p_mean_variance(self, x, t, cond): method p_sample (line 290) | def p_sample(self, x, t, cond, clip_denoised=True, repeat_noise=False): method p_sample_plms (line 299) | def p_sample_plms(self, x, t, interval, cond, clip_denoised=True, repe... method q_sample (line 335) | def q_sample(self, x_start, t, noise=None): method p_losses (line 342) | def p_losses(self, x_start, t, cond, noise=None, loss_type='l2'): method org_forward (line 357) | def org_forward(self, method norm_spec (line 467) | def norm_spec(self, x): method denorm_spec (line 470) | def denorm_spec(self, x): method get_x_pred (line 473) | def get_x_pred(self, x_1, noise_t, t_1, t_prev): method OnnxExport (line 482) | def OnnxExport(self, project_name=None, init_noise=None, hidden_channe... method forward (line 574) | def forward(self, condition=None, init_noise=None, pndms=None, k_step=... FILE: diffusion/dpm_solver_pytorch.py class NoiseScheduleVP (line 4) | class NoiseScheduleVP: method __init__ (line 5) | def __init__( method numerical_clip_alpha (line 112) | def numerical_clip_alpha(self, log_alphas, clipped_lambda=-5.1): method marginal_log_mean_coeff (line 125) | def marginal_log_mean_coeff(self, t): method marginal_alpha (line 134) | def marginal_alpha(self, t): method marginal_std (line 140) | def marginal_std(self, t): method marginal_lambda (line 146) | def marginal_lambda(self, t): method inverse_lambda (line 154) | def inverse_lambda(self, lamb): function model_wrapper (line 168) | def model_wrapper( class DPM_Solver (line 335) | class DPM_Solver: method __init__ (line 336) | def __init__( method dynamic_thresholding_fn (line 414) | def dynamic_thresholding_fn(self, x0, t): method noise_prediction_fn (line 425) | def noise_prediction_fn(self, x, t): method data_prediction_fn (line 431) | def data_prediction_fn(self, x, t): method model_fn (line 442) | def model_fn(self, x, t): method get_time_steps (line 451) | def get_time_steps(self, skip_type, t_T, t_0, N, device): method get_orders_and_timesteps_for_singlestep_solver (line 480) | def get_orders_and_timesteps_for_singlestep_solver(self, steps, order,... method denoise_to_zero_fn (line 539) | def denoise_to_zero_fn(self, x, s): method dpm_solver_first_update (line 545) | def dpm_solver_first_update(self, x, s, t, model_s=None, return_interm... method singlestep_dpm_solver_second_update (line 591) | def singlestep_dpm_solver_second_update(self, x, s, t, r1=0.5, model_s... method singlestep_dpm_solver_third_update (line 672) | def singlestep_dpm_solver_third_update(self, x, s, t, r1=1./3., r2=2./... method multistep_dpm_solver_second_update (line 793) | def multistep_dpm_solver_second_update(self, x, model_prev_list, t_pre... method multistep_dpm_solver_third_update (line 851) | def multistep_dpm_solver_third_update(self, x, model_prev_list, t_prev... method singlestep_dpm_solver_update (line 903) | def singlestep_dpm_solver_update(self, x, s, t, order, return_intermed... method multistep_dpm_solver_update (line 929) | def multistep_dpm_solver_update(self, x, model_prev_list, t_prev_list,... method dpm_solver_adaptive (line 953) | def dpm_solver_adaptive(self, x, order, t_T, t_0, h_init=0.05, atol=0.... method add_noise (line 1014) | def add_noise(self, x, t, noise=None): method inverse (line 1034) | def inverse(self, x, steps=20, t_start=None, t_end=None, order=2, skip... method sample (line 1049) | def sample(self, x, steps=20, t_start=None, t_end=None, order=2, skip_... function interpolate_fn (line 1255) | def interpolate_fn(x, xp, yp): function expand_dims (line 1297) | def expand_dims(v, dims): FILE: diffusion/infer_gt_mel.py class DiffGtMel (line 7) | class DiffGtMel: method __init__ (line 8) | def __init__(self, project_path=None, device=None): method flush_model (line 18) | def flush_model(self, project_path, ddsp_config=None): method check_args (line 26) | def check_args(self, args1, args2): method __call__ (line 35) | def __call__(self, audio, f0, hubert, volume, acc=1, spk_id=1, k_step=... method infer (line 58) | def infer(self, audio, f0, hubert, volume, acc=1, spk_id=1, k_step=0, ... FILE: diffusion/logger/saver.py class Saver (line 15) | class Saver(object): method __init__ (line 16) | def __init__( method log_info (line 47) | def log_info(self, msg): method log_value (line 70) | def log_value(self, dict): method log_spec (line 74) | def log_spec(self, name, spec, spec_out, vmin=-14, vmax=3.5): method log_audio (line 84) | def log_audio(self, dict): method get_interval_time (line 88) | def get_interval_time(self, update=True): method get_total_time (line 95) | def get_total_time(self, to_str=True): method save_model (line 102) | def save_model( method delete_model (line 130) | def delete_model(self, name='model', postfix=''): method global_step_increment (line 142) | def global_step_increment(self): FILE: diffusion/logger/utils.py function traverse_dir (line 8) | def traverse_dir( class DotDict (line 50) | class DotDict(dict): method __getattr__ (line 51) | def __getattr__(*args): function get_network_paras_amount (line 59) | def get_network_paras_amount(model_dict): function load_config (line 69) | def load_config(path_config): function save_config (line 76) | def save_config(path_config,config): function to_json (line 81) | def to_json(path_params, path_json): function convert_tensor_to_numpy (line 92) | def convert_tensor_to_numpy(tensor, is_squeeze=True): function load_model (line 102) | def load_model( FILE: diffusion/onnx_export.py class DotDict (line 11) | class DotDict(dict): method __getattr__ (line 12) | def __getattr__(*args): function load_model_vocoder (line 20) | def load_model_vocoder( class Unit2Mel (line 48) | class Unit2Mel(nn.Module): method __init__ (line 49) | def __init__( method forward (line 84) | def forward(self, units, mel2ph, f0, volume, g = None): method init_spkembed (line 110) | def init_spkembed(self, units, f0, volume, spk_id = None, spk_mix_dict... method OnnxExport (line 135) | def OnnxExport(self, project_name=None, init_noise=None, export_encode... method ExportOnnx (line 171) | def ExportOnnx(self, project_name=None): FILE: diffusion/solver.py function test (line 13) | def test(args, model, vocoder, loader_test, saver): function train (line 93) | def train(args, initial_global_step, model, optimizer, scheduler, vocode... FILE: diffusion/uni_pc.py class NoiseScheduleVP (line 6) | class NoiseScheduleVP: method __init__ (line 7) | def __init__( method marginal_log_mean_coeff (line 103) | def marginal_log_mean_coeff(self, t): method marginal_alpha (line 117) | def marginal_alpha(self, t): method marginal_std (line 123) | def marginal_std(self, t): method marginal_lambda (line 129) | def marginal_lambda(self, t): method inverse_lambda (line 137) | def inverse_lambda(self, lamb): function model_wrapper (line 157) | def model_wrapper( class UniPC (line 238) | class UniPC: method __init__ (line 239) | def __init__( method dynamic_thresholding_fn (line 270) | def dynamic_thresholding_fn(self, x0, t=None): method noise_prediction_fn (line 281) | def noise_prediction_fn(self, x, t): method data_prediction_fn (line 287) | def data_prediction_fn(self, x, t): method model_fn (line 298) | def model_fn(self, x, t): method get_time_steps (line 307) | def get_time_steps(self, skip_type, t_T, t_0, N, device): method get_orders_and_timesteps_for_singlestep_solver (line 324) | def get_orders_and_timesteps_for_singlestep_solver(self, steps, order,... method denoise_to_zero_fn (line 355) | def denoise_to_zero_fn(self, x, s): method multistep_uni_pc_update (line 361) | def multistep_uni_pc_update(self, x, model_prev_list, t_prev_list, t, ... method multistep_uni_pc_vary_update (line 370) | def multistep_uni_pc_vary_update(self, x, model_prev_list, t_prev_list... method multistep_uni_pc_bh_update (line 473) | def multistep_uni_pc_bh_update(self, x, model_prev_list, t_prev_list, ... method sample (line 592) | def sample(self, x, steps=20, t_start=None, t_end=None, order=2, skip_... function interpolate_fn (line 681) | def interpolate_fn(x, xp, yp): function expand_dims (line 723) | def expand_dims(v, dims): FILE: diffusion/unit2mel.py class DotDict (line 13) | class DotDict(dict): method __getattr__ (line 14) | def __getattr__(*args): function load_model_vocoder (line 22) | def load_model_vocoder( class Unit2Mel (line 61) | class Unit2Mel(nn.Module): method __init__ (line 62) | def __init__( method init_spkembed (line 94) | def init_spkembed(self, units, f0, volume, spk_id = None, spk_mix_dict... method init_spkmix (line 119) | def init_spkmix(self, n_spk): method forward (line 131) | def forward(self, units, f0, volume, spk_id = None, spk_mix_dict = Non... FILE: diffusion/vocoder.py class Vocoder (line 8) | class Vocoder: method __init__ (line 9) | def __init__(self, vocoder_type, vocoder_ckpt, device = None): method extract (line 26) | def extract(self, audio, sample_rate, keyshift=0): method infer (line 41) | def infer(self, mel, f0): class NsfHifiGAN (line 47) | class NsfHifiGAN(torch.nn.Module): method __init__ (line 48) | def __init__(self, model_path, device=None): method sample_rate (line 65) | def sample_rate(self): method hop_size (line 68) | def hop_size(self): method dimension (line 71) | def dimension(self): method extract (line 74) | def extract(self, audio, keyshift=0): method forward (line 78) | def forward(self, mel, f0): class NsfHifiGANLog10 (line 87) | class NsfHifiGANLog10(NsfHifiGAN): method forward (line 88) | def forward(self, mel, f0): FILE: diffusion/wavenet.py class Conv1d (line 10) | class Conv1d(torch.nn.Conv1d): method __init__ (line 11) | def __init__(self, *args, **kwargs): class SinusoidalPosEmb (line 16) | class SinusoidalPosEmb(nn.Module): method __init__ (line 17) | def __init__(self, dim): method forward (line 21) | def forward(self, x): class ResidualBlock (line 31) | class ResidualBlock(nn.Module): method __init__ (line 32) | def __init__(self, encoder_hidden, residual_channels, dilation): method forward (line 46) | def forward(self, x, conditioner, diffusion_step): class WaveNet (line 64) | class WaveNet(nn.Module): method __init__ (line 65) | def __init__(self, in_dims=128, n_layers=20, n_chans=384, n_hidden=256): method forward (line 86) | def forward(self, spec, diffusion_step, cond): FILE: edgetts/tts.py function _main (line 21) | async def _main() -> None: FILE: flask_api.py function voice_change_model (line 20) | def voice_change_model(): FILE: flask_api_full_song.py function wav2wav (line 13) | def wav2wav(): FILE: inference/infer_tool.py function read_temp (line 28) | def read_temp(file_name): function write_temp (line 51) | def write_temp(file_name, data): function timeit (line 56) | def timeit(func): function format_wav (line 66) | def format_wav(audio_path): function get_end_file (line 73) | def get_end_file(dir_path, end): function get_md5 (line 84) | def get_md5(content): function fill_a_to_b (line 87) | def fill_a_to_b(a, b): function mkdir (line 92) | def mkdir(paths: list): function pad_array (line 97) | def pad_array(arr, target_length): function split_list_by_n (line 108) | def split_list_by_n(list_collection, n, pre=0): class F0FilterException (line 113) | class F0FilterException(Exception): class Svc (line 116) | class Svc(object): method __init__ (line 117) | def __init__(self, net_g_path, config_path, method load_model (line 189) | def load_model(self, spk_mix_enable=False): method get_unit_f0 (line 204) | def get_unit_f0(self, wav, tran, cluster_infer_ratio, speaker, f0_filt... method infer (line 256) | def infer(self, speaker, tran, raw_path, method clear_empty (line 342) | def clear_empty(self): method unload_model (line 346) | def unload_model(self): method slice_inference (line 356) | def slice_inference(self, class RealTimeVC (line 498) | class RealTimeVC: method __init__ (line 499) | def __init__(self): method process (line 507) | def process(self, svc_model, speaker_id, f_pitch_change, input_wav_path, FILE: inference/infer_tool_grad.py function resize2d_f0 (line 19) | def resize2d_f0(x, target_len): function get_f0 (line 27) | def get_f0(x, p_len,f0_up_key=0): function clean_pitch (line 51) | def clean_pitch(input_pitch): function plt_pitch (line 58) | def plt_pitch(input_pitch): function f0_to_pitch (line 64) | def f0_to_pitch(ff): function fill_a_to_b (line 69) | def fill_a_to_b(a, b): function mkdir (line 75) | def mkdir(paths: list): class VitsSvc (line 81) | class VitsSvc(object): method __init__ (line 82) | def __init__(self): method set_device (line 89) | def set_device(self, device): method loadCheckpoint (line 95) | def loadCheckpoint(self, path): method get_units (line 105) | def get_units(self, source, sr): method get_unit_pitch (line 112) | def get_unit_pitch(self, in_path, tran): method infer (line 121) | def infer(self, speaker_id, tran, raw_path): method inference (line 133) | def inference(self,srcaudio,chara,tran,slice_db): FILE: inference/slicer.py class Slicer (line 6) | class Slicer: method __init__ (line 7) | def __init__(self, method _apply_slice (line 26) | def _apply_slice(self, waveform, begin, end): method slice (line 33) | def slice(self, waveform): function cut (line 120) | def cut(audio_path, db_thresh=-30, min_len=5000): function chunks2audio (line 131) | def chunks2audio(audio_path, chunks): FILE: inference_main.py function main (line 14) | def main(): FILE: models.py class ResidualCouplingBlock (line 15) | class ResidualCouplingBlock(nn.Module): method __init__ (line 16) | def __init__(self, method forward (line 45) | def forward(self, x, x_mask, g=None, reverse=False): class TransformerCouplingBlock (line 54) | class TransformerCouplingBlock(nn.Module): method __init__ (line 55) | def __init__(self, method forward (line 85) | def forward(self, x, x_mask, g=None, reverse=False): class Encoder (line 95) | class Encoder(nn.Module): method __init__ (line 96) | def __init__(self, method forward (line 117) | def forward(self, x, x_lengths, g=None): class TextEncoder (line 128) | class TextEncoder(nn.Module): method __init__ (line 129) | def __init__(self, method forward (line 155) | def forward(self, x, x_mask, f0=None, noice_scale=1): class DiscriminatorP (line 165) | class DiscriminatorP(torch.nn.Module): method __init__ (line 166) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=... method forward (line 180) | def forward(self, x): class DiscriminatorS (line 202) | class DiscriminatorS(torch.nn.Module): method __init__ (line 203) | def __init__(self, use_spectral_norm=False): method forward (line 216) | def forward(self, x): class MultiPeriodDiscriminator (line 230) | class MultiPeriodDiscriminator(torch.nn.Module): method __init__ (line 231) | def __init__(self, use_spectral_norm=False): method forward (line 239) | def forward(self, y, y_hat): class SpeakerEncoder (line 255) | class SpeakerEncoder(torch.nn.Module): method __init__ (line 256) | def __init__(self, mel_n_channels=80, model_num_layers=3, model_hidden... method forward (line 262) | def forward(self, mels): method compute_partial_slices (line 268) | def compute_partial_slices(self, total_frames, partial_frames, partial... method embed_utterance (line 276) | def embed_utterance(self, mel, partial_frames=128, partial_hop=64): class F0Decoder (line 296) | class F0Decoder(nn.Module): method __init__ (line 297) | def __init__(self, method forward (line 328) | def forward(self, x, norm_f0, x_mask, spk_emb=None): class SynthesizerTrn (line 339) | class SynthesizerTrn(nn.Module): method __init__ (line 344) | def __init__(self, method EnableCharacterMix (line 456) | def EnableCharacterMix(self, n_speakers_map, device): method forward (line 463) | def forward(self, c, f0, uv, spec, g=None, c_lengths=None, spec_length... method infer (line 496) | def infer(self, c, f0, uv, g=None, noice_scale=0.35, seed=52468, predi... FILE: modules/DSConv.py class Depthwise_Separable_Conv1D (line 5) | class Depthwise_Separable_Conv1D(nn.Module): method __init__ (line 6) | def __init__( method forward (line 23) | def forward(self, input): method weight_norm (line 26) | def weight_norm(self): method remove_weight_norm (line 30) | def remove_weight_norm(self): class Depthwise_Separable_TransposeConv1D (line 34) | class Depthwise_Separable_TransposeConv1D(nn.Module): method __init__ (line 35) | def __init__( method forward (line 53) | def forward(self, input): method weight_norm (line 56) | def weight_norm(self): method remove_weight_norm (line 60) | def remove_weight_norm(self): function weight_norm_modules (line 65) | def weight_norm_modules(module, name = 'weight', dim = 0): function remove_weight_norm_modules (line 72) | def remove_weight_norm_modules(module, name = 'weight'): FILE: modules/F0Predictor/CrepeF0Predictor.py class CrepeF0Predictor (line 7) | class CrepeF0Predictor(F0Predictor): method __init__ (line 8) | def __init__(self,hop_length=512,f0_min=50,f0_max=1100,device=None,sam... method compute_f0 (line 18) | def compute_f0(self,wav,p_len=None): method compute_f0_uv (line 27) | def compute_f0_uv(self,wav,p_len=None): FILE: modules/F0Predictor/DioF0Predictor.py class DioF0Predictor (line 7) | class DioF0Predictor(F0Predictor): method __init__ (line 8) | def __init__(self,hop_length=512,f0_min=50,f0_max=1100,sampling_rate=4... method interpolate_f0 (line 15) | def interpolate_f0(self,f0): method resize_f0 (line 39) | def resize_f0(self,x, target_len): method compute_f0 (line 46) | def compute_f0(self,wav,p_len=None): method compute_f0_uv (line 61) | def compute_f0_uv(self,wav,p_len=None): FILE: modules/F0Predictor/F0Predictor.py class F0Predictor (line 1) | class F0Predictor(object): method compute_f0 (line 2) | def compute_f0(self,wav,p_len): method compute_f0_uv (line 10) | def compute_f0_uv(self,wav,p_len): FILE: modules/F0Predictor/FCPEF0Predictor.py class FCPEF0Predictor (line 12) | class FCPEF0Predictor(F0Predictor): method __init__ (line 13) | def __init__(self, hop_length=512, f0_min=50, f0_max=1100, dtype=torch... method repeat_expand (line 28) | def repeat_expand( method post_process (line 54) | def post_process(self, x, sampling_rate, f0, pad_to): method compute_f0 (line 87) | def compute_f0(self, wav, p_len=None): method compute_f0_uv (line 99) | def compute_f0_uv(self, wav, p_len=None): FILE: modules/F0Predictor/HarvestF0Predictor.py class HarvestF0Predictor (line 7) | class HarvestF0Predictor(F0Predictor): method __init__ (line 8) | def __init__(self,hop_length=512,f0_min=50,f0_max=1100,sampling_rate=4... method interpolate_f0 (line 15) | def interpolate_f0(self,f0): method resize_f0 (line 38) | def resize_f0(self,x, target_len): method compute_f0 (line 45) | def compute_f0(self,wav,p_len=None): method compute_f0_uv (line 58) | def compute_f0_uv(self,wav,p_len=None): FILE: modules/F0Predictor/PMF0Predictor.py class PMF0Predictor (line 7) | class PMF0Predictor(F0Predictor): method __init__ (line 8) | def __init__(self,hop_length=512,f0_min=50,f0_max=1100,sampling_rate=4... method interpolate_f0 (line 15) | def interpolate_f0(self,f0): method compute_f0 (line 40) | def compute_f0(self,wav,p_len=None): method compute_f0_uv (line 57) | def compute_f0_uv(self,wav,p_len=None): FILE: modules/F0Predictor/RMVPEF0Predictor.py class RMVPEF0Predictor (line 12) | class RMVPEF0Predictor(F0Predictor): method __init__ (line 13) | def __init__(self,hop_length=512,f0_min=50,f0_max=1100, dtype=torch.fl... method repeat_expand (line 27) | def repeat_expand( method post_process (line 53) | def post_process(self, x, sampling_rate, f0, pad_to): method compute_f0 (line 85) | def compute_f0(self,wav,p_len=None): method compute_f0_uv (line 97) | def compute_f0_uv(self,wav,p_len=None): FILE: modules/F0Predictor/crepe.py function repeat_expand (line 15) | def repeat_expand( class BasePitchExtractor (line 54) | class BasePitchExtractor: method __init__ (line 55) | def __init__( method __call__ (line 76) | def __call__(self, x, sampling_rate=44100, pad_to=None): method post_process (line 79) | def post_process(self, x, sampling_rate, f0, pad_to): class MaskedAvgPool1d (line 115) | class MaskedAvgPool1d(nn.Module): method __init__ (line 116) | def __init__( method forward (line 132) | def forward(self, x, mask=None): class MaskedMedianPool1d (line 183) | class MaskedMedianPool1d(nn.Module): method __init__ (line 184) | def __init__( method forward (line 203) | def forward(self, x, mask=None): class CrepePitchExtractor (line 255) | class CrepePitchExtractor(BasePitchExtractor): method __init__ (line 256) | def __init__( method __call__ (line 289) | def __call__(self, x, sampling_rate=44100, pad_to=None): FILE: modules/F0Predictor/fcpe/model.py function l2_regularization (line 12) | def l2_regularization(model, l2_alpha): class FCPE (line 20) | class FCPE(nn.Module): method __init__ (line 21) | def __init__( method forward (line 87) | def forward(self, mel, infer=True, gt_f0=None, return_hz_f0=False, cde... method cents_decoder (line 121) | def cents_decoder(self, y, mask=True): method cents_local_decoder (line 135) | def cents_local_decoder(self, y, mask=True): method cent_to_f0 (line 154) | def cent_to_f0(self, cent): method f0_to_cent (line 157) | def f0_to_cent(self, f0): method gaussian_blurred_cent (line 160) | def gaussian_blurred_cent(self, cents): # cents: [B,N,1] class FCPEInfer (line 167) | class FCPEInfer: method __init__ (line 168) | def __init__(self, model_path, device=None, dtype=torch.float32): method __call__ (line 198) | def __call__(self, audio, sr, threshold=0.05): class Wav2Mel (line 206) | class Wav2Mel: method __init__ (line 208) | def __init__(self, args, device=None, dtype=torch.float32): method extract_nvstft (line 227) | def extract_nvstft(self, audio, keyshift=0, train=False): method extract_mel (line 231) | def extract_mel(self, audio, sample_rate, keyshift=0, train=False): method __call__ (line 252) | def __call__(self, audio, sample_rate, keyshift=0, train=False): class DotDict (line 256) | class DotDict(dict): method __getattr__ (line 257) | def __getattr__(*args): FILE: modules/F0Predictor/fcpe/nvSTFT.py function load_wav_to_torch (line 13) | def load_wav_to_torch(full_path, target_sr=None, return_empty_on_excepti... function dynamic_range_compression (line 45) | def dynamic_range_compression(x, C=1, clip_val=1e-5): function dynamic_range_decompression (line 48) | def dynamic_range_decompression(x, C=1): function dynamic_range_compression_torch (line 51) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): function dynamic_range_decompression_torch (line 54) | def dynamic_range_decompression_torch(x, C=1): class STFT (line 57) | class STFT(): method __init__ (line 58) | def __init__(self, sr=22050, n_mels=80, n_fft=1024, win_size=1024, hop... method get_mel (line 71) | def get_mel(self, y, keyshift=0, speed=1, center=False, train=False): method __call__ (line 128) | def __call__(self, audiopath): FILE: modules/F0Predictor/fcpe/pcmer.py function softmax_kernel (line 12) | def softmax_kernel(data, *, projection_matrix, is_query, normalize_data=... function orthogonal_matrix_chunk (line 47) | def orthogonal_matrix_chunk(cols, qr_uniform_q = False, device = None): function exists (line 58) | def exists(val): function empty (line 61) | def empty(tensor): function default (line 64) | def default(val, d): function cast_tuple (line 67) | def cast_tuple(val): class PCmer (line 70) | class PCmer(nn.Module): method __init__ (line 73) | def __init__(self, method forward (line 94) | def forward(self, phone, mask=None): class _EncoderLayer (line 108) | class _EncoderLayer(nn.Module): method __init__ (line 116) | def __init__(self, parent: PCmer): method forward (line 136) | def forward(self, phone, mask=None): function calc_same_padding (line 145) | def calc_same_padding(kernel_size): class Swish (line 151) | class Swish(nn.Module): method forward (line 152) | def forward(self, x): class Transpose (line 155) | class Transpose(nn.Module): method __init__ (line 156) | def __init__(self, dims): method forward (line 161) | def forward(self, x): class GLU (line 164) | class GLU(nn.Module): method __init__ (line 165) | def __init__(self, dim): method forward (line 169) | def forward(self, x): class DepthWiseConv1d (line 173) | class DepthWiseConv1d(nn.Module): method __init__ (line 174) | def __init__(self, chan_in, chan_out, kernel_size, padding): method forward (line 179) | def forward(self, x): class ConformerConvModule (line 183) | class ConformerConvModule(nn.Module): method __init__ (line 184) | def __init__( method forward (line 209) | def forward(self, x): function linear_attention (line 212) | def linear_attention(q, k, v): function gaussian_orthogonal_random_matrix (line 228) | def gaussian_orthogonal_random_matrix(nb_rows, nb_columns, scaling = 0, ... class FastAttention (line 257) | class FastAttention(nn.Module): method __init__ (line 258) | def __init__(self, dim_heads, nb_features = None, ortho_scaling = 0, c... method redraw_projection_matrix (line 280) | def redraw_projection_matrix(self): method forward (line 285) | def forward(self, q, k, v): class SelfAttention (line 304) | class SelfAttention(nn.Module): method __init__ (line 305) | def __init__(self, dim, causal = False, heads = 8, dim_head = 64, loca... method redraw_projection_matrix (line 328) | def redraw_projection_matrix(self): method forward (line 332) | def forward(self, x, context = None, mask = None, context_mask = None,... FILE: modules/F0Predictor/rmvpe/deepunet.py class ConvBlockRes (line 7) | class ConvBlockRes(nn.Module): method __init__ (line 8) | def __init__(self, in_channels, out_channels, momentum=0.01): method forward (line 35) | def forward(self, x): class ResEncoderBlock (line 42) | class ResEncoderBlock(nn.Module): method __init__ (line 43) | def __init__(self, in_channels, out_channels, kernel_size, n_blocks=1,... method forward (line 54) | def forward(self, x): class ResDecoderBlock (line 63) | class ResDecoderBlock(nn.Module): method __init__ (line 64) | def __init__(self, in_channels, out_channels, stride, n_blocks=1, mome... method forward (line 84) | def forward(self, x, concat_tensor): class Encoder (line 92) | class Encoder(nn.Module): method __init__ (line 93) | def __init__(self, in_channels, in_size, n_encoders, kernel_size, n_bl... method forward (line 108) | def forward(self, x): class Intermediate (line 117) | class Intermediate(nn.Module): method __init__ (line 118) | def __init__(self, in_channels, out_channels, n_inters, n_blocks, mome... method forward (line 126) | def forward(self, x): class Decoder (line 132) | class Decoder(nn.Module): method __init__ (line 133) | def __init__(self, in_channels, n_decoders, stride, n_blocks, momentum... method forward (line 142) | def forward(self, x, concat_tensors): class TimbreFilter (line 148) | class TimbreFilter(nn.Module): method __init__ (line 149) | def __init__(self, latent_rep_channels): method forward (line 155) | def forward(self, x_tensors): class DeepUnet (line 162) | class DeepUnet(nn.Module): method __init__ (line 163) | def __init__(self, kernel_size, n_blocks, en_de_layers=5, inter_layers... method forward (line 170) | def forward(self, x): class DeepUnet0 (line 178) | class DeepUnet0(nn.Module): method __init__ (line 179) | def __init__(self, kernel_size, n_blocks, en_de_layers=5, inter_layers... method forward (line 186) | def forward(self, x): FILE: modules/F0Predictor/rmvpe/inference.py class RMVPE (line 11) | class RMVPE: method __init__ (line 12) | def __init__(self, model_path, device=None, dtype = torch.float32, hop... method mel2hidden (line 28) | def mel2hidden(self, mel): method decode (line 35) | def decode(self, hidden, thred=0.03, use_viterbi=False): method infer_from_audio (line 43) | def infer_from_audio(self, audio, sample_rate=16000, thred=0.05, use_v... FILE: modules/F0Predictor/rmvpe/model.py class E2E (line 9) | class E2E(nn.Module): method __init__ (line 10) | def __init__(self, hop_length, n_blocks, n_gru, kernel_size, en_de_lay... method forward (line 30) | def forward(self, x): class E2E0 (line 43) | class E2E0(nn.Module): method __init__ (line 44) | def __init__(self, n_blocks, n_gru, kernel_size, en_de_layers=5, inter... method forward (line 63) | def forward(self, mel): FILE: modules/F0Predictor/rmvpe/seq.py class BiGRU (line 4) | class BiGRU(nn.Module): method __init__ (line 5) | def __init__(self, input_features, hidden_features, num_layers): method forward (line 9) | def forward(self, x): class BiLSTM (line 13) | class BiLSTM(nn.Module): method __init__ (line 14) | def __init__(self, input_features, hidden_features, num_layers): method forward (line 18) | def forward(self, x): FILE: modules/F0Predictor/rmvpe/spec.py class MelSpectrogram (line 7) | class MelSpectrogram(torch.nn.Module): method __init__ (line 8) | def __init__( method forward (line 38) | def forward(self, audio, keyshift=0, speed=1, center=True): FILE: modules/F0Predictor/rmvpe/utils.py function cycle (line 12) | def cycle(iterable): function summary (line 18) | def summary(model, file=sys.stdout): function to_local_average_cents (line 64) | def to_local_average_cents(salience, center=None, thred=0.05): function to_viterbi_cents (line 90) | def to_viterbi_cents(salience, thred=0.05): FILE: modules/attentions.py class FFT (line 12) | class FFT(nn.Module): method __init__ (line 13) | def __init__(self, hidden_channels, filter_channels, n_heads, n_layers... method forward (line 43) | def forward(self, x, x_mask, g = None): class Encoder (line 73) | class Encoder(nn.Module): method __init__ (line 74) | def __init__(self, hidden_channels, filter_channels, n_heads, n_layers... method forward (line 95) | def forward(self, x, x_mask): class Decoder (line 110) | class Decoder(nn.Module): method __init__ (line 111) | def __init__(self, hidden_channels, filter_channels, n_heads, n_layers... method forward (line 137) | def forward(self, x, x_mask, h, h_mask): class MultiHeadAttention (line 161) | class MultiHeadAttention(nn.Module): method __init__ (line 162) | def __init__(self, channels, out_channels, n_heads, p_dropout=0., wind... method forward (line 198) | def forward(self, x, c, attn_mask=None): method attention (line 208) | def attention(self, query, key, value, mask=None): method _matmul_with_relative_values (line 241) | def _matmul_with_relative_values(self, x, y): method _matmul_with_relative_keys (line 250) | def _matmul_with_relative_keys(self, x, y): method _get_relative_embeddings (line 259) | def _get_relative_embeddings(self, relative_embeddings, length): method _relative_position_to_absolute_position (line 274) | def _relative_position_to_absolute_position(self, x): method _absolute_position_to_relative_position (line 291) | def _absolute_position_to_relative_position(self, x): method _attention_bias_proximal (line 305) | def _attention_bias_proximal(self, length): class FFN (line 317) | class FFN(nn.Module): method __init__ (line 318) | def __init__(self, in_channels, out_channels, filter_channels, kernel_... method forward (line 337) | def forward(self, x, x_mask): method _causal_padding (line 347) | def _causal_padding(self, x): method _same_padding (line 356) | def _same_padding(self, x): FILE: modules/commons.py function slice_pitch_segments (line 7) | def slice_pitch_segments(x, ids_str, segment_size=4): function rand_slice_segments_with_pitch (line 15) | def rand_slice_segments_with_pitch(x, pitch, x_lengths=None, segment_siz... function init_weights (line 25) | def init_weights(m, mean=0.0, std=0.01): function get_padding (line 33) | def get_padding(kernel_size, dilation=1): function convert_pad_shape (line 37) | def convert_pad_shape(pad_shape): function intersperse (line 43) | def intersperse(lst, item): function kl_divergence (line 49) | def kl_divergence(m_p, logs_p, m_q, logs_q): function rand_gumbel (line 56) | def rand_gumbel(shape): function rand_gumbel_like (line 62) | def rand_gumbel_like(x): function slice_segments (line 67) | def slice_segments(x, ids_str, segment_size=4): function rand_slice_segments (line 76) | def rand_slice_segments(x, x_lengths=None, segment_size=4): function rand_spec_segments (line 86) | def rand_spec_segments(x, x_lengths=None, segment_size=4): function get_timing_signal_1d (line 96) | def get_timing_signal_1d( function add_timing_signal_1d (line 112) | def add_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4): function cat_timing_signal_1d (line 118) | def cat_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4, axis... function subsequent_mask (line 124) | def subsequent_mask(length): function fused_add_tanh_sigmoid_multiply (line 130) | def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels): function shift_1d (line 139) | def shift_1d(x): function sequence_mask (line 144) | def sequence_mask(length, max_length=None): function generate_path (line 151) | def generate_path(duration, mask): function clip_grad_value_ (line 168) | def clip_grad_value_(parameters, clip_value, norm_type=2): FILE: modules/enhancer.py class Enhancer (line 10) | class Enhancer: method __init__ (line 11) | def __init__(self, enhancer_type, enhancer_ckpt, device=None): method enhance (line 25) | def enhance(self, class NsfHifiGAN (line 80) | class NsfHifiGAN(torch.nn.Module): method __init__ (line 81) | def __init__(self, model_path, device=None): method sample_rate (line 89) | def sample_rate(self): method hop_size (line 92) | def hop_size(self): method forward (line 95) | def forward(self, audio, f0): FILE: modules/losses.py function feature_loss (line 4) | def feature_loss(fmap_r, fmap_g): function discriminator_loss (line 15) | def discriminator_loss(disc_real_outputs, disc_generated_outputs): function generator_loss (line 31) | def generator_loss(disc_outputs): function kl_loss (line 43) | def kl_loss(z_p, logs_q, m_p, logs_p, z_mask): FILE: modules/mel_processing.py function dynamic_range_compression_torch (line 8) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): function dynamic_range_decompression_torch (line 17) | def dynamic_range_decompression_torch(x, C=1): function spectral_normalize_torch (line 26) | def spectral_normalize_torch(magnitudes): function spectral_de_normalize_torch (line 31) | def spectral_de_normalize_torch(magnitudes): function spectrogram_torch (line 40) | def spectrogram_torch(y, n_fft, sampling_rate, hop_size, win_size, cente... function spec_to_mel_torch (line 67) | def spec_to_mel_torch(spec, n_fft, num_mels, sampling_rate, fmin, fmax): function mel_spectrogram_torch (line 79) | def mel_spectrogram_torch(y, n_fft, num_mels, sampling_rate, hop_size, w... FILE: modules/modules.py function set_Conv1dModel (line 18) | def set_Conv1dModel(use_depthwise_conv): class LayerNorm (line 23) | class LayerNorm(nn.Module): method __init__ (line 24) | def __init__(self, channels, eps=1e-5): method forward (line 32) | def forward(self, x): class ConvReluNorm (line 38) | class ConvReluNorm(nn.Module): method __init__ (line 39) | def __init__(self, in_channels, hidden_channels, out_channels, kernel_... method forward (line 63) | def forward(self, x, x_mask): class WN (line 73) | class WN(torch.nn.Module): method __init__ (line 74) | def __init__(self, hidden_channels, kernel_size, dilation_rate, n_laye... method forward (line 110) | def forward(self, x, x_mask, g=None, **kwargs): method remove_weight_norm (line 140) | def remove_weight_norm(self): class ResBlock1 (line 149) | class ResBlock1(torch.nn.Module): method __init__ (line 150) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5)): method forward (line 172) | def forward(self, x, x_mask=None): method remove_weight_norm (line 187) | def remove_weight_norm(self): class ResBlock2 (line 194) | class ResBlock2(torch.nn.Module): method __init__ (line 195) | def __init__(self, channels, kernel_size=3, dilation=(1, 3)): method forward (line 205) | def forward(self, x, x_mask=None): method remove_weight_norm (line 216) | def remove_weight_norm(self): class Log (line 221) | class Log(nn.Module): method forward (line 222) | def forward(self, x, x_mask, reverse=False, **kwargs): class Flip (line 232) | class Flip(nn.Module): method forward (line 233) | def forward(self, x, *args, reverse=False, **kwargs): class ElementwiseAffine (line 242) | class ElementwiseAffine(nn.Module): method __init__ (line 243) | def __init__(self, channels): method forward (line 249) | def forward(self, x, x_mask, reverse=False, **kwargs): class ResidualCouplingLayer (line 260) | class ResidualCouplingLayer(nn.Module): method __init__ (line 261) | def __init__(self, method forward (line 288) | def forward(self, x, x_mask, g=None, reverse=False): class TransformerCouplingLayer (line 309) | class TransformerCouplingLayer(nn.Module): method __init__ (line 310) | def __init__(self, method forward (line 337) | def forward(self, x, x_mask, g=None, reverse=False): FILE: onnx_export.py function OnnxExport (line 11) | def OnnxExport(path=None): FILE: onnx_export_old.py function main (line 7) | def main(NetExport): FILE: onnxexport/model_onnx.py class ResidualCouplingBlock (line 16) | class ResidualCouplingBlock(nn.Module): method __init__ (line 17) | def __init__(self, method forward (line 41) | def forward(self, x, x_mask, g=None, reverse=False): class Encoder (line 51) | class Encoder(nn.Module): method __init__ (line 52) | def __init__(self, method forward (line 73) | def forward(self, x, x_lengths, g=None): class TextEncoder (line 84) | class TextEncoder(nn.Module): method __init__ (line 85) | def __init__(self, method forward (line 111) | def forward(self, x, x_mask, f0=None, z=None): class DiscriminatorP (line 120) | class DiscriminatorP(torch.nn.Module): method __init__ (line 121) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=... method forward (line 135) | def forward(self, x): class DiscriminatorS (line 157) | class DiscriminatorS(torch.nn.Module): method __init__ (line 158) | def __init__(self, use_spectral_norm=False): method forward (line 171) | def forward(self, x): class F0Decoder (line 185) | class F0Decoder(nn.Module): method __init__ (line 186) | def __init__(self, method forward (line 217) | def forward(self, x, norm_f0, x_mask, spk_emb=None): class SynthesizerTrn (line 228) | class SynthesizerTrn(nn.Module): method __init__ (line 233) | def __init__(self, method forward (line 312) | def forward(self, c, f0, mel2ph, uv, noise=None, g=None): FILE: onnxexport/model_onnx_speaker_mix.py class ResidualCouplingBlock (line 12) | class ResidualCouplingBlock(nn.Module): method __init__ (line 13) | def __init__(self, method forward (line 42) | def forward(self, x, x_mask, g=None, reverse=False): class TransformerCouplingBlock (line 51) | class TransformerCouplingBlock(nn.Module): method __init__ (line 52) | def __init__(self, method forward (line 82) | def forward(self, x, x_mask, g=None, reverse=False): class Encoder (line 92) | class Encoder(nn.Module): method __init__ (line 93) | def __init__(self, method forward (line 114) | def forward(self, x, x_lengths, g=None): class TextEncoder (line 125) | class TextEncoder(nn.Module): method __init__ (line 126) | def __init__(self, method forward (line 152) | def forward(self, x, x_mask, f0=None, z=None): class F0Decoder (line 162) | class F0Decoder(nn.Module): method __init__ (line 163) | def __init__(self, method forward (line 194) | def forward(self, x, norm_f0, x_mask, spk_emb=None): class SynthesizerTrn (line 205) | class SynthesizerTrn(nn.Module): method __init__ (line 210) | def __init__(self, method export_chara_mix (line 324) | def export_chara_mix(self, speakers_mix): method forward (line 334) | def forward(self, c, f0, mel2ph, uv, noise=None, g=None, vol = None): FILE: preprocess_flist_config.py function get_wav_duration (line 15) | def get_wav_duration(file_path): FILE: preprocess_hubert_f0.py function process_one (line 31) | def process_one(filename, hmodel, f0p, device, diff=False, mel_extractor... function process_batch (line 106) | def process_batch(file_chunk, f0p, diff=False, mel_extractor=None, devic... function parallel_process (line 119) | def parallel_process(filenames, num_processes, f0p, diff, mel_extractor,... FILE: resample.py function load_wav (line 13) | def load_wav(wav_path): function trim_wav (line 17) | def trim_wav(wav, top_db=40): function normalize_peak (line 21) | def normalize_peak(wav, threshold=1.0): function resample_wav (line 28) | def resample_wav(wav, sr, target_sr): function save_wav_to_path (line 32) | def save_wav_to_path(wav, save_path, sr): function process (line 40) | def process(item): function process_all_speakers (line 76) | def process_all_speakers(): FILE: train.py function main (line 35) | def main(): function run (line 47) | def run(rank, n_gpus, hps): function train_and_evaluate (line 135) | def train_and_evaluate(rank, epoch, hps, nets, optims, schedulers, scale... function evaluate (line 276) | def evaluate(hps, generator, eval_loader, writer_eval): FILE: train_diff.py function parse_args (line 14) | def parse_args(args=None, namespace=None): FILE: utils.py function normalize_f0 (line 31) | def normalize_f0(f0, x_mask, uv, random_scale=True): function plot_data_to_numpy (line 46) | def plot_data_to_numpy(x, y): function f0_to_coarse (line 69) | def f0_to_coarse(f0): function get_content (line 82) | def get_content(cmodel, y): function get_f0_predictor (line 88) | def get_f0_predictor(f0_predictor,hop_length,sampling_rate,**kargs): function get_speech_encoder (line 111) | def get_speech_encoder(speech_encoder,device=None,**kargs): function load_checkpoint (line 155) | def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimiz... function save_checkpoint (line 190) | def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoi... function clean_checkpoints (line 202) | def clean_checkpoints(path_to_models='logs/44k/', n_ckpts_to_keep=2, sor... function summarize (line 227) | def summarize(writer, global_step, scalars={}, histograms={}, images={},... function latest_checkpoint_path (line 238) | def latest_checkpoint_path(dir_path, regex="G_*.pth"): function plot_spectrogram_to_numpy (line 246) | def plot_spectrogram_to_numpy(spectrogram): function plot_alignment_to_numpy (line 272) | def plot_alignment_to_numpy(alignment, info=None): function load_wav_to_torch (line 301) | def load_wav_to_torch(full_path): function load_filepaths_and_text (line 306) | def load_filepaths_and_text(filename, split="|"): function get_hparams (line 312) | def get_hparams(init=True): function get_hparams_from_dir (line 342) | def get_hparams_from_dir(model_dir): function get_hparams_from_file (line 353) | def get_hparams_from_file(config_path, infer_mode = False): function check_git_hash (line 361) | def check_git_hash(model_dir): function get_logger (line 381) | def get_logger(model_dir, filename="train.log"): function repeat_expand_2d (line 396) | def repeat_expand_2d(content, target_len, mode = 'left'): function repeat_expand_2d_left (line 402) | def repeat_expand_2d_left(content, target_len): function repeat_expand_2d_other (line 420) | def repeat_expand_2d_other(content, target_len, mode = 'nearest'): function mix_model (line 427) | def mix_model(model_paths,mix_rate,mode): function change_rms (line 440) | def change_rms(data1, sr1, data2, sr2, rate): # 1是输入音频,2是输出音频,rate是2的占比... function train_index (line 461) | def train_index(spk_name,root_dir = "dataset/44k/"): #from: RVC https:/... class HParams (line 514) | class HParams(): method __init__ (line 515) | def __init__(self, **kwargs): method keys (line 521) | def keys(self): method items (line 524) | def items(self): method values (line 527) | def values(self): method __len__ (line 530) | def __len__(self): method __getitem__ (line 533) | def __getitem__(self, key): method __setitem__ (line 536) | def __setitem__(self, key, value): method __contains__ (line 539) | def __contains__(self, key): method __repr__ (line 542) | def __repr__(self): method get (line 545) | def get(self,index): class InferHParams (line 549) | class InferHParams(HParams): method __init__ (line 550) | def __init__(self, **kwargs): method __getattr__ (line 556) | def __getattr__(self,index): class Volume_Extractor (line 560) | class Volume_Extractor: method __init__ (line 561) | def __init__(self, hop_size = 512): method extract (line 564) | def extract(self, audio): # audio: 2d tensor array FILE: vdecoder/hifigan/env.py class AttrDict (line 5) | class AttrDict(dict): method __init__ (line 6) | def __init__(self, *args, **kwargs): function build_env (line 11) | def build_env(config, config_name, path): FILE: vdecoder/hifigan/models.py function load_model (line 17) | def load_model(model_path, device='cuda'): class ResBlock1 (line 36) | class ResBlock1(torch.nn.Module): method __init__ (line 37) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3, 5)): method forward (line 60) | def forward(self, x): method remove_weight_norm (line 69) | def remove_weight_norm(self): class ResBlock2 (line 76) | class ResBlock2(torch.nn.Module): method __init__ (line 77) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3)): method forward (line 88) | def forward(self, x): method remove_weight_norm (line 95) | def remove_weight_norm(self): function padDiff (line 100) | def padDiff(x): class SineGen (line 103) | class SineGen(torch.nn.Module): method __init__ (line 119) | def __init__(self, samp_rate, harmonic_num=0, method _f02uv (line 133) | def _f02uv(self, f0): method _f02sine (line 138) | def _f02sine(self, f0_values): method forward (line 197) | def forward(self, f0, upp=None): class SourceModuleHnNSF (line 274) | class SourceModuleHnNSF(torch.nn.Module): method __init__ (line 292) | def __init__(self, sampling_rate, harmonic_num=0, sine_amp=0.1, method forward (line 307) | def forward(self, x, upp=None): class Generator (line 323) | class Generator(torch.nn.Module): method __init__ (line 324) | def __init__(self, h): method OnnxExport (line 362) | def OnnxExport(self): method forward (line 366) | def forward(self, x, f0, g=None): method remove_weight_norm (line 396) | def remove_weight_norm(self): class DiscriminatorP (line 406) | class DiscriminatorP(torch.nn.Module): method __init__ (line 407) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=... method forward (line 420) | def forward(self, x): class MultiPeriodDiscriminator (line 442) | class MultiPeriodDiscriminator(torch.nn.Module): method __init__ (line 443) | def __init__(self, periods=None): method forward (line 450) | def forward(self, y, y_hat): class DiscriminatorS (line 466) | class DiscriminatorS(torch.nn.Module): method __init__ (line 467) | def __init__(self, use_spectral_norm=False): method forward (line 481) | def forward(self, x): class MultiScaleDiscriminator (line 494) | class MultiScaleDiscriminator(torch.nn.Module): method __init__ (line 495) | def __init__(self): method forward (line 507) | def forward(self, y, y_hat): function feature_loss (line 526) | def feature_loss(fmap_r, fmap_g): function discriminator_loss (line 535) | def discriminator_loss(disc_real_outputs, disc_generated_outputs): function generator_loss (line 549) | def generator_loss(disc_outputs): FILE: vdecoder/hifigan/nvSTFT.py function load_wav_to_torch (line 12) | def load_wav_to_torch(full_path, target_sr=None, return_empty_on_excepti... function dynamic_range_compression (line 44) | def dynamic_range_compression(x, C=1, clip_val=1e-5): function dynamic_range_decompression (line 47) | def dynamic_range_decompression(x, C=1): function dynamic_range_compression_torch (line 50) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): function dynamic_range_decompression_torch (line 53) | def dynamic_range_decompression_torch(x, C=1): class STFT (line 56) | class STFT(): method __init__ (line 57) | def __init__(self, sr=22050, n_mels=80, n_fft=1024, win_size=1024, hop... method get_mel (line 70) | def get_mel(self, y, center=False): method __call__ (line 104) | def __call__(self, audiopath): FILE: vdecoder/hifigan/utils.py function plot_spectrogram (line 10) | def plot_spectrogram(spectrogram): function init_weights (line 22) | def init_weights(m, mean=0.0, std=0.01): function apply_weight_norm (line 28) | def apply_weight_norm(m): function get_padding (line 34) | def get_padding(kernel_size, dilation=1): function load_checkpoint (line 38) | def load_checkpoint(filepath, device): function save_checkpoint (line 46) | def save_checkpoint(filepath, obj): function del_old_checkpoints (line 52) | def del_old_checkpoints(cp_dir, prefix, n_models=2): function scan_checkpoint (line 62) | def scan_checkpoint(cp_dir, prefix): FILE: vdecoder/hifiganwithsnake/alias/act.py class Activation1d (line 13) | class Activation1d(nn.Module): method __init__ (line 14) | def __init__(self, method forward (line 28) | def forward(self, x): class SnakeBeta (line 36) | class SnakeBeta(nn.Module): method __init__ (line 54) | def __init__(self, in_features, alpha=1.0, alpha_trainable=True, alpha... method forward (line 79) | def forward(self, x): class Mish (line 95) | class Mish(nn.Module): method __init__ (line 102) | def __init__(self): method forward (line 105) | def forward(self, x): class SnakeAlias (line 109) | class SnakeAlias(nn.Module): method __init__ (line 110) | def __init__(self, method forward (line 125) | def forward(self, x, C=None): FILE: vdecoder/hifiganwithsnake/alias/filter.py function sinc (line 16) | def sinc(x: torch.Tensor): function kaiser_sinc_filter1d (line 29) | def kaiser_sinc_filter1d(cutoff, half_width, kernel_size): # return filt... class LowPassFilter1d (line 61) | class LowPassFilter1d(nn.Module): method __init__ (line 62) | def __init__(self, method forward (line 93) | def forward(self, x): FILE: vdecoder/hifiganwithsnake/alias/resample.py class UpSample1d (line 10) | class UpSample1d(nn.Module): method __init__ (line 11) | def __init__(self, ratio=2, kernel_size=None, C=None): method forward (line 38) | def forward(self, x, C=None): class DownSample1d (line 57) | class DownSample1d(nn.Module): method __init__ (line 58) | def __init__(self, ratio=2, kernel_size=None, C=None): method forward (line 69) | def forward(self, x): FILE: vdecoder/hifiganwithsnake/env.py class AttrDict (line 5) | class AttrDict(dict): method __init__ (line 6) | def __init__(self, *args, **kwargs): function build_env (line 11) | def build_env(config, config_name, path): FILE: vdecoder/hifiganwithsnake/models.py function load_model (line 19) | def load_model(model_path, device='cuda'): class ResBlock1 (line 38) | class ResBlock1(torch.nn.Module): method __init__ (line 39) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3, 5), C=N... method forward (line 67) | def forward(self, x, DIM=None): method remove_weight_norm (line 77) | def remove_weight_norm(self): class ResBlock2 (line 84) | class ResBlock2(torch.nn.Module): method __init__ (line 85) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3), C=None): method forward (line 101) | def forward(self, x, DIM=None): method remove_weight_norm (line 108) | def remove_weight_norm(self): function padDiff (line 113) | def padDiff(x): class SineGen (line 116) | class SineGen(torch.nn.Module): method __init__ (line 132) | def __init__(self, samp_rate, harmonic_num=0, method _f02uv (line 146) | def _f02uv(self, f0): method _f02sine (line 151) | def _f02sine(self, f0_values): method forward (line 210) | def forward(self, f0, upp=None): class SourceModuleHnNSF (line 288) | class SourceModuleHnNSF(torch.nn.Module): method __init__ (line 306) | def __init__(self, sampling_rate, harmonic_num=0, sine_amp=0.1, method forward (line 321) | def forward(self, x, upp=None): class Generator (line 337) | class Generator(torch.nn.Module): method __init__ (line 338) | def __init__(self, h): method OnnxExport (line 379) | def OnnxExport(self): method forward (line 383) | def forward(self, x, f0, g=None): method remove_weight_norm (line 415) | def remove_weight_norm(self): class DiscriminatorP (line 425) | class DiscriminatorP(torch.nn.Module): method __init__ (line 426) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=... method forward (line 439) | def forward(self, x): class MultiPeriodDiscriminator (line 461) | class MultiPeriodDiscriminator(torch.nn.Module): method __init__ (line 462) | def __init__(self, periods=None): method forward (line 469) | def forward(self, y, y_hat): class DiscriminatorS (line 485) | class DiscriminatorS(torch.nn.Module): method __init__ (line 486) | def __init__(self, use_spectral_norm=False): method forward (line 500) | def forward(self, x): class MultiScaleDiscriminator (line 513) | class MultiScaleDiscriminator(torch.nn.Module): method __init__ (line 514) | def __init__(self): method forward (line 526) | def forward(self, y, y_hat): function feature_loss (line 545) | def feature_loss(fmap_r, fmap_g): function discriminator_loss (line 554) | def discriminator_loss(disc_real_outputs, disc_generated_outputs): function generator_loss (line 568) | def generator_loss(disc_outputs): FILE: vdecoder/hifiganwithsnake/nvSTFT.py function load_wav_to_torch (line 12) | def load_wav_to_torch(full_path, target_sr=None, return_empty_on_excepti... function dynamic_range_compression (line 44) | def dynamic_range_compression(x, C=1, clip_val=1e-5): function dynamic_range_decompression (line 47) | def dynamic_range_decompression(x, C=1): function dynamic_range_compression_torch (line 50) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): function dynamic_range_decompression_torch (line 53) | def dynamic_range_decompression_torch(x, C=1): class STFT (line 56) | class STFT(): method __init__ (line 57) | def __init__(self, sr=22050, n_mels=80, n_fft=1024, win_size=1024, hop... method get_mel (line 70) | def get_mel(self, y, center=False): method __call__ (line 104) | def __call__(self, audiopath): FILE: vdecoder/hifiganwithsnake/utils.py function plot_spectrogram (line 10) | def plot_spectrogram(spectrogram): function init_weights (line 22) | def init_weights(m, mean=0.0, std=0.01): function apply_weight_norm (line 28) | def apply_weight_norm(m): function get_padding (line 34) | def get_padding(kernel_size, dilation=1): function load_checkpoint (line 38) | def load_checkpoint(filepath, device): function save_checkpoint (line 46) | def save_checkpoint(filepath, obj): function del_old_checkpoints (line 52) | def del_old_checkpoints(cp_dir, prefix, n_models=2): function scan_checkpoint (line 62) | def scan_checkpoint(cp_dir, prefix): FILE: vdecoder/nsf_hifigan/env.py class AttrDict (line 5) | class AttrDict(dict): method __init__ (line 6) | def __init__(self, *args, **kwargs): function build_env (line 11) | def build_env(config, config_name, path): FILE: vdecoder/nsf_hifigan/models.py function load_model (line 17) | def load_model(model_path, device='cuda'): function load_config (line 29) | def load_config(model_path): class ResBlock1 (line 39) | class ResBlock1(torch.nn.Module): method __init__ (line 40) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3, 5)): method forward (line 63) | def forward(self, x): method remove_weight_norm (line 72) | def remove_weight_norm(self): class ResBlock2 (line 79) | class ResBlock2(torch.nn.Module): method __init__ (line 80) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3)): method forward (line 91) | def forward(self, x): method remove_weight_norm (line 98) | def remove_weight_norm(self): class SineGen (line 103) | class SineGen(torch.nn.Module): method __init__ (line 119) | def __init__(self, samp_rate, harmonic_num=0, method _f02uv (line 130) | def _f02uv(self, f0): method forward (line 137) | def forward(self, f0, upp): class SourceModuleHnNSF (line 182) | class SourceModuleHnNSF(torch.nn.Module): method __init__ (line 200) | def __init__(self, sampling_rate, harmonic_num=0, sine_amp=0.1, method forward (line 215) | def forward(self, x, upp): class Generator (line 221) | class Generator(torch.nn.Module): method __init__ (line 222) | def __init__(self, h): method forward (line 259) | def forward(self, x, f0): method remove_weight_norm (line 280) | def remove_weight_norm(self): class DiscriminatorP (line 290) | class DiscriminatorP(torch.nn.Module): method __init__ (line 291) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=... method forward (line 304) | def forward(self, x): class MultiPeriodDiscriminator (line 326) | class MultiPeriodDiscriminator(torch.nn.Module): method __init__ (line 327) | def __init__(self, periods=None): method forward (line 334) | def forward(self, y, y_hat): class DiscriminatorS (line 350) | class DiscriminatorS(torch.nn.Module): method __init__ (line 351) | def __init__(self, use_spectral_norm=False): method forward (line 365) | def forward(self, x): class MultiScaleDiscriminator (line 378) | class MultiScaleDiscriminator(torch.nn.Module): method __init__ (line 379) | def __init__(self): method forward (line 391) | def forward(self, y, y_hat): function feature_loss (line 410) | def feature_loss(fmap_r, fmap_g): function discriminator_loss (line 419) | def discriminator_loss(disc_real_outputs, disc_generated_outputs): function generator_loss (line 433) | def generator_loss(disc_outputs): FILE: vdecoder/nsf_hifigan/nvSTFT.py function load_wav_to_torch (line 13) | def load_wav_to_torch(full_path, target_sr=None, return_empty_on_excepti... function dynamic_range_compression (line 45) | def dynamic_range_compression(x, C=1, clip_val=1e-5): function dynamic_range_decompression (line 48) | def dynamic_range_decompression(x, C=1): function dynamic_range_compression_torch (line 51) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): function dynamic_range_decompression_torch (line 54) | def dynamic_range_decompression_torch(x, C=1): class STFT (line 57) | class STFT(): method __init__ (line 58) | def __init__(self, sr=22050, n_mels=80, n_fft=1024, win_size=1024, hop... method get_mel (line 71) | def get_mel(self, y, keyshift=0, speed=1, center=False): method __call__ (line 127) | def __call__(self, audiopath): FILE: vdecoder/nsf_hifigan/utils.py function plot_spectrogram (line 12) | def plot_spectrogram(spectrogram): function init_weights (line 24) | def init_weights(m, mean=0.0, std=0.01): function apply_weight_norm (line 30) | def apply_weight_norm(m): function get_padding (line 36) | def get_padding(kernel_size, dilation=1): function load_checkpoint (line 40) | def load_checkpoint(filepath, device): function save_checkpoint (line 48) | def save_checkpoint(filepath, obj): function del_old_checkpoints (line 54) | def del_old_checkpoints(cp_dir, prefix, n_models=2): function scan_checkpoint (line 64) | def scan_checkpoint(cp_dir, prefix): FILE: vencoder/CNHubertLarge.py class CNHubertLarge (line 7) | class CNHubertLarge(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/chinese-hubert-large-fairseq-ckp... method encoder (line 23) | def encoder(self, wav): FILE: vencoder/ContentVec256L12_Onnx.py class ContentVec256L12_Onnx (line 7) | class ContentVec256L12_Onnx(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/vec-256-layer-12.onnx", device=N... method encoder (line 24) | def encoder(self, wav): FILE: vencoder/ContentVec256L9.py class ContentVec256L9 (line 7) | class ContentVec256L9(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/checkpoint_best_legacy_500.pt", ... method encoder (line 23) | def encoder(self, wav): FILE: vencoder/ContentVec256L9_Onnx.py class ContentVec256L9_Onnx (line 7) | class ContentVec256L9_Onnx(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/vec-256-layer-9.onnx", device=No... method encoder (line 22) | def encoder(self, wav): FILE: vencoder/ContentVec768L12.py class ContentVec768L12 (line 7) | class ContentVec768L12(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/checkpoint_best_legacy_500.pt", ... method encoder (line 23) | def encoder(self, wav): FILE: vencoder/ContentVec768L12_Onnx.py class ContentVec768L12_Onnx (line 7) | class ContentVec768L12_Onnx(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/vec-768-layer-12.onnx", device=N... method encoder (line 24) | def encoder(self, wav): FILE: vencoder/ContentVec768L9_Onnx.py class ContentVec768L9_Onnx (line 7) | class ContentVec768L9_Onnx(SpeechEncoder): method __init__ (line 8) | def __init__(self,vec_path = "pretrain/vec-768-layer-9.onnx",device=No... method encoder (line 24) | def encoder(self, wav): FILE: vencoder/DPHubert.py class DPHubert (line 7) | class DPHubert(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/DPHuBERT-sp0.75.pth", device=None): method encoder (line 20) | def encoder(self, wav): FILE: vencoder/HubertSoft.py class HubertSoft (line 7) | class HubertSoft(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/hubert-soft-0d54a1f4.pt", device... method encoder (line 19) | def encoder(self, wav): FILE: vencoder/HubertSoft_Onnx.py class HubertSoft_Onnx (line 7) | class HubertSoft_Onnx(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/hubert-soft.onnx", device=None): method encoder (line 24) | def encoder(self, wav): FILE: vencoder/WavLMBasePlus.py class WavLMBasePlus (line 7) | class WavLMBasePlus(SpeechEncoder): method __init__ (line 8) | def __init__(self, vec_path="pretrain/WavLM-Base+.pt", device=None): method encoder (line 22) | def encoder(self, wav): FILE: vencoder/WhisperPPG.py class WhisperPPG (line 8) | class WhisperPPG(SpeechEncoder): method __init__ (line 9) | def __init__(self, vec_path="pretrain/medium.pt", device=None): method encoder (line 22) | def encoder(self, wav): FILE: vencoder/WhisperPPGLarge.py class WhisperPPGLarge (line 8) | class WhisperPPGLarge(SpeechEncoder): method __init__ (line 9) | def __init__(self, vec_path="pretrain/large-v2.pt", device=None): method encoder (line 22) | def encoder(self, wav): FILE: vencoder/dphubert/components.py function _init_transformer_params (line 24) | def _init_transformer_params(module): class LayerNorm (line 54) | class LayerNorm(nn.LayerNorm): method forward (line 57) | def forward(self, input: Tensor) -> Tensor: class ConvLayerBlock (line 64) | class ConvLayerBlock(Module): method __init__ (line 67) | def __init__( method forward (line 94) | def forward( method get_num_params_and_out_channels (line 122) | def get_num_params_and_out_channels(self, in_channels): class FeatureExtractor (line 137) | class FeatureExtractor(Module): method __init__ (line 145) | def __init__( method forward (line 158) | def forward( method get_num_params_and_final_out_channels (line 187) | def get_num_params_and_final_out_channels(self): method prune (line 198) | def prune(self): class FeatureProjection (line 238) | class FeatureProjection(Module): method __init__ (line 249) | def __init__( method forward (line 263) | def forward(self, x): method get_num_params (line 276) | def get_num_params(self, in_features): class ConvolutionalPositionalEmbedding (line 280) | class ConvolutionalPositionalEmbedding(Module): method __init__ (line 289) | def __init__( method __prepare_scriptable__ (line 309) | def __prepare_scriptable__(self): method forward (line 319) | def forward(self, x): class SelfAttention (line 336) | class SelfAttention(Module): method __init__ (line 346) | def __init__( method forward (line 379) | def forward( method get_num_params (line 438) | def get_num_params(self): method prune (line 451) | def prune(self): class WavLMSelfAttention (line 486) | class WavLMSelfAttention(SelfAttention): method __init__ (line 501) | def __init__( method compute_bias (line 546) | def compute_bias(self, query_length: int, key_length: int) -> Tensor: method _relative_positions_bucket (line 563) | def _relative_positions_bucket(self, relative_positions: Tensor, bidir... method forward (line 602) | def forward( method prune (line 661) | def prune(self): class FeedForward (line 696) | class FeedForward(Module): method __init__ (line 699) | def __init__( method forward (line 726) | def forward(self, x): method get_num_params (line 750) | def get_num_params(self): method prune (line 763) | def prune(self): class EncoderLayer (line 794) | class EncoderLayer(Module): method __init__ (line 797) | def __init__( method forward (line 814) | def forward( method get_num_params (line 859) | def get_num_params(self): class Transformer (line 868) | class Transformer(Module): method __init__ (line 869) | def __init__( method _preprocess (line 885) | def _preprocess(self, x: Tensor): method forward (line 894) | def forward( method get_intermediate_outputs (line 909) | def get_intermediate_outputs( method get_num_params (line 929) | def get_num_params(self): method prune (line 936) | def prune(self): class Encoder (line 958) | class Encoder(Module): method __init__ (line 959) | def __init__( method _preprocess (line 968) | def _preprocess( method forward (line 986) | def forward( method extract_features (line 995) | def extract_features( method get_num_params (line 1005) | def get_num_params(self, in_features): method prune (line 1011) | def prune(self, conv_out_index): function _get_feature_extractor (line 1020) | def _get_feature_extractor( function _get_encoder (line 1097) | def _get_encoder( function _get_wavlm_encoder (line 1289) | def _get_wavlm_encoder( function _get_padding_mask (line 1387) | def _get_padding_mask(input: Tensor, lengths: Tensor) -> Tensor: class GradMultiply (line 1401) | class GradMultiply(torch.autograd.Function): method forward (line 1403) | def forward(ctx, x, scale): method backward (line 1409) | def backward(ctx, grad): FILE: vencoder/dphubert/hardconcrete.py class HardConcrete (line 14) | class HardConcrete(nn.Module): method __init__ (line 28) | def __init__( method reset_parameters (line 70) | def reset_parameters(self): method l0_norm (line 76) | def l0_norm(self) -> torch.Tensor: method forward (line 85) | def forward(self) -> torch.Tensor: method extra_repr (line 118) | def extra_repr(self) -> str: method __repr__ (line 121) | def __repr__(self) -> str: FILE: vencoder/dphubert/model.py class Wav2Vec2Model (line 19) | class Wav2Vec2Model(Module): method __init__ (line 44) | def __init__( method extract_features (line 58) | def extract_features( method get_num_params (line 109) | def get_num_params(self): method prune (line 115) | def prune(self): method forward (line 127) | def forward( function wav2vec2_model (line 172) | def wav2vec2_model(**configs) -> Wav2Vec2Model: function wav2vec2_model_original (line 181) | def wav2vec2_model_original( function wav2vec2_base (line 364) | def wav2vec2_base( function wav2vec2_large (line 422) | def wav2vec2_large( function wav2vec2_large_lv60k (line 480) | def wav2vec2_large_lv60k( function hubert_base (line 538) | def hubert_base( function hubert_large (line 599) | def hubert_large( function hubert_xlarge (line 657) | def hubert_xlarge( function _init_hubert_pretrain_model (line 715) | def _init_hubert_pretrain_model(module): function wavlm_model (line 736) | def wavlm_model( function wavlm_base (line 865) | def wavlm_base( function wavlm_large (line 917) | def wavlm_large( FILE: vencoder/dphubert/pruning_utils.py function prune_linear_layer (line 9) | def prune_linear_layer(layer: nn.Linear, index: torch.LongTensor, dim: s... function prune_conv1d_layer (line 26) | def prune_conv1d_layer(layer: nn.Conv1d, index: torch.LongTensor, dim: s... function prune_layer_norm (line 43) | def prune_layer_norm(layernorm: Union[nn.LayerNorm, nn.GroupNorm], index... FILE: vencoder/dphubert/utils/import_huggingface_wavlm.py function _get_config (line 18) | def _get_config(cfg): function _get_config_wavlm (line 39) | def _get_config_wavlm(cfg): function _build (line 66) | def _build(config, original): function transform_wavlm_encoder_state (line 93) | def transform_wavlm_encoder_state(state: Dict[str, Any], encoder_num_lay... function import_huggingface_model (line 100) | def import_huggingface_model(original: Module) -> Wav2Vec2Model: FILE: vencoder/encoder.py class SpeechEncoder (line 1) | class SpeechEncoder(object): method __init__ (line 2) | def __init__(self, vec_path="pretrain/checkpoint_best_legacy_500.pt", ... method encoder (line 8) | def encoder(self, wav): FILE: vencoder/hubert/hubert_model.py class Hubert (line 11) | class Hubert(nn.Module): method __init__ (line 12) | def __init__(self, num_label_embeddings: int = 100, mask: bool = True): method mask (line 31) | def mask(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: method encode (line 38) | def encode( method logits (line 49) | def logits(self, x: torch.Tensor) -> torch.Tensor: method forward (line 57) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: class HubertSoft (line 64) | class HubertSoft(Hubert): method __init__ (line 65) | def __init__(self): method units (line 69) | def units(self, wav: torch.Tensor) -> torch.Tensor: class FeatureExtractor (line 75) | class FeatureExtractor(nn.Module): method __init__ (line 76) | def __init__(self): method forward (line 87) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FeatureProjection (line 98) | class FeatureProjection(nn.Module): method __init__ (line 99) | def __init__(self): method forward (line 105) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PositionalConvEmbedding (line 112) | class PositionalConvEmbedding(nn.Module): method __init__ (line 113) | def __init__(self): method forward (line 124) | def forward(self, x: torch.Tensor) -> torch.Tensor: class TransformerEncoder (line 130) | class TransformerEncoder(nn.Module): method __init__ (line 131) | def __init__( method forward (line 140) | def forward( function _compute_mask (line 155) | def _compute_mask( function hubert_soft (line 210) | def hubert_soft( FILE: vencoder/hubert/hubert_model_onnx.py class Hubert (line 11) | class Hubert(nn.Module): method __init__ (line 12) | def __init__(self, num_label_embeddings: int = 100, mask: bool = True): method mask (line 31) | def mask(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: method encode (line 38) | def encode( method logits (line 49) | def logits(self, x: torch.Tensor) -> torch.Tensor: class HubertSoft (line 58) | class HubertSoft(Hubert): method __init__ (line 59) | def __init__(self): method units (line 62) | def units(self, wav: torch.Tensor) -> torch.Tensor: method forward (line 67) | def forward(self, x): class FeatureExtractor (line 70) | class FeatureExtractor(nn.Module): method __init__ (line 71) | def __init__(self): method forward (line 82) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FeatureProjection (line 93) | class FeatureProjection(nn.Module): method __init__ (line 94) | def __init__(self): method forward (line 100) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PositionalConvEmbedding (line 107) | class PositionalConvEmbedding(nn.Module): method __init__ (line 108) | def __init__(self): method forward (line 119) | def forward(self, x: torch.Tensor) -> torch.Tensor: class TransformerEncoder (line 125) | class TransformerEncoder(nn.Module): method __init__ (line 126) | def __init__( method forward (line 135) | def forward( function _compute_mask (line 150) | def _compute_mask( function hubert_soft (line 205) | def hubert_soft( FILE: vencoder/wavlm/WavLM.py function compute_mask_indices (line 35) | def compute_mask_indices( class WavLMConfig (line 162) | class WavLMConfig: method __init__ (line 163) | def __init__(self, cfg=None): method update (line 216) | def update(self, cfg: dict): class WavLM (line 220) | class WavLM(nn.Module): method __init__ (line 221) | def __init__( method apply_mask (line 271) | def apply_mask(self, x, padding_mask): method forward_padding_mask (line 311) | def forward_padding_mask( method extract_features (line 323) | def extract_features( class ConvFeatureExtractionModel (line 378) | class ConvFeatureExtractionModel(nn.Module): method __init__ (line 379) | def __init__( method forward (line 483) | def forward(self, x, mask=None): class TransformerEncoder (line 505) | class TransformerEncoder(nn.Module): method __init__ (line 506) | def __init__(self, args): method forward (line 562) | def forward(self, x, padding_mask=None, streaming_mask=None, layer=None): method extract_features (line 570) | def extract_features(self, x, padding_mask=None, streaming_mask=None, ... class TransformerSentenceEncoderLayer (line 613) | class TransformerSentenceEncoderLayer(nn.Module): method __init__ (line 619) | def __init__( method forward (line 675) | def forward( FILE: vencoder/wavlm/modules.py class TransposeLast (line 20) | class TransposeLast(nn.Module): method __init__ (line 21) | def __init__(self, deconstruct_idx=None): method forward (line 25) | def forward(self, x): class Fp32LayerNorm (line 31) | class Fp32LayerNorm(nn.LayerNorm): method __init__ (line 32) | def __init__(self, *args, **kwargs): method forward (line 35) | def forward(self, input): class Fp32GroupNorm (line 46) | class Fp32GroupNorm(nn.GroupNorm): method __init__ (line 47) | def __init__(self, *args, **kwargs): method forward (line 50) | def forward(self, input): class GradMultiply (line 61) | class GradMultiply(torch.autograd.Function): method forward (line 63) | def forward(ctx, x, scale): method backward (line 69) | def backward(ctx, grad): class SamePad (line 73) | class SamePad(nn.Module): method __init__ (line 74) | def __init__(self, kernel_size, causal=False): method forward (line 81) | def forward(self, x): class Swish (line 87) | class Swish(nn.Module): method __init__ (line 91) | def __init__(self): method forward (line 96) | def forward(self, x): class GLU_Linear (line 100) | class GLU_Linear(nn.Module): method __init__ (line 101) | def __init__(self, input_dim, output_dim, glu_type="sigmoid", bias_in_... method forward (line 121) | def forward(self, x): function gelu_accurate (line 133) | def gelu_accurate(x): function gelu (line 141) | def gelu(x: torch.Tensor) -> torch.Tensor: function get_activation_fn (line 145) | def get_activation_fn(activation: str): function init_bert_params (line 169) | def init_bert_params(module): function quant_noise (line 204) | def quant_noise(module, p, block_size): class MultiheadAttention (line 304) | class MultiheadAttention(nn.Module): method __init__ (line 310) | def __init__( method reset_parameters (line 396) | def reset_parameters(self): method _relative_positions_bucket (line 418) | def _relative_positions_bucket(self, relative_positions, bidirectional... method compute_bias (line 445) | def compute_bias(self, query_length, key_length): method forward (line 458) | def forward( method _append_prev_key_padding_mask (line 767) | def _append_prev_key_padding_mask( method _get_input_buffer (line 810) | def _get_input_buffer( method _set_input_buffer (line 820) | def _set_input_buffer( method apply_sparse_mask (line 827) | def apply_sparse_mask(self, attn_weights, tgt_len: int, src_len: int, ... FILE: vencoder/whisper/audio.py function load_audio (line 22) | def load_audio(file: str, sr: int = SAMPLE_RATE): function pad_or_trim (line 52) | def pad_or_trim(array, length: int = N_SAMPLES, *, axis: int = -1): function mel_filters (line 77) | def mel_filters(device, n_mels: int = N_MELS) -> torch.Tensor: function log_mel_spectrogram (line 91) | def log_mel_spectrogram(audio: Union[str, np.ndarray, torch.Tensor], n_m... FILE: vencoder/whisper/decoding.py function detect_language (line 19) | def detect_language(model: "Whisper", mel: Tensor, tokenizer: Tokenizer ... class DecodingOptions (line 72) | class DecodingOptions: class DecodingResult (line 104) | class DecodingResult: class Inference (line 116) | class Inference: method logits (line 117) | def logits(self, tokens: Tensor, audio_features: Tensor) -> Tensor: method rearrange_kv_cache (line 121) | def rearrange_kv_cache(self, source_indices) -> None: method cleanup_caching (line 125) | def cleanup_caching(self) -> None: class PyTorchInference (line 130) | class PyTorchInference(Inference): method __init__ (line 131) | def __init__(self, model: "Whisper", initial_token_length: int): method logits (line 137) | def logits(self, tokens: Tensor, audio_features: Tensor) -> Tensor: method cleanup_caching (line 147) | def cleanup_caching(self): method rearrange_kv_cache (line 154) | def rearrange_kv_cache(self, source_indices): class SequenceRanker (line 160) | class SequenceRanker: method rank (line 161) | def rank(self, tokens: List[List[Tensor]], sum_logprobs: List[List[flo... class MaximumLikelihoodRanker (line 169) | class MaximumLikelihoodRanker(SequenceRanker): method __init__ (line 175) | def __init__(self, length_penalty: Optional[float]): method rank (line 178) | def rank(self, tokens: List[List[Tensor]], sum_logprobs: List[List[flo... class TokenDecoder (line 195) | class TokenDecoder: method reset (line 196) | def reset(self): method update (line 199) | def update(self, tokens: Tensor, logits: Tensor, sum_logprobs: Tensor)... method finalize (line 224) | def finalize( class GreedyDecoder (line 249) | class GreedyDecoder(TokenDecoder): method __init__ (line 250) | def __init__(self, temperature: float, eot: int): method update (line 254) | def update(self, tokens: Tensor, logits: Tensor, sum_logprobs: Tensor)... method finalize (line 271) | def finalize(self, tokens: Tensor, sum_logprobs: Tensor): class BeamSearchDecoder (line 277) | class BeamSearchDecoder(TokenDecoder): method __init__ (line 278) | def __init__(self, beam_size: int, eot: int, inference: Inference, pat... method reset (line 288) | def reset(self): method update (line 291) | def update(self, tokens: Tensor, logits: Tensor, sum_logprobs: Tensor)... method finalize (line 347) | def finalize(self, preceding_tokens: Tensor, sum_logprobs: Tensor): class LogitFilter (line 367) | class LogitFilter: method apply (line 368) | def apply(self, logits: Tensor, tokens: Tensor) -> None: class SuppressBlank (line 383) | class SuppressBlank(LogitFilter): method __init__ (line 384) | def __init__(self, tokenizer: Tokenizer, sample_begin: int): method apply (line 388) | def apply(self, logits: Tensor, tokens: Tensor): class SuppressTokens (line 393) | class SuppressTokens(LogitFilter): method __init__ (line 394) | def __init__(self, suppress_tokens: Sequence[int]): method apply (line 397) | def apply(self, logits: Tensor, tokens: Tensor): class ApplyTimestampRules (line 401) | class ApplyTimestampRules(LogitFilter): method __init__ (line 402) | def __init__( method apply (line 409) | def apply(self, logits: Tensor, tokens: Tensor): class DecodingTask (line 444) | class DecodingTask: method __init__ (line 450) | def __init__(self, model: "Whisper", options: DecodingOptions): method _verify_options (line 499) | def _verify_options(self, options: DecodingOptions) -> DecodingOptions: method _get_initial_tokens (line 512) | def _get_initial_tokens(self) -> Tuple[int]: method _get_suppress_tokens (line 534) | def _get_suppress_tokens(self) -> Tuple[int]: method _get_audio_features (line 557) | def _get_audio_features(self, mel: Tensor): method _detect_language (line 575) | def _detect_language(self, audio_features: Tensor, tokens: Tensor): method _main_loop (line 587) | def _main_loop(self, audio_features: Tensor, tokens: Tensor): method run (line 619) | def run(self, mel: Tensor) -> List[DecodingResult]: function decode (line 684) | def decode(model: "Whisper", mel: Tensor, options: DecodingOptions = Dec... FILE: vencoder/whisper/model.py class ModelDimensions (line 14) | class ModelDimensions: class LayerNorm (line 27) | class LayerNorm(nn.LayerNorm): method forward (line 28) | def forward(self, x: Tensor) -> Tensor: class Linear (line 32) | class Linear(nn.Linear): method forward (line 33) | def forward(self, x: Tensor) -> Tensor: class Conv1d (line 39) | class Conv1d(nn.Conv1d): method _conv_forward (line 40) | def _conv_forward(self, x: Tensor, weight: Tensor, bias: Optional[Tens... function sinusoids (line 46) | def sinusoids(length, channels, max_timescale=10000): class MultiHeadAttention (line 55) | class MultiHeadAttention(nn.Module): method __init__ (line 56) | def __init__(self, n_state: int, n_head: int): method forward (line 64) | def forward( method qkv_attention (line 86) | def qkv_attention(self, q: Tensor, k: Tensor, v: Tensor, mask: Optiona... class ResidualAttentionBlock (line 102) | class ResidualAttentionBlock(nn.Module): method __init__ (line 103) | def __init__(self, n_state: int, n_head: int, cross_attention: bool = ... method forward (line 116) | def forward( class AudioEncoder (line 130) | class AudioEncoder(nn.Module): method __init__ (line 131) | def __init__(self, n_mels: int, n_ctx: int, n_state: int, n_head: int,... method forward (line 142) | def forward(self, x: Tensor): class TextDecoder (line 164) | class TextDecoder(nn.Module): method __init__ (line 165) | def __init__(self, n_vocab: int, n_ctx: int, n_state: int, n_head: int... method forward (line 179) | def forward(self, x: Tensor, xa: Tensor, kv_cache: Optional[dict] = No... class Whisper (line 199) | class Whisper(nn.Module): method __init__ (line 200) | def __init__(self, dims: ModelDimensions): method embed_audio (line 218) | def embed_audio(self, mel: torch.Tensor): method logits (line 221) | def logits(self, tokens: torch.Tensor, audio_features: torch.Tensor): method forward (line 224) | def forward(self, mel: torch.Tensor, tokens: torch.Tensor) -> Dict[str... method device (line 228) | def device(self): method is_multilingual (line 232) | def is_multilingual(self): method install_kv_cache_hooks (line 235) | def install_kv_cache_hooks(self, cache: Optional[dict] = None): FILE: vencoder/whisper/tokenizer.py class Tokenizer (line 130) | class Tokenizer: method encode (line 137) | def encode(self, text, **kwargs): method decode (line 140) | def decode(self, token_ids: Union[int, List[int], np.ndarray, torch.Te... method decode_with_timestamps (line 143) | def decode_with_timestamps(self, tokens) -> str: method eot (line 161) | def eot(self) -> int: method sot (line 166) | def sot(self) -> int: method sot_lm (line 171) | def sot_lm(self) -> int: method sot_prev (line 176) | def sot_prev(self) -> int: method no_speech (line 181) | def no_speech(self) -> int: method no_timestamps (line 186) | def no_timestamps(self) -> int: method timestamp_begin (line 191) | def timestamp_begin(self) -> int: method language_token (line 196) | def language_token(self) -> int: method all_language_tokens (line 215) | def all_language_tokens(self) -> Tuple[int]: method all_language_codes (line 227) | def all_language_codes(self) -> Tuple[str]: method sot_sequence_including_notimestamps (line 232) | def sot_sequence_including_notimestamps(self) -> Tuple[int]: method non_speech_tokens (line 237) | def non_speech_tokens(self) -> Tuple[int]: method _get_single_token_id (line 267) | def _get_single_token_id(self, text) -> int: function build_tokenizer (line 274) | def build_tokenizer(name: str = "gpt2"): function get_tokenizer (line 295) | def get_tokenizer( FILE: vencoder/whisper/utils.py function make_safe (line 10) | def make_safe(string): function make_safe (line 15) | def make_safe(string): function exact_div (line 20) | def exact_div(x, y): function str2bool (line 25) | def str2bool(string): function optional_int (line 33) | def optional_int(string): function optional_float (line 37) | def optional_float(string): function compression_ratio (line 41) | def compression_ratio(text) -> float: function format_timestamp (line 46) | def format_timestamp(seconds: float, always_include_hours: bool = False,... class ResultWriter (line 63) | class ResultWriter: method __init__ (line 66) | def __init__(self, output_dir: str): method __call__ (line 69) | def __call__(self, result: dict, audio_path: str): method write_result (line 76) | def write_result(self, result: dict, file: TextIO): class WriteTXT (line 80) | class WriteTXT(ResultWriter): method write_result (line 83) | def write_result(self, result: dict, file: TextIO): class WriteVTT (line 88) | class WriteVTT(ResultWriter): method write_result (line 91) | def write_result(self, result: dict, file: TextIO): class WriteSRT (line 102) | class WriteSRT(ResultWriter): method write_result (line 105) | def write_result(self, result: dict, file: TextIO): class WriteTSV (line 118) | class WriteTSV(ResultWriter): method write_result (line 129) | def write_result(self, result: dict, file: TextIO): class WriteJSON (line 137) | class WriteJSON(ResultWriter): method write_result (line 140) | def write_result(self, result: dict, file: TextIO): function get_writer (line 144) | def get_writer(output_format: str, output_dir: str) -> Callable[[dict, T... FILE: webUI.py function upload_mix_append_file (line 43) | def upload_mix_append_file(files,sfiles): function mix_submit_click (line 56) | def mix_submit_click(js,mode): function updata_mix_info (line 71) | def updata_mix_info(files): function modelAnalysis (line 82) | def modelAnalysis(model_path,config_path,cluster_model_path,device,enhan... function modelUnload (line 132) | def modelUnload(): function vc_infer (line 142) | def vc_infer(output_format, sid, audio_path, truncated_basename, vc_tran... function vc_fn (line 183) | def vc_fn(sid, input_audio, output_format, vc_transform, auto_f0,cluster... function text_clear (line 213) | def text_clear(text): function vc_fn2 (line 216) | def vc_fn2(_text, _lang, _gender, _rate, _volume, sid, output_format, vc... function model_compression (line 244) | def model_compression(_model): function scan_local_models (line 255) | def scan_local_models(): function local_model_refresh_fn (line 267) | def local_model_refresh_fn(): function debug_change (line 271) | def debug_change():