[英]MATLAB mfcc gmdistribution fit for Speech Recognition Program
I'm new to Matlab and doing a signal processing project(Speech Recognition). 我是Matlab的新手,正在做一个信号处理项目(语音识别)。 After doing some calculations, I get some values known as MFCC (Mel-Frequency Cepstral Coefficient) in a matrix.
在做了一些计算之后,我在矩阵中得到了一些称为MFCC(Mel-Frequency Cepstral Coefficient)的值。 I'm now supposed to apply a Gaussian Mixture Model (GMM) distribution using the function gmdistribution.fit(X,k).
我现在应该使用函数gmdistribution.fit(X,k)来应用高斯混合模型(GMM)分布。 But I keep getting the error,
但我一直得到错误,
X must have more rows than columns.
I don't understand, how can I fix this? 我不明白,我该怎么办呢? I tried doing a transpose of the matrix, but then, I get other errors.
我试着对矩阵进行转置,但后来我得到了其他错误。
??? Error using ==> gmcluster at 181
Ill-conditioned covariance created at iteration 3.
Error in ==> gmdistribution.fit at 199
[S,NlogL,optimInfo] =...
My MFCC matrix generally has 13 rows and about 50-80 columns. 我的MFCC矩阵通常有13行和约50-80列。
Any ideas on how to fix this? 有想法该怎么解决这个吗? Should I be using only upto 12 cols at a time?
我一次最多只能使用12个字符吗? OR what could be an alternate expectation-maximization (EM) algorithm to obtain a maximum likelihood (ML)estimate in Speech recognition?
或者什么是备用期望最大化(EM)算法来获得语音识别中的最大似然(ML)估计?
Here's a sample matrix that I get after extracting the mfcc feature vectors from the speech: 这是从语音中提取mfcc特征向量后得到的样本矩阵:
53.19162380493035 53.04536473593154 52.52404588266867 52.76558091790412 53.63907256262721 53.357790132994836 52.73205096524416 52.902995065027056 52.61096061282659 54.15474467851871 53.67444472478125 52.64177726437717 52.51697384592561 52.71137919365186 53.092851922453896 53.16427640450918 54.43019514688636 60.79640902129941 59.84919922646779 63.15389910551327 61.88723594060794 64.74826830389657 64.8349874832628 64.86278444375218 65.76126193531795 65.64589407152897 65.46920375829764 65.69178734432299 65.28831375816117 64.56074008418904 63.4966945660873 63.81859800557705 63.72800219675504 62.48994205815299 62.170438508902436 61.06563184036766 59.13583014975035 58.81335869501639 56.32130498897641 55.13711899166046 54.013505531107796 54.15759852717166 53.44176740036524 53.13219768600348 53.03407270007307 52.88271825256845 53.822163186509016 53.53892778841879 54.04538463287215 59.485371756367954 58.48009762761471 54.643413468895346 52.808848460884654 52.87392859698496 52.42111841679119 53.2365666558251 53.30622484832905 53.1799318016215 53.784807994410315 53.248067707554924 52.69122098296521 52.50131276155125 53.43030515391315 53.902384536061604 54.029570128176985 52.842675820980034 52.79731975873874 53.18695701339912
-10.209801833131205 -9.680631918902254 -9.62767876068187 -11.100788671331799 -12.214764051532008 -10.968305830999338 -9.860973825750351 -9.865056435511548 -10.658715794299441 -9.3596215435813 -11.6646716335442 -11.73183849207276 -12.378134406457027 -10.926012890327158 -11.620321504456165 -10.158285684702548 -9.264017760124812 -3.477686356268614 -3.34008367962826 -4.830538727398767 -2.000396004172366 -4.4851181728969225 -2.9033880784025152 -4.367902167404347 -4.497084603581041 -5.199683464056032 -5.906443970301479 -6.1194300184632855 -5.96250940992931 -6.359811770556116 -6.264817939973589 -4.895405335125048 -5.356838360441918 -6.327382452484718 -6.680325151391659 -6.17848037726304 -5.4759013940523245 -1.9841026636312946 -4.076294540940979 -7.824603409725002 -5.800269620602235 -8.01263214623702 -11.425250071230579 -10.277472714265365 -10.774573945280718 -11.322162485376891 -10.052477908307408 -10.004482396755566 -8.557096237262265 -7.319189335399103 -4.798868632345757 -10.203105092807693 -10.406716632774856 -11.067414745093817 -11.699111553041329 -10.749597806292954 -10.555273429092225 -8.854304279940754 -10.903698849240602 -10.234951031082241 -11.550994106255267 -11.295232804215324 -10.688554946454785 -9.208980407123816 -10.585845595336993 -10.757300448605834 -10.319608162526984 -10.551598424355781
-0.18311276580153307 -1.3000235617058096 -2.379404485976171 0.8537711039288245 0.7835891293988151 -0.786100291329253 1.0107138900981782 -0.12469382941718324 -2.2952791566222173 -0.8251663787748776 -0.050658777310996696 -4.6807361290865295 -3.3756455575107784 0.38895610612101605 -0.9962664893365839 -1.3680101462804826 -0.7328675082528926 14.930618844131613 11.172961105935304 16.974801313922335 13.375385369069916 14.024700863057664 14.594849346714536 17.610029847404075 16.601731375214815 15.581203919095396 15.429198596491359 15.842389728372694 16.162847697063377 17.262648834400064 18.2608582394078 19.38844125300681 16.858591012785013 16.93154670795065 12.906259456599424 13.056739996060314 11.258250889980491 8.834726263239137 6.184939770895715 4.068236554570518 2.184520358080839 3.6716311416454106 0.5890504959921528 -3.0455374126328874 -1.657407892408495 0.33660057466143056 -0.40801030148804557 0.04270808730635576 3.208411924734062 5.821481390407001 4.560967865706884 -0.9575473658761547 -1.9690622742411314 -1.4335363449433605 0.5073073427521086 1.8313651620152203 -2.1659200593772345 1.2769675752335854 -2.2873258303700696 -0.030049578085935582 -2.002440722711317 -2.3424337647822346 -4.259810095095228 -0.9747655920995262 0.09482704525635513 -0.2885341356828254 1.439149953470075 0.6807611595304401
2.087244713218005 -3.787403802296573 -4.665688240227797 0.46022874550890147 -0.16943798737784035 -2.7170563621342785 -1.7464303367036695 -3.27442943105816 -3.6318990907200597 -1.1574346481702122 -1.0207450052082863 -5.838249114276465 -4.864029691290982 -2.7443279494466704 -1.3475670289669839 -0.71926223394222 -1.7145131082739746 10.695036462762722 10.398176627688748 11.642258160333318 8.67660434911699 13.223576542483247 14.470121526018994 14.100543157086074 13.22291384069529 11.67823582796623 13.466476916853203 13.535357097626715 14.875339057135838 14.37083096189283 13.33673313953938 12.329553090328996 9.676373050790103 11.448653427990415 9.874926564656558 7.147530590070999 10.29584390330658 10.101141207939456 5.283325337013565 4.507665609590605 3.1555597807254223 1.176891149051998 -0.2017066100725112 -2.5074705794245427 3.7132131484813073 0.9607407688505634 -3.2742739297063865 -6.602070936837743 -2.2912280318564378 10.190482148210974 10.157945177713376 -0.09147003586407224 -5.244432802624313 -1.2872483780850776 -3.7378553488851147 2.853534940706138 -2.9599246290596257 -1.2759697907404983 -2.609173347676013 -0.027021884588768103 -2.3092682012995387 -1.4002697262020989 -4.192442987678205 -0.11708538059933485 -1.722764980370641 -0.8528543327485958 0.36818682029243044 -1.5833959315094956
-1.2340033668089612 -2.7554310519289933 1.4704457874837413 -0.4125243211298726 1.7297567688324673 3.721374587353874 -2.2232745236466402 -1.0295891117338212 1.021098021933131 -3.392544522126444 1.3301447592375433 -0.30182589581098784 -2.2645887723031413 0.5179073904608001 2.0537130718040917 -3.030349632233867 -2.107849434880047 -7.949976055283274 -5.172658838436902 -7.2904509401269575 -6.1323858833603815 -2.37546696444418 -2.6620539778383723 -3.5795807500300305 -4.687709564035536 -1.7454933814935076 -0.6827757483935794 0.23687223893178067 2.8267871613253077 3.5866135581831227 3.142665641927276 4.095262325494299 3.871285159350548 3.8703187080829764 3.8314236250858555 1.798983626211966 0.725468180389042 0.11919814479647405 2.7173707003940124 6.868690477210499 6.270964718280218 2.3176609494750564 2.0733820130334926 -0.8539453920978304 3.48931978155834 -2.6098957232427957 0.7925129692289851 -2.482250690121881 -1.9255950956807195 -3.3296568338000525 -2.5852039200206076 0.7513494304110043 1.6119079892129162 0.8581457406304087 1.4037071284373093 -3.163651849398714 5.052978402873416 2.4518824480379813 0.027602305580521395 0.7477958990121767 0.9232542431737198 -0.5545479544994354 -3.4480660326803503 1.0747263160741485 -4.078097840161742 4.485742151839941 0.1658605159666291 0.1722930547996016
-1.6428664752690114 3.7865726986742145 2.5318491820052564 -2.1947219298888676 -2.1237775233625986 2.598630953202959 -6.076201524281277 -5.315246911864284 -1.5747455209374586 -3.223379488606859 2.6008295264581776 1.3270506534986315 -2.5790744715346676 0.7756431623687378 3.0553271757777356 -0.20800002044634847 -1.530027153710214 -2.207970121996219 -1.8813636939941347 -2.685201388968379 -1.2497372042225408 2.5726591149003712 1.4779209530617206 0.18848939011950389 -0.8737068656038859 4.364271583896629 2.0338276700410187 4.017665258617117 2.929288856255161 10.031463178073729 7.807148474194119 8.930649791195147 9.356704480964387 4.682860624638529 3.9421955431659375 3.46979114616638 0.10907941624689588 1.013539556043216 1.380950812959332 1.077296756517698 4.643176114193134 0.276532579753215 1.3247848485761091 -1.6452351331258643 5.459080479943587 -2.623903958160855 -3.6495250981385525 0.30098983943901886 1.2192582165344557 3.9341748890807207 3.8902438441040768 2.3070835920696586 -2.692501110699399 1.6807838025217028 1.5259881694196216 0.3750392433389195 5.708674336592535 -1.1571072509634228 -1.9909829706185518 -2.911287549300028 -4.934348834333174 -2.258176779559039 0.17624511060134188 0.02295826196619305 -3.516972940169973 5.184345513656031 1.4594074325337887 -0.19794455729474633
2.362306464828889 1.8140886321872307 3.105122487428386 -2.452729932993756 -1.9482153346221507 0.23556664481369372 1.0605939999557794 9.466891504042334 4.485454438679325 2.6792667132201102 -0.7696085536288818 1.1799363148487811 -4.770207147524265 0.7773255533610134 -1.0253054017942649 5.364238239319841 3.1331011184169473 4.744685304867839 -0.052537238369118014 4.477806263589113 3.1539530991186067 6.4185233259645385 2.549990446321861 2.4829837421356564 4.089323590949597 7.9396405004582045 6.041498345508568 9.234608707932582 7.3843205505399885 10.495371462065135 15.043508733932194 8.70736248600434 13.199534350054295 9.807690741908354 9.182134815924455 12.06839623216329 7.974743468866006 12.349726591545481 5.750367027892127 -0.6482940009399485 5.4638120941442185 1.856389413910232 1.9530813300592067 -2.8701346921179733 1.558852931425583 -0.19366384484174437 -2.6386457918474457 1.4662219452543457 2.079641671534525 15.326629935694294 14.705559998054612 -0.06282946858494885 -1.827803410621235 3.114649202395378 0.3720781976421628 0.43011998686353536 -3.376799358785071 -1.5552531679484054 3.060902156478365 3.5360394473034553 -2.3908283396567356 0.6675611086499327 0.22711502816964574 -6.457828495248154 -0.6807474446526474 -0.6230980701736715 2.2692316872172476 -0.979235567032777
2.306823535295793 3.4952484194762055 5.910905884417197 -3.0627994884681873 -3.2217585242174294 -0.015187803494101149 -0.9514287527346498 3.114431724585367 0.42923281798814705 -3.189859804015462 -1.472673603923648 -3.036867739556342 -0.15973786580917693 -0.0905525722541792 2.330382174351248 2.7439958525955515 0.3730263667251821 -12.515523622378907 -13.343548342714616 -11.536760383050373 -8.307383651556634 -15.660481772806875 -14.155076207607415 -14.343032997039627 -11.791205489191787 -14.964231411185601 -13.183950294156357 -8.972526839374074 -5.366478645304655 -10.910217774510665 -1.5480767893424763 -8.888577773693916 -2.6255911360834023 -5.8588628908556695 -4.145564000313309 -2.984375697431632 0.8831077064431804 -5.243824833303439 5.196626588048474 6.352837095147023 1.2112116324076188 -2.9147691775934286 -2.6935780565318352 -2.810972986669758 4.9399646272914275 -1.1703117105056318 -2.402532372315127 -4.8461309660884675 -7.261524451953783 -2.5282219889051856 -1.0065282601086587 -2.5563997598612156 -4.351683980269447 -0.46252498899381495 -5.890633052969005 -0.3032076532083649 -0.6457938679695084 -0.455043482005029 3.359840875612215 -1.7228176367513395 -3.168976094613273 -2.5233843488620917 -6.495499983402964 -3.4972987525688515 0.7115283186290751 -2.581097605905542 0.6315410714331887 0.19502062594451325
1.2870172739850947 2.713157481924801 -0.5205380954882455 -4.658525381198428 -0.10827507866220412 2.4486415136057875 -0.2640204926534809 -0.09970608992954652 1.5082258768440102 -0.48148890836461583 6.911722876338505 -1.839425896561688 -3.841669694063511 -4.524554996776859 -0.9323811218879002 -6.12813923896959 -2.617633134059251 -6.309717724130619 -3.909047191185573 -6.705305972326263 -3.194505292603528 -7.893721876340621 -0.7610949447938617 -0.6090909340423546 1.4581855733113227 -2.41596099072141 -3.8541389118806912 -1.927700181895679 4.665459793274741 -2.132645903487048 4.157947245063189 0.11326683589817262 -1.162075689787945 1.055761599597126 3.298475882289032 0.9391848013866494 5.223274229835592 5.199193224601442 6.24812913948699 5.2190463423872515 1.5179114498579496 -0.6790185492512775 -0.31373376397636593 -3.5993965276962707 4.302535367682559 5.0068035330847005 -2.436072054028143 -0.8350201387276532 -2.018104375721472 0.5404586080558861 -2.428770201558009 -2.335732881592787 -0.052034561490399235 2.6353099398265676 -2.99995676341149 1.7399565653589897 -0.29483744276382473 4.957413374961816 5.6898464888615 -4.002464222625706 0.966133847419872 2.170532357744949 -2.4172124815273173 -5.913083394982123 -0.22652498917043715 0.138040634076645 -2.826152803587723 5.842509989192995
-6.149578124267104 -2.8288721761218962 -0.27284674336933024 -0.7388702321118317 6.111878602550777 3.359125556152289 1.2074835809541602 -2.229103203811113 -1.625118718284933 -0.2004222132512952 2.0932748099429754 0.712406626137792 0.43416711590137985 -5.55554193439384 -2.1786650973628827 -2.969057723871395 -6.618199451327406 2.299416281672153 5.007013248892597 -2.8033104103688027 -0.14925301159195922 -3.1533724522208697 -1.686316186073986 -0.08884837954280254 1.3265208802169017 1.3523930289041641 3.5524134648371395 -1.4254466520590146 -3.5611240333626477 1.0329276937146186 0.753052597154297 0.7975894394949765 -1.1854014340942607 1.1593797963914545 -0.8529267167794818 -5.171015036219429 4.116322136411159 -1.4483994704782983 -4.286164521201809 2.740046108799948 -3.5798763236060673 -3.018292657641495 -3.1806602684198966 -7.234273046469597 -9.434807181114692 -1.5847563989433828 -3.5635243742856346 4.782665786942992 3.5778211425622497 1.6853638633605281 1.7167799803768633 -1.6174055012561088 3.7435401900571574 -3.176593678259591 6.40495736593622 3.3331406463423483 -4.189245091250336 -1.1362166265192732 4.592859698246665 -2.8863334811724606 0.16041676401714375 4.737837256397985 -2.2744510630052366 1.4695485402180768 -4.897075450622638 1.0194864096015128 3.0757846367935398 1.489203230013674
-5.616870225243653 4.10940999519677 -0.3567822711722583 4.987855490462697 2.5632059692246143 -4.705396196410884 -0.1194996962733683 8.46869233605413 1.7788275688487483 -1.9527299063266377 -1.481085011956697 -1.0244613136295895 3.2992905241167114 -3.64385218716246 0.4426619512128128 -0.9239334997116153 -1.8620760850713798 -1.572039531941818 -10.036763755809012 -4.991528131941471 -7.136095340914314 -3.9318863449619683 -8.239368103131268 -8.443697887490892 -7.638579800501108 -8.460278636486919 2.042450826339361 -2.9885807367329646 -7.09364471308204 0.751496922690038 -0.7845673603407124 3.01935526513198 -1.39022538332522 -1.3101410638362037 -6.557786354682332 -10.172228179790066 -7.914321004354581 -5.649458806929109 2.0908760762554857 -1.4736963383710477 -1.1834278800206155 -0.6892124083994282 4.710875739605662 -3.269448539379895 -1.365967094144594 2.229881555767406 -0.9419137895352326 -0.48671864439322476 4.178896930726449 -6.953289505262448 -3.5225552311666406 -0.03841148260907753 0.14013269702442782 -6.512368259808616 1.8280649782849192 0.3454330974085145 -7.766620058704248 1.6650823954773208 9.615187994533223 3.360235349725343 0.22182808924480077 -0.30209172650913635 -1.6349262462057823 5.754809401078592 -1.6377375938940244 4.58705098784457 -2.404590707062002 0.45319882935997813
-3.730821551088958 1.1493694300690667 6.12342052964259 1.0160737493461047 4.543231805847945 -0.46099872305259204 -1.5594323941163388 10.090773095751917 5.028250117132579 1.5903687490782517 0.5749808655709501 -4.492674335179201 2.325703447395548 5.206408565021089 -4.9872461967223565 -6.549149325309605 2.90139977554803 -3.116490551862926 -8.703818668102071 -0.6313375630613844 -1.3155034176934333 1.1556044127857454 -0.9275062964334158 2.1324193244502876 3.430145051864411 4.086699745467884 5.480203425684989 1.3741912885959398 3.339835767680544 5.640295156144797 1.9610369474663063 1.785080274117643 1.8291947445479142 2.966205980470809 -0.12596430958161875 4.646073914100102 -0.7648039700071241 6.3484330647888605 4.459704396949977 1.5062484187054803 -1.6168718590653306 1.7558262745105164 1.2355091938620948 -9.312287204368275E-4 -0.5174901532050828 -3.0942917590395123 2.127834965233185 2.205667503405521 1.120114080459297 -1.7595270682165296 -9.083346980110788 -1.4981626322158839 0.7146008123272161 -0.6811098332417078 0.32703395934824275 -2.555380698176684 1.7740823756697832 4.5707670000209495 1.4842964294571344 4.818614788487457 3.1215801329358515 1.4479667080737233 1.1758507462380035 6.03230783411774 2.288914057777 4.82860171466599 -1.2457175363287405 -0.5058301430711261
-2.768473705667538 0.15564719507110275 -2.6550122323991947 -5.709488621527887 0.4785386384778287 0.6814858260993006 -5.52429514744985 -0.5602195429716864 3.9723119003523184 -5.62516538263036 -4.829570651115459 -1.2950948013109767 7.302412416568166 -3.043678812305364 -3.149850274277347 -6.476944546181209 -0.5807442791158823 -4.080078654055604 -3.1611933621382597 -0.11637063086775598 1.6049131611665592 5.044497534034215 0.3838925988521055 5.778293566481567 4.058620434329893 5.927479580737815 2.489198330275847 1.3107947997423626 1.5828295303331719 0.024839158566965516 -0.5476121359730696 0.87259267290178 0.9361180475548712 -1.5960762918622518 -5.611058251792273 -0.1594321010434905 -4.760816879788385 -0.07479939429503339 -1.7483043512234622 -2.8457787380793556 -1.7121754676101464 -3.787278050262899 3.7473965097918542 -1.659644247031472 -0.09111384850703107 2.4558095815874137 -0.06434581404575994 -3.7711115877495898 -0.2647997786903864 7.047915131872554 2.696723847584077 2.0890029827477234 -1.6825745638184928 -3.5887592066629557 -1.6594244317183802 -3.1951431164448874 3.27560938604933 2.334479543234365 2.9783519550285447 4.899933974871159 -2.2328606908007633 1.600105125583785 -2.1591853807024437 5.713548445622229 2.1891014794399264 -4.680943918675132 -2.5283217348396123 -2.6580555791689666
I don't understand, how can I fix this?
我不明白,我该怎么办呢?
You need to transpose the matrix, you got it right. 你需要转置矩阵,你做对了。 The vectors must be on the raws
向量必须在原始数据上
Any ideas on how to fix this?
有想法该怎么解决这个吗?
GMDISTRIBUTION implements the standard Expectation-Maximization (EM) algorithm. GMDISTRIBUTION实现标准的期望最大化(EM)算法。 In some cases, it may converge to a solution which contains singular or close-singular covariance matrix for one or more components.
在一些情况下,它可以收敛到包含一个或多个分量的奇异或近似奇异协方差矩阵的解。 Those components usually contains a few data points almost lying in a lower-dimensional subspace.
这些组件通常包含几个几乎位于较低维子空间的数据点。 A solution with singular covariance matrix is usually considered as spurious.
具有奇异协方差矩阵的解通常被认为是伪的。 Sometimes, this problem may go away if you try another set of initial values;
有时,如果您尝试另一组初始值,此问题可能会消失; Sometimes, this problem will always occur because of any of the following reasons:
有时,由于以下任何原因,总会发生此问题:
In your case, it seems that the number of components that you used, 8, is too big. 在您的情况下,您使用的组件数量8似乎太大了。 you can try to reduce the number of components.
您可以尝试减少组件数量。 Generally, there are also other ways that you can use to avoid getting "Ill-conditioned covariance matrix" error message"
通常,您还可以使用其他方法来避免出现“病态协方差矩阵”错误消息“
See also 也可以看看
http://www.mathworks.com/matlabcentral/newsreader/view_thread/168289 http://www.mathworks.com/matlabcentral/newsreader/view_thread/168289
Should I be using only upto 12 cols at a time?
我一次最多只能使用12个字符吗?
No 没有
@Shark I had the same problem, trying to generate an Gaussian MM object from a set of data. @Shark我有同样的问题,试图从一组数据生成一个高斯MM对象。 I solved it by specifing the type of covariance:
我通过指定协方差的类型来解决它:
GMM1=gmdistribution.fit(X,k,'CovType','diagonal') GMM1 = gmdistribution.fit(X,K, 'CovType', '对角')
GMM1 is the object name. GMM1是对象名称。 You can find the meaning of X and k in
你可以找到X和k的含义
help gmdistribution.fit
帮助gmdistribution.fit
If this doesn't work for you, try specifying the initial values of the EM algorithm that gmdistribution already uses to generate the GMM. 如果这对您不起作用,请尝试指定gmdistribution已用于生成GMM的EM算法的初始值。
Elios 爱丽思
first of you should make it linear because it is too big for matlab to do it, after that its better to just take 7-10 features (i think you get more than this). 你们中的第一个应该让它变得线性,因为它对于matlab来说太大了,之后最好只需要7-10个特征(我认为你得到的不仅仅是这个)。 after you did your work then use reshape function in order to make it what you want
在你完成你的工作后,然后使用重塑功能,以使它成为你想要的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.