@lokutor/sdk 1.1.19 → 1.1.20

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 CHANGED
@@ -590,4 +590,78 @@ declare class BrowserAudioManager {
590
590
  isRecording(): boolean;
591
591
  }
592
592
 
593
- export { AUDIO_CONFIG, type AnalyserConfig, type AudioManager, type BrowserAudioConfig, BrowserAudioManager, type BrowserAudioOptions, DEFAULT_URLS, type ErrorCode, type HealthStatus, Language, type LanguageInfo, type LokutorConfig, LokutorError, type ModelInfo, type ServerConfig, type ServerStatus, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS };
593
+ interface ConversationalPanelConfig {
594
+ container: HTMLElement;
595
+ title: string;
596
+ description: string;
597
+ prompt: string;
598
+ voice?: string;
599
+ language?: string;
600
+ /** Accent color for the sphere glow and highlights, e.g. '#e74c3c' */
601
+ accentColor?: string;
602
+ /** Background color, e.g. '#0a0a0a' */
603
+ backgroundColor?: string;
604
+ /** API key for connecting to the voice agent */
605
+ apiKey: string;
606
+ /** Reference to the ConvoAgent class */
607
+ ConvoAgent: any;
608
+ /** Reference to the SphereVisualizer class */
609
+ SphereVisualizer: any;
610
+ /** URL for the connecting sound asset */
611
+ connectingSoundSrc?: string;
612
+ /** Background image for the curtain, e.g. '/background_gradient.jpeg' */
613
+ curtainBgSrc?: string;
614
+ }
615
+ declare class ConversationalPanel {
616
+ private cfg;
617
+ private container;
618
+ private agent;
619
+ private visualizer;
620
+ private timerTicker;
621
+ private connectingSound;
622
+ private connectingFadeTimer;
623
+ private isRunning;
624
+ private el;
625
+ private curtain;
626
+ private curtainTitle;
627
+ private curtainDesc;
628
+ private startBtn;
629
+ private errorEl;
630
+ private errorText;
631
+ private timerEl;
632
+ private canvas;
633
+ private muteBtn;
634
+ private stopBtn;
635
+ private visualizerWrap;
636
+ onTranscription?: (text: string) => void;
637
+ onResponse?: (text: string) => void;
638
+ onStart?: () => void;
639
+ onStop?: () => void;
640
+ onError?: (err: any) => void;
641
+ constructor(cfg: ConversationalPanelConfig);
642
+ private buildDOM;
643
+ private esc;
644
+ /** Start the conversation (called when user clicks "Start Conversation" or externally) */
645
+ start(): Promise<void>;
646
+ /** Stop / disconnect the conversation */
647
+ stop(): void;
648
+ /** Update accent color dynamically */
649
+ setColor(color: string): void;
650
+ /** Update title text */
651
+ setTitle(title: string): void;
652
+ /** Update description text */
653
+ setDescription(desc: string): void;
654
+ /** Update prompt (only takes effect on next start()) */
655
+ setPrompt(prompt: string): void;
656
+ /** Show an error message */
657
+ showError(text: string): void;
658
+ /** Destroy the component, removing all DOM and stopping any active session */
659
+ destroy(): void;
660
+ private startTimer;
661
+ private toggleMute;
662
+ private playConnectingSound;
663
+ private fadeOutConnectingSound;
664
+ private playErrorTone;
665
+ }
666
+
667
+ 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, type ServerConfig, type ServerStatus, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS };
package/dist/index.d.ts CHANGED
@@ -590,4 +590,78 @@ declare class BrowserAudioManager {
590
590
  isRecording(): boolean;
591
591
  }
592
592
 
593
- export { AUDIO_CONFIG, type AnalyserConfig, type AudioManager, type BrowserAudioConfig, BrowserAudioManager, type BrowserAudioOptions, DEFAULT_URLS, type ErrorCode, type HealthStatus, Language, type LanguageInfo, type LokutorConfig, LokutorError, type ModelInfo, type ServerConfig, type ServerStatus, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS };
593
+ interface ConversationalPanelConfig {
594
+ container: HTMLElement;
595
+ title: string;
596
+ description: string;
597
+ prompt: string;
598
+ voice?: string;
599
+ language?: string;
600
+ /** Accent color for the sphere glow and highlights, e.g. '#e74c3c' */
601
+ accentColor?: string;
602
+ /** Background color, e.g. '#0a0a0a' */
603
+ backgroundColor?: string;
604
+ /** API key for connecting to the voice agent */
605
+ apiKey: string;
606
+ /** Reference to the ConvoAgent class */
607
+ ConvoAgent: any;
608
+ /** Reference to the SphereVisualizer class */
609
+ SphereVisualizer: any;
610
+ /** URL for the connecting sound asset */
611
+ connectingSoundSrc?: string;
612
+ /** Background image for the curtain, e.g. '/background_gradient.jpeg' */
613
+ curtainBgSrc?: string;
614
+ }
615
+ declare class ConversationalPanel {
616
+ private cfg;
617
+ private container;
618
+ private agent;
619
+ private visualizer;
620
+ private timerTicker;
621
+ private connectingSound;
622
+ private connectingFadeTimer;
623
+ private isRunning;
624
+ private el;
625
+ private curtain;
626
+ private curtainTitle;
627
+ private curtainDesc;
628
+ private startBtn;
629
+ private errorEl;
630
+ private errorText;
631
+ private timerEl;
632
+ private canvas;
633
+ private muteBtn;
634
+ private stopBtn;
635
+ private visualizerWrap;
636
+ onTranscription?: (text: string) => void;
637
+ onResponse?: (text: string) => void;
638
+ onStart?: () => void;
639
+ onStop?: () => void;
640
+ onError?: (err: any) => void;
641
+ constructor(cfg: ConversationalPanelConfig);
642
+ private buildDOM;
643
+ private esc;
644
+ /** Start the conversation (called when user clicks "Start Conversation" or externally) */
645
+ start(): Promise<void>;
646
+ /** Stop / disconnect the conversation */
647
+ stop(): void;
648
+ /** Update accent color dynamically */
649
+ setColor(color: string): void;
650
+ /** Update title text */
651
+ setTitle(title: string): void;
652
+ /** Update description text */
653
+ setDescription(desc: string): void;
654
+ /** Update prompt (only takes effect on next start()) */
655
+ setPrompt(prompt: string): void;
656
+ /** Show an error message */
657
+ showError(text: string): void;
658
+ /** Destroy the component, removing all DOM and stopping any active session */
659
+ destroy(): void;
660
+ private startTimer;
661
+ private toggleMute;
662
+ private playConnectingSound;
663
+ private fadeOutConnectingSound;
664
+ private playErrorTone;
665
+ }
666
+
667
+ 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, type ServerConfig, type ServerStatus, StreamResampler, type SynthesizeOptions, TTSClient, type ToolCall, type ToolDefinition, type Viseme, VoiceAgentClient, type VoiceAgentOptions, type VoiceInfo, VoiceStyle, applyLowPassFilter, bytesToPcm16, calculateRMS, float32ToPcm16, isRetryable, normalizeAudio, pcm16ToBytes, pcm16ToFloat32, resample, resampleWithAntiAliasing, simpleConversation, simpleTTS };