TranscriptionManager

Manages parallel transcription jobs. Each job is keyed by project ID and persists independently of which project is open in the workspace, so the SSE connection stays alive while the user navigates between projects.

Constructor

new TranscriptionManager(callbacks)

Parameters:
NameTypeDescription
callbacksobjectevent hooks for job state changes and completion
Properties
NameTypeDescription
onUpdatefunctioncalled with projectId whenever a job's state changes
onResultfunctionasync (projectId, server) => void, called on success

Classes

TranscriptionManager

Methods

cancel(projectId)

Parameters:
NameTypeDescription
projectIdstringthe project whose transcription to cancel

getState(projectId) → {Object|null}

Parameters:
NameTypeDescription
projectIdstringproject ID
Returns:
Type: 
Object | null

isActive(projectId) → {boolean}

Parameters:
NameTypeDescription
projectIdstringthe project to check
Returns:
Type: 
boolean

(async) reconnect(projectId, server, initialState)

Reconnects to a transcription that was already running before the page loaded. Polls the server for progress until the job completes, then calls onResult. No-ops if a job for this project is already tracked locally.
Parameters:
NameTypeDescription
projectIdstringthe project to reconnect to
serverobjectServer instance
initialStateObjectlast known state from the server

(async) start(projectId, server, opts)

Starts a transcription job for the given project. No-ops if already running.
Parameters:
NameTypeDescription
projectIdstringthe project to transcribe
serverobjectServer instance
optsobjectTranscription options (modelSize, speakerCount, etc.)