Datasets:

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

strore only path to audio (don't read bytes)

Browse files

Audio feature automatically decode local audio files, there is no need to open it and store bytes, you can just provide path to local file :)

Files changed (1) hide show
  1. cvss.py +2 -6
cvss.py CHANGED
@@ -134,12 +134,8 @@ class CVSS(datasets.GeneratorBasedBuilder):
134
  cols = line.rstrip().split('\t')
135
  assert len(cols) == 2, cols
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,
 
134
  cols = line.rstrip().split('\t')
135
  assert len(cols) == 2, cols
136
  key, text = cols
137
+ audio = {'path': audio_path}
138
+
 
 
 
 
139
  yield key, {
140
  'id': key,
141
  'text': text,