Porcupine is a hotword recognition tool, like "Ok Google" and "Alexa". The library created by donmanfred works very well with predefined hotwords.
But when I tried creating my own hotword the library fails to initialize.
I am using Windows, and this is the command-
in "E:\porcupine" directory, I have the following files-
porcupine.data
params.pv
pv_porcupine_optimizer.exe
I placed the generated "extreme_windows.ppn" file under "File.DirRootExternal&"/porcupine" folder. When run, the following error occurs:
My example code- https://drive.google.com/open?id=1qEmR9kVJ2sHqk575UW8W0ZRc6PrzZHpN
I've attached the generated hotword.
But when I tried creating my own hotword the library fails to initialize.
I am using Windows, and this is the command-
B4X:
E:\porcupine\pv_porcupine_optimizer -r E:\porcupine -w "extreme" -p windows -o E:\porcupine
in "E:\porcupine" directory, I have the following files-
porcupine.data
params.pv
pv_porcupine_optimizer.exe
I placed the generated "extreme_windows.ppn" file under "File.DirRootExternal&"/porcupine" folder. When run, the following error occurs:
B4X:
Error occurred on line: 48 (Main)
ai.picovoice.porcupinemanager.PorcupineManagerException: ai.picovoice.porcupine.PorcupineException: java.lang.IllegalArgumentException: Initialization of Porcupine failed.
at ai.picovoice.porcupinemanager.PorcupineManager.<init>(PorcupineManager.java:110)
at de.donmanfred.Porcupinewrapper.Initialize(Porcupinewrapper.java:63)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5265)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Caused by: ai.picovoice.porcupine.PorcupineException: java.lang.IllegalArgumentException: Initialization of Porcupine failed.
at ai.picovoice.porcupine.Porcupine.<init>(Porcupine.java:49)
at ai.picovoice.porcupinemanager.PorcupineManager.<init>(PorcupineManager.java:108)
... 20 more
Caused by: java.lang.IllegalArgumentException: Initialization of Porcupine failed.
at ai.picovoice.porcupine.Porcupine.init(Native Method)
at ai.picovoice.porcupine.Porcupine.<init>(Porcupine.java:47)
... 21 more
** Activity (main) Resume **
My example code- https://drive.google.com/open?id=1qEmR9kVJ2sHqk575UW8W0ZRc6PrzZHpN
I've attached the generated hotword.
Attachments
Last edited: