TaoRuijie / ECAPA-TDNN

Unofficial reimplementation of ECAPA-TDNN for speaker recognition (EER=0.86 for Vox1_O when train only in Vox2)
MIT License
581 stars 111 forks source link

关于musan数据集的问题 #65

Closed wangsheng3 closed 9 months ago

wangsheng3 commented 11 months ago

运行python trainECAPAModel.py --save_path exps/exp1 报错

adins@DESKTOP-2P212JU MINGW64 /e/pycharm/ECAPA-TDNN-main $ python trainECAPAModel.py --save_path exps/exp1 E:\Anaconda3\envs\voxsrc2022\lib\site-packages\torchaudio\extension\extension.py:14: UserWarning: torchaudio C++ extension is not available. warnings.warn('torchaudio C++ extension is not available.') E:\Anaconda3\envs\voxsrc2022\lib\site-packages\torchaudio\backend\utils.py:64: UserWarning: The interface of "soundfile" backend is planned to change in 0.8.0 to match that of "sox_io" backend and the current interface will be removed in 0.9.0. To use the new interface, do torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE = False before setting the backend to "soundfile". Please refer to https://github.com/pytorch/audio/issues/903 for the detail. 'The interface of "soundfile" backend is planned to change in 0.8.0 to ' 10-11 14:34:06 Model para number = 14.73 Traceback (most recent call last): File "trainECAPAModel.py", line 85, in loss, lr, acc = s.train_network(epoch = epoch, loader = trainLoader) File "E:\pycharm\ECAPA-TDNN-main\ECAPAModel.py", line 29, in train_network for num, (data, labels) in enumerate(loader, start = 1): File "E:\Anaconda3\envs\voxsrc2022\lib\site-packages\torch\utils\data\dataloader.py", line 435, in next data = self._next_data() File "E:\Anaconda3\envs\voxsrc2022\lib\site-packages\torch\utils\data\dataloader.py", line 475, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "E:\Anaconda3\envs\voxsrc2022\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "E:\Anaconda3\envs\voxsrc2022\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "E:\pycharm\ECAPA-TDNN-main\dataLoader.py", line 56, in getitem audio = self.add_noise(audio, 'music') File "E:\pycharm\ECAPA-TDNN-main\dataLoader.py", line 77, in add_noise noiselist = random.sample(self.noiselist[noisecat], random.randint(numnoise[0],numnoise[1])) KeyError: 'music' 最后的keyerror可能是music,noise,speech,不知道是为什么报错

19862288048 commented 10 months ago

解决了吗?兄弟

wangsheng3 commented 10 months ago

解决了,是数据集和代码放的有点问题,不太匹配,改了下代码和数据集路径格式就没问题了,麻烦了,谢谢😊

---原始邮件--- 发件人: @.> 发送时间: 2023年10月17日(周二) 中午1:17 收件人: @.>; 抄送: @.**@.>; 主题: Re: [TaoRuijie/ECAPA-TDNN] 关于musan数据集的问题 (Issue #65)

解决了吗?兄弟

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

zs-joker commented 10 months ago

兄弟你咋改的 我也是类似的报错 改完路径还是错的 设置musan报错下面的 设置musan/music等keyerror就可能是music,noise,speech ('--musan_path', type=str, default="E:/桌面/论文合集/dataset/musan", help='The path to the MUSAN set, eg:"/data08/Others/musan_split" in my case') noiselist = random.sample(self.noiselist[noisecat], random.randint(numnoise[0], numnoise[1])) KeyError: 'noise'

wangsheng3 commented 10 months ago

你的路径的问题,人家这里help写的是相对路径,绝对路径我举个例子,可能是这样:"E:pycharmProject/ECAPA-TDNN/data08....",前面是有默认的,那你在换了路径的情况下,你得数清楚后面找musan数据集时的'//.wav'是否正确,搞清楚才行。对了,你这里说找不到,应该就是路径和没匹配,以我的经验。