@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,20 @@
1
+ import type { VoiceControllerOptions } from '../types';
2
+ export declare const useVoiceController: <TResult = unknown>(path: string, options?: VoiceControllerOptions) => {
3
+ bindHTMX: (options: import("..").VoiceHTMXBindingOptions) => () => void;
4
+ close: () => void;
5
+ endTurn: () => void;
6
+ sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
7
+ startRecording: () => Promise<void>;
8
+ stopRecording: () => void;
9
+ toggleRecording: () => Promise<void>;
10
+ sessionId: string | null;
11
+ scenarioId: string | null;
12
+ status: import("..").VoiceSessionStatus | "idle";
13
+ partial: string;
14
+ turns: import("..").VoiceTurnRecord<TResult>[];
15
+ assistantTexts: string[];
16
+ error: string | null;
17
+ isConnected: boolean;
18
+ isRecording: boolean;
19
+ recordingError: string | null;
20
+ };
@@ -4,6 +4,7 @@ export declare const useVoiceStream: <TResult = unknown>(path: string, options?:
4
4
  endTurn: () => void;
5
5
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
6
6
  sessionId: string | null;
7
+ scenarioId: string | null;
7
8
  status: import("..").VoiceSessionStatus | "idle";
8
9
  partial: string;
9
10
  turns: import("..").VoiceTurnRecord<TResult>[];
package/dist/store.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Transcript, VoiceSessionRecord, VoiceSessionSummary } from './types';
2
2
  export declare const createId: () => `${string}-${string}-${string}-${string}-${string}`;
3
3
  export declare const createTranscript: (text: string, input?: Partial<Transcript>) => Transcript;
4
- export declare const createVoiceSessionRecord: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(id: string) => TSession;
5
- export declare const resetVoiceSessionRecord: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(id: string, existing?: TSession) => TSession;
4
+ export declare const createVoiceSessionRecord: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(id: string, scenarioId?: string) => TSession;
5
+ export declare const resetVoiceSessionRecord: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(id: string, existing?: TSession, scenarioId?: string) => TSession;
6
6
  export declare const toVoiceSessionSummary: (session: VoiceSessionRecord) => VoiceSessionSummary;
@@ -1 +1,2 @@
1
1
  export { createVoiceStream } from './createVoiceStream';
2
+ export { createVoiceController } from '../client/controller';