Comments (3)
pre.py运行报错
Using data from:
data/aishell3/train/wav
aishell3: 0%| | 0/174 [00:00<?, ?speakers/s]/home_1/gaoyiyao/MockingBird-main/models/synthesizer/preprocess_audio.py:88: UserWarning: PySoundFile failed. Trying audioread instead.
wav, _ = librosa.load(wav_fpath, sr= hparams.sample_rate)
/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/librosa/core/audio.py:183: FutureWarning: librosa.core.audio.__audioread_load
Deprecated as of librosa version 0.10.0.
It will be removed in librosa version 1.0.
y, sr_native = __audioread_load(path, offset, duration, dtype)
aishell3: 0%| | 0/174 [01:26<?, ?speakers/s]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/librosa/core/audio.py", line 175, in load
y, sr_native = __soundfile_load(path, offset, duration, dtype)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/librosa/core/audio.py", line 208, in __soundfile_load
context = sf.SoundFile(path)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/soundfile.py", line 658, in init
self._file = self._open(file, mode_int, closefd)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/soundfile.py", line 1216, in _open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening 'data/SV2TTS/synthesizer/audio/audio-SSB03850064.wav_00.npy': System error.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home_1/gaoyiyao/MockingBird-main/models/synthesizer/preprocess_audio.py", line 124, in preprocess_general
wav, text = _split_on_silences(wav_fpath, words, hparams)
File "/home_1/gaoyiyao/MockingBird-main/models/synthesizer/preprocess_audio.py", line 88, in _split_on_silences
wav, _ = librosa.load(wav_fpath, sr= hparams.sample_rate)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/librosa/core/audio.py", line 183, in load
y, sr_native = __audioread_load(path, offset, duration, dtype)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/librosa/util/decorators.py", line 59, in __wrapper
return func(*args, **kwargs)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/librosa/core/audio.py", line 239, in __audioread_load
reader = audioread.audio_open(path)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/audioread/init.py", line 127, in audio_open
return BackendClass(path)
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/audioread/rawread.py", line 59, in init
self._fh = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'data/SV2TTS/synthesizer/audio/audio-SSB03850064.wav_00.npy'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home_1/gaoyiyao/MockingBird-main/pre.py", line 74, in
preprocess_dataset(**vars(args))
File "/home_1/gaoyiyao/MockingBird-main/models/synthesizer/preprocess.py", line 86, in preprocess_dataset
for speaker_metadata in tqdm(job, dataset, len(speaker_dirs), unit="speakers"):
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/tqdm/std.py", line 1181, in iter
for obj in iterable:
File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/multiprocessing/pool.py", line 870, in next
raise value
FileNotFoundError: [Errno 2] No such file or directory: 'data/SV2TTS/synthesizer/audio/audio-SSB03850064.wav_00.npy'
from mockingbird.
Traceback (most recent call last): File "/home_1/gaoyiyao/MockingBird-main/pre.py", line 74, in preprocess_dataset(**vars(args)) File "/home_1/gaoyiyao/MockingBird-main/models/synthesizer/preprocess.py", line 86, in preprocess_dataset for speaker_metadata in tqdm(job, dataset, len(speaker_dirs), unit="speakers"): File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/site-packages/tqdm/std.py", line 1181, in iter for obj in iterable: File "/home_1/gaoyiyao/anaconda3/envs/sound/lib/python3.9/multiprocessing/pool.py", line 870, in next raise value FileNotFoundError: [Errno 2] No such file or directory: 'data/SV2TTS/synthesizer/audio/audio-SSB03850064.wav_00.npy' 哪位大佬知道怎么解决
把preprocess_general函数修改一下试试, 参考这条issue #963
def preprocess_general(speaker_dir, out_dir: Path, skip_existing: bool, hparams, dict_info, no_alignments: bool, encoder_model_fpath: Path):
metadata = []
extensions = ("*.wav", "*.flac", "*.mp3")
for extension in extensions:
wav_fpath_list = speaker_dir.glob(extension)
# Iterate over each wav
for wav_fpath in wav_fpath_list:
words = dict_info.get(wav_fpath.name.split(".")[0])
if not words:
words = dict_info.get(wav_fpath.name) # try with extension
if not words:
print(f"No word found in dict_info for {wav_fpath.name}, skip it")
continue
sub_basename = "%s_%02d" % (wav_fpath.name, 0)
# mel_fpath = out_dir.joinpath("mels", f"mel-{sub_basename}.npy")
# wav_fpath = out_dir.joinpath("audio", f"audio-{sub_basename}.npy")
mel_fpath_out = out_dir.joinpath("mels", f"mel-{sub_basename}.npy")
wav_fpath_out = out_dir.joinpath("audio", f"audio-{sub_basename}.npy")
# if skip_existing and mel_fpath.exists() and wav_fpath.exists():
if skip_existing and mel_fpath_out.exists() and wav_fpath_out.exists():
continue
wav, text = _split_on_silences(wav_fpath, words, hparams)
# result = _process_utterance(wav, text, out_dir, sub_basename,
# False, hparams, encoder_model_fpath) # accelarate
result = _process_utterance(wav, text, out_dir, sub_basename, mel_fpath_out, wav_fpath_out, hparams, encoder_model_fpath)
if result is None:
continue
wav_fpath_name, mel_fpath_name, embed_fpath_name, wav, mel_frames, text = result
metadata.append ((wav_fpath_name, mel_fpath_name, embed_fpath_name, len(wav), mel_frames, text))
return metadata
from mockingbird.
多谢你,已经解决了
from mockingbird.
Related Issues (20)
- 主要粤语训练,怎样添加MozillaCommonVoice数据集训练?
- 求个好心人给一个MockingBird的交流群,另外tag0.0.1版本下,运行demo_toolbox工具箱,数据集\train无法识别
- windows11输入>python demo_toolbox.py后没反应,不报错 HOT 1
- Docker compose run failed
- 运行 python .\pre.py G:\AISHELL-3 preprocess_audio.py预处理报错,要在transformers里边导包,可是没有这个文件夹啊 HOT 1
- 预处理数据集出现如下错误
- 维度问题
- 没有_sources.txt这个文件'
- 不想每一条语音都覆盖前一条
- 有可以朗读英文和数字的模型吗 HOT 1
- how to solve this problem about pydantic V2? 跑代码在运行web.py时说pydantic版本不对,我使用liunx系统下跑的 HOT 1
- the first pretrained model url in the list cannot be opened
- 启动python web.py无反应,小白求助 HOT 1
- Synthesize and vocode时报错RuntimeError
- 社区预先训练好的75k合成器的百度网盘链接无法下载 HOT 2
- NameError: name 'audio_input_selection' is not defined
- RuntimeError: mat1 and mat2 shapes cannot be multiplied (80x513 and 1x513)
- 请问作者大大,encoder如何训练? HOT 2
- request:请教一下想法是否可行
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mockingbird.