@fonoster/autopilot 0.7.47 → 0.7.49

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.
@@ -12,7 +12,7 @@ declare class SileroVad implements Vad {
12
12
  activationThreshold: number;
13
13
  deactivationThreshold: number;
14
14
  debounceFrames: number;
15
- private init;
15
+ init(): Promise<void>;
16
16
  processChunk(data: Uint8Array, callback: (event: "SPEECH_START" | "SPEECH_END") => void): void;
17
17
  }
18
18
  export { SileroVad };
@@ -27,10 +27,8 @@ class SileroVad {
27
27
  constructor(params) {
28
28
  logger.verbose("starting instance of silero vad", { ...params });
29
29
  this.params = params;
30
- this.init();
31
30
  }
32
31
  async init() {
33
- // FIXME: It feels strange to do this in the constructor
34
32
  this.vad = await (0, makeVad_1.makeVad)(this.params);
35
33
  }
36
34
  processChunk(data, callback) {
package/dist/vadWorker.js CHANGED
@@ -21,8 +21,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  const worker_threads_1 = require("worker_threads");
22
22
  const SileroVad_1 = require("./vad/SileroVad");
23
23
  const vad = new SileroVad_1.SileroVad(worker_threads_1.workerData);
24
- worker_threads_1.parentPort?.on("message", (chunk) => {
25
- vad.processChunk(chunk, (voiceActivity) => {
26
- worker_threads_1.parentPort?.postMessage(voiceActivity);
24
+ vad.init().then(() => {
25
+ worker_threads_1.parentPort?.on("message", (chunk) => {
26
+ vad.processChunk(chunk, (voiceActivity) => {
27
+ worker_threads_1.parentPort?.postMessage(voiceActivity);
28
+ });
27
29
  });
28
30
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/autopilot",
3
- "version": "0.7.47",
3
+ "version": "0.7.49",
4
4
  "description": "Voice AI for the Fonoster platform",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@aws-sdk/client-s3": "^3.712.0",
39
- "@fonoster/common": "^0.7.47",
40
- "@fonoster/logger": "^0.7.47",
41
- "@fonoster/types": "^0.7.47",
42
- "@fonoster/voice": "^0.7.47",
39
+ "@fonoster/common": "^0.7.49",
40
+ "@fonoster/logger": "^0.7.49",
41
+ "@fonoster/types": "^0.7.49",
42
+ "@fonoster/voice": "^0.7.49",
43
43
  "@langchain/community": "^0.3.19",
44
44
  "@langchain/core": "^0.3.23",
45
45
  "@langchain/groq": "^0.1.2",
@@ -57,5 +57,5 @@
57
57
  "devDependencies": {
58
58
  "typescript": "^5.5.4"
59
59
  },
60
- "gitHead": "6d3f97e9f11d0f526c013b7d210ef482787e799e"
60
+ "gitHead": "3fdbcfdf8240218f371a03826ccf75175bee5610"
61
61
  }