-
Notifications
You must be signed in to change notification settings - Fork 2
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
will there be support for android in near future? #10
Comments
Very likely. Unfortunately I'm not very familiar with the android ecosystem so there might be some hidden pitfalls. I going to give it a try and see if I run into any problems. |
Cool. We can help. If I understand correctly, there is other no other dependency than kissfft. Right? |
Sorry for the delay. I managed to successfully compile everything locally. The part I missed was writing a jni interface for java/kotlin. I already implemented parts of the interface. I will push the final version of the lib in Some parts still need to be done after that: Recording and buffering the audio as well as a small gui example. (record.py and ringbuffer.py ) |
Awesome! Looking forward to test it. |
Just a quick update. The changes are live in the 0.3.5 branch, but mostly untested and building the library is still a bit of a hassle. I set up a temporary repository at https://github.com/yodakohl/AudioRecognition_AndroidTest . The repository features a pre-build version of the X86 library for android and a kotlin interface to the lib. This should be sufficient to get an app running. I will expand the temp repository to a minimal Keyword Spotting App. |
@yodakohl Great! We will check it and report back. |
Thank you. We had some trouble to get it compiled but we resolved it. We have now issue with detection. First of all, we are little confused as to why signalToMel function is returning 800 mel values when fed byteArray of size 3200 (which is 1600 samples)? It should written 400 mel values. right? We used test.cpp to compare the reference mel values. The 400 values match as expected but then the puzzling question is why signalToMel is returning 800 instead of 400 values on byteArray size of 3200. And oh, the runDetetion always return zero. even on valid "marvin" wav file (with marvin model file) |
The signalToMel function expects 3200 samples which are 6400 bytes. Do you mind sharing your wave reading code in a gist so i can integrate it into the android example and test it myself? |
I agree that when 6400 bytes are fed you expect to get 800 mels |
Is this right? |
Ah ok, seems like I have a bug in the jni binding (lib.cpp) `jbyteArray Java_com_nyumaya_audiorecognition_NyumayaLibrary_signalToMel(JNIEnv env, jobject obj,jlong impl,jbyteArray pcm,jfloat gain)
}` I'm getting the inlen from the byte array and then cast it to int16_t. I will probably have to divide inlen by two before feeding it to signal_to_mel. |
glad you found it :). will wait for the fix. |
I fixed in lib.cpp and rebuilt the library. Now it return correct numberl of mels (400). But the runDetection still return 0 even on valid marvin wav file. |
Yeah, same here. I'm currently trying to find the issue |
Got a detection result. The slicing code is wrong:
|
Yep. got it working. Awesome! Thanks |
Can you please add the licence file? |
No description provided.
The text was updated successfully, but these errors were encountered: