本项目实现需要voicebox模块,附网址:
http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
1、特征提取
声纹识别中常用到的特征主要有MFCC、和LPC。本文采取的MFCC特征。
function [ mfcc_feature ] = get_features( voice_data, fs )
%GET_FEATURES 提取语音信号的MFCC特征
a = 0.92; %预加重系数 0.9 < a < 1。
voice_data = filter([1 - a],1,voice_data);%预加重
mfcc_feature = melcepst(voice_data, fs); % 提取MFCC特征
end
2、主函数
%% 初始化
GMM_order = 10;
train_path = './train';
test_path = './test'
train_info = dir(train_path);
n_speakers = length(train_info) - 2