@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.
- package/README.md +387 -4
- package/dist/angular/index.d.ts +1 -0
- package/dist/angular/index.js +669 -3
- package/dist/angular/voice-controller.service.d.ts +21 -0
- package/dist/audioConditioning.d.ts +3 -0
- package/dist/client/actions.d.ts +7 -0
- package/dist/client/connection.d.ts +5 -0
- package/dist/client/controller.d.ts +2 -0
- package/dist/client/htmxBootstrap.js +576 -167
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +486 -3
- package/dist/client/microphone.d.ts +4 -2
- package/dist/correction.d.ts +16 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1314 -283
- package/dist/presets.d.ts +13 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +642 -3
- package/dist/react/useVoiceController.d.ts +20 -0
- package/dist/react/useVoiceStream.d.ts +1 -0
- package/dist/store.d.ts +2 -2
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +607 -3
- package/dist/testing/benchmark.d.ts +36 -0
- package/dist/testing/fixtures.d.ts +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +1975 -4
- package/dist/testing/resilience.d.ts +20 -0
- package/dist/testing/sessionBenchmark.d.ts +126 -0
- package/dist/testing/stt.d.ts +1 -0
- package/dist/turnDetection.d.ts +5 -1
- package/dist/turnProfiles.d.ts +6 -0
- package/dist/types.d.ts +198 -8
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +660 -3
- package/dist/vue/useVoiceController.d.ts +19 -0
- package/fixtures/README.md +24 -0
- package/fixtures/manifest.json +127 -0
- package/fixtures/pcm/dialogue-three-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-three-mixed.pcm +0 -0
- package/fixtures/pcm/dialogue-two-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-two-noisy.pcm +0 -0
- package/fixtures/pcm/multiturn-three-mixed.pcm +0 -0
- package/fixtures/pcm/multiturn-two-clean.pcm +0 -0
- package/fixtures/pcm/stella-bulgaria-bulgarian20.pcm +0 -0
- package/fixtures/pcm/stella-jamaica-jamaican-creole-english1.pcm +0 -0
- package/fixtures/pcm/stella-liberia-liberian-pidgin-english2.pcm +0 -0
- package/fixtures/pcm/stella-sierra-leone-krio5.pcm +0 -0
- 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;
|
package/dist/client/actions.d.ts
CHANGED
|
@@ -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;
|