Error meassge while using wavread and audioread
이전 댓글 표시
This is a code for computing mfcc.I'm getting error as
'Undefined function 'wavread' for input arguments of type 'char'.'
When audioread is used instead of wavread it is shown that 'Too many output arguments.'
Could anybody help me resolving the issue?
% 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
N = 9;
P = 7;
file_name_array = {'a','d','f','h','n','sa','su'};
for i=1:N
for k=1:P
wav_file = char(strcat(dir_path,file_name_array(k),'0',num2str(i)));
% for i=1:
% Read speech samples, sampling rate and precision from file
[ speech, fs, nbits ] = wavread( wav_file );
% Feature extraction (feature vectors as columns)
[ MFCCs, FBEs, frames ] = ...
mfcc( speech, fs, Tw, Ts, alpha, @hamming, [LF HF], M, C+1, L );
답변 (1개)
KSSV
2021년 8월 17일
Try treplacing this line:
wav_file = char(strcat(dir_path,file_name_array(k),'0',num2str(i)));
with
wav_file = [dir_path,filesep,file_name_array(k),'0',num2str(i)];
Also read about fullfile.
카테고리
도움말 센터 및 File Exchange에서 Cepstral Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!