Spaces:
Sleeping
Sleeping
ASG Models
commited on
Update app.py
Browse files
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 |
-
|
|
|
99 |
|
100 |
-
|
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)
|