Error meassge while using wavread and audioread
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 );
0 Kommentare
Antworten (1)
KSSV
am 17 Aug. 2021
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.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!