DetectionAPI仅支持单声道Wav [英] DetectionAPI supports mono Wav only

查看:217
本文介绍了DetectionAPI仅支持单声道Wav的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个拍手检测Android应用程序。我正在使用 musicg api。

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

我从github导入项目并在Android设备上运行。然后这个错误显示 - DetectionAPI仅支持单声道Wav

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

详细信息LogCat是 -

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(DetectionApi.java:80)
at com.musicg.api.WhistleApi.isWhistle(WhistleApi.java:54)
at com.musicg.demo.android.DetectorThread.run(DetectorThread.java:106)
at java.lang.Thread.run(Thread.java:818)

有人有任何建议如何解决这个问题吗?

推荐答案


仅支持单声道Wav

supports mono Wav only

您应该记录为api提到的wav文件。我建议您查看 musicg_android_demo 来源。

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

这篇关于DetectionAPI仅支持单声道Wav的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆