PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.15k stars 5.56k forks source link

waveflow训练中文模型报错 #25762

Closed yeguang1991 closed 3 years ago

yeguang1991 commented 4 years ago

语料: image image 报错截图: image image

iclementine commented 4 years ago

出现这个问题的原因,训练代码中预设了音频的采样率和配置文件中写的采样率相同。 https://github.com/PaddlePaddle/Parakeet/blob/e58e927c5e1265f3ff3a61502f03475e9ebfbd85/examples/waveflow/data.py#L39

LJSpeech 的采样率是 22050Hz, 如果你使用的音频的话,你可以改一下读取音频的方式,让它把音频重采样到指定的采样率,这样应该就能正常训练了。

waveflow 中的 data.py 使用的是 scipy.io.wavfile.read 来读取音频,读出来的是整数类型的,比如说 16 bit 整数类型。 你可以稍微改一下代码,使用 librosa.load 或者用 soundfile.read 来读取音频,这些 API 支持自定义采样率。但是用它们读出来的默认是浮点数 (-1,1 )之间的 ndarray. 和 scipy.io.wavfile.read 不同,需要改动一下。

paddle-bot-old[bot] commented 3 years ago

Since you haven\'t replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。