• 大小: 39.74MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-30
  • 语言: Matlab
  • 标签: Matlab  

资源简介

说话人识别。github下载。 主要是Matlab代码。

资源截图

代码片段和文件信息

%%
rng(‘default‘)
% Step1: Create the universal background model from all the
% training speaker data
nmix = nMixtures; % In this case we know the # of mixtures needed
final_niter = 10;
ds_factor = 1;
ubm = gmm_em(trainSpeakerData(:) nmix final_niter ds_factor ...
nWorkers);
%%
% Step2: Now adapt the UBM to each speaker to create GMM speaker model.
map_tau = 10.0;
config = ‘mwv‘;
gmm = cell(nSpeakers 1);
for s=1:nSpeakers
gmm{s} = mapAdapt(trainSpeakerData(s :) ubm map_tau config);
end
%%
% Step3: Now calculate the score for each model versus each speaker‘s
% data.
% Generate a list that tests each model (first column) against all the
% testSpeakerData.
trials = zeros(nSpeakerstest*nChannelstest*nSpeakers 2);
answers = zeros(nSpeakerstest*nChannelstest*nSpeakers 1);
for ix = 1 : nSpeakers
b = (ix-1)*nSpeakerstest*nChannelstest + 1;
e = b + nSpeakerstest*nChannelstest - 1;
trials(b:e :) = [ix * ones(nSpeakerstest*nChannelstest 1)(1:nSpeakerstest*nChannelstest)‘];
answers((ix-1)*nChannelstest+b : (ix-1)*nChannelstest+b+nChannelstest-1) = 1;
end
gmmScores = score_gmm_trials(gmm reshape(testSpeakerData‘ nSpeakerstest*nChannelstest1) trials ubm);
%%
% Step4: Now compute the EER and plot the DET curve and confusion matrix
% imagesc(reshape(gmmScoresnSpeakers*nChannelstest nSpeakerstest))
% title(‘Speaker Verification Likelihood (GMM Model)‘);
% ylabel(‘Test # (Channel x Speaker)‘); xlabel(‘Model #‘);
% colorbar; drawnow; axis xy
% %figure
% eer = compute_eer(gmmScores answers false);

gmmScores=reshape(gmmScoresnSpeakers*nChannelstest nSpeakerstest);

%%
[val idx] = max(gmmScores);
a=all_files(idx).name;
a=a(1:end-13);
sprintf(‘\n Identified Speaker is %s \n‘ a)
% fprintf(‘\n Identified Speaker is : S%i \n‘idx)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-28 08:10  Speaker-Recognition-master\
     文件         383  2018-08-28 08:10  Speaker-Recognition-master\README.md
     目录           0  2018-08-28 08:10  Speaker-Recognition-master\data\
     目录           0  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\
     目录           0  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\
     文件      377644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Aditya Wagh testing2.wav
     文件      361644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Aditya wagh testing1.wav
     文件      380844  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Aditya wagh testing3.wav
     文件      435244  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Anousha testing2.wav
     文件      358444  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Anoushka testing1.wav
     文件      345644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Debabrata testing1.wav
     文件      368044  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Debabrata testing2.wav
     文件      371244  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Debabrata testing3.wav
     文件      342444  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Kuldeep testing1.wav
     文件      361644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Kuldeep testing2.wav
     文件      352044  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Kuldeep testing3.wav
     文件      352044  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Neeraj mishra testing1.wav
     文件      380844  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Neeraj mishra testing2.wav
     文件      361644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Neeraj mishra testing3.wav
     文件      358444  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Rahul Saxena testing1.wav
     文件      406444  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Rahul Saxena testing3.wav
     文件      412844  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Rahul saxena testing2.wav
     文件      419244  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Satyam testing.wav
     文件      361644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Shreeya testing1.wav
     文件      336044  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Shreeya testing2.wav
     文件      390444  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Shreeya testing3.wav
     文件      345644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Sugam Singla testing1.wav
     文件      377644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Sugam Singla testing2.wav
     文件      352044  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Sugam Singla testing3.wav
     文件      361644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Suryansh testing1.wav
     文件      345644  2018-08-28 08:10  Speaker-Recognition-master\data\VoiceRecorder\test_files\Suryansh testing2.wav
............此处省略34个文件信息

评论

共有 条评论