MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / get_lf0_cwt_norm

Function get_lf0_cwt_norm

utils/cwt.py:89–115  ·  view source on GitHub ↗
(f0s, mean, std)

Source from the content-addressed store, hash-verified

87
88
89def get_lf0_cwt_norm(f0s, mean, std):
90 uvs = list()
91 cont_lf0_lpfs = list()
92 cont_lf0_lpf_norms = list()
93 Wavelet_lf0s = list()
94 Wavelet_lf0s_norm = list()
95 scaless = list()
96
97 means = list()
98 stds = list()
99 for f0 in f0s:
100 uv, cont_lf0_lpf = get_cont_lf0(f0)
101 cont_lf0_lpf_norm = (cont_lf0_lpf - mean) / std
102
103 Wavelet_lf0, scales = get_lf0_cwt(cont_lf0_lpf_norm) # [560,10]
104 Wavelet_lf0_norm, mean_scale, std_scale = norm_scale(Wavelet_lf0) # [560,10],[1,10],[1,10]
105
106 Wavelet_lf0s_norm.append(Wavelet_lf0_norm)
107 uvs.append(uv)
108 cont_lf0_lpfs.append(cont_lf0_lpf)
109 cont_lf0_lpf_norms.append(cont_lf0_lpf_norm)
110 Wavelet_lf0s.append(Wavelet_lf0)
111 scaless.append(scales)
112 means.append(mean_scale)
113 stds.append(std_scale)
114
115 return Wavelet_lf0s_norm, scaless, means, stds
116
117
118def inverse_cwt_torch(Wavelet_lf0, scales):

Callers

nothing calls this directly

Calls 3

get_cont_lf0Function · 0.85
get_lf0_cwtFunction · 0.85
norm_scaleFunction · 0.85

Tested by

no test coverage detected