@alexkroman1/aai-ui 1.16.0 → 2.0.0
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/audio.d.ts +43 -5
- package/dist/audio.js +39 -20
- package/dist/chat-view-DKFhxMAT.js +129 -0
- package/dist/client-config.d.ts +7 -6
- package/dist/components/chat-view.d.ts +1 -8
- package/dist/components/chat-view.js +2 -2
- package/dist/components/console-shell.d.ts +37 -0
- package/dist/components/controls.js +1 -1
- package/dist/components/url-chips.d.ts +1 -1
- package/dist/components/workflow-view.d.ts +13 -0
- package/dist/{controls-BbZcmnJf.js → controls-4OJoekj6.js} +1 -1
- package/dist/default-client/assets/audio-Cgviqo9t.js +1 -0
- package/dist/default-client/assets/capture-processor-DLHxAIfT.js +90 -0
- package/dist/default-client/assets/index-BgbIWnfG.css +2 -0
- package/dist/default-client/assets/index-DbKKR3UE.js +62 -0
- package/dist/default-client/assets/playback-processor-bMTdFp-8.js +271 -0
- package/dist/default-client/assets/rolldown-runtime-BpQH8Ho1.js +1 -0
- package/dist/default-client/assets/types-Bpg3ZIZK.js +64 -0
- package/dist/default-client/index.html +5 -2
- package/dist/define-client-yoGybEYR.js +710 -0
- package/dist/define-client.d.ts +0 -9
- package/dist/define-client.js +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +6 -5
- package/dist/{session-core-B64kau_v.js → session-core-BLhiQ18c.js} +6 -0
- package/dist/session-core.js +1 -1
- package/dist/sync-mic.d.ts +11 -43
- package/dist/types.d.ts +24 -1
- package/dist/types.js +32 -2
- package/dist/worklets/capture-processor.d.ts +1 -1
- package/dist/worklets/capture-processor.js +32 -49
- package/dist/worklets/playback-processor.d.ts +1 -1
- package/dist/worklets/playback-processor.js +125 -9
- package/package.json +2 -2
- package/dist/chat-view-gi6FccZq.js +0 -193
- package/dist/components/sync-chat-view.d.ts +0 -18
- package/dist/components/text-controls.d.ts +0 -14
- package/dist/default-client/assets/audio-DNDZgEZp.js +0 -1
- package/dist/default-client/assets/capture-processor-UlKEKyIW.js +0 -108
- package/dist/default-client/assets/index-BogmeUln.css +0 -2
- package/dist/default-client/assets/index-BunwIXSP.js +0 -124
- package/dist/default-client/assets/playback-processor-C5HVRVbu.js +0 -156
- package/dist/define-client-DdpijqAu.js +0 -906
- package/dist/sync-vad.d.ts +0 -54
package/dist/sync-vad.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Client-side utterance detection (VAD) for sync mode.
|
|
3
|
-
*
|
|
4
|
-
* Sync mode has no streaming STT to endpoint speech server-side, so the
|
|
5
|
-
* browser decides where an utterance ends: this module is a pure
|
|
6
|
-
* energy-based voice-activity state machine fed PCM16 frames (from the
|
|
7
|
-
* WebRTC capture pipeline in `sync-mic.ts` — `getUserMedia`'s voice
|
|
8
|
-
* processing handles echo cancellation and noise suppression upstream,
|
|
9
|
-
* which is what makes a simple RMS gate workable). No browser APIs are
|
|
10
|
-
* touched here, so the state machine is fully unit-testable.
|
|
11
|
-
*
|
|
12
|
-
* Lifecycle per utterance: idle (keeping a pre-roll ring of recent audio)
|
|
13
|
-
* → candidate speech (voiced frames accumulating toward `minSpeechMs`)
|
|
14
|
-
* → speaking → `hangoverMs` of silence closes the utterance, which is
|
|
15
|
-
* returned as one PCM16 buffer including the pre-roll and the hangover
|
|
16
|
-
* tail (leading context and trailing silence both help one-shot STT).
|
|
17
|
-
*/
|
|
18
|
-
/** Tuning for {@link createUtteranceDetector}. */
|
|
19
|
-
export type UtteranceDetectorOptions = {
|
|
20
|
-
/** Sample rate of pushed PCM16 frames, in Hz. */
|
|
21
|
-
sampleRate: number;
|
|
22
|
-
/** RMS level (0..1 of full scale) a frame must exceed to count as voiced. */
|
|
23
|
-
speechRms?: number;
|
|
24
|
-
/** Sustained voiced audio required before an utterance starts. Filters clicks. */
|
|
25
|
-
minSpeechMs?: number;
|
|
26
|
-
/** Silence that ends an utterance once one has started. */
|
|
27
|
-
hangoverMs?: number;
|
|
28
|
-
/** Audio kept from before speech onset, so a soft first syllable survives. */
|
|
29
|
-
prerollMs?: number;
|
|
30
|
-
/** Hard cap: a monologue this long is emitted as an utterance mid-speech. */
|
|
31
|
-
maxUtteranceMs?: number;
|
|
32
|
-
};
|
|
33
|
-
export declare const DEFAULT_SPEECH_RMS = 0.015;
|
|
34
|
-
export declare const DEFAULT_MIN_SPEECH_MS = 150;
|
|
35
|
-
export declare const DEFAULT_HANGOVER_MS = 700;
|
|
36
|
-
export declare const DEFAULT_PREROLL_MS = 300;
|
|
37
|
-
export declare const DEFAULT_MAX_UTTERANCE_MS = 30000;
|
|
38
|
-
/** Utterance detector — feed PCM16 frames, get complete utterances back. */
|
|
39
|
-
export type UtteranceDetector = {
|
|
40
|
-
/**
|
|
41
|
-
* Push one capture frame (any length). Returns a complete utterance when
|
|
42
|
-
* this frame closed one, else null.
|
|
43
|
-
*/
|
|
44
|
-
push(frame: Int16Array): Int16Array | null;
|
|
45
|
-
/** End of stream: returns any in-progress utterance (candidate audio that
|
|
46
|
-
* never reached `minSpeechMs` is discarded as noise). */
|
|
47
|
-
flush(): Int16Array | null;
|
|
48
|
-
/** True while an utterance is being captured. */
|
|
49
|
-
readonly speaking: boolean;
|
|
50
|
-
/** Discard all buffered audio and return to idle. */
|
|
51
|
-
reset(): void;
|
|
52
|
-
};
|
|
53
|
-
/** Create an energy-based {@link UtteranceDetector}. */
|
|
54
|
-
export declare function createUtteranceDetector(opts: UtteranceDetectorOptions): UtteranceDetector;
|