How to use few files from audioDatastore after reading the whole wav files?
2 次查看(过去 30 天)
显示 更早的评论
I am using audioDatastore for reading wav files from a folder then assign lables to each file. Now I want to use only few of those labels to train my model not all. My labels are there in ads.Labels. Could any one tell me how to do that, before splitting using them as:
[adsTrain,adsTest] = splitEachLabel(ads,0.8);
Here ads should have only some selected labels say 1, 2, 3 out of 1,2,3,4,5,6,7.
I am not able to write that conditional statement here for object ads.
Thanks
0 个评论
采纳的回答
jibrahim
2022-12-14
Hi Krishna,
You can use subset for this. Something like:
ads = subset(ads,ads.Labels==1 || ads.Labels==2)
12 个评论
Walter Roberson
2022-12-18
ads = subset(ads,strcmp(ads.Labels,'Happy')|strcmp(ads.Labels,'Sad')|strcmp(ads.Labels,'Angry'));
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 AI for Signals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!