nakas commited on
Commit
2ab20da
·
1 Parent(s): 30bd434

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -3
utils.py CHANGED
@@ -10,6 +10,7 @@ import tensorflow as tf
10
  from tensorflow.python.framework import random_seed
11
  import gradio as gr
12
  from scipy.io.wavfile import write as write_wav
 
13
 
14
 
15
  class Utils_functions:
@@ -623,9 +624,7 @@ class Utils_functions:
623
 
624
  strg = (np.int16(abwvc * 32767.0))
625
  ## convert np.int16 array to float32 array
626
- strg = strg.astype(np.float32, order='C') / 32768.0
627
- ##conver float32 array to string
628
- strg = strg.tostring()
629
  return (
630
  np.clip(spec, -1.0, 1.0),
631
  strg,
 
10
  from tensorflow.python.framework import random_seed
11
  import gradio as gr
12
  from scipy.io.wavfile import write as write_wav
13
+ import java.util.Arrays;
14
 
15
 
16
  class Utils_functions:
 
624
 
625
  strg = (np.int16(abwvc * 32767.0))
626
  ## convert np.int16 array to float32 array
627
+ strg = Arrays.toString(strg)
 
 
628
  return (
629
  np.clip(spec, -1.0, 1.0),
630
  strg,