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

Function get_lf0_cwt

utils/cwt.py:53–69  ·  view source on GitHub ↗

input: signal of shape (N) output: Wavelet_lf0 of shape(10, N), scales of shape(10)

(lf0)

Source from the content-addressed store, hash-verified

51
52
53def get_lf0_cwt(lf0):
54 '''
55 input:
56 signal of shape (N)
57 output:
58 Wavelet_lf0 of shape(10, N), scales of shape(10)
59 '''
60 mother = wavelet.MexicanHat()
61 dt = 0.005
62 dj = 1
63 s0 = dt * 2
64 J = 9
65
66 Wavelet_lf0, scales, _, _, _, _ = wavelet.cwt(np.squeeze(lf0), dt, dj, s0, J, mother)
67 # Wavelet.shape => (J + 1, len(lf0))
68 Wavelet_lf0 = np.real(Wavelet_lf0).T
69 return Wavelet_lf0, scales
70
71
72def norm_scale(Wavelet_lf0):

Callers 4

get_f0cwtMethod · 0.90
__init__Method · 0.90
normalize_cwt_lf0Function · 0.85
get_lf0_cwt_normFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected