porcupine: Java init fails on Linux mint

Im trying to create an home assistant with a laptop x86_64 running Raspberry Os. Of I try to run my code i get this Error: ai.picovoice.porcupine.PorcupineIOException: Initialization failed. at ai.picovoice.porcupine.Porcupine.init(Native Method) at ai.picovoice.porcupine.Porcupine.<init>(Porcupine.java:61) at ai.picovoice.porcupine.Porcupine$Builder.build(Porcupine.java:262) at de.VoiceRecognition.ball.WakeWordDetection.main(WakeWordDetection.java:79)

this is my code:

`

        ByteArrayOutputStream outputStream = null;

    
        String Keypath =   "voiceTickets/de_linux_v2_1_0.ppn";
        String ModelPath = "voiceTickets/porcupine_params_de.pv";
        
        // get audio capture device
        
        
        try {
            micDataLine = mic.getTargetDataLine();
            micDataLine.open(format);
        } catch (LineUnavailableException e) {
            System.err.println("Failed to get a valid capture device. Use --show_audio_devices to " +
                    "show available capture devices and their indices");
            System.exit(1);
            return;
        }
        

            Porcupine handle = new Porcupine.Builder()
                                .setAccessKey(accessKey)
                                .setKeywordPath(Keypath)
                                .setModelPath(ModelPath)
                                .build();`

Thank You

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 35 (16 by maintainers)

Most upvoted comments

I’ve run it via Ubuntu Standard with my Desktop PC!

Yes of course I’ve replaced it, I just didnt want others to know my key so i censored it. I have a constant internet connection 400mb. What am I supposed to do next?