Spaces:
Sleeping
Sleeping
Update src/rmvpe.py
Browse files- src/rmvpe.py +2 -1
src/rmvpe.py
CHANGED
@@ -352,13 +352,14 @@ class RMVPE:
|
|
352 |
def mel2hidden(self, mel):
|
353 |
with torch.no_grad():
|
354 |
n_frames = mel.shape[-1]
|
355 |
-
mel = mel.
|
356 |
mel = F.pad(
|
357 |
mel, (0, 32 * ((n_frames - 1) // 32 + 1) - n_frames), mode="reflect"
|
358 |
)
|
359 |
hidden = self.model(mel)
|
360 |
return hidden[:, :n_frames]
|
361 |
|
|
|
362 |
def decode(self, hidden, thred=0.03):
|
363 |
cents_pred = self.to_local_average_cents(hidden, thred=thred)
|
364 |
f0 = 10 * (2 ** (cents_pred / 1200))
|
|
|
352 |
def mel2hidden(self, mel):
|
353 |
with torch.no_grad():
|
354 |
n_frames = mel.shape[-1]
|
355 |
+
mel = mel.to(torch.float32) # Convert mel tensor to 'Float'
|
356 |
mel = F.pad(
|
357 |
mel, (0, 32 * ((n_frames - 1) // 32 + 1) - n_frames), mode="reflect"
|
358 |
)
|
359 |
hidden = self.model(mel)
|
360 |
return hidden[:, :n_frames]
|
361 |
|
362 |
+
|
363 |
def decode(self, hidden, thred=0.03):
|
364 |
cents_pred = self.to_local_average_cents(hidden, thred=thred)
|
365 |
f0 = 10 * (2 ** (cents_pred / 1200))
|