Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于musan数据集的问题 #65

Closed
wangsheng3 opened this issue Oct 11, 2023 · 4 comments
Closed

关于musan数据集的问题 #65

wangsheng3 opened this issue Oct 11, 2023 · 4 comments

Comments

@wangsheng3
Copy link

运行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 pytorch/audio#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
Copy link

解决了吗?兄弟

@wangsheng3
Copy link
Author

wangsheng3 commented Oct 17, 2023 via email

@zs-joker
Copy link

zs-joker commented Nov 5, 2023

兄弟你咋改的 我也是类似的报错 改完路径还是错的 设置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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants