Spaces:
Build error
Build error
Update utils.py
Browse files
utils.py
CHANGED
@@ -620,8 +620,12 @@ class Utils_functions:
|
|
620 |
),
|
621 |
-2,
|
622 |
)
|
623 |
-
|
624 |
-
|
|
|
|
|
|
|
|
|
625 |
return (
|
626 |
np.clip(spec, -1.0, 1.0),
|
627 |
strg,
|
|
|
620 |
),
|
621 |
-2,
|
622 |
)
|
623 |
+
|
624 |
+
strg = (np.int16(abwvc * 32767.0))
|
625 |
+
## convert np.int16 array to float32 array
|
626 |
+
strg = strg.astype(np.float32)
|
627 |
+
##conver float32 array to string
|
628 |
+
strg = strg.tostring()
|
629 |
return (
|
630 |
np.clip(spec, -1.0, 1.0),
|
631 |
strg,
|