MCPcopy
hub / github.com/RVC-Boss/GPT-SoVITS / resample

Function resample

GPT_SoVITS/inference_webui.py:548–553  ·  view source on GitHub ↗
(audio_tensor, sr0, sr1, device)

Source from the content-addressed store, hash-verified

546
547
548def resample(audio_tensor, sr0, sr1, device):
549 global resample_transform_dict
550 key = "%s-%s-%s" % (sr0, sr1, str(device))
551 if key not in resample_transform_dict:
552 resample_transform_dict[key] = torchaudio.transforms.Resample(sr0, sr1).to(device)
553 return resample_transform_dict[key](audio_tensor)
554
555
556def get_spepc(hps, filename, dtype, device, is_v2pro=False):

Callers 3

export_1Function · 0.90
get_spepcFunction · 0.70
get_tts_wavFunction · 0.70

Calls 1

toMethod · 0.80

Tested by

no test coverage detected