필터 지우기
필터 지우기

ValidateAudioPlugin Error "Input series must be a numeric vector" in plugin

조회 수: 1 (최근 30일)
Pedro Carranza Velez
Pedro Carranza Velez 2023년 5월 11일
답변: jibrahim 2023년 5월 11일
I am working on a plugin that takes in two channels. For some reason the validation is failing and I don't understand why. With other two-channel plugins I found online it works alright. What does it mean that "input series must be a numeric vector"? How do I fix it?
Here is the code:
classdef myVocoder < audioPlugin
properties (Access = private)
p = 12; % LPC Filter Order
end
properties (Constant)
PluginInterface = audioPluginInterface( ...
'PluginName','Vocoder', ...
'InputChannels',[2 2], ...
'OutputChannels',2);
end
methods
function out = process(plugin, in1, in2)
% LPC
r2 = autocorr(in1, plugin.p); % LPCs coefficients for last two frames
coeffs = levinson(r2, plugin.p); % Solve with Levinson Durbin
vocoder_curr = (filter(1, coeffs, in2)); % Filter glottal pulses with LPC Filter
vocoder_play = vocoder_curr;
% AGC: if voice in is louder, voice out should be louder too
gain = std(in1)/std(vocoder_curr);
out = gain*vocoder_play;
end
end
end

답변 (1개)

jibrahim
jibrahim 2023년 5월 11일
Hi Pedro,
This error is thrown from the first line of your process method. To reproduce:
v = myVocoder
process(plugin,randn(2,2),randn(2,2))
Essentially this line is failing:
r2 = autocorr(randn(2,2), 12)
In general, in order to debug issues caught by validateAudioPlugin, you can do the following:
validateAudioPlugin -keeptestbench myVocoder
This will keep the MATLAB testbench code for you. Then, you can run the testbwench file, and put a debug point where it fails:
testbench_myVocoder

카테고리

Help CenterFile Exchange에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by