Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions packages/client/src/BaseConversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,6 @@ export abstract class BaseConversation {
const textOnly = isTextOnly(partialOptions);
return {
clientTools: {},
onConnect: () => {},
onDebug: () => {},
onDisconnect: () => {},
onError: () => {},
onMessage: () => {},
onAudio: () => {},
onModeChange: () => {},
onStatusChange: () => {},
onCanSendFeedbackChange: () => {},
onInterruption: () => {},
onAgentResponseCorrection: () => {},
...partialOptions,
textOnly,
overrides: {
Expand Down
8 changes: 4 additions & 4 deletions packages/client/src/VoiceConversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ export class VoiceConversation extends BaseConversation {
protected override handleAudio(event: AgentAudioEvent) {
super.handleAudio(event);

if (event.audio_event.alignment && this.options.onAudioAlignment) {
this.options.onAudioAlignment(event.audio_event.alignment);
if (event.audio_event.alignment) {
this.emit("audio-alignment", event.audio_event.alignment);
}

if (this.lastInterruptTimestamp <= event.audio_event.event_id) {
if (event.audio_event.audio_base_64) {
this.options.onAudio?.(event.audio_event.audio_base_64);
this.emit("audio", event.audio_event.audio_base_64);
// Audio routing is handled by attachConnectionToOutput for WebSocket
// WebRTC handles audio playback directly through LiveKit tracks
}
Expand All @@ -197,7 +197,7 @@ export class VoiceConversation extends BaseConversation {

public setMicMuted(isMuted: boolean) {
this.input.setMuted(isMuted).catch(error => {
this.options.onError?.("Failed to set input muted state", error);
this.emit("error", "Failed to set input muted state", error);
});
}

Expand Down
Loading