@lokutor/sdk 1.4.1 → 1.5.1
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/dist/index.d.mts +76 -5
- package/dist/index.d.ts +76 -5
- package/dist/index.js +273 -26
- package/dist/index.mjs +271 -26
- package/package.json +1 -1
- package/src/browser-audio.ts +149 -13
- package/src/client.ts +76 -8
- package/src/conversational-panel.ts +137 -18
- package/src/index.ts +1 -1
- package/src/types.ts +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -289,7 +289,7 @@ interface ToolCall {
|
|
|
289
289
|
/**
|
|
290
290
|
* Error code enum matching the backend API error catalog
|
|
291
291
|
*/
|
|
292
|
-
type ErrorCode = 'auth.missing_key' | 'auth.invalid_key' | 'auth.rate_limited' | 'auth.time_limited' | 'validation.invalid_voice' | 'validation.invalid_language' | 'validation.text_too_long' | 'validation.speed_out_of_range' | 'validation.steps_out_of_range' | 'validation.invalid_request_format' | 'tts.synthesis_failed' | 'tts.voice_unavailable' | 'tts.model_not_found' | 'tts.session_limit_reached' | 'stt.not_configured' | 'stt.stream_create_failed' | 'stt.language_not_supported' | 'agent.session_failed' | 'agent.provider_error' | 'internal.error' | 'internal.timeout' | 'internal.cancelled' | 'ws.close';
|
|
292
|
+
type ErrorCode = 'auth.missing_key' | 'auth.invalid_key' | 'auth.rate_limited' | 'auth.time_limited' | 'validation.invalid_voice' | 'validation.invalid_language' | 'validation.text_too_long' | 'validation.speed_out_of_range' | 'validation.steps_out_of_range' | 'validation.invalid_request_format' | 'tts.synthesis_failed' | 'tts.voice_unavailable' | 'tts.model_not_found' | 'tts.session_limit_reached' | 'stt.not_configured' | 'stt.stream_create_failed' | 'stt.language_not_supported' | 'agent.session_failed' | 'agent.provider_error' | 'session.ended' | 'audio.microphone_unavailable' | 'internal.error' | 'internal.timeout' | 'internal.cancelled' | 'ws.close';
|
|
293
293
|
/**
|
|
294
294
|
* Typed error class for all Lokutor SDK errors.
|
|
295
295
|
* Includes the backend error code, human-readable message,
|
|
@@ -325,6 +325,13 @@ interface AudioManager {
|
|
|
325
325
|
setMuted(muted: boolean): void;
|
|
326
326
|
getAmplitude(): number;
|
|
327
327
|
}
|
|
328
|
+
/** What the server announced about how long this session may run (landing-page demo sessions). */
|
|
329
|
+
interface SessionLimit {
|
|
330
|
+
/** Seconds the session may still run, from when the message arrived. */
|
|
331
|
+
seconds: number;
|
|
332
|
+
/** Why there is a limit, e.g. "demo". */
|
|
333
|
+
reason?: string;
|
|
334
|
+
}
|
|
328
335
|
/**
|
|
329
336
|
* Main client for Lokutor Voice Agent SDK
|
|
330
337
|
*
|
|
@@ -358,6 +365,7 @@ declare class VoiceAgentClient {
|
|
|
358
365
|
private reconnectAttempts;
|
|
359
366
|
private maxReconnectAttempts;
|
|
360
367
|
private reconnectTimer;
|
|
368
|
+
private micStarted;
|
|
361
369
|
private serverPlaybackRate;
|
|
362
370
|
private serverInputRate;
|
|
363
371
|
private serverUrl;
|
|
@@ -685,8 +693,32 @@ interface BrowserAudioConfig {
|
|
|
685
693
|
autoGainControl?: boolean;
|
|
686
694
|
echoCancellation?: boolean;
|
|
687
695
|
noiseSuppression?: boolean;
|
|
696
|
+
/**
|
|
697
|
+
* Keep the screen awake while the microphone is live (Screen Wake Lock API), as a video player does.
|
|
698
|
+
* Default true: a phone that dims and locks mid-call suspends the page's microphone and audio, and
|
|
699
|
+
* the call goes silent in both directions. Set false if your app manages this itself.
|
|
700
|
+
*/
|
|
701
|
+
keepAwake?: boolean;
|
|
702
|
+
/**
|
|
703
|
+
* A microphone stream the page already asked for, ideally with requestMicrophone() inside the tap that
|
|
704
|
+
* started the call. startMicrophone uses it instead of calling getUserMedia again later, after the
|
|
705
|
+
* connection opens -- which iOS Safari can refuse without showing its prompt.
|
|
706
|
+
*/
|
|
707
|
+
microphone?: MediaStream | Promise<MediaStream>;
|
|
688
708
|
onInputError?: (error: Error) => void;
|
|
689
709
|
}
|
|
710
|
+
/**
|
|
711
|
+
* Ask for the microphone now, from inside the tap or click that starts a call, and return the pending stream.
|
|
712
|
+
*
|
|
713
|
+
* Call it synchronously in the gesture handler, before any await, and pass the result to BrowserAudioManager
|
|
714
|
+
* as `microphone` (ConversationalPanel does this itself). Two iOS Safari behaviours made a later request fail
|
|
715
|
+
* with no prompt at all -- the call connected, the agent spoke, and nothing the caller said was heard:
|
|
716
|
+
* - a request outside a user gesture may be refused instead of prompting;
|
|
717
|
+
* - while the page's audio session is in 'playback' mode (set by pages so audio plays through the mute
|
|
718
|
+
* switch), capture is refused outright. It is put back to 'auto', under which Safari switches to
|
|
719
|
+
* play-and-record itself when capture starts and keeps the loudspeaker.
|
|
720
|
+
*/
|
|
721
|
+
declare function requestMicrophone(constraints?: Pick<BrowserAudioConfig, 'autoGainControl' | 'echoCancellation' | 'noiseSuppression'>): Promise<MediaStream>;
|
|
690
722
|
/**
|
|
691
723
|
* Analyser configuration for audio visualization
|
|
692
724
|
*/
|
|
@@ -714,6 +746,10 @@ declare class BrowserAudioManager {
|
|
|
714
746
|
private autoGainControl;
|
|
715
747
|
private echoCancellation;
|
|
716
748
|
private noiseSuppression;
|
|
749
|
+
private keepAwake;
|
|
750
|
+
private providedMicrophone;
|
|
751
|
+
private wakeLock;
|
|
752
|
+
private visibilityHandler;
|
|
717
753
|
private onAudioInput?;
|
|
718
754
|
private onInputError?;
|
|
719
755
|
private isMuted;
|
|
@@ -735,6 +771,13 @@ declare class BrowserAudioManager {
|
|
|
735
771
|
* Stop capturing microphone input
|
|
736
772
|
*/
|
|
737
773
|
stopMicrophone(): void;
|
|
774
|
+
/**
|
|
775
|
+
* Keep the screen on while the microphone is live, and bring audio back when the page returns
|
|
776
|
+
* to the foreground (iOS leaves the context "interrupted" after the screen locks).
|
|
777
|
+
*/
|
|
778
|
+
private holdScreenAwake;
|
|
779
|
+
private requestWakeLock;
|
|
780
|
+
private releaseScreenAwake;
|
|
738
781
|
/**
|
|
739
782
|
* Play back audio received from the server
|
|
740
783
|
* @param pcm16Data Int16 PCM audio data at SPEAKER_SAMPLE_RATE
|
|
@@ -824,7 +867,11 @@ interface ConversationalPanelConfig {
|
|
|
824
867
|
backgroundColor?: string;
|
|
825
868
|
/** API key for connecting to the voice agent */
|
|
826
869
|
apiKey: string;
|
|
827
|
-
/**
|
|
870
|
+
/**
|
|
871
|
+
* Reference to the ConvoAgent class. Its constructor options include `microphone`, a
|
|
872
|
+
* Promise<MediaStream> requested inside the Start tap (see requestMicrophone); pass it on to
|
|
873
|
+
* BrowserAudioManager as `microphone` so the call uses it instead of asking again later.
|
|
874
|
+
*/
|
|
828
875
|
ConvoAgent: any;
|
|
829
876
|
/** Reference to the SphereVisualizer class */
|
|
830
877
|
SphereVisualizer: any;
|
|
@@ -839,6 +886,9 @@ interface ConversationalPanelConfig {
|
|
|
839
886
|
/** Seconds of silence before auto-close (default 60) */
|
|
840
887
|
silenceTimeout?: number;
|
|
841
888
|
}
|
|
889
|
+
/** What to tell the caller when the microphone did not start: a DOMException from getUserMedia, or the
|
|
890
|
+
* SDK's 'audio.microphone_unavailable' error wrapping one. */
|
|
891
|
+
declare function microphoneMessage(err: any): string;
|
|
842
892
|
declare class ConversationalPanel {
|
|
843
893
|
private cfg;
|
|
844
894
|
private container;
|
|
@@ -865,17 +915,32 @@ declare class ConversationalPanel {
|
|
|
865
915
|
private muteSvg;
|
|
866
916
|
private stopBtn;
|
|
867
917
|
private visualizerWrap;
|
|
918
|
+
private countdownEl;
|
|
919
|
+
private noteEl;
|
|
920
|
+
private countdownTicker;
|
|
921
|
+
private microphone;
|
|
922
|
+
private micError;
|
|
868
923
|
onTranscription?: (text: string) => void;
|
|
869
924
|
onResponse?: (text: string) => void;
|
|
870
925
|
onStart?: () => void;
|
|
871
926
|
onStop?: () => void;
|
|
872
927
|
onError?: (err: any) => void;
|
|
873
928
|
onToolCall?: (tool: any) => void;
|
|
929
|
+
/**
|
|
930
|
+
* The call ended without the visitor pressing End: a time limit, the silence timeout, the server
|
|
931
|
+
* closing the session, or the connection being lost. Receives the message the panel shows, so a
|
|
932
|
+
* page that renders its own chrome (and hides this panel's curtain) can show it too.
|
|
933
|
+
*/
|
|
934
|
+
onEnded?: (message: string) => void;
|
|
874
935
|
constructor(cfg: ConversationalPanelConfig);
|
|
875
936
|
private buildDOM;
|
|
876
937
|
private esc;
|
|
877
|
-
/**
|
|
878
|
-
|
|
938
|
+
/**
|
|
939
|
+
* Start the conversation (called when user clicks "Start Conversation" or externally). Call it from
|
|
940
|
+
* inside the click or tap, before any await: it asks for the microphone there. Resolves true once the
|
|
941
|
+
* call is live, false when it could not start (the reason is shown, and passed to onError).
|
|
942
|
+
*/
|
|
943
|
+
start(): Promise<boolean>;
|
|
879
944
|
/** Stop / disconnect the conversation */
|
|
880
945
|
stop(): void;
|
|
881
946
|
/** Update accent color dynamically */
|
|
@@ -893,6 +958,12 @@ declare class ConversationalPanel {
|
|
|
893
958
|
setTools(tools: any[]): void;
|
|
894
959
|
/** Show an error message */
|
|
895
960
|
showError(text: string): void;
|
|
961
|
+
/** End the call for a reason other than the End button, and say why. */
|
|
962
|
+
private end;
|
|
963
|
+
/** Show how long the session may still run, as announced by the server. */
|
|
964
|
+
private startCountdown;
|
|
965
|
+
private stopCountdown;
|
|
966
|
+
private setNote;
|
|
896
967
|
/** Destroy the component, removing all DOM and stopping any active session */
|
|
897
968
|
destroy(): void;
|
|
898
969
|
private startTimer;
|
|
@@ -902,4 +973,4 @@ declare class ConversationalPanel {
|
|
|
902
973
|
private playErrorTone;
|
|
903
974
|
}
|
|
904
975
|
|
|
905
|
-
export { AUDIO_CONFIG, type AnalyserConfig, type AudioManager, type BrowserAudioConfig, BrowserAudioManager, type BrowserAudioOptions, ConversationalPanel, type ConversationalPanelConfig, DEFAULT_URLS, type ErrorCode, type HealthStatus, Language, type LanguageInfo, type LokutorConfig, LokutorError, type ModelInfo, NodeAudioManager, STTClient, type ServerConfig, type ServerStatus, SpeechToTextClient, type SpeechToTextOptions, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type TranscribeOptions, type TranscribeResult, type TranscribeSegment, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceId, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS, simpleTranscribe };
|
|
976
|
+
export { AUDIO_CONFIG, type AnalyserConfig, type AudioManager, type BrowserAudioConfig, BrowserAudioManager, type BrowserAudioOptions, ConversationalPanel, type ConversationalPanelConfig, DEFAULT_URLS, type ErrorCode, type HealthStatus, Language, type LanguageInfo, type LokutorConfig, LokutorError, type ModelInfo, NodeAudioManager, STTClient, type ServerConfig, type ServerStatus, type SessionLimit, SpeechToTextClient, type SpeechToTextOptions, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type TranscribeOptions, type TranscribeResult, type TranscribeSegment, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceId, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, microphoneMessage, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, requestMicrophone, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS, simpleTranscribe };
|
package/dist/index.d.ts
CHANGED
|
@@ -289,7 +289,7 @@ interface ToolCall {
|
|
|
289
289
|
/**
|
|
290
290
|
* Error code enum matching the backend API error catalog
|
|
291
291
|
*/
|
|
292
|
-
type ErrorCode = 'auth.missing_key' | 'auth.invalid_key' | 'auth.rate_limited' | 'auth.time_limited' | 'validation.invalid_voice' | 'validation.invalid_language' | 'validation.text_too_long' | 'validation.speed_out_of_range' | 'validation.steps_out_of_range' | 'validation.invalid_request_format' | 'tts.synthesis_failed' | 'tts.voice_unavailable' | 'tts.model_not_found' | 'tts.session_limit_reached' | 'stt.not_configured' | 'stt.stream_create_failed' | 'stt.language_not_supported' | 'agent.session_failed' | 'agent.provider_error' | 'internal.error' | 'internal.timeout' | 'internal.cancelled' | 'ws.close';
|
|
292
|
+
type ErrorCode = 'auth.missing_key' | 'auth.invalid_key' | 'auth.rate_limited' | 'auth.time_limited' | 'validation.invalid_voice' | 'validation.invalid_language' | 'validation.text_too_long' | 'validation.speed_out_of_range' | 'validation.steps_out_of_range' | 'validation.invalid_request_format' | 'tts.synthesis_failed' | 'tts.voice_unavailable' | 'tts.model_not_found' | 'tts.session_limit_reached' | 'stt.not_configured' | 'stt.stream_create_failed' | 'stt.language_not_supported' | 'agent.session_failed' | 'agent.provider_error' | 'session.ended' | 'audio.microphone_unavailable' | 'internal.error' | 'internal.timeout' | 'internal.cancelled' | 'ws.close';
|
|
293
293
|
/**
|
|
294
294
|
* Typed error class for all Lokutor SDK errors.
|
|
295
295
|
* Includes the backend error code, human-readable message,
|
|
@@ -325,6 +325,13 @@ interface AudioManager {
|
|
|
325
325
|
setMuted(muted: boolean): void;
|
|
326
326
|
getAmplitude(): number;
|
|
327
327
|
}
|
|
328
|
+
/** What the server announced about how long this session may run (landing-page demo sessions). */
|
|
329
|
+
interface SessionLimit {
|
|
330
|
+
/** Seconds the session may still run, from when the message arrived. */
|
|
331
|
+
seconds: number;
|
|
332
|
+
/** Why there is a limit, e.g. "demo". */
|
|
333
|
+
reason?: string;
|
|
334
|
+
}
|
|
328
335
|
/**
|
|
329
336
|
* Main client for Lokutor Voice Agent SDK
|
|
330
337
|
*
|
|
@@ -358,6 +365,7 @@ declare class VoiceAgentClient {
|
|
|
358
365
|
private reconnectAttempts;
|
|
359
366
|
private maxReconnectAttempts;
|
|
360
367
|
private reconnectTimer;
|
|
368
|
+
private micStarted;
|
|
361
369
|
private serverPlaybackRate;
|
|
362
370
|
private serverInputRate;
|
|
363
371
|
private serverUrl;
|
|
@@ -685,8 +693,32 @@ interface BrowserAudioConfig {
|
|
|
685
693
|
autoGainControl?: boolean;
|
|
686
694
|
echoCancellation?: boolean;
|
|
687
695
|
noiseSuppression?: boolean;
|
|
696
|
+
/**
|
|
697
|
+
* Keep the screen awake while the microphone is live (Screen Wake Lock API), as a video player does.
|
|
698
|
+
* Default true: a phone that dims and locks mid-call suspends the page's microphone and audio, and
|
|
699
|
+
* the call goes silent in both directions. Set false if your app manages this itself.
|
|
700
|
+
*/
|
|
701
|
+
keepAwake?: boolean;
|
|
702
|
+
/**
|
|
703
|
+
* A microphone stream the page already asked for, ideally with requestMicrophone() inside the tap that
|
|
704
|
+
* started the call. startMicrophone uses it instead of calling getUserMedia again later, after the
|
|
705
|
+
* connection opens -- which iOS Safari can refuse without showing its prompt.
|
|
706
|
+
*/
|
|
707
|
+
microphone?: MediaStream | Promise<MediaStream>;
|
|
688
708
|
onInputError?: (error: Error) => void;
|
|
689
709
|
}
|
|
710
|
+
/**
|
|
711
|
+
* Ask for the microphone now, from inside the tap or click that starts a call, and return the pending stream.
|
|
712
|
+
*
|
|
713
|
+
* Call it synchronously in the gesture handler, before any await, and pass the result to BrowserAudioManager
|
|
714
|
+
* as `microphone` (ConversationalPanel does this itself). Two iOS Safari behaviours made a later request fail
|
|
715
|
+
* with no prompt at all -- the call connected, the agent spoke, and nothing the caller said was heard:
|
|
716
|
+
* - a request outside a user gesture may be refused instead of prompting;
|
|
717
|
+
* - while the page's audio session is in 'playback' mode (set by pages so audio plays through the mute
|
|
718
|
+
* switch), capture is refused outright. It is put back to 'auto', under which Safari switches to
|
|
719
|
+
* play-and-record itself when capture starts and keeps the loudspeaker.
|
|
720
|
+
*/
|
|
721
|
+
declare function requestMicrophone(constraints?: Pick<BrowserAudioConfig, 'autoGainControl' | 'echoCancellation' | 'noiseSuppression'>): Promise<MediaStream>;
|
|
690
722
|
/**
|
|
691
723
|
* Analyser configuration for audio visualization
|
|
692
724
|
*/
|
|
@@ -714,6 +746,10 @@ declare class BrowserAudioManager {
|
|
|
714
746
|
private autoGainControl;
|
|
715
747
|
private echoCancellation;
|
|
716
748
|
private noiseSuppression;
|
|
749
|
+
private keepAwake;
|
|
750
|
+
private providedMicrophone;
|
|
751
|
+
private wakeLock;
|
|
752
|
+
private visibilityHandler;
|
|
717
753
|
private onAudioInput?;
|
|
718
754
|
private onInputError?;
|
|
719
755
|
private isMuted;
|
|
@@ -735,6 +771,13 @@ declare class BrowserAudioManager {
|
|
|
735
771
|
* Stop capturing microphone input
|
|
736
772
|
*/
|
|
737
773
|
stopMicrophone(): void;
|
|
774
|
+
/**
|
|
775
|
+
* Keep the screen on while the microphone is live, and bring audio back when the page returns
|
|
776
|
+
* to the foreground (iOS leaves the context "interrupted" after the screen locks).
|
|
777
|
+
*/
|
|
778
|
+
private holdScreenAwake;
|
|
779
|
+
private requestWakeLock;
|
|
780
|
+
private releaseScreenAwake;
|
|
738
781
|
/**
|
|
739
782
|
* Play back audio received from the server
|
|
740
783
|
* @param pcm16Data Int16 PCM audio data at SPEAKER_SAMPLE_RATE
|
|
@@ -824,7 +867,11 @@ interface ConversationalPanelConfig {
|
|
|
824
867
|
backgroundColor?: string;
|
|
825
868
|
/** API key for connecting to the voice agent */
|
|
826
869
|
apiKey: string;
|
|
827
|
-
/**
|
|
870
|
+
/**
|
|
871
|
+
* Reference to the ConvoAgent class. Its constructor options include `microphone`, a
|
|
872
|
+
* Promise<MediaStream> requested inside the Start tap (see requestMicrophone); pass it on to
|
|
873
|
+
* BrowserAudioManager as `microphone` so the call uses it instead of asking again later.
|
|
874
|
+
*/
|
|
828
875
|
ConvoAgent: any;
|
|
829
876
|
/** Reference to the SphereVisualizer class */
|
|
830
877
|
SphereVisualizer: any;
|
|
@@ -839,6 +886,9 @@ interface ConversationalPanelConfig {
|
|
|
839
886
|
/** Seconds of silence before auto-close (default 60) */
|
|
840
887
|
silenceTimeout?: number;
|
|
841
888
|
}
|
|
889
|
+
/** What to tell the caller when the microphone did not start: a DOMException from getUserMedia, or the
|
|
890
|
+
* SDK's 'audio.microphone_unavailable' error wrapping one. */
|
|
891
|
+
declare function microphoneMessage(err: any): string;
|
|
842
892
|
declare class ConversationalPanel {
|
|
843
893
|
private cfg;
|
|
844
894
|
private container;
|
|
@@ -865,17 +915,32 @@ declare class ConversationalPanel {
|
|
|
865
915
|
private muteSvg;
|
|
866
916
|
private stopBtn;
|
|
867
917
|
private visualizerWrap;
|
|
918
|
+
private countdownEl;
|
|
919
|
+
private noteEl;
|
|
920
|
+
private countdownTicker;
|
|
921
|
+
private microphone;
|
|
922
|
+
private micError;
|
|
868
923
|
onTranscription?: (text: string) => void;
|
|
869
924
|
onResponse?: (text: string) => void;
|
|
870
925
|
onStart?: () => void;
|
|
871
926
|
onStop?: () => void;
|
|
872
927
|
onError?: (err: any) => void;
|
|
873
928
|
onToolCall?: (tool: any) => void;
|
|
929
|
+
/**
|
|
930
|
+
* The call ended without the visitor pressing End: a time limit, the silence timeout, the server
|
|
931
|
+
* closing the session, or the connection being lost. Receives the message the panel shows, so a
|
|
932
|
+
* page that renders its own chrome (and hides this panel's curtain) can show it too.
|
|
933
|
+
*/
|
|
934
|
+
onEnded?: (message: string) => void;
|
|
874
935
|
constructor(cfg: ConversationalPanelConfig);
|
|
875
936
|
private buildDOM;
|
|
876
937
|
private esc;
|
|
877
|
-
/**
|
|
878
|
-
|
|
938
|
+
/**
|
|
939
|
+
* Start the conversation (called when user clicks "Start Conversation" or externally). Call it from
|
|
940
|
+
* inside the click or tap, before any await: it asks for the microphone there. Resolves true once the
|
|
941
|
+
* call is live, false when it could not start (the reason is shown, and passed to onError).
|
|
942
|
+
*/
|
|
943
|
+
start(): Promise<boolean>;
|
|
879
944
|
/** Stop / disconnect the conversation */
|
|
880
945
|
stop(): void;
|
|
881
946
|
/** Update accent color dynamically */
|
|
@@ -893,6 +958,12 @@ declare class ConversationalPanel {
|
|
|
893
958
|
setTools(tools: any[]): void;
|
|
894
959
|
/** Show an error message */
|
|
895
960
|
showError(text: string): void;
|
|
961
|
+
/** End the call for a reason other than the End button, and say why. */
|
|
962
|
+
private end;
|
|
963
|
+
/** Show how long the session may still run, as announced by the server. */
|
|
964
|
+
private startCountdown;
|
|
965
|
+
private stopCountdown;
|
|
966
|
+
private setNote;
|
|
896
967
|
/** Destroy the component, removing all DOM and stopping any active session */
|
|
897
968
|
destroy(): void;
|
|
898
969
|
private startTimer;
|
|
@@ -902,4 +973,4 @@ declare class ConversationalPanel {
|
|
|
902
973
|
private playErrorTone;
|
|
903
974
|
}
|
|
904
975
|
|
|
905
|
-
export { AUDIO_CONFIG, type AnalyserConfig, type AudioManager, type BrowserAudioConfig, BrowserAudioManager, type BrowserAudioOptions, ConversationalPanel, type ConversationalPanelConfig, DEFAULT_URLS, type ErrorCode, type HealthStatus, Language, type LanguageInfo, type LokutorConfig, LokutorError, type ModelInfo, NodeAudioManager, STTClient, type ServerConfig, type ServerStatus, SpeechToTextClient, type SpeechToTextOptions, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type TranscribeOptions, type TranscribeResult, type TranscribeSegment, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceId, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS, simpleTranscribe };
|
|
976
|
+
export { AUDIO_CONFIG, type AnalyserConfig, type AudioManager, type BrowserAudioConfig, BrowserAudioManager, type BrowserAudioOptions, ConversationalPanel, type ConversationalPanelConfig, DEFAULT_URLS, type ErrorCode, type HealthStatus, Language, type LanguageInfo, type LokutorConfig, LokutorError, type ModelInfo, NodeAudioManager, STTClient, type ServerConfig, type ServerStatus, type SessionLimit, SpeechToTextClient, type SpeechToTextOptions, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type TranscribeOptions, type TranscribeResult, type TranscribeSegment, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceId, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, microphoneMessage, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, requestMicrophone, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS, simpleTranscribe };
|