ValidateAudioPlugin Error "Input series must be a numeric vector" in plugin
6 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
jibrahim
on 11 May 2023
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
0 Comments
See Also
Categories
Find more on Audio Plugin Creation and Hosting in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!