@framers/agentos-ext-streaming-stt-deepgram 0.2.2 → 0.2.4
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 +57 -0
- package/manifest.json +1 -1
- package/package.json +5 -2
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Deepgram streaming speech recognition
|
|
2
|
+
|
|
3
|
+
This pack gives an agent a streaming speech recognition provider using the Deepgram WebSocket API through `ws`, with interim transcripts, final transcripts and speaker labels.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-streaming-stt-deepgram
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` (`>=0.10.40`).
|
|
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-streaming-stt-deepgram' }],
|
|
21
|
+
},
|
|
22
|
+
extensionSecrets: {
|
|
23
|
+
DEEPGRAM_API_KEY: process.env.DEEPGRAM_API_KEY!,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Configuration
|
|
29
|
+
|
|
30
|
+
The pack factory reads only the secret. Session settings go to `startSession`, with provider settings in `providerOptions`.
|
|
31
|
+
|
|
32
|
+
| Option | Secret id | Environment variable | Required | Default |
|
|
33
|
+
| --- | --- | --- | --- | --- |
|
|
34
|
+
| `apiKey` (standalone session) | `DEEPGRAM_API_KEY` | None | Yes, session interface | Empty string in pack factory |
|
|
35
|
+
| `language`, or `providerOptions.language` | None | None | No | `undefined` through provider; `'en-US'` when omitted from direct session construction |
|
|
36
|
+
| `punctuate`, or `providerOptions.punctuate` | None | None | No | `undefined` through provider; `true` when omitted from direct session construction |
|
|
37
|
+
| `interimResults`, or `providerOptions.interimResults` | None | None | No | `undefined` through provider; `true` when omitted from direct session construction |
|
|
38
|
+
| `providerOptions.model` | None | None | No | `undefined` through provider; `'nova-2'` when omitted from direct session construction |
|
|
39
|
+
| `providerOptions.diarize` | None | None | No | `undefined` through provider; `false` when omitted from direct session construction |
|
|
40
|
+
| `providerOptions.keywords` | None | None | No | `undefined`, omitted from request |
|
|
41
|
+
| `providerOptions.endpointing` | None | None | No | `undefined`, omitted from request |
|
|
42
|
+
|
|
43
|
+
## Notes
|
|
44
|
+
|
|
45
|
+
The pack registers an enabled `streaming-stt-provider` with provider id `deepgram-streaming`. `createDeepgramStreamingSTT` also creates a standalone provider from an API key.
|
|
46
|
+
|
|
47
|
+
`startSession` opens a WebSocket authenticated with the key and transmits audio to Deepgram. It converts normalized floating point PCM to signed integer PCM without resampling. The request fixes the audio rate and channel layout, so callers must supply matching audio.
|
|
48
|
+
|
|
49
|
+
Sessions emit `transcript`, `interim_transcript`, `final_transcript`, `speech_start`, `speech_end`, `error` and `close`. Word timestamps are converted to milliseconds, and diarization assigns speaker labels. Empty interim transcripts are suppressed.
|
|
50
|
+
|
|
51
|
+
Unexpected socket closures trigger reconnection with capped exponential backoff. Buffered audio drops the oldest frames when full. `flush` sends `CloseStream` and resolves after enqueueing it; `close` terminates the socket and cancels reconnection.
|
|
52
|
+
|
|
53
|
+
The provider forwards unset session fields as `undefined`, overriding the direct session constructor defaults. The pack passes an empty key when the secret is absent and does not validate it locally. `endpointing: false` omits the query parameter rather than sending a disabling value.
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
Apache-2.0
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-streaming-stt-deepgram",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Real-time streaming STT via Deepgram WebSocket API for AgentOS voice pipeline",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"SKILL.md",
|
|
18
18
|
"manifest.json"
|
|
19
19
|
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=22"
|
|
22
|
+
},
|
|
20
23
|
"peerDependencies": {
|
|
21
24
|
"@framers/agentos": ">=0.10.40"
|
|
22
25
|
},
|
|
@@ -24,7 +27,7 @@
|
|
|
24
27
|
"ws": "^8.17.0"
|
|
25
28
|
},
|
|
26
29
|
"devDependencies": {
|
|
27
|
-
"@framers/agentos": "^0.
|
|
30
|
+
"@framers/agentos": "^0.14.25",
|
|
28
31
|
"typescript": "^5.5.0",
|
|
29
32
|
"vitest": "^3.2.7",
|
|
30
33
|
"@types/ws": "^8.5.0"
|