mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-07 19:40:44 +08:00
feat(web): add hash_similarity calculating
This commit is contained in:
@@ -189,7 +189,7 @@ def _extend_difference(n, a, b):
|
||||
return n
|
||||
|
||||
|
||||
def hash_similarity(h1: str, h2: str) -> int:
|
||||
def hash_similarity(h1: str, h2: str) -> float:
|
||||
h1b, h2b = decode_from_string(h1), decode_from_string(h2)
|
||||
if len(h1b) != half_hash_len * 2 or len(h2b) != half_hash_len * 2:
|
||||
raise Exception("invalid hash length")
|
||||
|
||||
Reference in New Issue
Block a user