babysor / MockingBird

🚀AI拟声: 5秒内克隆您的声音并生成任意语音内容 Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
35.43k stars 5.21k forks source link

TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' #707

Closed HuanLinOTO closed 6 months ago

HuanLinOTO commented 2 years ago

Summary[问题简述(一句话)] A clear and concise description of what the issue is. toolbox跑不了 Env & To Reproduce[复现与环境] 描述你用的环境、代码版本、模型 python3.8.10 最新mockingbird miven的模型 Screenshots[截图(如有)] If applicable, add screenshots to help image 完整日志:`D:\Project\MockingBird>python demo_toolbox.py -d ./ceshi.pt Arguments: datasets_root: ceshi.pt vc_mode: False enc_models_dir: encoder\saved_models syn_models_dir: synthesizer\saved_models voc_models_dir: vocoder\saved_models extractor_models_dir: ppg_extractor\saved_models convertor_models_dir: ppg2mel\saved_models cpu: False seed: None no_mp3_support: False

Warning: you do not have any of the recognized datasets in ceshi.pt. The recognized datasets are: LibriSpeech/dev-clean LibriSpeech/dev-other LibriSpeech/test-clean LibriSpeech/test-other LibriSpeech/train-clean-100 LibriSpeech/train-clean-360 LibriSpeech/train-other-500 LibriTTS/dev-clean LibriTTS/dev-other LibriTTS/test-clean LibriTTS/test-other LibriTTS/train-clean-100 LibriTTS/train-clean-360 LibriTTS/train-other-500 LJSpeech-1.1 VoxCeleb1/wav VoxCeleb1/test_wav VoxCeleb2/dev/aac VoxCeleb2/test/aac VCTK-Corpus/wav48 aidatatang_200zh/corpus/dev aidatatang_200zh/corpus/test aishell3/test/wav magicdata/train Feel free to add your own. You can still use the toolbox by recording samples yourself. Loaded encoder "pretrained.pt" trained to step 1564501 Synthesizer using device: cpu Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox__init.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox__init.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox__init.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Synthesizer using device: cpu Traceback (most recent call last): File "D:\Project\MockingBird\toolbox\init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox\init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox\init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox\init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox\init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Synthesizer using device: cpu Traceback (most recent call last): File "D:\Project\MockingBird\toolbox\init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\backends\backend_qtagg.py", line 23, in paintEvent def paintEvent(self, event): KeyboardInterrupt

D:\Project\MockingBird>python demo_toolbox.py Arguments: datasets_root: None vc_mode: False enc_models_dir: encoder\saved_models syn_models_dir: synthesizer\saved_models voc_models_dir: vocoder\saved_models extractor_models_dir: ppg_extractor\saved_models convertor_models_dir: ppg2mel\saved_models cpu: False seed: None no_mp3_support: False

Warning: you did not pass a root directory for datasets as argument. The recognized datasets are: LibriSpeech/dev-clean LibriSpeech/dev-other LibriSpeech/test-clean LibriSpeech/test-other LibriSpeech/train-clean-100 LibriSpeech/train-clean-360 LibriSpeech/train-other-500 LibriTTS/dev-clean LibriTTS/dev-other LibriTTS/test-clean LibriTTS/test-other LibriTTS/train-clean-100 LibriTTS/train-clean-360 LibriTTS/train-other-500 LJSpeech-1.1 VoxCeleb1/wav VoxCeleb1/test_wav VoxCeleb2/dev/aac VoxCeleb2/test/aac VCTK-Corpus/wav48 aidatatang_200zh/corpus/dev aidatatang_200zh/corpus/test aishell3/test/wav magicdata/train Feel free to add your own. You can still use the toolbox by recording samples yourself. Loaded encoder "pretrained.pt" trained to step 1564501 Synthesizer using device: cpu Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox__init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx' Traceback (most recent call last): File "D:\Project\MockingBird\toolbox\init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) TypeError: synthesize_spectrograms() got an unexpected keyword argument 'style_idx'`

HuanLinOTO commented 2 years ago

出现了一个新的错误 Loaded encoder "pretrained.pt" trained to step 1564501 Synthesizer using device: cuda Trainable Parameters: 0.000M Traceback (most recent call last): File "D:\Project\MockingBird\toolbox__init.py", line 144, in func = lambda: self.synthesize() or self.vocode() File "D:\Project\MockingBird\toolbox\init__.py", line 260, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) File "D:\Project\MockingBird\synthesizer\inference.py", line 93, in synthesize_spectrograms self.load() File "D:\Project\MockingBird\synthesizer\inference.py", line 71, in load self._model.load(self.model_fpath, self.device) File "D:\Project\MockingBird\synthesizer\models\base.py", line 51, in load self.load_state_dict(checkpoint["model_state"], strict=False) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\nn\modules\module.py", line 1604, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Tacotron: size mismatch for encoder.embedding.weight: copying a param with shape torch.Size([70, 512]) from checkpoint, the shape in current model is torch.Size([75, 512]). size mismatch for encoder_proj.weight: copying a param with shape torch.Size([128, 512]) from checkpoint, the shape in current model is torch.Size([128, 1024]). size mismatch for decoder.attn_rnn.weight_ih: copying a param with shape torch.Size([384, 768]) from checkpoint, the shape in current model is torch.Size([384, 1280]). size mismatch for decoder.rnn_input.weight: copying a param with shape torch.Size([1024, 640]) from checkpoint, the shape in current model is torch.Size([1024, 1152]). size mismatch for decoder.stop_proj.weight: copying a param with shape torch.Size([1, 1536]) from checkpoint, the shape in current model is torch.Size([1, 2048]).