Constructor
new TranscriptionManager(callbacks)
Parameters:| Name | Type | Description |
|---|
callbacks | object | event hooks for job state changes and completionProperties| Name | Type | Description |
|---|
onUpdate | function | called with projectId whenever a job's state changes | onResult | function | async (projectId, server) => void, called on success |
|
Classes
- TranscriptionManager
Methods
cancel(projectId)
Parameters:| Name | Type | Description |
|---|
projectId | string | the project whose transcription to cancel |
getState(projectId) → {Object|null}
Parameters:| Name | Type | Description |
|---|
projectId | string | project ID |
Returns:- Type:
- Object | null
isActive(projectId) → {boolean}
Parameters:| Name | Type | Description |
|---|
projectId | string | the project to check |
(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:| Name | Type | Description |
|---|
projectId | string | the project to reconnect to |
server | object | Server instance |
initialState | Object | last known state from the server |
(async) start(projectId, server, opts)
Starts a transcription job for the given project. No-ops if already running.
Parameters:| Name | Type | Description |
|---|
projectId | string | the project to transcribe |
server | object | Server instance |
opts | object | Transcription options (modelSize, speakerCount, etc.) |