0

I am planning to extract MFCC features in real time so that it can be used for speech recognition in my android application. For the same I have found that there is a package available in java called CoMIRVA. I tried using the package for my application but I am getting some errors.

This is the part of the code where I am creating a object of the MFCC class. float samplerate=8000; private MFCC mfcc_inst=new MFCC(samplerate);

I have not yet started using any of the methods in the class. The rest of the application contains code for real time audio recording and playback using AudioRecord and AudioTrack classes. When I run the app I am getting error at the line where I create the object. I am posting the concerned part of the log file below

E/AndroidRuntime(871): FATAL EXCEPTION: main

E/AndroidRuntime(871): java.lang.VerifyError: comirva/audio/util/math/Matrix

E/AndroidRuntime(871): at comirva.audio.util.MFCC.getMelFilterBanks(MFCC.java:267)

E/AndroidRuntime(871): at comirva.audio.util.MFCC.(MFCC.java:162)

E/AndroidRuntime(871): at comirva.audio.util.MFCC.(MFCC.java:71)

E/AndroidRuntime(871): at com.example.mfcc.MFCCActivity.(MFCCActivity.java:46)

E/AndroidRuntime(871): at java.lang.Class.newInstanceImpl(Native Method)

E/AndroidRuntime(871): at java.lang.Class.newInstance(Class.java:1319)

E/AndroidRuntime(871): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)

E/AndroidRuntime(871): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)

E/AndroidRuntime(871): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

E/AndroidRuntime(871): at android.app.ActivityThread.access$600(ActivityThread.java:123)

E/AndroidRuntime(871): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

E/AndroidRuntime(871): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime(871): at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime(871): at android.app.ActivityThread.main(ActivityThread.java:4424)

E/AndroidRuntime(871): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime(871): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime(871): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

E/AndroidRuntime(871): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

E/AndroidRuntime(871): at dalvik.system.NativeStart.main(Native Method)

Thanks!!

user1957734
  • 1
  • 1
  • 4
  • Hello. Welcome to StackOverflow. Many people used comirva and other speech recognition software like CMUSphinx on android successfully. Most of the issues could be quickly resolved as long as you have information. When you ask programming question it's better to provide specific information. You need to describe what you have done in details, describe **what exact error** you get and so on. For more information see the http://stackoverflow.com/faq – Nikolay Shmyrev Apr 05 '13 at 07:40
  • hi..sorry for not mentioning my error.. plz go through the edit I have made..Thanks! – user1957734 Apr 05 '13 at 10:51
  • Ok, so your question is just about java.lang.VerifyError. It looks like you compiled comirva against wrong java classes. You need to recompile comirva java code against android java classes. See for details http://stackoverflow.com/questions/100107/reasons-of-getting-a-java-lang-verifyerror – Nikolay Shmyrev Apr 05 '13 at 10:56
  • so I need to copy the codes in comirva package to my android project and compile it rite? Sorry i am quite new in android and java – user1957734 Apr 05 '13 at 11:11
  • hi..i went through the java code for AudioPreProcessor.java, I could find that AudioInputStream class is not there in android. I replaced it with InputStream class as suggested by you in one of the questions in stackoverflow. But still many changes are to be made(I guess so) at many places. Could you please tell me if you also had to do the same? – user1957734 Apr 05 '13 at 13:06

0 Answers0