Can someone please help me with the code. Speech recognition system.

Hi there,
whenever I am trying to run the code, it first throws an error at "ms" in "mfcc.m" and then if cont. the running process, it stuck at the "x=disteu(......)" (line 25, "vector.m"). Can any one pls help with the code.
Phase one is main training code from where mfcc and vector code will be called.

7 件のコメント

Walter Roberson
Walter Roberson 2018 年 11 月 24 日
what is the error message at ms and what are the sizes of the variables on that line ?
Gaurav Sharma
Gaurav Sharma 2018 年 11 月 24 日
編集済み: Gaurav Sharma 2018 年 11 月 24 日
>> firstly it was showing an error regarding the index eceeding the array in mfcc.m . But after I made the change it stopped shwing that error. But now it is not showing any DCT plot.
"ms = MelFrequencyVector*abs(freqDomMat(1:nby2)).^2" => I change (1:nby2,:) to (1:nby2).
>> it enters into an infinite loop at "x= disteu(.....)"; line 25 => in the vector.m.
screen shot of workspace is attched down below for your kind reference.
Walter Roberson
Walter Roberson 2018 年 11 月 24 日
if (((distortion - t)/t) < e)
appears to be attempting to calculate a proportional error, but looks to be failing to take into account absolute value, that the range -e to +e should probably be accepted. Still, though, that would tend to break more often rather than less often.
Gaurav Sharma
Gaurav Sharma 2018 年 11 月 24 日
But Sir, May I request you to tell me why I am not getting the DCT plot. And, for the above problem, What should I do ?
Walter Roberson
Walter Roberson 2018 年 11 月 24 日
You have
ms = MelFrequencyVector*abs(freqDomMat(1:nby2)).^2; % mel spectrum
c = dct(log(ms)); % mel-frequency cepstrum coefficients
c(1,:) = [] ; % exclude 0'th order cepstral coefficient
Your ms is a row vector, 1 x 501. dct of a row vector gives you a row vector. You then ask to delete row 1 of the row vector, which is all that exists in the row vector, so your c is going to come out empty.
Gaurav Sharma
Gaurav Sharma 2018 年 11 月 24 日
Thank You very mech sir for your help.
I need one more favour from you..... Can you pls tell why in the vector.m, the code enters in an infinite loop? and how it can be overcomed. I have tried but it didnt work.
Walter Roberson
Walter Roberson 2018 年 11 月 24 日
In my test, if the data you pass as the first parameter of vector() has 1 or 2 columns, then the way you handle the means makes it certain that t will become 0. When it does then
(distortion - t)/t
has a division by 0 and becomes infinite, which is not less than e. This leads to 0 being assigned to distortion, and t becomes 0 again, leading to (0-0)/0 as the next test, which is NaN, which again is not less than e. You are then stuck in an infinite loop.
In the case of 3 or more columns then this problem is not certain to happen, and vector can potentially exit.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2018 年 11 月 23 日

コメント済み:

2018 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by