'Java Picovoice Porcupine Initalization failed Linux Raspberry OS
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:
final String accessKey = "[Acceskey]"; // AccessKey obtained from Picovoice Console (https://picovoice.ai/console/)
mainFrame.startFrame();
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!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
