按步骤训练fastspeech时,在训练之前进行Compute Phoneme Duration的时候,
按照说明,预先在
https://github.com/PaddlePaddle/Parakeet
下载了transformerTTS预训练模型作为教学模型参数,放在pre_modle文件夹下,然后运行时报错如下:
**运行命令:**python get_alignments.py \
--use_gpu=1
--output='./alignments'
--data='~/datasets/LJSpeech-1.1'
--config='../pre_model/ljspeech.yaml'
--checkpoint_transformer='../pre_model/step-162000.pdparams' \
报错log:
Traceback (most recent call last):
File "get_alignments.py", line 132, in
alignments(args)
File "get_alignments.py", line 62, in alignments
network_cfg['embedding_size'], network_cfg['hidden_size'],
KeyError: 'embedding_size'
然后由于下一步训练中的参数可以使用教学模型的alignments.pkl参数和config参数,转而进行train步骤,依旧报错:
运行指令:
python train.py \
--use_gpu=1
--data='~/datasets/LJSpeech-1.1'
--alignments_path='pre_model/alignments.pkl'
--output='./experiments'
--config='./pre_model/ljspeech.yaml' \
报错log如下:
{'alignments_path': 'pre_model/alignments.pkl',
'checkpoint': None,
'config': './pre_model/ljspeech.yaml',
'data': '/datasets/LJSpeech-1.1',
'iteration': None,
'output': './experiments',
'use_gpu': 1}
W0701 01:40:03.189592 15764 device_context.cc:252] Please NOTE: device: 0, CUDA Capability: 61, Driver API Version: 10.1, Runtime API Version: 10.0
W0701 01:40:03.192462 15764 device_context.cc:260] device: 0, cuDNN Version: 7.6.
0it [00:00, ?it/s]Rank 0: checkpoint loaded.
/root/anaconda3/envs/paddle/lib/python3.7/site-packages/librosa/core/audio.py:161: UserWarning: PySoundFile failed. Trying audioread instead.
warnings.warn('PySoundFile failed. Trying audioread instead.')
2020-07-01 01:40:11,265-WARNING: DygraphDataLoader reader thread raised an exception.
Exception in thread Thread-3:
Traceback (most recent call last):
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/librosa/core/audio.py", line 129, in load
with sf.SoundFile(path) as sf_desc:
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/soundfile.py", line 629, in init
self._file = self._open(file, mode_int, closefd)
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/soundfile.py", line 1184, in _open
"Error opening {0!r}: ".format(self.name))
File "/root/anaconda3/envs/paddle/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 '/datasets/LJSpeech-1.1/wavs/LJ037-0090.wav': System error.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/anaconda3/envs/paddle/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/root/anaconda3/envs/paddle/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/fluid/reader.py", line 913, in _reader_thread_loop_for_singleprocess
six.reraise(*sys.exc_info())
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/six.py", line 703, in reraise
raise value
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/fluid/reader.py", line 892, in reader_thread_loop_for_singleprocess
for sample in self.batch_reader():
File "/root/AI/Paddle/Parakeet/parakeet/data/datacargo.py", line 112, in next
minibatch = [self.dataset[i] for i in index]
File "/root/AI/Paddle/Parakeet/parakeet/data/datacargo.py", line 112, in
minibatch = [self.dataset[i] for i in index]
File "/root/AI/Paddle/Parakeet/parakeet/data/dataset.py", line 47, in getitem
return self.get_example(index)
File "/root/AI/Paddle/Parakeet/parakeet/data/dataset.py", line 100, in get_example
self.cache[i] = self.dataset[i]
File "/root/AI/Paddle/Parakeet/parakeet/data/dataset.py", line 47, in getitem
return self.get_example(index)
File "/root/AI/Paddle/Parakeet/parakeet/data/dataset.py", line 82, in get_example
return self.transform(in_data)
File "/root/AI/Paddle/Parakeet/examples/fastspeech/data.py", line 114, in call
wav, _ = librosa.load(str(fname))
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/librosa/core/audio.py", line 162, in load
y, sr_native = __audioread_load(path, offset, duration, dtype)
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/librosa/core/audio.py", line 186, in __audioread_load
with audioread.audio_open(path) as input_file:
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/audioread/init.py", line 111, in audio_open
return BackendClass(path)
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/audioread/rawread.py", line 62, in init
self._fh = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '~/datasets/LJSpeech-1.1/wavs/LJ037-0090.wav'
Traceback (most recent call last):
File "train.py", line 166, in
main(args)
File "train.py", line 110, in main
batch = next(iterator)
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/tqdm/_tqdm.py", line 897, in iter
for obj in iterable:
File "/root/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/fluid/reader.py", line 804, in next
return self._reader.read_next_var_list()
paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int)
1 paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int)
2 paddle::operators::reader::BlockingQueue<std::vector<paddle::framework::LoDTensor, std::allocatorpaddle::framework::LoDTensor > >::Receive(std::vector<paddle::framework::LoDTensor, std::allocatorpaddle::framework::LoDTensor >)
3 paddle::operators::reader::PyReader::ReadNext(std::vector<paddle::framework::LoDTensor, std::allocatorpaddle::framework::LoDTensor >)
4 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result, std::__future_base::_Result_base::_Deleter>, unsigned long> >::_M_invoke(std::_Any_data const&)
5 std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&)
6 ThreadPool::ThreadPool(unsigned long)::{lambda()#1}::operator()() const
Error Message Summary:
Error: Blocking queue is killed because the data reader raises an exception
[Hint: Expected killed_ != true, but received killed_:1 == true:1.] at (/paddle/paddle/fluid/operators/reader/blocking_queue.h:141)
关于runerror:数据集下载正确并解压也正确,查找文件也存在,为什么会读取错误呢?
以上2个问题希望开发人员帮忙解答~感谢!