Skip to content

Commit 8a19de0

Browse files
authored
Fix audio bytes (#7670)
fix audio bytes
1 parent c2490a4 commit 8a19de0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datasets/features/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def decode_example(
174174
if not self.decode:
175175
raise RuntimeError("Decoding is disabled for this feature. Please use Audio(decode=True) instead.")
176176

177-
path, bytes = (value["path"], BytesIO(value["bytes"])) if value["bytes"] is not None else (value["path"], None)
177+
path, bytes = (value["path"], value["bytes"]) if value["bytes"] is not None else (value["path"], None)
178178
if path is None and bytes is None:
179179
raise ValueError(f"An audio sample should have one of 'path' or 'bytes' but both are None in {value}.")
180180

0 commit comments

Comments
 (0)