ASG Models commited on
Commit
f550012
·
verified ·
1 Parent(s): 87e8238

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -93,13 +93,13 @@ class DataViewerApp:
93
  self.data.iloc[self.current_selected] = row
94
  sr,audio=data_oudio
95
  if sr!=16000:
96
-
 
97
  audio=librosa.resample(audio,orig_sr=sr,target_sr=16000)
98
- if audio.dtype != np.float32:
 
99
 
100
- audio=audio.astype(np.float32)
101
- audio/=np.max(np.abs(audio))
102
-
103
 
104
  self.sdata[self.current_selected] = audio
105
  return self.get_page_data(self.current_page)
 
93
  self.data.iloc[self.current_selected] = row
94
  sr,audio=data_oudio
95
  if sr!=16000:
96
+ audio=audio.astype(np.float32)
97
+ audio/=np.max(np.abs(audio))
98
  audio=librosa.resample(audio,orig_sr=sr,target_sr=16000)
99
+
100
+
101
 
102
+
 
 
103
 
104
  self.sdata[self.current_selected] = audio
105
  return self.get_page_data(self.current_page)