Working Android Sample

Hey guys,
I’m pretty new here. Can somebody show me a working sample for snips integration in android app with java? The given sample apps war loading, but if I speak, they don’t register my voice. If I let choose Snips microphone automatic or if I use AudioRecorder nothing happens if I speak given Wakeword.
Thanks

Hi @peet000020!

the sample: https://github.com/snipsco/snips-platform-android-demo should work and is written in java.

just be sure to download your assistant an copy it to the device as explained in the readme

Hi fredszaq,
I tried this sample. But the Wake word and Intents where not registered.
LG

Hi @peet000020!

Could you share some logs of the ai.snips.demo:snipsProcessingService process ?

Hi,
here are the log-files.

snipsdemo-Process:

08-28 22:08:47.675 28485-28485/? E/Zygote: v2
08-28 22:08:47.675 28485-28485/? I/libpersona: KNOX_SDCARD checking this for 10610
08-28 22:08:47.675 28485-28485/? I/libpersona: KNOX_SDCARD not a persona
08-28 22:08:47.675 28485-28485/? I/SELinux: Function: selinux_compare_spd_ram, index[1], SPD-policy is existed. and_ver=SEPF_SECMOBILE_6.0.1 ver=11
08-28 22:08:47.675 28485-28485/? W/SELinux: Function: selinux_compare_spd_ram, index[1], priority [2], priority version is VE=SEPF_SECMOBILE_6.0.1_0034
08-28 22:08:47.685 28485-28485/? E/Zygote: accessInfo : 0
08-28 22:08:47.685 28485-28485/? W/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=ai.snips.snipsdemo 
08-28 22:08:47.685 28485-28485/? I/art: Late-enabling -Xcheck:jni
08-28 22:08:47.735 28485-28485/? D/TimaKeyStoreProvider: TimaSignature is unavailable
08-28 22:08:47.735 28485-28485/? D/ActivityThread: Added TimaKeyStore provider
08-28 22:08:47.815 28485-28485/ai.snips.snipsdemo W/ResourcesManager: getTopLevelResources: /data/app/ai.snips.snipsdemo-1/base.apk / 1.0 running in ai.snips.snipsdemo rsrc of package null
08-28 22:08:47.985 28485-28485/ai.snips.snipsdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:48.315 28485-28485/ai.snips.snipsdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:48.385 28485-28485/ai.snips.snipsdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:48.485 28485-28485/ai.snips.snipsdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:48.555 28485-28485/ai.snips.snipsdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:48.615 28485-28485/ai.snips.snipsdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:48.685 28485-28485/ai.snips.snipsdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:48.705 28485-28485/ai.snips.snipsdemo I/InstantRun: starting instant run server: is main process
08-28 22:08:48.715 28485-28485/ai.snips.snipsdemo I/SnipsDemoApp: in the main process
08-28 22:08:48.895 28485-28485/ai.snips.snipsdemo W/ResourcesManager: getTopLevelResources: /data/app/ai.snips.snipsdemo-1/base.apk / 1.0 running in ai.snips.snipsdemo rsrc of package null
08-28 22:08:48.905 28485-28485/ai.snips.snipsdemo W/ResourcesManager: getTopLevelResources: /data/app/ai.snips.snipsdemo-1/base.apk / 1.0 running in ai.snips.snipsdemo rsrc of package null
08-28 22:08:49.675 28485-28485/ai.snips.snipsdemo W/art: Verification of void android.support.v7.widget.AppCompatDrawableManager.<clinit>() took 104.870ms
08-28 22:08:49.675 28485-28485/ai.snips.snipsdemo W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
08-28 22:08:50.025 28485-28485/ai.snips.snipsdemo D/TextView: setTypeface with style : 0
08-28 22:08:50.025 28485-28485/ai.snips.snipsdemo D/TextView: setTypeface with style : 0
08-28 22:08:50.105 28485-28485/ai.snips.snipsdemo D/TextView: setTypeface with style : 0
08-28 22:08:50.145 28485-28485/ai.snips.snipsdemo D/TextView: setTypeface with style : 0
08-28 22:08:50.245 28485-28485/ai.snips.snipsdemo D/SecWifiDisplayUtil: Metadata value : none
08-28 22:08:50.275 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{41fd004 I.E...... R.....ID 0,0-0,0}
08-28 22:08:50.285 28485-28641/ai.snips.snipsdemo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
08-28 22:08:50.365 28485-28641/ai.snips.snipsdemo I/Adreno: QUALCOMM build                   : d842ad3, Ia10634f51b
    Build Date                       : 01/04/16
    OpenGL ES Shader Compiler Version: XE031.06.00.05
    Local Branch                     : mybranch17578993
    Remote Branch                    : quic/LA.BF.2.1.2_rb1.7
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
08-28 22:08:50.375 28485-28641/ai.snips.snipsdemo D/libEGL: eglInitialize EGLDisplay = 0x9f13f7c4
08-28 22:08:50.375 28485-28641/ai.snips.snipsdemo I/OpenGLRenderer: Initialized EGL, version 1.4
08-28 22:08:50.465 28485-28485/ai.snips.snipsdemo W/art: Before Android 4.1, method int android.support.v7.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
08-28 22:08:50.755 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
08-28 22:08:50.765 28485-28485/ai.snips.snipsdemo V/ActivityThread: updateVisibility : ActivityRecord{9a5385d token=android.os.BinderProxy@bdc6417 {ai.snips.snipsdemo/ai.snips.snipsdemo.MainActivity}} show : true
08-28 22:08:50.775 28485-28485/ai.snips.snipsdemo I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@bdc6417 time:4460403
08-28 22:08:54.955 28485-28485/ai.snips.snipsdemo I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@bdc6417 time:4464582
08-28 22:08:57.295 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: ViewPostImeInputStage processPointer 0
08-28 22:08:57.385 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: ViewPostImeInputStage processPointer 1
08-28 22:08:57.425 28485-28733/ai.snips.snipsdemo D/MainActivity: starting audio streaming
08-28 22:08:57.435 28485-28733/ai.snips.snipsdemo D/MainActivity: minBufferSizeInBytes: 1280
08-28 22:08:57.475 28485-28485/ai.snips.snipsdemo W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.tts-1/base.apk / 1.0 running in ai.snips.snipsdemo rsrc of package null
08-28 22:08:57.525 28485-28485/ai.snips.snipsdemo I/TextToSpeech: Sucessfully bound to com.google.android.tts
08-28 22:08:57.525 28485-28485/ai.snips.snipsdemo I/SnipsPlatform: Connecting to remote Snips processing service
08-28 22:08:58.285 28485-28485/ai.snips.snipsdemo I/TextToSpeech: Connected to ComponentInfo{com.google.android.tts/com.google.android.tts.service.GoogleTTSService}
08-28 22:08:58.305 28485-28793/ai.snips.snipsdemo I/TextToSpeech: Set up connection to ComponentInfo{com.google.android.tts/com.google.android.tts.service.GoogleTTSService}
08-28 22:08:58.425 28485-28485/ai.snips.snipsdemo I/SnipsPlatform: Snips processing service connected, starting the platform
//here I have said the wake word
08-28 22:09:16.905 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: ViewPostImeInputStage processPointer 0
08-28 22:09:17.025 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: ViewPostImeInputStage processPointer 1
08-28 22:09:22.505 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: ViewPostImeInputStage processPointer 0
08-28 22:09:22.585 28485-28485/ai.snips.snipsdemo D/ViewRootImpl: ViewPostImeInputStage processPointer 1

snipsProcessingService

08-28 22:08:57.535 28748-28748/? E/Zygote: v2
08-28 22:08:57.535 28748-28748/? I/libpersona: KNOX_SDCARD checking this for 10610
08-28 22:08:57.535 28748-28748/? I/libpersona: KNOX_SDCARD not a persona
08-28 22:08:57.545 28748-28748/? I/SELinux: Function: selinux_compare_spd_ram, index[1], SPD-policy is existed. and_ver=SEPF_SECMOBILE_6.0.1 ver=11
08-28 22:08:57.545 28748-28748/? W/SELinux: Function: selinux_compare_spd_ram, index[1], priority [2], priority version is VE=SEPF_SECMOBILE_6.0.1_0034
08-28 22:08:57.545 28748-28748/? E/Zygote: accessInfo : 0
08-28 22:08:57.545 28748-28748/? W/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=ai.snips.snipsdemo:snipsProcessingService 
08-28 22:08:57.545 28748-28748/? I/art: Late-enabling -Xcheck:jni
08-28 22:08:57.575 28748-28748/? D/TimaKeyStoreProvider: TimaSignature is unavailable
08-28 22:08:57.575 28748-28748/? D/ActivityThread: Added TimaKeyStore provider
08-28 22:08:57.595 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/ResourcesManager: getTopLevelResources: /data/app/ai.snips.snipsdemo-1/base.apk / 1.0 running in ai.snips.snipsdemo rsrc of package null
08-28 22:08:57.745 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:58.055 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:58.115 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:58.175 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:58.235 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:58.315 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:58.385 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
08-28 22:08:58.405 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/SnipsDemoApp: in the snips process
08-28 22:08:58.475 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/SnipsPlatform: registering client d668be55-43a0-405c-ad42-3fee1cdb31c8
08-28 22:08:58.735 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/de/g2p.fst
08-28 22:09:00.985 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/de/align.fst
08-28 22:09:00.985 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/de/in_syms.txt
08-28 22:09:00.985 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/de/map.fst
08-28 22:09:00.985 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/de/map_out_syms.txt
08-28 22:09:00.985 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/de/out_syms.txt
08-28 22:09:00.995 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/en/g2p.fst
08-28 22:09:01.895 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/en/align.fst
08-28 22:09:01.895 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/en/in_syms.txt
08-28 22:09:01.895 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/en/out_syms.txt
08-28 22:09:01.895 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/es/g2p.fst
08-28 22:09:01.935 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/es/align.fst
08-28 22:09:01.935 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/es/in_syms.txt
08-28 22:09:01.935 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/es/out_syms.txt
08-28 22:09:01.945 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/fr/g2p.fst
08-28 22:09:03.815 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/fr/align.fst
08-28 22:09:03.815 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/fr/in_syms.txt
08-28 22:09:03.815 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/fr/map.fst
08-28 22:09:03.825 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/fr/map_out_syms.txt
08-28 22:09:03.825 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/fr/out_syms.txt
08-28 22:09:03.825 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/it/g2p.fst
08-28 22:09:03.865 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/it/align.fst
08-28 22:09:03.865 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/it/in_syms.txt
08-28 22:09:03.865 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: unzipping /data/user/0/ai.snips.snipsdemo/files/_snips/g2p/it/out_syms.txt
08-28 22:09:03.875 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: Looking for library 'snips_megazord'
08-28 22:09:03.875 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: Adding paths from jna.library.path: null
08-28 22:09:03.875 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: Trying libsnips_megazord.so
08-28 22:09:03.895 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/linker: /data/app/ai.snips.snipsdemo-1/lib/arm/libsnips_kaldi.so: unused DT entry: type 0x7ffffffd arg 0x1db147
08-28 22:09:04.055 28748-28748/ai.snips.snipsdemo:snipsProcessingService I/System.out: Found library 'snips_megazord' at libsnips_megazord.so
08-28 22:09:04.085 28748-28805/ai.snips.snipsdemo:snipsProcessingService I/snips-platform: snips_megazord: Starting components
08-28 22:09:04.085 28748-28805/ai.snips.snipsdemo:snipsProcessingService I/snips-platform: snips_megazord: Starting manual Audio-Server
08-28 22:09:04.085 28748-28805/ai.snips.snipsdemo:snipsProcessingService I/snips-platform: snips_megazord: Starting Audio-Server
08-28 22:09:04.085 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on AudioServer/AudioServerPlayBytes
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on AudioServer/IdentifiableToggleableToggleOn<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on AudioServer/IdentifiableToggleableToggleOff<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on AudioServer/AudioServerReplayRequest
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService I/snips-platform: snips_audio::remote: Started from API
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: snips_megazord: starting snips-watch
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on VoiceActivity/VoiceActivityVadUp
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on VoiceActivity/VoiceActivityVadDown
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Hotword/IdentifiableToggleableToggleOff<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Hotword/IdentifiableToggleableToggleOn<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Hotword/HotwordDetected
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Sound/IdentifiableToggleableToggleOff<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Sound/IdentifiableToggleableToggleOn<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/ToggleableToggleOff<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/ToggleableToggleOn<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrTextCaptured
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrPartialTextCaptured
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrStartListening
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrStopListening
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrReload
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Tts/TtsSay
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Tts/TtsRegisterSound
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Tts/TtsSayFinished
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Injection/InjectionPerform
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Injection/InjectionStatusRequest
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Injection/InjectionStatus
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Nlu/NluSlotParsed
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Nlu/NluIntentParsed
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Nlu/NluIntentNotRecognized
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Nlu/NluReload
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Nlu/NluQuery
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Nlu/NluPartialQuery
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on AudioServer/AudioServerPlayFinished
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on AudioServer/AudioServerPlayBytes
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/ToggleableToggleOff<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/ToggleableToggleOn<T>
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueSessionQueued
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueSessionStarted
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueIntent
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueSessionEnded
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueConfigure
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueStartSession
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueContinueSession
08-28 22:09:04.095 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueEndSession
08-28 22:09:04.105 28748-28810/ai.snips.snipsdemo:snipsProcessingService I/snips-platform: snips_broadcast_mqtt_server: Starting broadcasting audio on hermes for site "default"
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Hotword/HotwordDetected
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrTextCaptured
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrPartialTextCaptured
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueIntent
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueIntentNotRecognized
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueSessionStarted
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueSessionQueued
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Dialogue/DialogueSessionEnded
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrStartListening
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Asr/AsrStopListening
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService I/snips-platform: snips_megazord: Starting injection
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService I/snips-platform: snips_injection_hermes: Launch with assistant "/storage/emulated/0/snips_android_assistant" and user dir "/data/user/0/ai.snips.snipsdemo/files/_snips"
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Injection/InjectionPerform
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Injection/InjectionStatusRequest
08-28 22:09:04.105 28748-28805/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Subscribing on Injection/ComponentVersionRequest<T>
08-28 22:09:04.105 28748-28813/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: snips_injection_hermes: snips-injection started
08-28 22:09:22.635 28748-28748/ai.snips.snipsdemo:snipsProcessingService D/snips-platform: hermes_inprocess: Publishing Dialogue/DialogueStartSession {
        start_session: StartSessionMessage {
            init: Action {
                text: None,
                intent_filter: None,
                can_be_enqueued: false,
                send_intent_not_recognized: false,
            },
            custom_data: None,
            site_id: None,
        },
    }

Hum this is weird, the hotword, asr, nlu and dialogue component don’t seem to start. Are you using exactly the code from the demo or did you make some changes ? (like setting .enableHotword(false) and .enableDialogue(false) on the SnipsPlatformClient builder)

All settings are true. The builder is exact the same as in the example. I have only added some outputs for logging.

Hi @peet000020 !

Could you try we a clean checkout of the demo code? Logs should not affect how the code works but this is really weird so lets be sure an try that.

Also what device are you deploying on? I’ll see if I can find the same. BTW did you try on another device ?

A clean checkout has the same result.

For programming I’m using a Samsung galaxy S5 and emulated versions of Pixel 2, Nexus 5X, Galaxy S10. On all devices the code dont work correct.

I just tested the demo on a fresh nexus 5X API 29 emulator (on Linux) and it works fine here. Just make sure to check “Virtual microphone uses host audio input” in the settings of the emulator to pass the mic to the emulator and copy your assistant.

Your tip with the virtual mic was great. The log displays more information. Asr is now working. (Yey) But the assistant don’t recognize my spoken text. The recognition was 4 seconds and no text was found. - I think this is a problem with the mic of my PC.

Do you know why it isn’t working on the real device?

Make sure the pc mic is not muted :smiley: (happens to me more often than I care to admit)

As for on the device, I don’t know this is really weird, my primary test device is a OnePlus One that has exactly the same CPU, and similar specs, I runs quite well on it. The logs from before were on the device or on the emulator ?

Yes mic on PC was muted. On the emulator the app is working. Thanks.

The logs are from the real device.

Could this be the problem for the real device?

        08-28 22:08:57.595 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/ResourcesManager: getTopLevelResources: /data/app/ai.snips.snipsdemo-1/base.apk / 1.0 running in ai.snips.snipsdemo rsrc of package null
    08-28 22:08:57.745 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
    08-28 22:08:58.055 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
    08-28 22:08:58.115 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
    08-28 22:08:58.175 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
    08-28 22:08:58.235 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
    08-28 22:08:58.315 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
    08-28 22:08:58.385 28748-28748/ai.snips.snipsdemo:snipsProcessingService W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/ai.snips.snipsdemo-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@ai.snips.snipsdemo-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status

Well maybe but I would expect something more dramatic than an half started snips platform in that case. Are you using instant run? This seems to come out quite frequently when searching dex2oat

Maybe try to uninstall the app and install it from the cli:

$ adb uninstall ai.snips.snipsdemo
$ ./gradlew installDebug
$ adb shell am start -n ai.snips.snipsdemo/.MainActivity```

Thank you so much. Now I can use the assistant also on my real device :smiley:

Short another question. When I ask something the text recording stops before I finish my query. Do you know how I change this? An example if I say “Which day is today?” the recognition only recognize something like “day is” or “Which day”.

Hi @peet000020 !
The reason might be that you speak too slowly. The parameters that decide when the ASR stops listening (namely endpoints) can be modified to better suit you.
You can find more information here --> Is it possible to modify the default timeout on no response from the user
Hope it helps

Thanks :smile: Now it’s working.

1 Like