Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Feb 2, 2024
1 parent 49d3c40 commit c7c70c9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions demo/nodejs/mic.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const {
} = require("@picovoice/cobra-node");

program
.option(
.requiredOption(
"-a, --access_key <string>",
"AccessKey obtain from the Picovoice Console (https://console.picovoice.ai/)"
)
Expand Down Expand Up @@ -81,7 +81,11 @@ async function micDemo() {
process.stdin.setRawMode(true);

process.stdin.on("keypress", (key, str) => {
if (str.sequence === "\r" || str.sequence === "\n") {
if (
str.sequence === "\r" ||
str.sequence === "\n" ||
(str.ctrl && str.name === "c")
) {
isInterrupted = true;
}
});
Expand Down

0 comments on commit c7c70c9

Please sign in to comment.