@framers/agentos 0.1.107 → 0.1.109
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/memory/ingestion/ChunkingEngine.d.ts.map +1 -1
- package/dist/memory/ingestion/ChunkingEngine.js +5 -1
- package/dist/memory/ingestion/ChunkingEngine.js.map +1 -1
- package/dist/memory/ingestion/DocxLoader.d.ts.map +1 -1
- package/dist/memory/ingestion/DocxLoader.js +2 -1
- package/dist/memory/ingestion/DocxLoader.js.map +1 -1
- package/dist/memory/ingestion/FolderScanner.d.ts.map +1 -1
- package/dist/memory/ingestion/FolderScanner.js +6 -3
- package/dist/memory/ingestion/FolderScanner.js.map +1 -1
- package/dist/memory/ingestion/HtmlLoader.d.ts.map +1 -1
- package/dist/memory/ingestion/HtmlLoader.js +2 -1
- package/dist/memory/ingestion/HtmlLoader.js.map +1 -1
- package/dist/memory/ingestion/MarkdownLoader.d.ts.map +1 -1
- package/dist/memory/ingestion/MarkdownLoader.js +2 -1
- package/dist/memory/ingestion/MarkdownLoader.js.map +1 -1
- package/dist/memory/ingestion/PdfLoader.d.ts.map +1 -1
- package/dist/memory/ingestion/PdfLoader.js +2 -1
- package/dist/memory/ingestion/PdfLoader.js.map +1 -1
- package/dist/memory/ingestion/TextLoader.d.ts.map +1 -1
- package/dist/memory/ingestion/TextLoader.js +3 -2
- package/dist/memory/ingestion/TextLoader.js.map +1 -1
- package/dist/memory/ingestion/pathUtils.d.ts +40 -0
- package/dist/memory/ingestion/pathUtils.d.ts.map +1 -0
- package/dist/memory/ingestion/pathUtils.js +62 -0
- package/dist/memory/ingestion/pathUtils.js.map +1 -0
- package/dist/voice-pipeline/AcousticEndpointDetector.d.ts +95 -20
- package/dist/voice-pipeline/AcousticEndpointDetector.d.ts.map +1 -1
- package/dist/voice-pipeline/AcousticEndpointDetector.js +110 -24
- package/dist/voice-pipeline/AcousticEndpointDetector.js.map +1 -1
- package/dist/voice-pipeline/HardCutBargeinHandler.d.ts +66 -15
- package/dist/voice-pipeline/HardCutBargeinHandler.d.ts.map +1 -1
- package/dist/voice-pipeline/HardCutBargeinHandler.js +65 -13
- package/dist/voice-pipeline/HardCutBargeinHandler.js.map +1 -1
- package/dist/voice-pipeline/HeuristicEndpointDetector.d.ts +116 -42
- package/dist/voice-pipeline/HeuristicEndpointDetector.d.ts.map +1 -1
- package/dist/voice-pipeline/HeuristicEndpointDetector.js +159 -52
- package/dist/voice-pipeline/HeuristicEndpointDetector.js.map +1 -1
- package/dist/voice-pipeline/SoftFadeBargeinHandler.d.ts +89 -24
- package/dist/voice-pipeline/SoftFadeBargeinHandler.d.ts.map +1 -1
- package/dist/voice-pipeline/SoftFadeBargeinHandler.js +74 -20
- package/dist/voice-pipeline/SoftFadeBargeinHandler.js.map +1 -1
- package/dist/voice-pipeline/VoiceInterruptError.d.ts +68 -10
- package/dist/voice-pipeline/VoiceInterruptError.d.ts.map +1 -1
- package/dist/voice-pipeline/VoiceInterruptError.js +53 -6
- package/dist/voice-pipeline/VoiceInterruptError.js.map +1 -1
- package/dist/voice-pipeline/VoicePipelineOrchestrator.d.ts +190 -39
- package/dist/voice-pipeline/VoicePipelineOrchestrator.d.ts.map +1 -1
- package/dist/voice-pipeline/VoicePipelineOrchestrator.js +266 -53
- package/dist/voice-pipeline/VoicePipelineOrchestrator.js.map +1 -1
- package/dist/voice-pipeline/WebSocketStreamTransport.d.ts +135 -43
- package/dist/voice-pipeline/WebSocketStreamTransport.d.ts.map +1 -1
- package/dist/voice-pipeline/WebSocketStreamTransport.js +109 -47
- package/dist/voice-pipeline/WebSocketStreamTransport.js.map +1 -1
- package/dist/voice-pipeline/index.d.ts +34 -1
- package/dist/voice-pipeline/index.d.ts.map +1 -1
- package/dist/voice-pipeline/index.js +41 -1
- package/dist/voice-pipeline/index.js.map +1 -1
- package/dist/voice-pipeline/types.d.ts +432 -106
- package/dist/voice-pipeline/types.d.ts.map +1 -1
- package/dist/voice-pipeline/types.js +21 -9
- package/dist/voice-pipeline/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,32 +5,58 @@
|
|
|
5
5
|
* TTS, barge-in handling, and the agent session into a coordinated real-time
|
|
6
6
|
* voice conversation loop.
|
|
7
7
|
*
|
|
8
|
-
* State transitions
|
|
8
|
+
* ## State transitions
|
|
9
|
+
*
|
|
9
10
|
* ```
|
|
10
|
-
* IDLE
|
|
11
|
-
* LISTENING
|
|
12
|
-
* PROCESSING
|
|
13
|
-
* SPEAKING
|
|
14
|
-
* SPEAKING
|
|
15
|
-
* ANY
|
|
11
|
+
* IDLE -----> startSession() ---------> LISTENING
|
|
12
|
+
* LISTENING -> turn_complete ----------> PROCESSING
|
|
13
|
+
* PROCESSING -> LLM tokens start -----> SPEAKING
|
|
14
|
+
* SPEAKING --> TTS flush_complete -----> LISTENING
|
|
15
|
+
* SPEAKING --> barge-in (cancel) ------> INTERRUPTING -> LISTENING
|
|
16
|
+
* ANY ------> transport disconnect ----> CLOSED
|
|
17
|
+
* ANY ------> stopSession() -----------> CLOSED
|
|
16
18
|
* ```
|
|
19
|
+
*
|
|
20
|
+
* ## Design notes
|
|
21
|
+
*
|
|
22
|
+
* - The orchestrator does NOT resolve providers from ExtensionManager yet.
|
|
23
|
+
* All components must be injected via {@link VoicePipelineOverrides}.
|
|
24
|
+
* ExtensionManager integration is a planned future task.
|
|
25
|
+
* - Event wiring is done once during {@link startSession} and never rewired.
|
|
26
|
+
* The transport/STT/TTS sessions are immutable for the session's lifetime.
|
|
27
|
+
* - A watchdog timer prevents the pipeline from staying in LISTENING forever
|
|
28
|
+
* if the user walks away (default 30 s). The watchdog resets after each
|
|
29
|
+
* completed turn.
|
|
17
30
|
*/
|
|
18
31
|
import { EventEmitter } from 'node:events';
|
|
19
32
|
import type { IBargeinHandler, IDiarizationEngine, IEndpointDetector, IStreamTransport, IStreamingSTT, IStreamingTTS, IVoicePipelineAgentSession, PipelineState, TurnCompleteEvent, VoicePipelineConfig, VoicePipelineSession } from './types.js';
|
|
20
33
|
/**
|
|
21
|
-
* Overrides for injecting pre-built components
|
|
22
|
-
* In production, components would be resolved from ExtensionManager
|
|
34
|
+
* Overrides for injecting pre-built components, primarily for unit testing.
|
|
35
|
+
* In production, components would be resolved from ExtensionManager by
|
|
36
|
+
* provider ID (a planned future enhancement).
|
|
37
|
+
*
|
|
38
|
+
* @see {@link VoicePipelineOrchestrator.startSession} which accepts these overrides.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const overrides: VoicePipelineOverrides = {
|
|
43
|
+
* streamingSTT: myDeepgramSTT,
|
|
44
|
+
* streamingTTS: myOpenAITTS,
|
|
45
|
+
* endpointDetector: new HeuristicEndpointDetector(),
|
|
46
|
+
* bargeinHandler: new HardCutBargeinHandler(),
|
|
47
|
+
* };
|
|
48
|
+
* ```
|
|
23
49
|
*/
|
|
24
50
|
export interface VoicePipelineOverrides {
|
|
25
|
-
/** Pre-built streaming STT provider. */
|
|
51
|
+
/** Pre-built streaming STT provider (bypasses ExtensionManager resolution). */
|
|
26
52
|
streamingSTT?: IStreamingSTT;
|
|
27
|
-
/** Pre-built streaming TTS provider. */
|
|
53
|
+
/** Pre-built streaming TTS provider (bypasses ExtensionManager resolution). */
|
|
28
54
|
streamingTTS?: IStreamingTTS;
|
|
29
|
-
/** Pre-built endpoint detector. */
|
|
55
|
+
/** Pre-built endpoint detector instance. */
|
|
30
56
|
endpointDetector?: IEndpointDetector;
|
|
31
|
-
/** Pre-built barge-in handler. */
|
|
57
|
+
/** Pre-built barge-in handler instance. */
|
|
32
58
|
bargeinHandler?: IBargeinHandler;
|
|
33
|
-
/** Pre-built diarization engine. */
|
|
59
|
+
/** Pre-built diarization engine (optional; only needed for multi-speaker). */
|
|
34
60
|
diarizationEngine?: IDiarizationEngine;
|
|
35
61
|
}
|
|
36
62
|
/**
|
|
@@ -39,42 +65,91 @@ export interface VoicePipelineOverrides {
|
|
|
39
65
|
* endpoint detection, agent inference, text-to-speech synthesis, and barge-in
|
|
40
66
|
* handling into a seamless real-time conversation loop.
|
|
41
67
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
68
|
+
* ## Events emitted
|
|
69
|
+
*
|
|
70
|
+
* | Event | Payload |
|
|
71
|
+
* |-------------------|----------------------------------------------|
|
|
72
|
+
* | `'state_changed'` | `{ from: PipelineState, to: PipelineState }` |
|
|
73
|
+
* | `'turn_complete'` | {@link TurnCompleteEvent} |
|
|
74
|
+
*
|
|
75
|
+
* @see {@link VoicePipelineSession} for the public session interface returned by {@link startSession}.
|
|
44
76
|
*/
|
|
45
77
|
export declare class VoicePipelineOrchestrator extends EventEmitter {
|
|
46
78
|
private readonly config;
|
|
47
|
-
/** Current pipeline state. */
|
|
79
|
+
/** Current pipeline state. Transitions are managed exclusively by {@link _setState}. */
|
|
48
80
|
private _state;
|
|
49
|
-
/** Active
|
|
81
|
+
/** Active STT session created during {@link startSession}. Null when idle or closed. */
|
|
50
82
|
private _sttSession;
|
|
83
|
+
/** Active TTS session created during {@link startSession}. Null when idle or closed. */
|
|
51
84
|
private _ttsSession;
|
|
85
|
+
/** The endpoint detector wired during {@link startSession}. Null when idle or closed. */
|
|
52
86
|
private _endpointDetector;
|
|
87
|
+
/** The barge-in handler consulted when speech is detected during SPEAKING. Null when idle or closed. */
|
|
53
88
|
private _bargeinHandler;
|
|
89
|
+
/** The transport bound to this session. Null when idle or closed. */
|
|
54
90
|
private _transport;
|
|
91
|
+
/** The agent session adapter for turn-based conversation. Null when idle or closed. */
|
|
55
92
|
private _agentSession;
|
|
56
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Watchdog timer ID for max turn duration. Fires a synthetic speech_end
|
|
95
|
+
* VAD event if the pipeline stays in LISTENING too long without a turn_complete.
|
|
96
|
+
*/
|
|
57
97
|
private _watchdogTimer;
|
|
58
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Tracks cumulative TTS text for barge-in context. Reset at the start
|
|
100
|
+
* of each agent response (PROCESSING -> SPEAKING transition).
|
|
101
|
+
*/
|
|
59
102
|
private _currentTTSText;
|
|
60
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Tracks cumulative played duration (ms) for barge-in context.
|
|
105
|
+
* Incremented as each {@link EncodedAudioChunk} is forwarded to the transport.
|
|
106
|
+
*/
|
|
61
107
|
private _currentPlayedMs;
|
|
62
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Current pipeline state (read-only).
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* if (orchestrator.state === 'listening') {
|
|
114
|
+
* console.log('Waiting for user input...');
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
63
118
|
get state(): PipelineState;
|
|
119
|
+
/**
|
|
120
|
+
* Create a new orchestrator with the given pipeline configuration.
|
|
121
|
+
*
|
|
122
|
+
* The orchestrator starts in `'idle'` state. Call {@link startSession}
|
|
123
|
+
* to wire up components and transition to `'listening'`.
|
|
124
|
+
*
|
|
125
|
+
* @param config - Top-level pipeline configuration specifying providers and options.
|
|
126
|
+
*/
|
|
64
127
|
constructor(config: VoicePipelineConfig);
|
|
65
128
|
/**
|
|
66
129
|
* Start a voice session. Accepts pre-built components via overrides for testing.
|
|
67
|
-
* In production, components
|
|
130
|
+
* In production, components would be resolved from ExtensionManager (future task).
|
|
131
|
+
*
|
|
132
|
+
* This method:
|
|
133
|
+
* 1. Validates the orchestrator is in `'idle'` state.
|
|
134
|
+
* 2. Creates STT and TTS sub-sessions from the provided factories.
|
|
135
|
+
* 3. Wires all event handlers (transport -> STT -> endpoint -> agent -> TTS -> transport).
|
|
136
|
+
* 4. Transitions to `'listening'` and starts the watchdog timer.
|
|
137
|
+
* 5. Returns a {@link VoicePipelineSession} handle.
|
|
68
138
|
*
|
|
69
139
|
* @param transport - The bidirectional audio/text stream transport.
|
|
70
140
|
* @param agentSession - The agent session adapter for turn-based conversation.
|
|
71
141
|
* @param overrides - Optional pre-built components (for testing or manual wiring).
|
|
72
142
|
* @returns A live VoicePipelineSession object.
|
|
143
|
+
*
|
|
144
|
+
* @throws {Error} If the orchestrator is not in `'idle'` state.
|
|
145
|
+
* @throws {Error} If any required component (STT, TTS, endpoint, bargein) is missing.
|
|
73
146
|
*/
|
|
74
147
|
startSession(transport: IStreamTransport, agentSession: IVoicePipelineAgentSession, overrides?: VoicePipelineOverrides): Promise<VoicePipelineSession>;
|
|
75
148
|
/**
|
|
76
149
|
* Stop the current session, tearing down all sub-sessions and timers.
|
|
77
150
|
*
|
|
151
|
+
* Safe to call multiple times -- subsequent calls after the first are no-ops.
|
|
152
|
+
*
|
|
78
153
|
* @param reason - Optional human-readable reason for diagnostics.
|
|
79
154
|
*/
|
|
80
155
|
stopSession(reason?: string): Promise<void>;
|
|
@@ -85,9 +160,9 @@ export declare class VoicePipelineOrchestrator extends EventEmitter {
|
|
|
85
160
|
* graph nodes (via VoiceTransportAdapter) can `await` user input without
|
|
86
161
|
* having to manage raw EventEmitter subscriptions themselves.
|
|
87
162
|
*
|
|
88
|
-
* Resolves with the first
|
|
163
|
+
* Resolves with the first {@link TurnCompleteEvent} fired after this call.
|
|
89
164
|
* If the session is closed before a turn completes, the Promise will never
|
|
90
|
-
* resolve
|
|
165
|
+
* resolve -- callers should race it against a session-close signal if needed.
|
|
91
166
|
*
|
|
92
167
|
* @returns A Promise that resolves with the completed turn event.
|
|
93
168
|
*
|
|
@@ -95,6 +170,7 @@ export declare class VoicePipelineOrchestrator extends EventEmitter {
|
|
|
95
170
|
* ```typescript
|
|
96
171
|
* const turn = await orchestrator.waitForUserTurn();
|
|
97
172
|
* console.log('User said:', turn.transcript);
|
|
173
|
+
* console.log('Reason:', turn.reason);
|
|
98
174
|
* ```
|
|
99
175
|
*/
|
|
100
176
|
waitForUserTurn(): Promise<TurnCompleteEvent>;
|
|
@@ -109,7 +185,9 @@ export declare class VoicePipelineOrchestrator extends EventEmitter {
|
|
|
109
185
|
* without the caller needing a direct reference to the TTS session.
|
|
110
186
|
*
|
|
111
187
|
* @param text - A complete string, or an async iterable of string tokens.
|
|
112
|
-
*
|
|
188
|
+
*
|
|
189
|
+
* @throws {Error} If there is no active TTS session (i.e. session not started
|
|
190
|
+
* or already stopped).
|
|
113
191
|
*
|
|
114
192
|
* @example
|
|
115
193
|
* ```typescript
|
|
@@ -122,43 +200,116 @@ export declare class VoicePipelineOrchestrator extends EventEmitter {
|
|
|
122
200
|
*/
|
|
123
201
|
pushToTTS(text: string | AsyncIterable<string>): Promise<void>;
|
|
124
202
|
/**
|
|
125
|
-
*
|
|
203
|
+
* Wire segment 1: Transport -> STT.
|
|
204
|
+
*
|
|
205
|
+
* Every inbound audio frame from the transport is forwarded directly to
|
|
206
|
+
* the STT session for recognition. No buffering or resampling is done here;
|
|
207
|
+
* the STT provider is expected to handle sample rate conversion internally.
|
|
208
|
+
*
|
|
209
|
+
* @param transport - The bidirectional transport receiving client audio.
|
|
210
|
+
* @param sttSession - The STT session that will process the audio.
|
|
126
211
|
*/
|
|
127
212
|
private _wireTransportToSTT;
|
|
128
213
|
/**
|
|
129
|
-
*
|
|
214
|
+
* Wire segment 2: STT -> Endpoint Detector + Transport.
|
|
215
|
+
*
|
|
216
|
+
* Every transcript event from STT is:
|
|
217
|
+
* 1. Forwarded to the endpoint detector for turn-boundary analysis.
|
|
218
|
+
* 2. Relayed to the transport so the client can display real-time captions.
|
|
219
|
+
*
|
|
220
|
+
* @param sttSession - The STT session emitting transcript events.
|
|
221
|
+
* @param endpointDetector - The detector analysing transcripts for turn boundaries.
|
|
222
|
+
* @param transport - The transport for relaying transcript events to the client.
|
|
130
223
|
*/
|
|
131
224
|
private _wireSTTToEndpoint;
|
|
132
225
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
226
|
+
* Wire segment 3: Endpoint Detector -> Agent -> TTS.
|
|
227
|
+
*
|
|
228
|
+
* When the endpoint detector fires `turn_complete`, the orchestrator:
|
|
229
|
+
* 1. Transitions LISTENING -> PROCESSING.
|
|
230
|
+
* 2. Sends the transcript to the agent session.
|
|
231
|
+
* 3. Transitions PROCESSING -> SPEAKING as LLM tokens start arriving.
|
|
232
|
+
* 4. Pipes each token to the TTS session.
|
|
233
|
+
*
|
|
234
|
+
* The turn is only processed if the orchestrator is currently in LISTENING
|
|
235
|
+
* state, preventing duplicate processing from stale events.
|
|
236
|
+
*
|
|
237
|
+
* @param endpointDetector - The detector that fires turn_complete events.
|
|
238
|
+
* @param transport - For sending agent_thinking/agent_speaking control messages.
|
|
239
|
+
* @param agentSession - The agent session that generates the response.
|
|
240
|
+
* @param ttsSession - The TTS session that synthesises the response as audio.
|
|
135
241
|
*/
|
|
136
242
|
private _wireTurnComplete;
|
|
137
243
|
/**
|
|
138
|
-
*
|
|
244
|
+
* Wire segment 4: TTS -> Transport.
|
|
245
|
+
*
|
|
246
|
+
* Each audio chunk from TTS is forwarded to the transport for client playback.
|
|
247
|
+
* The `flush_complete` event signals that all tokens have been synthesised,
|
|
248
|
+
* triggering the SPEAKING -> LISTENING transition.
|
|
249
|
+
*
|
|
250
|
+
* @param ttsSession - The TTS session emitting audio chunks.
|
|
251
|
+
* @param transport - The transport delivering audio to the client.
|
|
139
252
|
*/
|
|
140
253
|
private _wireTTSToTransport;
|
|
141
254
|
/**
|
|
142
|
-
* Wire
|
|
143
|
-
*
|
|
255
|
+
* Wire segment 5: Barge-in detection.
|
|
256
|
+
*
|
|
257
|
+
* When `speech_start` is detected (from the STT session) during the SPEAKING
|
|
258
|
+
* state, the barge-in handler is consulted. Depending on the handler's
|
|
259
|
+
* decision:
|
|
260
|
+
*
|
|
261
|
+
* - **cancel**: TTS is stopped, agent is aborted, state goes
|
|
262
|
+
* SPEAKING -> INTERRUPTING -> LISTENING.
|
|
263
|
+
* - **pause**: A control message is sent but state remains SPEAKING.
|
|
264
|
+
* - **ignore**: No action taken (e.g. lip smack below threshold).
|
|
265
|
+
*
|
|
266
|
+
* The `speech_start` and `speech_end` events are also forwarded to the
|
|
267
|
+
* endpoint detector as synthetic VAD events so it can track speech activity
|
|
268
|
+
* even when a dedicated VAD model is not present.
|
|
269
|
+
*
|
|
270
|
+
* @param sttSession - The STT session that re-emits speech_start/speech_end.
|
|
271
|
+
* @param ttsSession - The TTS session to cancel on barge-in.
|
|
272
|
+
* @param bargeinHandler - The policy handler deciding what to do.
|
|
273
|
+
* @param transport - For sending barge_in control messages.
|
|
274
|
+
* @param agentSession - The agent session to abort on cancel.
|
|
144
275
|
*/
|
|
145
276
|
private _wireBargein;
|
|
146
277
|
/**
|
|
147
|
-
*
|
|
278
|
+
* Wire segment 6: Transport disconnect.
|
|
279
|
+
*
|
|
280
|
+
* When the transport closes (e.g. WebSocket disconnect, client navigation),
|
|
281
|
+
* all sub-sessions are torn down and the orchestrator transitions to CLOSED.
|
|
282
|
+
* This is a terminal state -- no further events are emitted.
|
|
283
|
+
*
|
|
284
|
+
* @param transport - The transport to monitor for closure.
|
|
285
|
+
* @param sttSession - The STT session to close on disconnect.
|
|
286
|
+
* @param ttsSession - The TTS session to close on disconnect.
|
|
148
287
|
*/
|
|
149
288
|
private _wireDisconnect;
|
|
150
289
|
/**
|
|
151
|
-
* Transition to a new pipeline state, emitting a `state_changed` event.
|
|
290
|
+
* Transition to a new pipeline state, emitting a `'state_changed'` event.
|
|
291
|
+
*
|
|
292
|
+
* No-ops if the target state equals the current state (idempotent).
|
|
293
|
+
* This is the ONLY method that mutates {@link _state}, ensuring all
|
|
294
|
+
* transitions are observable via the `'state_changed'` event.
|
|
295
|
+
*
|
|
296
|
+
* @param state - The target pipeline state.
|
|
152
297
|
*/
|
|
153
298
|
private _setState;
|
|
154
299
|
/**
|
|
155
|
-
* Reset the watchdog timer for max turn duration.
|
|
156
|
-
*
|
|
157
|
-
*
|
|
300
|
+
* Reset the watchdog timer for max turn duration.
|
|
301
|
+
*
|
|
302
|
+
* If the pipeline stays in LISTENING for longer than
|
|
303
|
+
* {@link VoicePipelineConfig.maxTurnDurationMs} (default 30 s) without a
|
|
304
|
+
* `turn_complete`, the watchdog fires a synthetic `speech_end` VAD event
|
|
305
|
+
* to trigger the endpoint detector's silence timeout logic. This prevents
|
|
306
|
+
* the pipeline from hanging indefinitely when the user walks away or
|
|
307
|
+
* the microphone captures no meaningful audio.
|
|
158
308
|
*/
|
|
159
309
|
private _resetWatchdog;
|
|
160
310
|
/**
|
|
161
|
-
* Clear the watchdog timer if active.
|
|
311
|
+
* Clear the watchdog timer if one is active.
|
|
312
|
+
* Safe to call even when no timer is pending (no-op).
|
|
162
313
|
*/
|
|
163
314
|
private _clearWatchdog;
|
|
164
315
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoicePipelineOrchestrator.d.ts","sourceRoot":"","sources":["../../src/voice-pipeline/VoicePipelineOrchestrator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"VoicePipelineOrchestrator.d.ts","sourceRoot":"","sources":["../../src/voice-pipeline/VoicePipelineOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAGV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,0BAA0B,EAC1B,aAAa,EAIb,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EAErB,MAAM,YAAY,CAAC;AAMpB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,+EAA+E;IAC/E,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,2CAA2C;IAC3C,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAMD;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