-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentations and instructions for android integration needed #5
Comments
The Android sample should be in a working state. @hesamsagha can probably give you some hints how to get started with the Android integration. |
Thank you for the quick response When I try to build on Mac, I encounter an error about
which made subsequent post-fixing command not working
the build script auto-generate the OpenSmileJNI.java file but without the post-fixing step, the type will be conflicting. I believe |
you may comment out this part of the gradle and replace the string manually. |
After replacing that in the JNI wrapper classes generated by swig, I successfully built the aar file. The android template project couldn't find the aar file generated under |
@hesamsagha Any idea what could be going wrong here? |
@toankrw could you check the logcat and copy it here. |
After downloading this file "opensmile-3.0-win-x64" |
After trying again with another desktop running Ubuntu16.04, all the build steps seem to work. A comment on the issue: On MacOS, it would fail at step command |
Upon launching the app (without any modification to build procedure), I encounter the same error like before. Here is the logcat: When clicking "Test ExternalMessageInterface":
When clicking "Test ExternalSink":
One side question, do I load a sample audio file to sdcard/output_external.wav? I found the sample app request record audio feature and the class
|
@toankrw The error
example: BUILD_FLAGS="-DWITH_OPENSLES=ON" Other build flags you can also add, some of them are listed in the https://github.com/audeering/opensmile/blob/master/build_flags.sh Regarding the audio, the app will write the recorded audio or csv into a file, with the default paths mentioned in opensmile/progsrc/android-template/app/src/main/java/com/audeering/androidtemplate/MainActivity.kt Line 45 in 3faba92
If it has problem with writing, either the permission is not granted or the folder doesn't exist. You may change the default values to fix it. |
Thanks for the insights, the crashes seem to derive from permission changes come with Android 11. Even though the app requests for READ and WRITE permissions, the only thing granted was "Allow access to media only". The issue was further discussed here: I will try a workaround and let you know the result so you can apply the fix to sample app. About the hiccup I encountered previously, before I attempted the build on a desktop running Ubuntu 16.04, I tried with a VM running 19.04 (Disco Dingo) build. Do you have any idea why it would fail at the final step
The first step |
I am not sure why. Usually this error relates to the unsuccessful swig process, when it can't produce the output. Does this happen only on the VM with Ubuntu 19.04? Is a proper swig version installed? |
I only had the problem with 19.04. I had to change apt-get address to archive.ubuntu.com and there were some other hiccups so I probably did something wrong while setting up that VM. Here is the addition to AndroidManifest to prevent the app from crashing on newer model devices because the demo app is targeting Android 10
More about the issue here: https://developer.android.com/training/data-storage/use-cases?authuser=1#opt-out-scoped-storage Without that the app won't be able to access the external directory even though the permissions were granted |
I am trying to use opensmile 3.0 in python in windows 10. Downloaded from official website. Extract the folder, in cmd change working directory to opensmile\bin\SMILExtract -h Finally for feature extraction C:\Users\HP\Desktop\opensmile\bin>SMILExtract -C config -I opensmile.wav -O F.csv (MSG) [2] SMILExtract: openSMILE starting! please somebody guide. This is the issue with cmd, but when i try in python editor it generates the csv file but its not readable. some unknown font appear. |
@krishna51119 I think the path to your config file is wrong, double check the part |
@toankrw the path should be the path of this config file right? what else is needed? plz guide |
@toankrw Thank you for pointing out this breaking change and the workaround. We should indeed set this variable in the Android sample project. @krishna51119 Please open a new issue for your question. Thanks! |
@krishna51119 you should put the path config>mfcc>MFCC12_0_D_A.conf to the command, not just 'config', use absolute path if needed
|
I think the feedback has been received and minor issues with the app crashing have been resolved as well. I'm closing this issue |
Same issue on win 10 |
I believe the android example under
opensmile\progsrc\android-template
is in a non-working state right now with just the adapter and placeholder folder for the library. Do you have any plan to create a working example project to show how to utilize the built .aar file?I tried the Linux and Windows builds out and they worked fine but the documentations for android is somewhat lacking. There was no further instruction for android after the build step
Extracting your first features section only shows how to use SMILExtract using command line.
I have a .conf file and I'm looking for a way to pass that to the library (together with .wav input file) in android to get back data just like the first example of that section
SMILExtract -C config/demo/demo1_energy.conf -I example-audio/opensmile.wav -O opensmile.energy.csv
Digging into the template project, I do found some methods defined under
OpenSmileAdapter
. Could you please describe what those methods do and how I can get the results?The text was updated successfully, but these errors were encountered: