DetectionAPI supports mono Wav only

2020-05-03 10:10发布

I am working on a clap detection android app. i am using musicg api for this.

I imported the project from github and run on android device. then this error shows - DetectionAPI supports mono Wav only

the detail LogCat is-

DetectionAPI supports mono Wav only
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.musicg.wave.WaveHeader.getBitsPerSample()' on a null object reference
at com.musicg.api.DetectionApi.isSpecificSound(
at com.musicg.api.WhistleApi.isWhistle(

Do anyone have any suggestion how to solve this ?

2楼-- · 2020-05-03 10:17

supports mono Wav only

You should record as a wav file as api mentioned. I would recommend you to check musicg_android_demo sources.

登录 后发表回答