A list,

This paper designs and implements a text-related voiceprint recognition system based on Matlab, which can determine the speaker’s identity.

1 System Principle

A. Voice print recognition

In the past two years, with the development of artificial intelligence, many mobile phone apps have introduced the function of voice print lock. This is mainly used in the voice print recognition related technology. Voice print recognition, also known as speaker recognition, is a little different from speech recognition.



B. Meyer frequency cepstrum coefficient (MFCC)

Mel Frequency Cepstrum Coefficient (MFCC) is one of the most commonly used speech signal features in speech signal processing.

Experimental observations show that the human ear acts like a filter bank, focusing only on certain frequencies on the spectrum. The range of sound frequency perception of human ear does not follow a linear relationship in the spectrum, but follows an approximate linear relationship in the Mel frequency domain.

Meier frequency cepstrum coefficient takes into account human auditory characteristics, first mapping the linear spectrum to the Mel nonlinear spectrum based on auditory perception, and then converting to cepstrum. The relation between ordinary frequency conversion and Mayer frequency is:



C. VectorQuantization

The system uses vector quantization to compress the extracted speech MFCC features.

VectorQuantization (VQ) is a lossy data compression method based on block coding rules. In fact, there is a VQ step in multimedia compression formats such as JPEG and MPEG-4. Its basic idea is: several scalar data groups form a vector, and then the whole quantization in the vector space, so as to compress the data without losing much information.

3 System Structure

The structure of the whole system in this paper is shown as follows:

— Training process

Firstly, the speech signal is preprocessed, then the MFCC characteristic parameters are extracted and compressed by vector quantization method to obtain the speaker’s pronunciation codebook. The same speaker says the same content for many times, and the training process is repeated to form a codebook library.

— Identification process

In recognition, the speech signal is also preprocessed to extract MFCC features and compare the Euclidean distance between this feature and the training library codebook. When the value is smaller than a certain threshold, we assume that the speaker and the content of the speech are consistent with those in the training codebook, and the pairing is successful.

Ii. Source code

function varargout = GUI(varargin)
% GUI MATLAB code for GUI.fig
%      GUI, by itself, creates a new GUI or raises the existing
%      singleton*.
%
%      H = GUI returns the handle to a new GUI or the handle to
%      the existing singleton*.
%
%      GUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in GUI.M with the given input arguments.
%
%      GUI('Property'.'Value',...). creates anew GUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before GUI_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to GUI_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one % instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help GUI

% Last Modified by GUIDE v2. 5 15-Mar- 2021. 17:37:45

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @GUI_OpeningFcn, ...
                   'gui_OutputFcn',  @GUI_OutputFcn, ...
                   'gui_LayoutFcn', [],...'gui_Callback'[]);if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before GUI is made visible.
function GUI_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to GUI (see VARARGIN)

% Choose default command line output for GUI
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes GUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = GUI_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
fprintf('\n Identifying... \n\n'); % Load speakerData; load speakerGmm; waveDir='trainning\'; Test_speakerData = dir(waveDir); % gets the structure data in the test set, which is acharType Test_speakerData(1:2) = [];
Test_speakerNum=length(Test_speakerData);
Test_speakerNum
count=0; % % % % % % % % % % % % % % % %for i=1:Test_speakerNum %%% reading Speech [filename,filepath]= uigetFile (Test_speakerNum %%%'*.wav'.'Select Audio file');
set(handles.text1,'string',filepath)
   filep=strcat(filepath,filename); 
[testing_data, fs]=audioread(filep);
sound(testing_data, fs);
save testing_data
load testing_data
y=testing_data
axes(handles.axes1)
plot(y);
xlabel('t'); ylabel('value');
title('Time domain diagram'); % frequency domain % amplitude frequency graph N=length(y); fs1=100; % Sampling frequency n=0:N- 1; t=n/fs; % time series yfft = FFT (y,N); mag=abs(yfft); % Take the absolute value of amplitude f=n*fs/ n; Axes (axes2) axes(axes2)1:N/2),mag(1:N/2)); % Plot the amplitude before Nyquist frequency as a function of frequency xlabel('frequency/Hz');
ylabel('amplitude'); title('Frequency domain diagram'); A = % phase spectraabs(yfft);
ph=2*angle(yfft(1:N/2));
ph=ph*180/pi;
axes(handles.axes3);
plot(f(1:N/2),ph(1:N/2));
xlabel('frequency/hz'),ylabel('phase'),title('Phase spectrum of numbers 0-9'); % Draw power spectrum Fs=1000;
n=0:1/Fs:1;
xn=y;
nfft=1024; window=boxcar(length(n)); % Rectangular window noverlap=0; % Data without overlap p=0.9; % confidence probability [Pxx Pxxc] = PSD (xn, NFFT, Fs, window, noverlap, p); index=0:round(nfft/2- 1);
k=index*Fs/nfft;
plot_Pxx=10*log10(Pxx(index+1));
plot_Pxxc=10*log10(Pxxc(index+1));
axes(handles.axes4)
plot(k,plot_Pxx);
title('Power spectrum of numbers 0-9');

axes(handles.axes5)
surf( speakerData(1).mfcc); % Draw 3d map of MFCC title('3d MFCC of first Human Speech'); % Features of the first person speaking MFCC MFCC refers to the Meyercepstrum coefficient % All two-dimensional axes(handles. Axes6) plotting the first person's MFCCfor i=1:speakerNum
	fprintf('\n is the %d speaker %s training GMM... ', i,speakerData(i).name(1:end4 -));
	[speakerGmm(i).mu, speakerGmm(i).sigm,speakerGmm(i).c] = gmm_estimate(speakerData(i).mfcc(:,5:12)',gaussianNum,20); % transpose correct end fprintf('\n'); save speakerGmm speakerGmm; % Save sample GMM %hObject    handle to pushbutton5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
clc
close all
% hObject    handle to pushbutton6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
Copy the code

3. Operation results



Fourth, note

Version: 2014 a