Spaces:
Sleeping
Sleeping
Upload myinfer_latest.py
Browse files- myinfer_latest.py +4 -1
myinfer_latest.py
CHANGED
|
@@ -76,6 +76,9 @@ def hash_array(array):
|
|
| 76 |
hash_hex = hash_obj.hexdigest()
|
| 77 |
return hash_hex
|
| 78 |
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
if os.path.isfile("rmvpe.pt"):
|
| 81 |
f0method_mode.insert(2, "rmvpe")
|
|
@@ -351,7 +354,7 @@ def vc_single(
|
|
| 351 |
protect,
|
| 352 |
f0_file=f0_file
|
| 353 |
)
|
| 354 |
-
hash_val =
|
| 355 |
|
| 356 |
# Get the current thread's name or ID
|
| 357 |
thread_name = threading.current_thread().name
|
|
|
|
| 76 |
hash_hex = hash_obj.hexdigest()
|
| 77 |
return hash_hex
|
| 78 |
|
| 79 |
+
def hash_array1(arr):
|
| 80 |
+
arr_str = np.array2string(arr)
|
| 81 |
+
return hashlib.md5(arr_str.encode()).hexdigest()
|
| 82 |
|
| 83 |
if os.path.isfile("rmvpe.pt"):
|
| 84 |
f0method_mode.insert(2, "rmvpe")
|
|
|
|
| 354 |
protect,
|
| 355 |
f0_file=f0_file
|
| 356 |
)
|
| 357 |
+
hash_val = hash_array1(audio_opt)
|
| 358 |
|
| 359 |
# Get the current thread's name or ID
|
| 360 |
thread_name = threading.current_thread().name
|