我收到错误 Error using wavread (line 67) Invalid Wave File。原因:无法打开文件。
energy_per_frame 错误(第 2 行)[inpu fs] = wavread(file);
这是调用 energy_per_frame 的函数的源代码。
[inpu fs] = wavread(file);
clc;clear;close all;
file = input('Enter name of wav file ', 's');
counter=0;
for test_number = 0:4
for test_number2 = 0:20
counter=counter+1;
reference = dtw_avg(test_number2);
test = energy_per_frame(file);
distance(counter) = dtw(test,reference);
end
这是函数 energy_per_frame 的源代码
[inpu fs] = wavread(file);
fn = fs/2;
bins = 512; %useable bins
frame_length = bins;
window = hamming(frame_length);
overlap = .5;
number_of_frames = (length(inpu)/(frame_length)/overlap) - 1;
这里有什么问题?