Android Question Porcupine hotword creation

Discussion in 'Android Questions' started by Multiverse app, May 15, 2018.

  1. Multiverse app

    Multiverse app Active Member Licensed User

    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-
    Code:
    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:

    Code:
    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.
     

    Attached Files:

    Last edited: May 15, 2018
  2. DonManfred

    DonManfred Expert Licensed User

    Please remove the Library! I did not allowed to publish the library.
     
  3. Multiverse app

    Multiverse app Active Member Licensed User

    Oh, sorry! removed.
     
    DonManfred likes this.
  4. DonManfred

    DonManfred Expert Licensed User

    As far i can help (unfortunately the lib still does not work for me).

    I found out that the files generated by the Windowstool seems to be not able to create Files for ANDROID!?

    Now i found this (Optimizer/readme.md)
    So, if you need to create keywords for Android you need to buy a License. Don´t know what it costs/how much it is. You need to contact contact@picovoice.ai
     
    Last edited: May 15, 2018
    Multiverse app likes this.
  5. coslad

    coslad Well-Known Member Licensed User

    Hi. Can you tell us more about this wonderful library?
     
  6. DonManfred

    DonManfred Expert Licensed User

    It is a wrap for this Github project.

    Keywords available:
     
  7. Multiverse app

    Multiverse app Active Member Licensed User

    Got it. Thanks
     
  8. DonManfred

    DonManfred Expert Licensed User

    Keep me informed when you know the price :) (not interested but out of curiosity)
     
    Multiverse app likes this.
  9. Syd Wright

    Syd Wright Active Member Licensed User

    Why don't you want to share this Library? I asked in the Forum (not in a private message because you don't like that) about it two days ago but sadly got no reply. Please explain, because I don't understand why people's appetite first gets wet and then everything halts, despite people like me offering a donation if the wrapper works.
     
  10. coslad

    coslad Well-Known Member Licensed User

    Me too
     
  11. Syd Wright

    Syd Wright Active Member Licensed User

    You might want to try "Snowboy" which is similar to Porcupine. I have been using it successfully for the past half year. In the Snowboy case Don Manfred was very helpful to create the library.
     
    Multiverse app likes this.
  12. DonManfred

    DonManfred Expert Licensed User

    I was HELPFUL with this library too! I DID WROTE IT
    I don´t care about the 5 minutes you was too lazy to build the example by yourself.
    I deciced NOT to react on Posts from you. Private or open.

    Please do not ask me about any Library anymore.
     
    Last edited: May 16, 2018
  13. coslad

    coslad Well-Known Member Licensed User

    Hi Don

    it is a shame not to share your work , maybe into a donationware formula .

    Or send me Pm with your price .

    Think about it , the voice commands are the new future and do it with B4A will be great !!
     
  14. DonManfred

    DonManfred Expert Licensed User

    You are not able to create new commands with this library. At least not for Android. You need a Commercial License for this.
    Additionally the lib still does not work for me. Maybe my Device (Android 8). I don´t know.
    I would feel bad if i release it.
     
  15. coslad

    coslad Well-Known Member Licensed User

    Many thanks for your reply:) , it is a shame !

    I will continue trying to understand Google action command :(
     
  16. Multiverse app

    Multiverse app Active Member Licensed User

    It worked fine on my Android 8 device o_O
    What issue are you facing?
     
  17. DonManfred

    DonManfred Expert Licensed User

    The initialization does work (i guess). in resume i start and when i try to activate the Keyword used (Alexa_Android) the Lib (the Native) just crashes.
    I only could find something in the unfiltered log. But nothing which i could understand.

    As i am not interested in this Library i just put it by side... No problem for me at all.

    I´m glad it works for you...
     
  18. Syd Wright

    Syd Wright Active Member Licensed User

    Rude and respectless as usual. You didn't even read what I wrote: I was not able to build a project on the basis of what you made. I did try for more than an hour!
    Not everyone is an "Expert" like you... You wrote: "I don't have the time to finish the project" which is very strange.
    You are now on my ignore list. Go fly a kite.
     
    Last edited: May 15, 2018
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice