@handsforbots/voice 0.0.0-stage → 2.0.0-alpha.1

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.
Files changed (47) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +20 -2
  3. package/dist/index.d.ts +11 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +11 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/player.d.ts +33 -0
  8. package/dist/player.d.ts.map +1 -0
  9. package/dist/player.js +141 -0
  10. package/dist/player.js.map +1 -0
  11. package/dist/providers/echo.d.ts +25 -0
  12. package/dist/providers/echo.d.ts.map +1 -0
  13. package/dist/providers/echo.js +85 -0
  14. package/dist/providers/echo.js.map +1 -0
  15. package/dist/providers/end-of-turn.d.ts +22 -0
  16. package/dist/providers/end-of-turn.d.ts.map +1 -0
  17. package/dist/providers/end-of-turn.js +29 -0
  18. package/dist/providers/end-of-turn.js.map +1 -0
  19. package/dist/providers/http.d.ts +48 -0
  20. package/dist/providers/http.d.ts.map +1 -0
  21. package/dist/providers/http.js +153 -0
  22. package/dist/providers/http.js.map +1 -0
  23. package/dist/providers/media.d.ts +15 -0
  24. package/dist/providers/media.d.ts.map +1 -0
  25. package/dist/providers/media.js +122 -0
  26. package/dist/providers/media.js.map +1 -0
  27. package/dist/providers/vosk-browser.d.ts +33 -0
  28. package/dist/providers/vosk-browser.d.ts.map +1 -0
  29. package/dist/providers/vosk-browser.js +82 -0
  30. package/dist/providers/vosk-browser.js.map +1 -0
  31. package/dist/providers/websocket.d.ts +38 -0
  32. package/dist/providers/websocket.d.ts.map +1 -0
  33. package/dist/providers/websocket.js +94 -0
  34. package/dist/providers/websocket.js.map +1 -0
  35. package/dist/providers/webspeech.d.ts +40 -0
  36. package/dist/providers/webspeech.d.ts.map +1 -0
  37. package/dist/providers/webspeech.js +201 -0
  38. package/dist/providers/webspeech.js.map +1 -0
  39. package/dist/types.d.ts +263 -0
  40. package/dist/types.d.ts.map +1 -0
  41. package/dist/types.js +20 -0
  42. package/dist/types.js.map +1 -0
  43. package/dist/voice.d.ts +283 -0
  44. package/dist/voice.d.ts.map +1 -0
  45. package/dist/voice.js +1209 -0
  46. package/dist/voice.js.map +1 -0
  47. package/package.json +42 -3
@@ -0,0 +1,283 @@
1
+ import { type PluginContext } from '@handsforbots/core';
2
+ import { SpeechError, type AudioPlayer, type EchoFilter, type EndOfTurn, type SpeechEffects, type SpeechErrorCode, type SpeechToText, type TextToSpeech, type TtsTraceEvent } from './types.js';
3
+ export type VoiceMode = 'push-to-talk' | 'hands-free';
4
+ export type InputModality = 'keyboard' | 'voice';
5
+ /** `auto`: answer with voice when the user spoke, with text when they typed. */
6
+ export type OutputPreference = 'auto' | 'voice' | 'text';
7
+ /** What the conversation is doing, for UIs to draw (ADR 0011). */
8
+ export type VoicePhase = 'idle' | 'listening' | 'userSpeaking' | 'waitingEndOfTurn' | 'botSpeaking';
9
+ /** Where a speech provider is: providers without `load` are `ready` from the start. */
10
+ export type TtsStatus = {
11
+ state: 'unloaded' | 'loading' | 'ready' | 'failed';
12
+ /** Bytes downloaded so far. */
13
+ loaded?: number;
14
+ total?: number;
15
+ error?: string;
16
+ };
17
+ /**
18
+ * When providers with a model (`load`) start downloading. `eager`: when the
19
+ * plugin starts. `idle`: once the page is idle after that. `first-use`
20
+ * (default): when the user turns the bot's voice on (`setOutput` with `voice`
21
+ * or `auto`) or a reply is first spoken, whichever comes first; on mount when
22
+ * the app sets `output: 'voice'` (speech is the default way to answer). `manual`: only on `loadSpeech()`.
23
+ */
24
+ export type SpeechLoadStart = 'eager' | 'idle' | 'first-use' | 'manual';
25
+ /**
26
+ * Speech while the preferred provider is not ready. `fallback` (default): the
27
+ * next ready provider in the list speaks (the browser's voice, for instance).
28
+ * `wait`: speech waits for the download in progress. `silent`: replies are
29
+ * not spoken until it is ready.
30
+ */
31
+ export type SpeechWhileLoading = 'fallback' | 'wait' | 'silent';
32
+ export type SpeechLoading = {
33
+ start?: SpeechLoadStart;
34
+ whileLoading?: SpeechWhileLoading;
35
+ };
36
+ export type VoiceState = {
37
+ supported: {
38
+ stt: boolean;
39
+ tts: boolean;
40
+ };
41
+ mode: VoiceMode;
42
+ phase: VoicePhase;
43
+ listening: boolean;
44
+ speaking: boolean;
45
+ /** Live transcript while the user speaks (hands-free: the whole pending turn). */
46
+ partial: string;
47
+ /**
48
+ * Hands-free pause: when the last words were heard (epoch ms). Set together
49
+ * with `endOfTurnAt`; draw the countdown from `pauseSince` to `endOfTurnAt`.
50
+ */
51
+ pauseSince?: number;
52
+ /**
53
+ * When the pending hands-free turn will be sent if the user stays quiet
54
+ * (epoch ms): the latest moment, counted from `pauseSince`.
55
+ */
56
+ endOfTurnAt?: number;
57
+ /**
58
+ * When the end-of-turn model is asked whether the user finished (epoch ms).
59
+ * Present only while the model may still send the turn before `endOfTurnAt`;
60
+ * cleared once it answers "not finished" (then `endOfTurnAt` is exact) or
61
+ * fails (then `endOfTurnAt` moves to the `silence` deadline).
62
+ */
63
+ endOfTurnCheckAt?: number;
64
+ /** The user talked over the last reply and cut it short. Cleared when the next reply starts. */
65
+ interrupted: boolean;
66
+ /** Modality of the user's last trigger. */
67
+ lastInput: InputModality;
68
+ output: OutputPreference;
69
+ /** Active providers. */
70
+ stt?: string;
71
+ tts?: string;
72
+ /** Each speech provider by name: whether its model is downloaded, and how much of it. */
73
+ ttsStatus: Record<string, TtsStatus>;
74
+ /** A sentence is being synthesized (models can take seconds before speech starts). */
75
+ synthesizing: boolean;
76
+ /** End-of-turn provider in use, if any. */
77
+ endOfTurn?: string;
78
+ /** Echo filter in use, if any. */
79
+ echo?: string;
80
+ /** Speech effects in use, if any. */
81
+ effects?: string;
82
+ error?: SpeechError;
83
+ };
84
+ export type ListenOptions = {
85
+ /**
86
+ * When a push-to-talk utterance ends. `silence` (default): the first pause
87
+ * sends it. `stop`: keep listening across pauses and send everything said,
88
+ * as one message, when `stop()` is called (hold-to-talk). Hands-free mode
89
+ * ignores it.
90
+ */
91
+ until?: 'silence' | 'stop';
92
+ };
93
+ /** How long hands-free waits before sending what the user said (ms). */
94
+ export type TurnTiming = {
95
+ /**
96
+ * Without an end-of-turn provider (or when it fails): wait this long after the
97
+ * last words. Pauses are counted from the last words heard (live transcripts
98
+ * included), not from when the recognizer delivers its final result. Default 800.
99
+ */
100
+ silence?: number;
101
+ /** With a provider: ask it after this pause. Default 300. */
102
+ minSilence?: number;
103
+ /** With a provider that says "not finished" (or a recognizer that decides): send anyway after this pause. Default 2000. */
104
+ maxSilence?: number;
105
+ /** Probability from which the provider's answer counts as "finished". Default 0.5. */
106
+ threshold?: number;
107
+ /** Longest wait for the provider's answer; past it, silence decides. Default 600. */
108
+ timeout?: number;
109
+ /** Seconds of audio kept for audio providers. Default 8. */
110
+ audioSeconds?: number;
111
+ };
112
+ export type BargeInOptions = {
113
+ /** Words a live transcript needs before it interrupts (a final result always can). Default 2. */
114
+ minWords?: number;
115
+ /** Backchannels that never interrupt ("aham", "ok"…). Default: a list for the language. */
116
+ ignore?: string[];
117
+ };
118
+ export type VoiceDecision = {
119
+ kind: 'interrupt';
120
+ text: string;
121
+ } | {
122
+ kind: 'ignore';
123
+ text: string;
124
+ reason: 'backchannel' | 'too-short' | 'echo';
125
+ /** For backchannels: the reply being spoken and how many of its characters were spoken then (ADR 0015). */
126
+ messageId?: string;
127
+ at?: number;
128
+ } | {
129
+ kind: 'end-of-turn';
130
+ text: string;
131
+ reason: 'stt' | 'model' | 'silence' | 'max-silence' | 'manual';
132
+ probability?: number;
133
+ } | {
134
+ kind: 'end-of-turn-unavailable';
135
+ provider: string;
136
+ reason: string;
137
+ };
138
+ /**
139
+ * The life of one spoken chunk (a sentence or a whole short reply), for logs
140
+ * and debugging: `start` without `end` or `error` means the voice went silent.
141
+ */
142
+ export type VoiceSpeechEvent = ({
143
+ phase: 'start';
144
+ provider: string;
145
+ chars: number;
146
+ } | {
147
+ phase: 'end';
148
+ provider: string;
149
+ ms: number;
150
+ interrupted?: boolean;
151
+ } | {
152
+ phase: 'error';
153
+ provider?: string;
154
+ code: SpeechErrorCode;
155
+ message: string;
156
+ }
157
+ /** A chunk of a reply that was not spoken: no provider could speak it, or speech was cancelled first. */
158
+ | {
159
+ phase: 'skip';
160
+ reason: 'no-provider' | 'cancelled';
161
+ }) & Partial<SpokenRange>;
162
+ /**
163
+ * Where a chunk of an assistant reply sits in its text: `from` (inclusive) and
164
+ * `to` (exclusive) are UTF-16 positions into the message's text. Chunks from
165
+ * `speak(text)` have none.
166
+ */
167
+ export type SpokenRange = {
168
+ messageId: string;
169
+ from: number;
170
+ to: number;
171
+ };
172
+ /** Whether a reply will be spoken, decided when its first text arrives (from the output preference). */
173
+ export type VoiceTrackEvent = {
174
+ messageId: string;
175
+ speak: boolean;
176
+ };
177
+ /**
178
+ * A speech provider's model and internals, for logs and debugging: the voice
179
+ * plugin reports `load.start`, `load.progress` (each quarter of the download),
180
+ * `load.done`, `load.error`, `load.aborted` and `speech.while-loading` (a
181
+ * chunk asked for before the model is ready: `action` `fallback` with `to`,
182
+ * `wait` or `silent`, and the `policy` that chose it); the rest comes from the
183
+ * provider's own `trace` (`workerTTS`: the worker's life and each request).
184
+ */
185
+ export type VoiceTtsEvent = {
186
+ provider: string;
187
+ } & TtsTraceEvent;
188
+ export type VoiceService = {
189
+ getState(): VoiceState;
190
+ subscribe(listener: () => void): () => void;
191
+ /** Start listening (push-to-talk press, mic button, hands-free on). */
192
+ listen(options?: ListenOptions): Promise<void>;
193
+ /** Stop listening; the current utterance is still transcribed and sent. */
194
+ stop(): void;
195
+ /** Stop listening and discard the current utterance: nothing is sent. */
196
+ cancel(): void;
197
+ /** Hands-free: send the pending turn now, without waiting for the silence. */
198
+ endTurn(): void;
199
+ /** Hands-free: discard the pending turn and keep listening. */
200
+ discardTurn(): void;
201
+ toggle(): Promise<void>;
202
+ setMode(mode: VoiceMode): void;
203
+ setOutput(output: OutputPreference): void;
204
+ /** Turns the end-of-turn model on (a provider) or off (`null`: silence only). */
205
+ setEndOfTurn(provider: EndOfTurn | null): void;
206
+ /** Replaces the echo filter, or turns it off (`null`). */
207
+ setEcho(filter: EchoFilter | null): void;
208
+ /** Changes timings and barge-in at runtime. */
209
+ configure(options: {
210
+ turn?: TurnTiming;
211
+ bargeIn?: boolean | BargeInOptions;
212
+ }): void;
213
+ speak(text: string): Promise<void>;
214
+ cancelSpeech(): void;
215
+ /**
216
+ * Starts downloading a provider's model now (by name; default: the preferred
217
+ * one). Resolves `true` when it is ready, `false` if it failed (the error is
218
+ * in `ttsStatus` and on the `error` event). Calling it again after a failure retries.
219
+ */
220
+ loadSpeech(name?: string): Promise<boolean>;
221
+ /** Replaces the speech providers (the user picked another voice or model). */
222
+ setTTS(tts: TextToSpeech | TextToSpeech[]): Promise<void>;
223
+ /** Replaces the speech effects, or turns them off (`null`). */
224
+ setEffects(effects: SpeechEffects | null): void;
225
+ /** Allows audio playback: call it inside a click if speech may start long after it. */
226
+ unlockAudio(): void;
227
+ /** Whether a reply arriving now would be spoken (`output` is `voice`, or `auto` after voice input). */
228
+ willSpeakReplies(): boolean;
229
+ };
230
+ declare module '@handsforbots/core' {
231
+ interface Services {
232
+ voice: VoiceService;
233
+ }
234
+ interface Events {
235
+ /** Why the voice interrupted, ignored or ended a turn (for logs and debugging). */
236
+ 'voice.decision': VoiceDecision;
237
+ /** Each spoken chunk starting, ending, failing or skipped; chunks of a reply carry `messageId`, `from` and `to`. */
238
+ 'voice.speech': VoiceSpeechEvent;
239
+ /** A reply's text started arriving: whether it will be spoken (for UIs that sync with speech, like cues). */
240
+ 'voice.track': VoiceTrackEvent;
241
+ /** Each speech provider loading its model and, when it traces, its internals (for logs and debugging). */
242
+ 'voice.tts': VoiceTtsEvent;
243
+ }
244
+ }
245
+ export type VoiceOptions = {
246
+ /** Providers in order of preference; the next is tried when one is unsupported or fails. */
247
+ stt?: SpeechToText | SpeechToText[];
248
+ tts?: TextToSpeech | TextToSpeech[];
249
+ /** BCP 47, e.g. 'pt-BR'. Default: the document language or 'en-US'. */
250
+ language?: string;
251
+ mode?: VoiceMode;
252
+ output?: OutputPreference;
253
+ /**
254
+ * Talking over the bot interrupts it: the speech stops, the reply is
255
+ * cancelled and cut where it was heard. Default true.
256
+ */
257
+ bargeIn?: boolean | BargeInOptions;
258
+ /** Hands-free: decides whether a pause ends the turn. Without it, silence alone does. */
259
+ endOfTurn?: EndOfTurn | null;
260
+ /**
261
+ * Drops what the microphone hears of the bot's own speech, so it neither
262
+ * interrupts nor answers itself. Default `textEchoFilter()`; `false` turns it
263
+ * off; pass your own `EchoFilter` to replace it.
264
+ */
265
+ echo?: EchoFilter | false;
266
+ turn?: TurnTiming;
267
+ voiceName?: string;
268
+ /** When models download and what speech does meanwhile. Default `{ start: 'first-use', whileLoading: 'fallback' }`. */
269
+ load?: SpeechLoading;
270
+ /** Effects on synthesized speech; `speechSynthesis` only gets their prosody. */
271
+ effects?: SpeechEffects | null;
272
+ /** Plays synthesized speech. Default `webAudioPlayer()`. */
273
+ player?: AudioPlayer;
274
+ /**
275
+ * Backchannels heard over the bot ("hum", "aham") go to the backend on the
276
+ * next turn as the one-turn context signal `voice.reactions`, with where in
277
+ * the reply each came (ADR 0015). They never interrupt. Default true.
278
+ */
279
+ reactions?: boolean;
280
+ };
281
+ export declare const voice: (config?: VoiceOptions | undefined) => import("@handsforbots/core").Plugin<VoiceOptions | undefined>;
282
+ export declare function createVoice(ctx: PluginContext, options: VoiceOptions): Promise<VoiceService>;
283
+ //# sourceMappingURL=voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../src/voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGpG,OAAO,EACL,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EAGd,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,YAAY,EAGjB,KAAK,YAAY,EACjB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