(self, x, name, save_dir, x_is_real_x=False)
Save dataspace instances.

    Args:
      x: A numpy array of dataspace points.
      name: A string indicating the name in the saved file.
      save_dir: A string indicating the directory to put the saved file.
      x_is_real_x: An boolean indicating whether `x` is already in dataspace. If
          not, `x` is converted to dataspace before saving
Save dataspace instances.
Save dataspace instances .
def save_data(self, x, name, save_dir, x_is_real_x=False):
    """Save dataspace instances.

    Args:
      x: A numpy array of dataspace points.
      name: A string indicating the name in the saved file.
      save_dir: A string indicating the directory to put the saved file.
      x_is_real_x: An boolean indicating whether `x` is already in dataspace. If
          not, `x` is converted to dataspace before saving
    """
    real_x = x if x_is_real_x else self.decode(x)
    real_x = real_x.reshape(-1)
    sample_file = os.path.join(save_dir, '%s.wav' % name)
    wavfile.write(sample_file, rate=16000, data=real_x)
def save_data ( self , x , name , save_dir , x_is_real_x = False ) : real_x = x if x_is_real_x else self . decode ( x ) real_x = real_x . reshape ( - 1 ) sample_file = os . path . join ( save_dir , '%s.wav' % name ) wavfile . write ( sample_file , rate = 16000 , data = real_x )