Speaker verification
18 次查看(过去 30 天)
显示 更早的评论
Hello,
I get a speaker verification matlab code on the internet. But I can't understand all the lines. Can someone explain to me the following lines?
for i=1:3
Speaker_name=Au_dir(i).name;
Speaker_path=strcat(data_path,Speaker_name);
Speaker_data=getInfo(Speaker_path, 'wav');
len=length(Speaker_data);
Speaker_mix=randperm(len);
Speaker_data=Speaker_data(Speaker_mix);
Speaker_train=Speaker_data(1:300);
Speaker_intest=Speaker_data(301:len);
All_data=getInfo(data_path, 'wav');
all_len=length(All_data);
Thank you for your kind support.
1 个评论
回答(1 个)
Wayne King
2011-11-3
Hi, this code appears to be just reading the data from the .wav file for a particular speaker
Speaker_name=Au_dir(i).name;
Speaker_path=strcat(data_path,Speaker_name);
Speaker_data=getInfo(Speaker_path, 'wav');
I'm guessing that getInfo is not a MATHWORKS function. Is there a getInfo.m file in the code you downloaded?
Then, you get the length of that data and obtain a random shuffling (permutation) of the integers from 1 to the number of samples in the data.
len=length(Speaker_data);
Speaker_mix=randperm(len);
Then, you reshuffle the data based on that permutation. And create a training set of the first three hundred samples of the shuffled data and a test set of samples 301 to the end of the speaker's sample.
Speaker_data=Speaker_data(Speaker_mix);
Speaker_train=Speaker_data(1:300);
Speaker_intest=Speaker_data(301:len);
Then it looks like it reads all the wav files in. I'm guessing to see if it can identify the correct speaker.
All_data=getInfo(data_path, 'wav');
all_len=length(All_data);
4 个评论
Dr. Nitisha Aggarwal
2011-11-5
can u please write the whole code....i urgently needs a project on speech recognition
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Speech Recognition 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!