@absolutejs/voice 0.0.22-beta.545 → 0.0.22-beta.547

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.
@@ -53,6 +53,7 @@ export type VoiceAgentModelInput<TContext = unknown, TSession extends VoiceSessi
53
53
  agentId: string;
54
54
  context: TContext;
55
55
  messages: VoiceAgentMessage[];
56
+ onTextDelta?: (delta: string) => void;
56
57
  session: TSession;
57
58
  system?: string;
58
59
  tools: Array<{
@@ -119,6 +120,7 @@ export type VoiceAgent<TContext = unknown, TSession extends VoiceSessionRecord =
119
120
  api: VoiceSessionHandle<TContext, TSession, TResult>;
120
121
  context: TContext;
121
122
  messages?: VoiceAgentMessage[];
123
+ onTextDelta?: (delta: string) => void;
122
124
  session: TSession;
123
125
  system?: string;
124
126
  turn: VoiceTurnRecord;
@@ -571,6 +571,7 @@ export type VoiceOnTurnObjectHandler<TContext = unknown, TSession extends VoiceS
571
571
  control: VoiceLiveOpsControlState;
572
572
  injectedInstruction?: string;
573
573
  };
574
+ onTextDelta?: (delta: string) => void;
574
575
  session: TSession;
575
576
  turn: VoiceTurnRecord;
576
577
  api: VoiceSessionHandle<TContext, TSession, TResult>;
@@ -744,7 +745,9 @@ export type VoiceSurfaceConfig<O> = false | O | (Record<string, never> extends O
744
745
  export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
745
746
  costTelemetry?: VoiceCostTelemetryConfig<TContext, TSession, TResult>;
746
747
  path: string;
747
- greeting?: string | (() => string | Promise<string>);
748
+ greeting?: string | ((input: {
749
+ session: TSession;
750
+ }) => string | Promise<string>);
748
751
  languageStrategy?: VoiceLanguageStrategy;
749
752
  lexicon?: VoiceLexiconEntry[] | VoiceLexiconResolver<TContext>;
750
753
  phraseHints?: VoicePhraseHint[] | VoicePhraseHintResolver<TContext>;
@@ -858,7 +861,9 @@ export type CreateVoiceSessionOptions<TContext = unknown, TSession extends Voice
858
861
  id: string;
859
862
  context: TContext;
860
863
  socket: VoiceSocket;
861
- greeting?: string | (() => string | Promise<string>);
864
+ greeting?: string | ((input: {
865
+ session: TSession;
866
+ }) => string | Promise<string>);
862
867
  stt?: STTAdapter;
863
868
  realtime?: RealtimeAdapter;
864
869
  realtimeInputFormat?: AudioFormat;