gkonovalov / android-vad

Android Voice Activity Detection (VAD) library. Supports WebRTC VAD GMM, Silero VAD DNN, Yamnet VAD DNN models.
MIT License
261 stars 60 forks source link

WebRTC IllegalArgumentException due to incorrect initialization check #11

Closed abb128 closed 1 year ago

abb128 commented 1 year ago

On my device, the pointer returned by nativeInit is so large that it wraps to a negative number (e.g. -5476166911861046016). This then fails the nativeHandle > 0 check in isVadInitialized and always throws IllegalArgumentException, even though everything initialized successfully.

I fixed this in my fork by changing the check: https://github.com/abb128/android-vad/commit/f49c0a37baec63628a7601d6225a64fa5d51a2bf

gkonovalov commented 1 year ago

Hi @abb128 Thank you so much for your comment! I have just released version 2.0.3, which includes a bug fix. I wanted to inform you that as part of this release, I have split the library into smaller modules. This means that we now have separate dependencies for each module.

dependencies { implementation 'com.github.gkonovalov.android-vad:webrtc:2.0.3' }

joshHu0912 commented 1 year ago

I can't find this lib. Please see the information below.

Could not find com.github.gkonovalov:android-vad:webrtc. Required by: project :app

how can fix it?