Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

611 B
Raw Blame
import type { StartRecordingArgs } from "../stores/meetingRecordingStore";

interface MeetingRecordingRequestOptions {
  args: StartRecordingArgs;
  startRecording: (args: StartRecordingArgs) => Promise<boolean>;
  restoreFromMeetingMode: () => Promise<void> | void;
  onHandled: () => void;
}

export async function handleMeetingRecordingRequest({
  args,
  startRecording,
  restoreFromMeetingMode,
  onHandled,
}: MeetingRecordingRequestOptions): Promise<void> {
  try {
    const accepted = await startRecording(args);
    if (!accepted) await restoreFromMeetingMode();
  } finally {
    onHandled();
  }
}