['/PATH/TO/WAVE_FILE/L1_1.wav', '/PATH/TO/WAVE_FILE/L1_2.wav', '/PATH/TO/WAVE_FILE/L1_3.wav', '/PATH/TO/WAVE_FILE/L1_4.wav', '/PATH/TO/WAVE_FILE/L1_5.wav', '/PATH/TO/WAVE_FILE/L1_6.wav', '/PATH/TO/WAVE_FILE/L1_7.wav', '/PATH/TO/WAVE_FILE/L1_8.wav', '/PATH/TO/WAVE_FILE/L1_9.wav', '/PATH/TO/WAVE_FILE/L1_10.wav', '/PATH/TO/WAVE_FILE/L2_1.wav', '/PATH/TO/WAVE_FILE/L2_2.wav', '/PATH/TO/WAVE_FILE/L2_3.wav', '/PATH/TO/WAVE_FILE/L2_4.wav', '/PATH/TO/WAVE_FILE/L2_5.wav', '/PATH/TO/WAVE_FILE/L2_6.wav', '/PATH/TO/WAVE_FILE/L2_7.wav', '/PATH/TO/WAVE_FILE/L2_8.wav', '/PATH/TO/WAVE_FILE/L2_9.wav', '/PATH/TO/WAVE_FILE/L2_10.wav', '/PATH/TO/WAVE_FILE/L3_1.wav', '/PATH/TO/WAVE_FILE/L3_2.wav', '/PATH/TO/WAVE_FILE/L3_3.wav', '/PATH/TO/WAVE_FILE/L3_4.wav', '/PATH/TO/WAVE_FILE/L3_5.wav', '/PATH/TO/WAVE_FILE/L3_6.wav', '/PATH/TO/WAVE_FILE/L3_7.wav', '/PATH/TO/WAVE_FILE/L3_8.wav', '/PATH/TO/WAVE_FILE/L3_9.wav', '/PATH/TO/WAVE_FILE/L3_10.wav', '/PATH/TO/WAVE_FILE/L4_1.wav', '/PATH/TO/WAVE_FILE/L4_2.wav', '/PATH/TO/WAVE_FILE/L4_3.wav', '/PATH/TO/WAVE_FILE/L4_4.wav', '/PATH/TO/WAVE_FILE/L4_5.wav', '/PATH/TO/WAVE_FILE/L4_6.wav', '/PATH/TO/WAVE_FILE/L4_7.wav', '/PATH/TO/WAVE_FILE/L4_8.wav', '/PATH/TO/WAVE_FILE/L4_9.wav', '/PATH/TO/WAVE_FILE/L4_10.wav', '/PATH/TO/WAVE_FILE/R1_1.wav', '/PATH/TO/WAVE_FILE/R1_2.wav', '/PATH/TO/WAVE_FILE/R1_3.wav', '/PATH/TO/WAVE_FILE/R1_4.wav', '/PATH/TO/WAVE_FILE/R1_5.wav', '/PATH/TO/WAVE_FILE/R1_6.wav', '/PATH/TO/WAVE_FILE/R1_7.wav', '/PATH/TO/WAVE_FILE/R1_8.wav', '/PATH/TO/WAVE_FILE/R1_9.wav', '/PATH/TO/WAVE_FILE/R1_10.wav', '/PATH/TO/WAVE_FILE/R2_1.wav', '/PATH/TO/WAVE_FILE/R2_2.wav', '/PATH/TO/WAVE_FILE/R2_3.wav', '/PATH/TO/WAVE_FILE/R2_4.wav', '/PATH/TO/WAVE_FILE/R2_5.wav', '/PATH/TO/WAVE_FILE/R2_6.wav', '/PATH/TO/WAVE_FILE/R2_7.wav', '/PATH/TO/WAVE_FILE/R2_8.wav', '/PATH/TO/WAVE_FILE/R2_9.wav', '/PATH/TO/WAVE_FILE/R2_10.wav', '/PATH/TO/WAVE_FILE/R3_1.wav', '/PATH/TO/WAVE_FILE/R3_2.wav', '/PATH/TO/WAVE_FILE/R3_3.wav', '/PATH/TO/WAVE_FILE/R3_4.wav', '/PATH/TO/WAVE_FILE/R3_5.wav', '/PATH/TO/WAVE_FILE/R3_6.wav', '/PATH/TO/WAVE_FILE/R3_7.wav', '/PATH/TO/WAVE_FILE/R3_8.wav', '/PATH/TO/WAVE_FILE/R3_9.wav', '/PATH/TO/WAVE_FILE/R3_10.wav', '/PATH/TO/WAVE_FILE/R4_1.wav', '/PATH/TO/WAVE_FILE/R4_2.wav', '/PATH/TO/WAVE_FILE/R4_3.wav', '/PATH/TO/WAVE_FILE/R4_4.wav', '/PATH/TO/WAVE_FILE/R4_5.wav', '/PATH/TO/WAVE_FILE/R4_6.wav', '/PATH/TO/WAVE_FILE/R4_7.wav', '/PATH/TO/WAVE_FILE/R4_8.wav', '/PATH/TO/WAVE_FILE/R4_9.wav', '/PATH/TO/WAVE_FILE/R4_10.wav']
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipykernel_29087/2753073062.py in
16 }
17
---> 18 train_ds = CustomDataset(mode="train",sample_rate = 48000)
19 print(train_ds)
20 feature_extractor = LogMelSpectrogram(**feat_conf)
/tmp/ipykernel_29087/4134170284.py in __init__(self, **kwargs)
12
13 def __init__(self, **kwargs):
---> 14 files, labels = self._get_data()
15 super(CustomDataset, self).__init__(
16 files=files, labels=labels, feat_type='raw', **kwargs)
/tmp/ipykernel_29087/4134170284.py in _get_data(self)
26 with open(self.meta_file) as f:
27 for line in f:
---> 28 file, label_str = line.strip().split(' ')
29 files.append(file)
30 #print(label_str)
ValueError: not enough values to unpack (expected 2, got 1)
N
/PATH/TO/WAVE_FILE/R4_1.wav
N
/PATH/TO/WAVE_FILE/R4_2.wav
N
/PATH/TO/WAVE_FILE/R4_3.wav
N
/PATH/TO/WAVE_FILE/R4_4.wav
N
/PATH/TO/WAVE_FILE/R4_5.wav
N
/PATH/TO/WAVE_FILE/R4_6.wav
N
/PATH/TO/WAVE_FILE/R4_7.wav
N
/PATH/TO/WAVE_FILE/R4_8.wav
N
/PATH/TO/WAVE_FILE/R4_9.wav
N
/PATH/TO/WAVE_FILE/R4_10.wav
N
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipykernel_29087/24555379.py in
16 }
17
---> 18 train_ds = CustomDataset(sample_rate = sample_rate)
19 print(train_ds)
20 feature_extractor = LogMelSpectrogram(**feat_conf)
/tmp/ipykernel_29087/3468521541.py in __init__(self, **kwargs)
12
13 def __init__(self, **kwargs):
---> 14 files, labels = self._get_data()
15 super(CustomDataset, self).__init__(
16 files=files, labels=labels, feat_type='raw', **kwargs)
/tmp/ipykernel_29087/3468521541.py in _get_data(self)
26 with open(self.meta_file) as f:
27 for line in f:
---> 28 file, label_str = line.strip().split(' ')
29 print(file)
30 print(label_str)
ValueError: not enough values to unpack (expected 2, got 1)
txt的结尾不能回车换行
新问题来了······
[2022-09-11 11:06:07,173] [ INFO] - PaddleAudio | unique_endpoints {''}
[2022-09-11 11:06:07,175] [ INFO] - PaddleAudio | Found /home/aistudio/.paddlespeech/models/panns/panns_cnn14.pdparams
Exception in thread Thread-5:
Traceback (most recent call last):
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 218, in _thread_loop
self._thread_done_event)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/fetcher.py", line 121, in fetch
data.append(self.dataset[idx])
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlespeech/audio/datasets/dataset.py", line 92, in __getitem__
record = self._convert_to_record(idx)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlespeech/audio/datasets/dataset.py", line 75, in _convert_to_record
waveform, sample_rate = load_audio(file, sr=self.sample_rate)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlespeech/audio/backends/soundfile_backend.py", line 306, in load
y, r = sound_file_load(file, offset=offset, dtype=dtype, duration=duration)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlespeech/audio/backends/soundfile_backend.py", line 207, in sound_file_load
with sf.SoundFile(file) as sf_desc:
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/soundfile.py", line 629, in __init__
self._file = self._open(file, mode_int, closefd)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/soundfile.py", line 1184, in _open
"Error opening {0!r}: ".format(self.name))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/soundfile.py", line 1357, in _error_check
raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening '/PATH/TO/WAVE_FILE/R2_1.wav': System error.