File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
audio_data_pytorch/datasets Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,10 @@ def identity(x):
157
157
return x
158
158
159
159
160
+ def first (x ):
161
+ return x [0 ]
162
+
163
+
160
164
class AudioWebDataset (WebDataset ):
161
165
162
166
# Why batch_size in a dataset constructor?
@@ -176,7 +180,7 @@ def __init__(
176
180
self .shuffle (shuffle )
177
181
.decode (torch_audio )
178
182
.to_tuple ("wav" , "json" )
179
- .map_tuple (( lambda tuple : tuple [ 0 ]) , identity )
183
+ .map_tuple (first , identity )
180
184
)
181
185
182
186
if exists (transforms ):
Original file line number Diff line number Diff line change 3
3
setup (
4
4
name = "audio-data-pytorch" ,
5
5
packages = find_packages (exclude = []),
6
- version = "0.0.14 " ,
6
+ version = "0.0.15 " ,
7
7
license = "MIT" ,
8
8
description = "Audio Data - PyTorch" ,
9
9
long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments