nakas commited on
Commit
4661bf3
·
1 Parent(s): 60420d4

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +6 -2
utils.py CHANGED
@@ -620,8 +620,12 @@ class Utils_functions:
620
  ),
621
  -2,
622
  )
623
- strg = abwvc.tostring()
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,