audrey06100 commited on
Commit
5ec1203
·
1 Parent(s): 4734edd
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -42,7 +42,7 @@ def resample(signal, fs):
42
 
43
  return signal_new
44
 
45
- # original -> 256Hz or 256Hz -> original
46
  def resample_(signal, current_fs, target_fs):
47
  fs = current_fs
48
  # downsample the signal to the target sample rate
@@ -260,7 +260,7 @@ def reconstruct(model_name, total, filepath, outputfile, samplerate):
260
  # -------------------delete_data---------------------------
261
  dataDelete(filepath+"temp2/")
262
  # --------------------resample-----------------------------
263
- signal = resample_(signal, 256, samplerate) # 256Hz -> original sampling rate
264
  #print(signal.shape)
265
  # --------------------save_data----------------------------
266
  save_data(signal, filepath+outputfile)
 
42
 
43
  return signal_new
44
 
45
+ # "original to 256Hz" or "256Hz to original"
46
  def resample_(signal, current_fs, target_fs):
47
  fs = current_fs
48
  # downsample the signal to the target sample rate
 
260
  # -------------------delete_data---------------------------
261
  dataDelete(filepath+"temp2/")
262
  # --------------------resample-----------------------------
263
+ signal = resample_(signal, 256, samplerate) # 256Hz to original sampling rate
264
  #print(signal.shape)
265
  # --------------------save_data----------------------------
266
  save_data(signal, filepath+outputfile)