couldnt incorporate the .wav file
1 次查看(过去 30 天)
显示 更早的评论
I am trying to run some voices [.WAV] in the matlab but couldnt able to do that. Firstly, it wasnt takimg the folder of the sounds... now after provoding the path it is throwing some error.
"Index exceeds the number of array elements (51).
Error in train1 (line 25)
files = traindir('*.wav');"
can some one pls help me with this code. I want to run these code... it is my final project.
I am providing all the codes and the data set of .wav down below as an attchment.
采纳的回答
Walter Roberson
2018-11-22
traindir is aa variable there . traindir('*.wav') is a request to index the variable with index
[double('*'), double('.'), double('w'), double('a'), double('v')]
2 个评论
Walter Roberson
2018-11-22
编辑:Walter Roberson
2018-11-22
files = dir(fullfile(traindir,'*.wav'));
and change
[y,Fs] = audioread(files(i).name);
to
[y,Fs] = audioread( fullfile(traindir, files(i).name));
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!