speech-opencode 1.1.5 → 1.1.6
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/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tool } from "@opencode-ai/plugin";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
|
-
import { spawn } from "child_process";
|
|
3
|
+
import { spawn, spawnSync } from "child_process";
|
|
4
4
|
import { unlinkSync, readFileSync, existsSync, watch, mkdirSync, writeFileSync } from "fs";
|
|
5
5
|
import { tmpdir, homedir } from "os";
|
|
6
6
|
import { join, dirname } from "path";
|
|
@@ -277,7 +277,7 @@ function startWakeWordListener(wakeWord = "hey_jarvis", threshold = 0.5) {
|
|
|
277
277
|
// First, kill any existing instances to prevent duplicates/zombies
|
|
278
278
|
// This is crucial because multiple listeners will fight for the mic
|
|
279
279
|
try {
|
|
280
|
-
|
|
280
|
+
spawnSync("pkill", ["-f", "opencode-wakeword-listener.py"]);
|
|
281
281
|
}
|
|
282
282
|
catch {
|
|
283
283
|
// Ignore
|