speech compression ,lpc to lsf using poly2lsf

1 次查看(过去 30 天)
hi,
this is my code for speech compression . i have two more blocks to write lbg codebook, and vector quantisation. till here iam getting error in lptolf file like this
Error using ==> roots at 28
Input to ROOTS must not contain NaN or Inf.
Error in ==> poly2lsf at 33
if (max(abs(roots(a))) >= 1.0),
Error in ==> lptolf at 4
lsfcoeff(i,:)=poly2lsf(ssig(:,i));
Error in ==> s2 at 15
[lsfcoeff]=lptolf(ssig,C3);
so where iam going wrong i couldn't understand
s2.m s my main file. before adding lptolf file everything fine.test.wav s my sound file of single channel.
thanks in advance.
  1 个评论
Walter Roberson
Walter Roberson 2016-3-1
At the MATLAB command line, command
dbstop if naninf
and then run your code. When it stops, it will be at a line that produced a nan or inf result. You need to work backwards from there to figure out why it produced those results.
My speculation would be that it is occurring in filter(), as a result of you passing in incorrect filter coefficients because of some circumstance that you did not take into account.

请先登录,再进行评论。

回答(0 个)

类别

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