obi-sdk 0.19.50-beta.1 → 0.19.50-beta.3
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.
|
@@ -13,6 +13,10 @@ type StartSessionDialogProps = {
|
|
|
13
13
|
startLabel?: string;
|
|
14
14
|
disclaimer?: string;
|
|
15
15
|
showCloseButton?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* When true, shows a loading spinner on the start button and disables it.
|
|
18
|
+
*/
|
|
19
|
+
isStarting?: boolean;
|
|
16
20
|
};
|
|
17
21
|
export declare function StartSessionDialog(props: StartSessionDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
18
22
|
export type { StartSessionDialogProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TextStreamData } from "@obi/obi-client";
|
|
2
|
+
export type UseAgentCaptionsFromStreamsOptions = {
|
|
3
|
+
/** Delay in ms before displaying captions (used to sync with avatar video audio delay) */
|
|
4
|
+
delayMs?: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Hook that returns the current transcription caption for the remote agent from text streams.
|
|
8
|
+
*
|
|
9
|
+
* Accumulates text until it reaches MAX_CAPTION_LENGTH, then lingers briefly
|
|
10
|
+
* on the current text before clearing to start fresh. This creates a readable
|
|
11
|
+
* caption experience without needing timing data from the server.
|
|
12
|
+
*
|
|
13
|
+
* This hook matches the behavior of obi-meet's useAgentCaptions exactly but
|
|
14
|
+
* consumes TextStreamData[] directly instead of using LiveKit React hooks.
|
|
15
|
+
*
|
|
16
|
+
* @param streams - Array of text stream data from ObiSession's captions event
|
|
17
|
+
* @param options.delayMs - Optional delay before displaying captions to sync with audio
|
|
18
|
+
*/
|
|
19
|
+
export declare function useAgentCaptionsFromStreams(streams: TextStreamData[], options?: UseAgentCaptionsFromStreamsOptions): {
|
|
20
|
+
caption: string;
|
|
21
|
+
hasCaption: boolean;
|
|
22
|
+
};
|