yeyupiaoling / VoiceprintRecognition-Pytorch

This project uses a variety of advanced voiceprint recognition models such as EcapaTdnn, ResNetSE, ERes2Net, CAM++, etc. It is not excluded that more models will be supported in the future. At the same time, this project also supports MelSpectrogram, Spectrogram data preprocessing methods
Apache License 2.0
777 stars 124 forks source link

您好,我在运行这个代码时,报了这个错误,我想问下是什么原因? #44

Closed wxy0505 closed 1 year ago

wxy0505 commented 1 year ago

[2023-05-02 14:34:01.811351 INFO ] utils:print_arguments:28 - max_epoch: 50 [2023-05-02 14:34:01.811389 INFO ] utils:print_arguments:30 - use_loss: AAMLoss [2023-05-02 14:34:01.811427 INFO ] utils:print_arguments:30 - use_model: Res2Net [2023-05-02 14:34:01.811465 INFO ] utils:print_arguments:31 - ------------------------------------------------ /home/hao/anaconda3/envs/tdnn/lib/python3.8/site-packages/torchaudio/functional/functional.py:594: UserWarning: At least one mel filterbank has all zero values. The value forn_mels(64) may be set too high. Or, the value forn_freqs` (513) may be set too low. warnings.warn( [2023-05-02 14:34:04.088952 INFO ] augmentation:_parse_pipeline_from:94 - 数据增强配置:{'type': 'noise', 'aug_type': 'audio', 'params': {'min_snr_dB': 10, 'max_snr_dB': 50, 'repetition': 2, 'noise_dir': 'dataset/noise/'}, 'prob': 0.0} [2023-05-02 14:34:04.089046 INFO ] augmentation:_parse_pipeline_from:94 - 数据增强配置:{'type': 'resample', 'aug_type': 'audio', 'params': {'new_sample_rate': [8000, 32000, 44100, 48000]}, 'prob': 0.0} [2023-05-02 14:34:04.089107 INFO ] augmentation:_parse_pipeline_from:94 - 数据增强配置:{'type': 'speed', 'aug_type': 'audio', 'params': {'min_speed_rate': 0.9, 'max_speed_rate': 1.1, 'num_rates': 3}, 'prob': 0.5} [2023-05-02 14:34:04.089164 INFO ] augmentation:_parse_pipeline_from:94 - 数据增强配置:{'type': 'shift', 'aug_type': 'audio', 'params': {'min_shift_ms': -5, 'max_shift_ms': 5}, 'prob': 0.0} [2023-05-02 14:34:04.089218 INFO ] augmentation:_parse_pipeline_from:94 - 数据增强配置:{'type': 'volume', 'aug_type': 'audio', 'params': {'min_gain_dBFS': -15, 'max_gain_dBFS': 15}, 'prob': 0.5} Traceback (most recent call last): File "/home/hao/VoiceprintRecognition-Pytorch-develop/train.py", line 22, in trainer.train(save_model_path=args.save_model_path, File "/home/hao/VoiceprintRecognition-Pytorch-develop/mvector/trainer.py", line 334, in train self.__setup_model(input_size=self.audio_featurizer.feature_dim, is_train=True) File "/home/hao/VoiceprintRecognition-Pytorch-develop/mvector/trainer.py", line 119, in setup_model backbone = Res2Net(input_size=input_size, **self.configs.model_conf) TypeError: init__() got an unexpected keyword argument 'channels'

Process finished with exit code 1`

yeyupiaoling commented 1 year ago

参考这个设置配置文件。

https://github.com/yeyupiaoling/VoiceprintRecognition-Pytorch/blob/fc4dd2273882c0e70129f9e91845b9e538fb6992/mvector/models/res2net.py#L91