function varargout = bishe(varargin)% BISHE MATLAB code for bishe.fig% BISHE, by itself, creates a new BISHE or raises the existing% singleton*.% H = BISHE returns the handle to a new BISHE or the handle to% the existing singleton*.% BISHE('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in BISHE.M with the given input arguments.% BISHE('Property','Value',...) creates a new BISHE or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before bishe_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to bishe_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 bishe% Last Modified by GUIDE v2.5 14-Apr-2013 11:52:05% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @bishe_OpeningFcn, ... 'gui_OutputFcn', @bishe_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []);if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1});endif 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 bishe is made visible.function bishe_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 bishe (see VARARGIN)% Choose default command line output for bishehandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes bishe wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = bishe_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 structurevarargout{1} = handles.output;% --- Executes on button press in exit.function exit_Callback(hObject, eventdata, handles)% hObject handle to exit (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)close;% --- Executes on button press in luyin2.function luyin2_Callback(hObject, eventdata, handles)% hObject handle to luyin2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global b;fs=16000;t=2;b=wavrecord(t*fs,fs);handles.b=b;guidata(hObject, handles);% --- Executes on button press in zanting2.function zanting2_Callback(hObject, eventdata, handles)% hObject handle to zanting2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global b;pause(handles.b);guidata(hObject, handles);% --- Executes on button press in bofang2.function bofang2_Callback(hObject, eventdata, handles)% hObject handle to bofang2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global b;wavplay(b,22050);axes(handles.axes2);plot(b);guidata(hObject, handles);% --- Executes on button press in baocun2.function baocun2_Callback(hObject, eventdata, handles)% hObject handle to baocun2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global b;[filename pathname]=uiputfile({'*.wav','wav-files(*.wav)';'*.*','All-files(*.*)'},'另存为');str=strcat(pathname,filename);save(str,'b');wavwrite(b,16000,str);guidata(hObject, handles);% --- Executes on button press in duqu2.function duqu2_Callback(hObject, eventdata, handles)% hObject handle to duqu2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global m2;global x1;global x2;[fname,L]=uigetfile({'*.wav','All MATLAB Files(*.wav)';'*.*','All-files(*.*)'},'');file=[L,fname];[S,fs]=wavread(file);figure[x1,x2]=vad(S);axes(handles.axes2);m2=mfcc(S);guidata(hObject, handles);% --- Executes on button press in luyin1.function luyin1_Callback(hObject, eventdata, handles)% hObject handle to luyin1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global a;fs=16000;t=2;a=wavrecord(t*fs,fs);handles.a=a;guidata(hObject, handles);% --- Executes on button press in zaiting1.function zaiting1_Callback(hObject, eventdata, handles)% hObject handle to zaiting1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global a;pause(handles.a);guidata(hObject, handles);% --- Executes on button press in bofang1.function bofang1_Callback(hObject, eventdata, handles)% hObject handle to bofang1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global a;wavplay(a,22050);axes(handles.axes1);plot(a);guidata(hObject, handles);% --- Executes on button press in baocun1.function baocun1_Callback(hObject, eventdata, handles)% hObject handle to baocun1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global a;[filename pathname]=uiputfile({'*.wav','wav-files(*.wav)';'*.*','All-files(*.*)'},'另存为');str=strcat(pathname,filename);save(str,'a');wavwrite(a,16000,str);guidata(hObject, handles);% --- Executes on button press in duqu1.function duqu1_Callback(hObject, eventdata, handles)% hObject handle to duqu1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global m1;global x1;global x2;[fname,L]=uigetfile({'*.wav','All MATLAB Files(*.wav)';'*.*','All-files(*.*)'},'Pick a file','MultiSelect', 'on');file=[L,fname];[S,fs]=wavread(file);figuresubplot(2,1,1);plot(S);[x1,x2]=vad(S);axes(handles.axes1);m1=mfcc(S);guidata(hObject, handles);% --- Executes on button press in pushbutton12.function pushbutton12_Callback(hObject, eventdata, handles)% hObject handle to pushbutton12 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global m1;global m2;global x1;global x2;for i=1:10fname=sprintf('test1\%d2.wav',i-1);x=wavread(fname); [x1 x2]=vad1(x); axes(handles.axes1); m2=mfcc(x); m2=m2(x1:x2,:); test(i).mfcc=m2;endfor i=1:10fname=sprintf('train1\%d3.wav',i-1);x=wavread(fname); [x1 x2]=vad1(x); axes(handles.axes2); m1=mfcc(x); m1=m1(x1:x2,:); ref(i).mfcc=m1;enddist=zeros(10,10);for i=1:10for j=1:10 dist(i,j)=dtw(test(i).mfcc,ref(j).mfcc);endendfor i=1:10 [d,j]=min(dist(i,:)); fprintf('测试模板%d的识别结果为:%dn',i-1,j-1);endguidata(hObject, handles);
导读:目前正在解读《MATLAB 特定人语音识别代码》的相关信息,《MATLAB 特定人语音识别代码》是由用户自行发布的知识型内容!下面请观看由(电工技术网 - www.9ddd.net)用户发布《MATLAB 特定人语音识别代码》的详细说明。
简介:这里给大家分享MATLAB特定人语音识别代码。
提醒:《MATLAB 特定人语音识别代码》最后刷新时间 2024-03-14 01:02:41,本站为公益型个人网站,仅供个人学习和记录信息,不进行任何商业性质的盈利。如果内容、图片资源失效或内容涉及侵权,请反馈至,我们会及时处理。本站只保证内容的可读性,无法保证真实性,《MATLAB 特定人语音识别代码》该内容的真实性请自行鉴别。