mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-01-31 02:32:51 +08:00
Move cor_nom
, cor_den
to mps (gui_v1.py
) (#851)
* Move `cor_nom`, `cor_den` to mps * Split logic based on system
This commit is contained in:
parent
78b8bfe890
commit
85d0d709e0
@ -556,9 +556,10 @@ if __name__ == "__main__":
|
|||||||
+ 1e-8
|
+ 1e-8
|
||||||
)
|
)
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
cor_nom = cor_nom.cpu()
|
_, sola_offset = torch.max(cor_nom[0, 0] / cor_den[0, 0])
|
||||||
cor_den = cor_den.cpu()
|
sola_offset = sola_offset.item()
|
||||||
sola_offset = torch.argmax(cor_nom[0, 0] / cor_den[0, 0])
|
else:
|
||||||
|
sola_offset = torch.argmax(cor_nom[0, 0] / cor_den[0, 0])
|
||||||
print("sola offset: " + str(int(sola_offset)))
|
print("sola offset: " + str(int(sola_offset)))
|
||||||
self.output_wav[:] = infer_wav[sola_offset : sola_offset + self.block_frame]
|
self.output_wav[:] = infer_wav[sola_offset : sola_offset + self.block_frame]
|
||||||
self.output_wav[: self.crossfade_frame] *= self.fade_in_window
|
self.output_wav[: self.crossfade_frame] *= self.fade_in_window
|
||||||
|
Loading…
Reference in New Issue
Block a user