naxingyu / opensmile

A github repo of the openSMILE feature extraction tool.
http://www.audeering.com/research/opensmile
Other
214 stars 79 forks source link

android-template project missing config files #18

Open Ventis opened 5 years ago

Ventis commented 5 years ago

Hi,

when running the android-template example app it immediately crashes because some files are missing in the assets folder, namely BufferModeLive.conf.inc, music_features.conf.inc and FrameModeMoodWin.conf.inc.

The BufferModeLive.conf.inc can be found and copied from the config folder in the opensmile trunk but the other two are nowhere to be found.

Why are they missing and how can I replace them? Without them the app doesn't seem to do much when I press the play button and start an opensmile thread.

flache commented 5 years ago

just remove them and add the features.conf.inc config file (as I did in my not yet reviewed pull request: https://github.com/naxingyu/opensmile/pull/19/files#diff-3c97870e814384188b070d1608384e4e )

The app should work fine then. If you have further issues running the android app, maybe some further adaptions taken from my pull request may help as well

Ventis commented 5 years ago

Hey @flache,

I tried the changes in your PR and they don't seem to help. The app launches, I see the Treble, Middle and Bass labels (with 0 as their values) but nothing further happens. When I click the Play button in the top right corner and I check LogCat I get the following messages:

2018-10-09 09:23:23.778 29448-30442/? I/opensmile: starting opensmile...
2018-10-09 09:23:23.778 29448-30442/? I/opensmile: Started openSMILE thread.

But nothing further happens. The treble, Middle, Bass values never update and I see nothing happening in Logcat. As far as I can see, onSmileMessageReceived is also never called.

flache commented 5 years ago

that's all what you see in logcat? can you post the full log (From the start of the app until you click the play button)? It might be an issue with the app permissions but it is hard to guess without the log

Ventis commented 5 years ago
2018-10-09 14:23:47.826 15485-15485/? I/Finsky: [2] com.google.android.finsky.verifier.impl.fl.c(173): Verification complete: id=76, package_name=com.audeering.opensmile.androidtemplate
2018-10-09 14:23:48.044 893-987/? V/BackupManagerService: restoreAtInstall pkg=com.audeering.opensmile.androidtemplate token=4d restoreSet=353ffe27c9e38370
2018-10-09 14:23:48.566 31127-17143/? I/Backup: [RestoreRequestProcessor] Skipping app with no doc id or kv pairs: com.audeering.opensmile.androidtemplate
2018-10-09 14:23:48.675 1412-1412/? D/BluetoothMapAppObserver: The installed package is: com.audeering.opensmile.androidtemplate
2018-10-09 14:23:48.686 1412-1412/? D/NewAvrcpMediaPlayerList: Name of package changed: com.audeering.opensmile.androidtemplate
2018-10-09 14:23:48.709 893-1429/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 (has extras) } to com.android.musicfx/.Compatibility$Receiver
2018-10-09 14:23:48.765 893-910/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 (has extras) } to com.google.android.gms/.games.chimera.GamesSystemBroadcastReceiverProxy
2018-10-09 14:23:48.766 893-941/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 (has extras) } to com.google.android.gms/.gass.chimera.PackageChangeBroadcastReceiver
2018-10-09 14:23:48.766 893-941/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
2018-10-09 14:23:48.766 893-941/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
2018-10-09 14:23:48.766 893-941/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 (has extras) } to com.bol.shop/.broadcastReceivers.InstallationBroadcastReceiver
2018-10-09 14:23:48.766 893-941/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 (has extras) } to com.facebook.katana/com.facebook.feed.platformads.AppInstallReceiver
2018-10-09 14:23:48.779 1648-1648/? D/ImsResolver: maybeAddedImsService, packageName: com.audeering.opensmile.androidtemplate
2018-10-09 14:23:48.825 31127-17395/? I/ChromeSync: [Sync,SyncIntentOperation] Handling the intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.audeering.opensmile.androidtemplate flg=0x4000010 cmp=com.google.android.gms/.chimera.GmsIntentOperationService (has extras) }.
2018-10-09 14:23:48.830 31127-17396/? I/FontsPackageChangeOp: Package com.audeering.opensmile.androidtemplate has no metadata
2018-10-09 14:23:49.119 15485-15485/? I/Finsky: [2] com.google.android.finsky.wear.ef.run(6): Begin wear auto install for package com.audeering.opensmile.androidtemplate
2018-10-09 14:24:10.274 893-6955/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.audeering.opensmile.androidtemplate/.MainActivity bnds=[237,1608][439,1862]} from uid 10032
2018-10-09 14:24:10.335 893-943/? I/ActivityManager: Start proc 17419:com.audeering.opensmile.androidtemplate/u0a384 for activity com.audeering.opensmile.androidtemplate/.MainActivity
2018-10-09 14:24:11.055 492-1322/? W/SurfaceFlinger: Attempting to set client state on removed layer: Surface(name=AppWindowToken{f896662 token=Token{77b012d ActivityRecord{9986c44 u0 com.audeering.opensmile.androidtemplate/.MainActivity t26913}}})/@0xc676e61 - animation-leash#0
2018-10-09 14:24:11.055 492-1322/? W/SurfaceFlinger: Attempting to destroy on removed layer: Surface(name=AppWindowToken{f896662 token=Token{77b012d ActivityRecord{9986c44 u0 com.audeering.opensmile.androidtemplate/.MainActivity t26913}}})/@0xc676e61 - animation-leash#0
2018-10-09 14:24:11.871 17419-17441/com.audeering.opensmile.androidtemplate I/Adreno: QUALCOMM build                   : 984b9a6, Ibe1bf21abc
    Build Date                       : 06/04/18
    OpenGL ES Shader Compiler Version: EV031.24.00.00
    Local Branch                     : googldrp
    Remote Branch                    : 
    Remote Branch                    : 
    Reconstruct Branch               : 
2018-10-09 14:24:11.871 17419-17441/com.audeering.opensmile.androidtemplate I/Adreno: Build Config                     : S L 4.0.10 AArch32
2018-10-09 14:24:11.898 17419-17441/com.audeering.opensmile.androidtemplate I/Adreno: PFP: 0x005ff110, ME: 0x005ff066
2018-10-09 14:24:11.925 17419-17441/com.audeering.opensmile.androidtemplate I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2018-10-09 14:24:11.927 17419-17441/com.audeering.opensmile.androidtemplate I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2018-10-09 14:24:11.930 17419-17441/com.audeering.opensmile.androidtemplate I/OpenGLRenderer: Initialized EGL, version 1.4
2018-10-09 14:24:11.936 17419-17441/com.audeering.opensmile.androidtemplate D/OpenGLRenderer: Swap behavior 1
2018-10-09 14:24:12.576 17419-17419/com.audeering.opensmile.androidtemplate I/Choreographer: Skipped 35 frames!  The application may be doing too much work on its main thread.
2018-10-09 14:24:12.772 492-547/? W/SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen com.audeering.opensmile.androidtemplate#0
2018-10-09 14:24:12.772 492-547/? W/SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen com.audeering.opensmile.androidtemplate#0
2018-10-09 14:24:18.308 17419-17419/com.audeering.opensmile.androidtemplate I/com.audeering.opensmile.androidtemplate.MainActivity: Permission granted
2018-10-09 14:24:21.341 17419-17478/com.audeering.opensmile.androidtemplate I/opensmile: starting opensmile...
2018-10-09 14:24:21.341 17419-17478/com.audeering.opensmile.androidtemplate I/opensmile: Started openSMILE thread.
Ventis commented 5 years ago

That's everything from start up of the app till after I press the start and even the stop button.

flache commented 5 years ago

You could try to uninstall the app and install my compiled version app-debug.apk.zip . It works on my phone. If it does not work on your device we know something is wrong with your device, otherwise your code/build has an issue.

It is weird that the app crashes without an error message, I always saw something on logcat when it did not work. Are you using logcat inside an IDE?

Ventis commented 5 years ago

To be clear, the app doesn't really crash, it just doesn't do anything. :) I'm using the logcat inside Android Studio.

Your apk however works. It shows live treble, middle and bass input. So there must be something wrong with either my code or the compiled libopensmile.

Could you upload your android-template project so I can try to compile it myself and see if it still works?

chausner-audeering commented 3 years ago

I think this was indeed a bug in the Android sample project in version 2.3. For anyone looking into Android integration, I suggest to give the recently released version 3.0 a try. The Android integration has been completely overhauled there.