fix memory issue

#1
by lhoestq HF staff - opened
Files changed (1) hide show
  1. dataset_script.py +1 -1
dataset_script.py CHANGED
@@ -250,7 +250,7 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
250
  if not metadata:
251
  break
252
  if path in metadata:
253
- result = metadata[path]
254
  # set the audio feature and the path to the extracted file
255
  path = os.path.join(local_extracted_archive, path) if local_extracted_archive else path
256
  result["audio"] = {"path": path, "bytes": f.read()}
 
250
  if not metadata:
251
  break
252
  if path in metadata:
253
+ result = dict(metadata[path])
254
  # set the audio feature and the path to the extracted file
255
  path = os.path.join(local_extracted_archive, path) if local_extracted_archive else path
256
  result["audio"] = {"path": path, "bytes": f.read()}