@absolutejs/voice 0.0.19 → 0.0.21

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 (49) hide show
  1. package/README.md +387 -4
  2. package/dist/angular/index.d.ts +1 -0
  3. package/dist/angular/index.js +669 -3
  4. package/dist/angular/voice-controller.service.d.ts +21 -0
  5. package/dist/audioConditioning.d.ts +3 -0
  6. package/dist/client/actions.d.ts +7 -0
  7. package/dist/client/connection.d.ts +5 -0
  8. package/dist/client/controller.d.ts +2 -0
  9. package/dist/client/htmxBootstrap.js +576 -167
  10. package/dist/client/index.d.ts +1 -0
  11. package/dist/client/index.js +486 -3
  12. package/dist/client/microphone.d.ts +4 -2
  13. package/dist/correction.d.ts +16 -0
  14. package/dist/index.d.ts +4 -0
  15. package/dist/index.js +1314 -283
  16. package/dist/presets.d.ts +13 -0
  17. package/dist/react/index.d.ts +1 -0
  18. package/dist/react/index.js +642 -3
  19. package/dist/react/useVoiceController.d.ts +20 -0
  20. package/dist/react/useVoiceStream.d.ts +1 -0
  21. package/dist/store.d.ts +2 -2
  22. package/dist/svelte/index.d.ts +1 -0
  23. package/dist/svelte/index.js +607 -3
  24. package/dist/testing/benchmark.d.ts +36 -0
  25. package/dist/testing/fixtures.d.ts +1 -0
  26. package/dist/testing/index.d.ts +2 -0
  27. package/dist/testing/index.js +1975 -4
  28. package/dist/testing/resilience.d.ts +20 -0
  29. package/dist/testing/sessionBenchmark.d.ts +126 -0
  30. package/dist/testing/stt.d.ts +1 -0
  31. package/dist/turnDetection.d.ts +5 -1
  32. package/dist/turnProfiles.d.ts +6 -0
  33. package/dist/types.d.ts +198 -8
  34. package/dist/vue/index.d.ts +1 -0
  35. package/dist/vue/index.js +660 -3
  36. package/dist/vue/useVoiceController.d.ts +19 -0
  37. package/fixtures/README.md +24 -0
  38. package/fixtures/manifest.json +127 -0
  39. package/fixtures/pcm/dialogue-three-clean.pcm +0 -0
  40. package/fixtures/pcm/dialogue-three-mixed.pcm +0 -0
  41. package/fixtures/pcm/dialogue-two-clean.pcm +0 -0
  42. package/fixtures/pcm/dialogue-two-noisy.pcm +0 -0
  43. package/fixtures/pcm/multiturn-three-mixed.pcm +0 -0
  44. package/fixtures/pcm/multiturn-two-clean.pcm +0 -0
  45. package/fixtures/pcm/stella-bulgaria-bulgarian20.pcm +0 -0
  46. package/fixtures/pcm/stella-jamaica-jamaican-creole-english1.pcm +0 -0
  47. package/fixtures/pcm/stella-liberia-liberian-pidgin-english2.pcm +0 -0
  48. package/fixtures/pcm/stella-sierra-leone-krio5.pcm +0 -0
  49. package/package.json +25 -1
@@ -0,0 +1,21 @@
1
+ import type { VoiceControllerOptions, VoiceTurnRecord } from '../types';
2
+ export declare class VoiceControllerService {
3
+ connect<TResult = unknown>(path: string, options?: VoiceControllerOptions): {
4
+ assistantTexts: import("@angular/core").Signal<string[]>;
5
+ bindHTMX: (options: import("..").VoiceHTMXBindingOptions) => () => void;
6
+ close: () => void;
7
+ endTurn: () => void;
8
+ error: import("@angular/core").Signal<string | null>;
9
+ isConnected: import("@angular/core").Signal<boolean>;
10
+ isRecording: import("@angular/core").Signal<boolean>;
11
+ partial: import("@angular/core").Signal<string>;
12
+ recordingError: import("@angular/core").Signal<string | null>;
13
+ sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
14
+ sessionId: import("@angular/core").Signal<string | null>;
15
+ startRecording: () => Promise<void>;
16
+ status: import("@angular/core").Signal<import("..").VoiceSessionStatus | "idle">;
17
+ stopRecording: () => void;
18
+ toggleRecording: () => Promise<void>;
19
+ turns: import("@angular/core").Signal<VoiceTurnRecord<TResult>[]>;
20
+ };
21
+ }
@@ -0,0 +1,3 @@
1
+ import type { AudioChunk, VoiceAudioConditioningConfig, VoiceResolvedAudioConditioningConfig } from './types';
2
+ export declare const resolveAudioConditioningConfig: (config?: VoiceAudioConditioningConfig) => VoiceResolvedAudioConditioningConfig | undefined;
3
+ export declare const conditionAudioChunk: (audio: AudioChunk, config?: VoiceResolvedAudioConditioningConfig) => AudioChunk;
@@ -5,6 +5,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
5
5
  sessionId?: undefined;
6
6
  message?: undefined;
7
7
  transcript?: undefined;
8
+ scenarioId?: undefined;
8
9
  status?: undefined;
9
10
  turn?: undefined;
10
11
  } | {
@@ -13,6 +14,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
13
14
  text?: undefined;
14
15
  message?: undefined;
15
16
  transcript?: undefined;
17
+ scenarioId?: undefined;
16
18
  status?: undefined;
17
19
  turn?: undefined;
18
20
  } | {
@@ -21,6 +23,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
21
23
  text?: undefined;
22
24
  sessionId?: undefined;
23
25
  transcript?: undefined;
26
+ scenarioId?: undefined;
24
27
  status?: undefined;
25
28
  turn?: undefined;
26
29
  } | {
@@ -29,6 +32,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
29
32
  text?: undefined;
30
33
  sessionId?: undefined;
31
34
  message?: undefined;
35
+ scenarioId?: undefined;
32
36
  status?: undefined;
33
37
  turn?: undefined;
34
38
  } | {
@@ -37,10 +41,12 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
37
41
  text?: undefined;
38
42
  sessionId?: undefined;
39
43
  message?: undefined;
44
+ scenarioId?: undefined;
40
45
  status?: undefined;
41
46
  turn?: undefined;
42
47
  } | {
43
48
  sessionId: string;
49
+ scenarioId: string | undefined;
44
50
  status: import("..").VoiceSessionStatus;
45
51
  type: "session";
46
52
  text?: undefined;
@@ -54,5 +60,6 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
54
60
  sessionId?: undefined;
55
61
  message?: undefined;
56
62
  transcript?: undefined;
63
+ scenarioId?: undefined;
57
64
  status?: undefined;
58
65
  } | null;
@@ -1,8 +1,13 @@
1
1
  import type { VoiceClientMessage, VoiceConnectionOptions, VoiceServerMessage } from '../types';
2
2
  type VoiceConnectionHandle = {
3
+ start: (input?: {
4
+ sessionId?: string;
5
+ scenarioId?: string;
6
+ }) => void;
3
7
  close: () => void;
4
8
  endTurn: () => void;
5
9
  getReadyState: () => number;
10
+ getScenarioId: () => string;
6
11
  getSessionId: () => string;
7
12
  send: (message: VoiceClientMessage) => void;
8
13
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
@@ -0,0 +1,2 @@
1
+ import type { VoiceController, VoiceControllerOptions } from '../types';
2
+ export declare const createVoiceController: <TResult = unknown>(path: string, options?: VoiceControllerOptions) => VoiceController<TResult>;