gkonovalov / android-vad Goto Github PK
View Code? Open in Web Editor NEWAndroid Voice Activity Detection (VAD) library. Supports WebRTC VAD GMM, Silero VAD DNN, Yamnet VAD DNN models.
License: MIT License
Android Voice Activity Detection (VAD) library. Supports WebRTC VAD GMM, Silero VAD DNN, Yamnet VAD DNN models.
License: MIT License
I am not using any proguard for yamnet, and no problems were found in my app release version. But I'm not sure if there's a hidden problem.
I want to research about preprogressing before passing input to tensor.
2023-11-10 19:26:16.403 10168-11450 CrashReport E SIGBUS(BUS_ADRALN)
0x28fb0338f600fb
#00 pc 00000000002cb968 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#1 pc 00000000002cb838 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#2 pc 00000000002c2c20 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#3 pc 0000000000124e38 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#4 pc 000000000015d8d8 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#5 pc 000000000015d610 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#6 pc 0000000000163734 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#7 pc 0000000000161bfc /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#8 pc 0000000000155ad0 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#9 pc 0000000000296e30 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#10 pc 0000000000299390 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#11 pc 0000000000070760 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#12 pc 000000000003dc40 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk
#13 pc 000000000003bdf8 /data/app/-EI9mCqmX1U_5phdfkkIrgA==/base.apk (Java_org_tensorflow_lite_task_audio_classifier_AudioClassifier_classifyNative+168)
#14 pc 0000000000560fe0 /system/lib64/libart.so (art_quick_generic_jni_trampoline+144) [arm64-v8a::877e0c32b9c4483a1e1a5c110198885b]
#15 pc 000000009cd48890
java:
org.tensorflow.lite.task.audio.classifier.AudioClassifier.classify(AudioClassifier.java:400)
com.konovalov.vad.yamnet.VadYamnet.classifyAudio(VadYamnet.kt:118)
com.konovalov.vad.yamnet.VadYamnet.setContinuousClassifierListener(VadYamnet.kt:134)
How to use the library to save the speech to file?
Hi, Thank you for the great library. It is detecting noise as a speech, noise can be of fan, vehicle, clap etc. it says its a speech. Can you please check what can be the issue? Configuration is as follows:
private val SAMPLE_RATE = 44100
private val SAMPLE_RATE_INDEX = 4
private val CHANNELS = 1
private val BIT_RATE = 32000
config = VadConfig.newBuilder()
.setSampleRate(VadConfig.SampleRate.SAMPLE_RATE_48K)
.setFrameSize(VadConfig.FrameSize.FRAME_SIZE_480)
.setMode(VadConfig.Mode.VERY_AGGRESSIVE)
.setSilenceDurationMillis(500)
.setVoiceDurationMillis(500)
.build()
Your help will be appreciated.
Can you share with me about how to train or pretrain model silero VAD? or document reference
Thanks for the great library! I used VAD with android and it works well, but I am running into another issue. The VAD detection code needs a short array of audio data from Mic and once detected I pass this to another library for processing which expects audio data as byte array. I tried converting audio data from short array to byte array but it kept failing. The other issue is a performance overhead for conversion. Can VAD work with byte array, although I know short array keep better audio quality. If not, then what is a recommended approach to convert mic audio data from Short array to byte array?
Related references -
https://stackoverflow.com/questions/15124050/audiotrack-short-array-to-byte-array-distortion-using-jlayerjava-mp3-decoder
https://stackoverflow.com/questions/24666961/converting-short-array-from-audio-record-to-byte-array-without-degrading-audio-q
https://stackoverflow.com/questions/51278201/android-audiotrack-playback-short-array-16bit
i guess its using the system sound as well? it only happens with wired earphones with mic
I have input as an audio file. How to apply VAD to remove silent sounds (noise) from audio files?
Pls help me!
Hi, is it possible to return the voice detected as an mp3 file, in the speech detected callback. So I can upload whatever the user has said to the server.(Continuous mode)
Hi, this library is great! I'm using it for my app and it is definitely a nice feature. You mentioned you may add a more accurate DNN model. Any timeframe in mind for this?
Thanks for your work!
Hello. Could you help me to detect the reason of the crash:
2021-06-17 13:37:42.559 18158-18258/com.bragi.skullcandy_internal A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 18258 (RxComputationTh), pid 18158 (lcandy_internal)
2021-06-17 13:37:42.764 21466-21466/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-06-17 13:37:42.764 21466-21466/? A/DEBUG: Build fingerprint: 'google/blueline/blueline:11/RQ1A.201205.003/6906706:user/release-keys'
2021-06-17 13:37:42.764 21466-21466/? A/DEBUG: Revision: 'MP1.0'
2021-06-17 13:37:42.764 21466-21466/? A/DEBUG: ABI: 'arm64'
2021-06-17 13:37:42.766 21466-21466/? A/DEBUG: Timestamp: 2021-06-17 13:37:42+0300
2021-06-17 13:37:42.766 21466-21466/? A/DEBUG: pid: 18158, tid: 18258, name: RxComputationTh >>> com.bragi.skullcandy_internal <<<
2021-06-17 13:37:42.766 21466-21466/? A/DEBUG: uid: 10746
2021-06-17 13:37:42.766 21466-21466/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2021-06-17 13:37:42.766 21466-21466/? A/DEBUG: Abort message: 'Scudo ERROR: invalid chunk state when deallocating address 0x0074daec7d90
'
2021-06-17 13:37:42.766 21466-21466/? A/DEBUG: x0 0000000000000000 x1 0000000000004752 x2 0000000000000006 x3 000000735c330880
2021-06-17 13:37:42.766 21466-21466/? A/DEBUG: x4 0000808080808080 x5 0000808080808080 x6 0000808080808080 x7 0000000000000018
2021-06-17 13:37:42.767 21466-21466/? A/DEBUG: x8 00000000000000f0 x9 87a18dc183846735 x10 0000000000000000 x11 ffffffc0fffffbdf
2021-06-17 13:37:42.767 21466-21466/? A/DEBUG: x12 0000000000000001 x13 0000000000000018 x14 000017eb6c1bcfab x15 00201657f3aaedbd
2021-06-17 13:37:42.767 21466-21466/? A/DEBUG: x16 000000767effbc80 x17 000000767efdd870 x18 00000073557ec000 x19 00000000000046ee
2021-06-17 13:37:42.767 21466-21466/? A/DEBUG: x20 0000000000004752 x21 00000000ffffffff x22 00000074daec7d90 x23 0000000012f6bc98
2021-06-17 13:37:42.767 21466-21466/? A/DEBUG: x24 0000000000000001 x25 0000000000000000 x26 0000000013401e20 x27 0000000000000002
2021-06-17 13:37:42.767 21466-21466/? A/DEBUG: x28 000000735c330a20 x29 000000735c330900
2021-06-17 13:37:42.767 21466-21466/? A/DEBUG: lr 000000767ef912a0 sp 000000735c330860 pc 000000767ef912cc pst 0000000000000000
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: backtrace:
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #00 pc 000000000004e2cc /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 95f68a34fdf7b31f42d3f811d5d88f58)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #1 pc 0000000000042910 /apex/com.android.runtime/lib64/bionic/libc.so (scudo::die()+8) (BuildId: 95f68a34fdf7b31f42d3f811d5d88f58)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #2 pc 0000000000042f88 /apex/com.android.runtime/lib64/bionic/libc.so (scudo::ScopedErrorReport::~ScopedErrorReport()+32) (BuildId: 95f68a34fdf7b31f42d3f811d5d88f58)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #3 pc 00000000000431bc /apex/com.android.runtime/lib64/bionic/libc.so (scudo::reportInvalidChunkState(scudo::AllocatorAction, void*)+76) (BuildId: 95f68a34fdf7b31f42d3f811d5d88f58)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #4 pc 00000000000445d8 /apex/com.android.runtime/lib64/bionic/libc.so (scudo::Allocator<scudo::AndroidConfig, &(scudo_malloc_postinit)>::deallocate(void*, scudo::Chunk::Origin, unsigned long, unsigned long)+340) (BuildId: 95f68a34fdf7b31f42d3f811d5d88f58)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #5 pc 0000000000002890 /data/app/~~6P7UBDmVN6I87aBxXQD0Cw==/com.bragi.skullcandy_internal-A2c6QSfjhTyXnuouzSfO5g==/base.apk!libvad_jni.so (offset 0xcc7000) (Java_com_konovalov_vad_Vad_nativeStop+24) (BuildId: 0fb3d26d0e3f1a0fb8b40e81c1e7679b7216eff2)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #6 pc 000000000013ced4 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #7 pc 000000000208b24c /memfd:jit-cache (deleted) (offset 0x2000000) (com.konovalov.vad.Vad.stop+44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #8 pc 000000000208aae8 /memfd:jit-cache (deleted) (offset 0x2000000) (com.bragi.speechtotext.android.recognizer.SilenceDetector.feedAudio+424)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #9 pc 00000000020dc83c /memfd:jit-cache (deleted) (offset 0x2000000) (com.bragi.speechtotext.android.domain.StreamDomainImpl$7.accept+188)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #10 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #11 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #12 pc 000000000031830c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #13 pc 000000000030e638 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #14 pc 000000000067b118 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+848) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #15 pc 000000000012d814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #16 pc 000000000000cbf0 [anon:dalvik-classes5.dex extracted in memory from /data/app/~~6P7UBDmVN6I87aBxXQD0Cw==/com.bragi.skullcandy_internal-A2c6QSfjhTyXnuouzSfO5g==/base.apk!classes5.dex] (com.bragi.speechtotext.android.domain.StreamDomainImpl$7.accept+4)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #17 pc 0000000000305c34 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.4023174618862212076)+268) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #18 pc 0000000000669e20 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #19 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #20 pc 0000000002089f08 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext+88)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #21 pc 00000000020dcd58 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.mixed.SingleFlatMapObservable$FlatMapObserver.onNext+72)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #22 pc 000000000208423c /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.tryEmit+140)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #23 pc 000000000208617c /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableFlatMap$InnerObserver.onNext+76)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #24 pc 00000000020dd368 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.observers.DisposableLambdaObserver.onNext+72)
2021-06-17 13:37:42.995 21466-21466/? A/DEBUG: #25 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #26 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #27 pc 000000000031830c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #28 pc 000000000030e638 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #29 pc 000000000067cae8 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1032) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #30 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #31 pc 0000000000112432 [anon:dalvik-classes4.dex extracted in memory from /data/app/~~6P7UBDmVN6I87aBxXQD0Cw==/com.bragi.skullcandy_internal-A2c6QSfjhTyXnuouzSfO5g==/base.apk!classes4.dex] (io.reactivex.internal.operators.observable.ObservableOnErrorNext$OnErrorNextObserver.onNext+14)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #32 pc 000000000067cdf0 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #33 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #34 pc 0000000000109792 [anon:dalvik-classes4.dex extracted in memory from /data/app/~~6P7UBDmVN6I87aBxXQD0Cw==/com.bragi.skullcandy_internal-A2c6QSfjhTyXnuouzSfO5g==/base.apk!classes4.dex] (io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.onNext+42)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #35 pc 0000000000305c34 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.4023174618862212076)+268) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #36 pc 0000000000669e20 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #37 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #38 pc 00000000020dc5d0 /memfd:jit-cache (deleted) (offset 0x2000000) (com.bragi.sdk.android.api.internal.domain.VoiceDomain$observePCM$1$1.subscribe+432)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #39 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #40 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #41 pc 000000000031830c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #42 pc 000000000030e638 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #43 pc 000000000067cae8 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1032) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #44 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #45 pc 0000000000109b1c [anon:dalvik-classes4.dex extracted in memory from /data/app/~~6P7UBDmVN6I87aBxXQD0Cw==/com.bragi.skullcandy_internal-A2c6QSfjhTyXnuouzSfO5g==/base.apk!classes4.dex] (io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual+20)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #46 pc 0000000000305c34 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.4023174618862212076)+268) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #47 pc 0000000000669e20 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #48 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #49 pc 0000000002077ecc /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.Observable.subscribe+156)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #50 pc 00000000020273a8 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableOnErrorNext.subscribeActual+200)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #51 pc 0000000002077ecc /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.Observable.subscribe+156)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #52 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #53 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #54 pc 000000000031830c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #55 pc 000000000030e638 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #56 pc 000000000067cae8 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1032) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #57 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #58 pc 000000000010b382 [anon:dalvik-classes4.dex extracted in memory from /data/app/~~6P7UBDmVN6I87aBxXQD0Cw==/com.bragi.skullcandy_internal-A2c6QSfjhTyXnuouzSfO5g==/base.apk!classes4.dex] (io.reactivex.internal.operators.observable.ObservableDoOnLifecycle.subscribeActual+22)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #59 pc 0000000000305c34 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.4023174618862212076)+268) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #60 pc 0000000000669e20 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #61 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #62 pc 0000000002077ecc /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.Observable.subscribe+156)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #63 pc 000000000203a8ac /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.subscribeInner+476)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #64 pc 00000000020232d4 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onNext+516)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #65 pc 00000000020dd368 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.observers.DisposableLambdaObserver.onNext+72)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #66 pc 0000000002034884 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal+292)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #67 pc 0000000002036204 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run+52)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #68 pc 0000000002078c8c /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.schedulers.ScheduledRunnable.run+124)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #69 pc 000000000202d628 /memfd:jit-cache (deleted) (offset 0x2000000) (io.reactivex.internal.schedulers.ScheduledRunnable.call+40)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #70 pc 000000000207c684 /memfd:jit-cache (deleted) (offset 0x2000000) (java.util.concurrent.FutureTask.run+212)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #71 pc 0000000002033140 /memfd:jit-cache (deleted) (offset 0x2000000) (java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run+144)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #72 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #73 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #74 pc 000000000031830c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #75 pc 000000000030e638 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #76 pc 000000000067cae8 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1032) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #77 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #78 pc 00000000001f9e6e /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor.runWorker+158)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #79 pc 000000000067b3b8 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #80 pc 000000000012d814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #81 pc 00000000001f8c30 /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor$Worker.run+4)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #82 pc 000000000067cdf0 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #83 pc 000000000012da14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #84 pc 0000000000003330 [anon:dalvik-/apex/com.android.art/javalib/core-oj.jar-transformed] (java.lang.Thread.run+8)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #85 pc 0000000000305c34 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.4023174618862212076)+268) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #86 pc 0000000000669e20 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #87 pc 000000000013cff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #88 pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #89 pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #90 pc 0000000000553890 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValuesart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #91 pc 00000000005a2c2c /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308) (BuildId: c820164b0c64ea40f1abc53aaf588b44)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #92 pc 00000000000afd4c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 95f68a34fdf7b31f42d3f811d5d88f58)
2021-06-17 13:37:42.996 21466-21466/? A/DEBUG: #93 pc 0000000000050288 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 95f68a34fdf7b31f42d3f811d5d88f58)
implementation ('com.github.gkonovalov:android-vad:1.0.0') { exclude group: 'androidx.appcompat', module: 'appcompat' }
It does not work when used with webrtc on Android 8 or higher and under 11.
activateRecordingButtonWithPermissionCheck() line 108 of mainactivity.kt has no function definition?
two others but thats the one thats got me!
I follow the direction provided. However, whether I add the code you mention to my current project or try to build a project from these files to test it out. I run into the following errors:
`FAILURE: Build failed with an exception.
NDK not configured. Download it with SDK manager. Preferred NDK version is '21.0.6113669'.
`
Thanks in advanced for the help. I am very interested in seeing this run since its an offline VAD.
Hello,
I've been trying to use the WebRTC VAD library in my project, but I've encountered issue:
Thank you for providing this great library! I would appreciate any help in resolving these issues.
Android Studio Version : Android Studio Flamingo | 2022.2.1 Patch 2
Kotlin Version : 1.8.10 * JAVA_17
Gradle Version : 8.0
hi, I want to detect long utterances use Yamnet VAD, but I can't find the api configuration. My purpose is to detect if someone speaks in a period of time, such as within 10 seconds someone said a word. I don't care about the result of each frame, I just want a final result. Does Yamnet support this case?what should I do?
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: abb128@f49c0a3
I want detetect audio file. How can I preprocess audio data?. Can you add it to example?
As mentioned in the title, everything seems to work fine in debug builds, we only have this issue coming up in release builds. Any assistance would be great, thanks.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
A Build fingerprint: 'google/blueline/blueline:12/SP1A.210812.016.C1/8029091:user/release-keys'
A Revision: 'MP1.0'
A ABI: 'arm64'
A Timestamp: 2024-02-29 13:43:13.169238661-0500
A Process uptime: 0s
A Cmdline: [app_package]
A pid: 16470, tid: 16571, name: DefaultDispatch >>> [app_package] <<<
A uid: 10660
A signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
A Abort message: 'JNI DETECTED ERROR IN APPLICATION: mid == null
in call to NewObject
from ai.onnxruntime.OnnxValue[] ai.onnxruntime.OrtSession.run(long, long, long, java.lang.String[], long[], long, java.lang.String[], long, long)'
A x0 0000000000000000 x1 00000000000040bb x2 0000000000000006 x3 00000075e33dff20
A x4 000024393f4f282a x5 000024393f4f282a x6 000024393f4f282a x7 2a284f3f3924ffff
A x8 00000000000000f0 x9 c16ac2a0f823b99a x10 0000000000000000 x11 ffffff80fffffbdf
A x12 0000000000000001 x13 000000000000010e x14 00000075e33ded20 x15 ffffffffffffffff
A x16 000000791a3ff050 x17 000000791a3dbeb0 x18 00000075e03b6000 x19 0000000000004056
A x20 00000000000040bb x21 00000000ffffffff x22 0000007684e15000 x23 000000000000000b
A x24 00000075e33e00f8 x25 00000075e33e2000 x26 0000000000000003 x27 00000076a5b28ab0
A x28 0000000000000125 x29 00000075e33dffa0
A lr 000000791a38eba0 sp 00000075e33dff00 pc 000000791a38ebcc pst 0000000000000000
A backtrace:
A #00 pc 000000000004fbcc /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
A #01 pc 00000000006d2a4c /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+704) (BuildId: d307dc6adc4105b5e392ad710770385d)
A #02 pc 0000000000016ea8 /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+80) (BuildId: 420d56eac27a210c92900f3ddb760c86)
A #03 pc 0000000000016450 /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+352) (BuildId: 420d56eac27a210c92900f3ddb760c86)
A #04 pc 0000000000445224 /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1612) (BuildId: d307dc6adc4105b5e392ad710770385d)
A #05 pc 0000000000434004 /apex/com.android.art/lib64/libart.so (art::JNI<false>::NewObject(_JNIEnv*, _jclass*, _jmethodID*, ...)+200) (BuildId: d307dc6adc4105b5e392ad710770385d)
A #06 pc 0000000000008048 /data/app/~~_H5nOS7XIOPh1RWnoBZkNg==/[app_package]-UA-ntdGhWf_xlHS_PeRynQ==/split_config.arm64_v8a.apk (convertToTensorInfo+452) (BuildId: 06a1b70929459ca8792ac5e81a456dff8cea6919)
A #07 pc 000000000000a1a4 /data/app/~~_H5nOS7XIOPh1RWnoBZkNg==/[app_package]-UA-ntdGhWf_xlHS_PeRynQ==/split_config.arm64_v8a.apk (convertOrtValueToONNXValue+236) (BuildId: 06a1b70929459ca8792ac5e81a456dff8cea6919)
A #08 pc 000000000000db90 /data/app/~~_H5nOS7XIOPh1RWnoBZkNg==/[app_package]-UA-ntdGhWf_xlHS_PeRynQ==/split_config.arm64_v8a.apk (Java_ai_onnxruntime_OrtSession_run+896) (BuildId: 06a1b70929459ca8792ac5e81a456dff8cea6919)
A #09 pc 000000000004ede8 /data/app/~~_H5nOS7XIOPh1RWnoBZkNg==/[app_package]-UA-ntdGhWf_xlHS_PeRynQ==/oat/arm64/base.odex (art_jni_trampoline+184)
E Tombstone written to: tombstone_11
Hello,
I imported this package, but I couldn't use it.
The error message is: Caused by: java.lang.IllegalArgumentException: Error can't init WebRTC VAD!!
The error code is as follows:
mVad=Vad.builder()
.setModel(Model.WEB_RTC_GMM)
.setSampleRate(SampleRate.SAMPLE_RATE_8K)
.setFrameSize(FrameSize.FRAME_SIZE_160)
.setMode(Mode.VERY_AGGRESSIVE)
.build()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.