Comments (26)
Take a look at how it is done in Android demo application please:
https://github.com/Picovoice/Porcupine/tree/master/demo/android
from porcupine.
I get this error when running the application:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.[censored].[censored]-1/base.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.[censored].[censored]-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.[censored].[censored]-1/lib/arm, /system/lib, /vendor/lib]]] couldn't find "libpv_porcupine.so"
I replaced my package name with [censored]
from porcupine.
The log says it cannot find the shared object. I guess you have not included it in your app ...
from porcupine.
Shared object? What is that?
from porcupine.
Where do I get the "shared file" (I'm assuming the file is libpv_porcupine.so) and where do I put it?
from porcupine.
.so files are here: https://github.com/Picovoice/Porcupine/tree/master/lib/android
you can use the android binding here: https://github.com/Picovoice/Porcupine/tree/master/binding/android
it gives you a ready to use AAR...
from porcupine.
Where am I supposed to put the .so files?
from porcupine.
Nevermind. It worked.
However, when I say the wake word, nothing happens. Here's my code:
try {
manager = new PorcupineManager(modelFilePath, keywordFilePath, sensitivity, new KeywordCallback() {
@Override
public void run(int keyword_index) {
Toast.makeText(MainActivity.this, "Detected!", Toast.LENGTH_LONG).show();
}
});
manager.start();
} catch (PorcupineManagerException e) {
e.printStackTrace();
}
from porcupine.
I get ai.picovoice.porcupinemanager.PorcupineManagerException: ai.picovoice.porcupine.PorcupineException: java.lang.IllegalArgumentException: Initialization of Porcupine failed.
from porcupine.
How do I tell what's the issue? This also happens when I try to run your demo app.
from porcupine.
I just tested the demo app and managed to build and run it on an Android phone.
have you looked into the logs?
from porcupine.
The demo app doesn't even have the library imported properly. I don't know where you're getting at. I had to manually add the library to the demo app. I'm getting the same error. I got nothing from the logs. This library has 0 error reporting, if there's an exception, no matter what it is, it throws a PorcupineException.
from porcupine.
Can you provide us with a .aar instead of having us do all of this to import the library properly?
from porcupine.
I see. I am using the master branch of the repo with no local changes. I can't reproduce the issue and hence cannot help any further. If you are not happy with the library, it is unfortunate. hope you find something that works better for you.
from porcupine.
Which folder do you open in Android Studio to see the demo application?
from porcupine.
https://i.imgur.com/VOrvtxj.jpg
I get this error in the Porcupine
class.
from porcupine.
https://github.com/Picovoice/Porcupine/tree/master/demo/android
from porcupine.
I've imported the library successfully:
https://i.imgur.com/55VOhAJ.png
However I still get this error. None of the native
methods seem to work. The .so files are there.
from porcupine.
I get the same error in your demo application without changing anything.
from porcupine.
what do you mean by none of the native methods work? I don't know what is the issue here. I know that other developers have successfully loaded and used the demo app. from the information you provide I can't figure out the issue here. could be something related to your android studio ...
from porcupine.
In the porcupine class, I get "cannot resolve corresponding JNI function" on methods like
public native long init();
and etc.
from porcupine.
can you run any NDK project other than this? I suspect something is wrong with your IDE/toolchain setup ...
from porcupine.
Hi man. Sorry, it turns out the NDK is importing properly and that error isn't real.
I decided to debug, and I found this error:
[ERROR] loading parameter file failed with 'IO_ERROR'
I have verified that params.pv
exists. The path is /data/user/0/com.package.name/files/params.pv
from porcupine.
I think I should open another issue for this, since it's a completely different problem then what we started with.
from porcupine.
Facing same error, aar link @kenarsa
from porcupine.
Hello, I have error "java.lang.IllegalArgumentException: Initialization of Porcupine failed". I'm sure about address of files "*.ppn and *.pv" and I can open them. but I have this error on this line "object = init(modelFilePath, new String[]{keywordFilePath}, new float[]{sensitivity});"
I'm developing on android studio in windows 10.
from porcupine.
Related Issues (20)
- Porcupine with react native voice HOT 2
- Porcupine Issue: visionOS support HOT 4
- Porcupine Issue: HOT 2
- Porcupine Issue: Implementing Custom Wake Word Recording in PorcupineManager HOT 1
- ERROR "PV file has incorrect format or belongs to a different platform" HOT 2
- Porcupine Issue:namespace name 'PorcupineManager' could not be found
- PorcupineInvalidStateError: Porcupine is not initialized HOT 3
- Porcupine Licensing and Access Key HOT 1
- Porcupine Issue: Trying to run the web demo throws errors HOT 1
- Porcupine Issue: Provided model (.pv) file belongs to a different version of the library HOT 1
- Not able to download my ppn model from the website HOT 2
- Picovoice Console Issue: HOT 1
- Porcupine Issue: Its Taking the audio from Device Speaker HOT 1
- Porcupine Issue: PICOVOICE_STATUS_TO_EXCEPTION 00000136 HOT 5
- Picovoice Documentation Issue (/docs/quick-start/porcupine-jetson/) HOT 1
- RK3588 (0xd05) is 100% working HOT 3
- PORCUPINE CASUING ERRORS AND NOT RUNNING TRAINED KEYWORD HOT 1
- Porcupine Documentation Issue: HOT 1
- Porcupine Issue: Japanese model params file is actually for English HOT 1
- Porcupine Issue: Are there any plans to support WebGL on the Unity platform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from porcupine.