Commit
•
d8d17d9
1
Parent(s):
1a527f1
strore only path to audio (don't read bytes)
Browse filesAudio feature automatically decode local audio files, there is no need to open it and store bytes, you can just provide path to local file :)
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 |
-
|
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,
|