Datasets:

ArXiv:
License:
polinaeterna HF staff commited on
Commit
86a85ad
1 Parent(s): 1a527f1

store only path to local audio file, do not store bytes

Browse files

if you have your audio files locally, there is no need to open them and store bytes, Audio features does it automatically so you can provide only path to local file :)

Files changed (1) hide show
  1. cvss.py +1 -5
cvss.py CHANGED
@@ -136,13 +136,9 @@ class CVSS(datasets.GeneratorBasedBuilder):
136
  key, text = cols
137
 
138
  audio_path = os.path.join(path, split, f'{key}.wav')
139
- with open(audio_path, 'rb') as audio_f:
140
- audio_bytes = audio_f.read()
141
-
142
- audio = {'path': audio_path, 'bytes': audio_bytes}
143
  yield key, {
144
  'id': key,
145
  'text': text,
146
- 'audio': audio,
147
  'file': audio_path,
148
  }
 
136
  key, text = cols
137
 
138
  audio_path = os.path.join(path, split, f'{key}.wav')
 
 
 
 
139
  yield key, {
140
  'id': key,
141
  'text': text,
142
+ 'audio': audio_path,
143
  'file': audio_path,
144
  }