File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ def __init__(
21
21
device : str ,
22
22
use_jit = False ,
23
23
):
24
- hop_length = 160
25
- f0_min = 30
26
- f0_max = 8000
27
- sampling_rate = 16000
24
+ hop_length = 160
25
+ f0_min = 30
26
+ f0_max = 8000
27
+ sampling_rate = 16000
28
28
29
29
super ().__init__ (hop_length , f0_min , f0_max , sampling_rate )
30
30
@@ -55,6 +55,7 @@ def __init__(
55
55
providers = ["DmlExecutionProvider" ],
56
56
)
57
57
else :
58
+
58
59
def get_jit_model ():
59
60
jit_model_path = model_path .rstrip (".pth" )
60
61
jit_model_path += ".half.jit" if is_half else ".jit"
@@ -110,9 +111,7 @@ def compute_f0(
110
111
p_len = wav .shape [0 ] // self .hop_length
111
112
if not torch .is_tensor (wav ):
112
113
wav = torch .from_numpy (wav )
113
- mel = self .mel_extractor (
114
- wav .float ().to (self .device ).unsqueeze (0 ), center = True
115
- )
114
+ mel = self .mel_extractor (wav .float ().to (self .device ).unsqueeze (0 ), center = True )
116
115
hidden = self ._mel2hidden (mel )
117
116
if "privateuseone" not in str (self .device ):
118
117
hidden = hidden .squeeze (0 ).cpu ().numpy ()
You can’t perform that action at this time.
0 commit comments