cdminix commited on
Commit
c4a2015
·
verified ·
1 Parent(s): 9297f78

Update libriheavy.py

Browse files
Files changed (1) hide show
  1. libriheavy.py +9 -9
libriheavy.py CHANGED
@@ -171,7 +171,7 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
171
  if utterance_id == sorted(list(text.keys()))[-1]:
172
  continue
173
  npz_item = npz[str(utterance_id)].item()
174
- print(npz_item["pitch"])
175
  result = {
176
  "id": chunk["speaker_id"] + "_" + utterance_id,
177
  "speaker_id": chunk["speaker_id"],
@@ -186,10 +186,10 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
186
  ],
187
  "mel_spectrogram": npz_item["mel"][0][0],
188
  "attributes": {
189
- npz_item["pitch"],
190
- npz_item["energy"],
191
- npz_item["snr"],
192
- npz_item["srmr"],
193
  },
194
  "overall_attributes": {
195
  npz_item["overall_pitch"],
@@ -218,10 +218,10 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
218
  ],
219
  "mel_spectrogram": npz_item["mel"][0][0],
220
  "attributes": {
221
- npz_item["pitch"],
222
- npz_item["energy"],
223
- npz_item["snr"],
224
- npz_item["srmr"],
225
  },
226
  "overall_attributes": {
227
  npz_item["overall_pitch"],
 
171
  if utterance_id == sorted(list(text.keys()))[-1]:
172
  continue
173
  npz_item = npz[str(utterance_id)].item()
174
+ print(npz_item["overall_pitch"])
175
  result = {
176
  "id": chunk["speaker_id"] + "_" + utterance_id,
177
  "speaker_id": chunk["speaker_id"],
 
186
  ],
187
  "mel_spectrogram": npz_item["mel"][0][0],
188
  "attributes": {
189
+ npz_item["pitch"][0],
190
+ npz_item["energy"][0],
191
+ npz_item["snr"][0],
192
+ npz_item["srmr"][0],
193
  },
194
  "overall_attributes": {
195
  npz_item["overall_pitch"],
 
218
  ],
219
  "mel_spectrogram": npz_item["mel"][0][0],
220
  "attributes": {
221
+ npz_item["pitch"][0],
222
+ npz_item["energy"][0],
223
+ npz_item["snr"][0],
224
+ npz_item["srmr"][0],
225
  },
226
  "overall_attributes": {
227
  npz_item["overall_pitch"],