@getsoren/design-system 4.58.0 → 4.59.0
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.
|
@@ -5,5 +5,5 @@ import { ChatVoiceRecorderProps } from '../types';
|
|
|
5
5
|
* the recorded audio Blob to `onRecorded`; transcription/upload is the caller's job
|
|
6
6
|
* (drive `isProcessing` while it runs).
|
|
7
7
|
*/
|
|
8
|
-
export declare const ChatVoiceRecorder: ({ onRecorded, onError, isProcessing, disabled, maxDurationMs,
|
|
8
|
+
export declare const ChatVoiceRecorder: ({ onRecorded, onError, labels, isProcessing, disabled, autoSubmitOnSilence, maxDurationMs, silenceTimeoutMs, }: ChatVoiceRecorderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default ChatVoiceRecorder;
|
|
@@ -118,15 +118,39 @@ export interface ChatVoiceRecorderLabels {
|
|
|
118
118
|
send?: string;
|
|
119
119
|
}
|
|
120
120
|
export interface ChatVoiceRecorderProps {
|
|
121
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Receives the recorded audio once the user validates the take
|
|
123
|
+
*/
|
|
122
124
|
onRecorded: (audio: Blob) => void;
|
|
123
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Typically a denied microphone permission
|
|
127
|
+
*/
|
|
124
128
|
onError?: (error: unknown) => void;
|
|
125
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* The caller is consuming the recording (upload/transcription): spinner on the mic, new take blocked
|
|
131
|
+
*/
|
|
126
132
|
isProcessing?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Disables the mic button (e.g. the chat is busy sending) — no recording can be started
|
|
135
|
+
*/
|
|
127
136
|
disabled?: boolean;
|
|
128
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* Hard stop: past this duration the take is validated automatically (default 2 min)
|
|
139
|
+
*/
|
|
129
140
|
maxDurationMs?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Enables Siri-style auto-send: once the user has started speaking, the take is validated automatically
|
|
143
|
+
* after a trailing silence. Opt-in (default false) so a shared consumer never auto-sends by surprise.
|
|
144
|
+
*/
|
|
145
|
+
autoSubmitOnSilence?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Trailing silence, in ms, before the take is auto-validated when `autoSubmitOnSilence` is on (default
|
|
148
|
+
* 2500). The timer only arms after the first speech is detected, so a slow start never cuts the user off.
|
|
149
|
+
*/
|
|
150
|
+
silenceTimeoutMs?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Translated strings for the tooltips (record / cancel / send) — falls back to English defaults
|
|
153
|
+
*/
|
|
130
154
|
labels?: ChatVoiceRecorderLabels;
|
|
131
155
|
}
|
|
132
156
|
export interface ChatParticipantDialogProps {
|