handle = Picovoice(
keyword_path=keyword_path,
wake_word_callback=wake_word_callback,
context_path=context_path,
inference_callback=inference_callback)
while True:
handle.process(get_next_audio_frame())
// Create an instance of PicovoiceManager
PicovoiceManager manager = await PicovoiceManager.create(
keywordPath,
(keywordIndex) => { /* logic to execute upon deletection of wake word */ },
contextPath,
(inference) => { /* logic to execute upon completion of intent inference */ }
);
// Process audio
await manager.start();
let manager = await PicovoiceManager.create(
keywordPath,
(keywordIndex) => { },
contextPath,
(inference) => { }
);
await manager.start();
// Create an instance of Picovoice
Picovoice picovoice = new Picovoice(
porcupineModelPath,
keywordPath,
porcupineSensitivity,
new PicovoiceWakeWordCallback() { /* logic to execute upon deletection of wake word */ },
rhinoModelPath,
contextPath,
rhinoSensitivity,
new PicovoiceInferenceCallback() { /* logic to execute upon completion of intent inference */ }
);
while (true) {
picovoice.process(getNextAudioFrame());
}
// Create an instance of PicovoiceManager
let manager = PicovoiceManager(
porcupineModelpath: porcupineModelpath,
keywordPath: keywordPath,
porcupineSensitivity: porcupineSensitivity,
onWakeWordDetection: { /* logic to execute upon wake word detection */ },
rhinoModelPath: rhinoModelPath,
contextPath: contextPath,
rhinoSensitivity: rhinoSensitivity,
onInference: { /* logic to execute upon intent inference completion */ }
)
// Process audio
try porcupineManager.start()
let handle = new Picovoice(
keywordArgument,
keywordCallback,
contextPath,
inferenceCallback
)
while (true) {
handle.process(getNextAudioFrame())
}
// Create an instance of Picovoice
Picovoice handle = new Picovoice(
keywordPath,
wakeWordCallback,
contextPath,
inferenceCallback);
// Process audio
while (true) {
handle.Process(GetNextAudioFrame());
}
// Create an instance of Picovoice
Picovoice handle = new Picovoice.Builder()
.setKeywordPath(keywordPath)
.setWakeWordCallback(wakeWordCallback)
.setContextPath(contextPath)
.setInferenceCallback(inferenceCallback)
.build();
// Process audio
while (true) {
handle.process(getNextAudioFrame());
}