@framers/agentos-ext-diarization 0.2.2 → 0.2.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/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Diarization
2
+
3
+ This pack registers a speaker diarization engine for the AgentOS voice pipeline. It uses local audio feature extraction and cosine similarity, or consumes speaker labels from speech-to-text transcript events.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @framers/agentos-ext-diarization
9
+ ```
10
+
11
+ Peer dependencies: `@framers/agentos` (`>=0.10.40`) and optional `onnxruntime-node` (`^1.18.0`).
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { AgentOS } from '@framers/agentos';
17
+
18
+ const agentos = await AgentOS.create({
19
+ extensionManifest: {
20
+ packs: [{ package: '@framers/agentos-ext-diarization' }],
21
+ },
22
+ });
23
+ ```
24
+
25
+ ## Configuration
26
+
27
+ The pack factory ignores its context. These settings belong to the engine's `startSession` method. It reads no secrets or environment variables.
28
+
29
+ | Option | Secret id | Environment variable | Required | Default |
30
+ | --- | --- | --- | --- | --- |
31
+ | `backend` | None | None | No | `local` |
32
+ | `similarityThreshold` | None | None | No | `0.7` |
33
+ | `chunkSizeMs` | None | None | No | `1500` milliseconds |
34
+ | `overlapMs` | None | None | No | `500` milliseconds |
35
+ | `sampleRate` | None | None | No | `16000` Hz |
36
+ | `expectedSpeakers` | None | None | No | Unset; declared but not read by `startSession` |
37
+
38
+ The exported `ClusteringStrategy` accepts `mergeThreshold`, defaulting to `0.85`, and its `mergeClusters` method accepts optional `expectedSpeakers`. Sessions do not invoke this strategy.
39
+
40
+ ## Notes
41
+
42
+ Local sessions accept PCM samples in `Float32Array` frames through `pushAudio`, emit `speaker_identified`, and label transcripts with the most recently identified speaker. `enrollSpeaker` registers a reference voiceprint and overwrites an existing voiceprint with the same identifier. Local feature extraction is a placeholder for demos and testing. It uses no ONNX model. Local transcript end times are estimated from text length, and confidence is fixed.
43
+
44
+ Provider sessions ignore audio and enrollment calls. `labelTranscript` selects the most frequent word-level speaker label and returns `null` when labels are absent. Both backends emit `segment_ready` for a labelled transcript.
45
+
46
+ The overlap must produce fewer samples than the chunk size, or session creation throws a `RangeError`. The extractor uses the configured sample rate without resampling incoming frames. `close` stops local processing, clears listeners, and causes subsequent audio and transcript inputs to be ignored.
47
+
48
+ ## License
49
+
50
+ Apache-2.0
package/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos-ext-diarization",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Speaker diarization with provider delegation and local spectral-centroid clustering",
5
5
  "kind": "diarization-provider",
6
6
  "extensionId": "diarization",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos-ext-diarization",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Speaker diarization extension pack for AgentOS voice pipeline — provider delegation and local clustering",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,7 +27,7 @@
27
27
  }
28
28
  },
29
29
  "devDependencies": {
30
- "@framers/agentos": "^0.13.40",
30
+ "@framers/agentos": "^0.13.47",
31
31
  "typescript": "^5.5.0",
32
32
  "vitest": "^3.2.7"
33
33
  },