پاسخ : پروژه پردازش گفتار با HMM
راستش من از یک تولباکس آماده استفاده میکنم که میتونی از http://www.cs.ubc.ca/~murphyk/Software/HMM.zip دانلود کنی
توضیحات پارامترها هم http://www.cs.ubc.ca/~murphyk/Softwa...hmm_usage.html
اینو یه آقایی به نام Kevin Murphy در سال 1998 نوشته که آخرین ورژن قابل دسترسش هست که 2005 پ کردند
فکر کنم به خود لینک نگاهی بندازی بهتر از توضیحات من باشه
فقط راجع به تولباکس اینو بگم که برای اجرا باید dhmm_em_demo.m رو اجرا کنی و بقیه کد ها باید مسیرشون Add Path بشه تو کد اصلی تا جواب بگیری!
کد های MFCC هم که استفاده کردم اینا هستن
نوشته اصلی توسط هـادی
توضیحات پارامترها هم http://www.cs.ubc.ca/~murphyk/Softwa...hmm_usage.html
اینو یه آقایی به نام Kevin Murphy در سال 1998 نوشته که آخرین ورژن قابل دسترسش هست که 2005 پ کردند
فکر کنم به خود لینک نگاهی بندازی بهتر از توضیحات من باشه
فقط راجع به تولباکس اینو بگم که برای اجرا باید dhmm_em_demo.m رو اجرا کنی و بقیه کد ها باید مسیرشون Add Path بشه تو کد اصلی تا جواب بگیری!
کد های MFCC هم که استفاده کردم اینا هستن
کد:
[left] % Clean-up MATLAB's environment clear all; close all; clc; % Define variables Tw = 25; % analysis frame duration (ms) Ts = 10; % analysis frame shift (ms) alpha = 0.97; % preemphasis coefficient M = 20; % number of filterbank channels C = 12; % number of cepstral coefficients L = 22; % cepstral sine lifter parameter LF = 300; % lower frequency limit (Hz) HF = 3700; % upper frequency limit (Hz) wav_file = 'sp10.wav'; % input audio filename % Read speech samples, sampling rate and precision from file [ speech, fs, nbits ] = wavread( wav_file ); %extra plot waveFile='sp10.wav'; [y2, fs2, nbits2]=wavread(waveFile); a2=0.95; y22 = filter([1, -a2], 1, y2); time=(1:length(y2))/fs2; wavwrite(y22, fs2, nbits2, 'P.E.sp10.wav'); subplot(2,1,1); plot(time, y2); title('Original wave: s(n)'); subplot(2,1,2); plot(time, y22); title(sprintf('After pre-emphasis: s_2(n)=s(n)-a*s(n-1), a=%f', a2)); subplot(2,1,1); set(gca, 'unit', 'pixel'); axisPos=get(gca, 'position'); uicontrol('string', 'Play', 'position', [axisPos(1:2), 60, 20], 'callback', 'sound(y2, fs)'); subplot(2,1,2); set(gca, 'unit', 'pixel'); axisPos=get(gca, 'position'); uicontrol('string', 'Play', 'position', [axisPos(1:2), 60, 20], 'callback', 'sound(y22, fs)'); % Feature extraction (feature vectors as columns) [ MFCCs, FBEs, frames ] = ... mfcc( speech, fs, Tw, Ts, alpha, @hamming, [LF HF], M, C+1, L ); % Generate data needed for plotting [ Nw, NF ] = size( frames ); % frame length and number of frames time_frames = [0:NF-1]*Ts*0.001+0.5*Nw/fs; % time vector (s) for frames time = [ 0:length(speech)-1 ]/fs; % time vector (s) for signal samples logFBEs = 20*log10( FBEs ); % compute log FBEs for plotting logFBEs_floor = max(logFBEs(:))-50; % get logFBE floor 50 dB below max logFBEs( logFBEs<logFBEs_floor ) = logFBEs_floor; % limit logFBE dynamic range % Generate plots figure('Position', [30 30 800 600], 'PaperPositionMode', 'auto', ... 'color', 'w', 'PaperOrientation', 'landscape', 'Visible', 'on' ); subplot( 311 ); plot( time, speech, 'k' ); xlim( [ min(time_frames) max(time_frames) ] ); xlabel( 'Time (s)' ); ylabel( 'Amplitude' ); title( 'Speech waveform'); subplot( 312 ); imagesc( time_frames, [1:M], logFBEs ); axis( 'xy' ); xlim( [ min(time_frames) max(time_frames) ] ); xlabel( 'Time (s)' ); ylabel( 'Channel index' ); title( 'Log (mel) filterbank energies'); subplot( 313 ); imagesc( time_frames, [1:C], MFCCs(2:end,:) ); % HTK's TARGETKIND: MFCC %imagesc( time_frames, [1:C+1], MFCCs ); % HTK's TARGETKIND: MFCC_0 axis( 'xy' ); xlim( [ min(time_frames) max(time_frames) ] ); xlabel( 'Time (s)' ); ylabel( 'Cepstrum index' ); title( 'Mel frequency cepstrum' ); % Set color map to grayscale colormap( 1-colormap('gray') );[/left]
دیدگاه