pi-web-voice 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/pi-web-voice.js +10 -1
- package/package.json +1 -1
package/bin/pi-web-voice.js
CHANGED
|
@@ -21,7 +21,16 @@ const hook = path.join(__dirname, "..", "hook.cjs");
|
|
|
21
21
|
// `pi-web-voice doctor [file.wav]` checks the speech backend and exits.
|
|
22
22
|
if (args[0] === "doctor") {
|
|
23
23
|
const { doctor } = require("../lib/doctor.cjs");
|
|
24
|
-
doctor(args.slice(1)).then((code) =>
|
|
24
|
+
doctor(args.slice(1)).then((code) => {
|
|
25
|
+
// Setting the code rather than calling process.exit lets the HTTP
|
|
26
|
+
// connection finish closing. Forcing an exit mid-teardown trips a libuv
|
|
27
|
+
// assertion on Windows: !(handle->flags & UV_HANDLE_CLOSING).
|
|
28
|
+
process.exitCode = code;
|
|
29
|
+
// Keep-alive sockets can still hold the loop open for a few seconds after
|
|
30
|
+
// the answer is in hand. This timer does not itself keep the process
|
|
31
|
+
// alive, and by the time it fires nothing is mid-close.
|
|
32
|
+
setTimeout(() => process.exit(code), 750).unref();
|
|
33
|
+
});
|
|
25
34
|
return;
|
|
26
35
|
}
|
|
27
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-voice",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Voice input for pi-web. A NODE_OPTIONS hook that injects a microphone button into the chat composer and transcribes speech with Azure AI Speech, Azure OpenAI, or any OpenAI-compatible endpoint. No fork, no patching, no rebuild.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi",
|